Skip to contentSkip to conversation

arm64: dts: rockchip: RockPro64: enable wifi/bt

PATCH In review Soeren Moch 2 participants 4 messages Dec 18, 2019 – Dec 21, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v3 cover arm64: dts: rockchip: RockPro64: enable wifi/bt

Enhance devicetree of the RockPro64 arm64/rockchip board to use an AP6359SA based wifi/bt combo module.

Patches 1-7 of version 2 of this patch series (to add support for the BCM4359 chipset with SDIO interface to the brcmfmac wireless network driver) are already picked up for wireless-drivers-next. So this version 3 only contains the patches 8-9 from v2.

Soeren Moch (2):
arm64: dts: rockchip: RockPro64: enable wifi module at sdio0
arm64: dts: rockchip: RockPro64: hook up bluetooth at uart0

 .../boot/dts/rockchip/rk3399-rockpro64.dts    | 50 ++++++++++++++++---
 1 file changed, 42 insertions(+), 8 deletions(-)

---
Cc: Heiko Stuebner <[email protected]>
Cc: Robin Murphy <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
--
2.17.1

#1 lore raw

PATCH v3 1/2 arm64: dts: rockchip: RockPro64: enable wifi module at sdio0

RockPro64 supports an Ampak AP6359SA based wifi/bt combo module. The BCM4359/9 wifi controller in this module is connected to sdio0, enable this interface.

Use the in-band sdio irq instead of the out-of-band wifi_host_wake_l signal since the latter is not working reliably on this board (probably due to it's PCIe WAKE# connection).

---
changes in v3:
- none
changes in v2:
- add comment about irq in commit message

Not sure where to place exactly the sdio0 node in the dts because existing sd nodes are not sorted alphabetically.

---
 .../boot/dts/rockchip/rk3399-rockpro64.dts    | 21 ++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts +14 -7
index 7f4b2eba31d4..9fa92790d6e0 100644
@@ -71,13 +71,6 @@
 		clock-names = "ext_clock";
 		pinctrl-names = "default";
 		pinctrl-0 = <&wifi_enable_h>;
-
-		/*
-		 * On the module itself this is one of these (depending
-		 * on the actual card populated):
-		 * - SDIO_RESET_L_WL_REG_ON
-		 * - PDN (power down when low)
-		 */
 		reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
 	};
 
@@ -650,6 +643,20 @@
 	status = "okay";
 };
 
+&sdio0 {
+	bus-width = <4>;
+	cap-sd-highspeed;
+	cap-sdio-irq;
+	disable-wp;
+	keep-power-in-suspend;
+	mmc-pwrseq = <&sdio_pwrseq>;
+	non-removable;
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
+	sd-uhs-sdr104;
+	status = "okay";
+};
+
 &sdmmc {
 	bus-width = <4>;
 	cap-sd-highspeed;

--
2.17.1

#2 lore raw

PATCH v3 2/2 arm64: dts: rockchip: RockPro64: hook up bluetooth at uart0

In reply to Soeren Moch

With enabled wifi support (required for firmware loading) for the Ampak AP6359SA based wifi/bt combo module we now also can enable the bluetooth part.

---
changes in v3:
- fix bluetooth clock name as reported by Robin Murphy changes in v2:
- new patch

---
 .../boot/dts/rockchip/rk3399-rockpro64.dts    | 29 ++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts +28 -1
index 9fa92790d6e0..d9206730c88c 100644
@@ -561,6 +561,20 @@
 };
 
 &pinctrl {
+	bt {
+		bt_enable_h: bt-enable-h {
+			rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		bt_host_wake_l: bt-host-wake-l {
+			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>;
+		};
+
+		bt_wake_l: bt-wake-l {
+			rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	buttons {
 		pwrbtn: pwrbtn {
 			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
@@ -729,8 +743,21 @@
 
 &uart0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_xfer &uart0_cts>;
+	pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
 	status = "okay";
+
+	bluetooth {
+		compatible = "brcm,bcm43438-bt";
+		clocks = <&rk808 1>;
+		clock-names = "lpo";
+		device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
+		host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
+		shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
+		vbat-supply = <&vcc3v3_sys>;
+		vddio-supply = <&vcc_1v8>;
+	};
 };
 
 &uart2 {

--
2.17.1

maintainer
#3 lore raw
In reply to Soeren Moch

Am Mittwoch, 18. Dezember 2019, 23:35:21 CET schrieb Soeren Moch:

Quoted 8 lines

Enhance devicetree of the RockPro64 arm64/rockchip board to use an AP6359SA based wifi/bt combo module.

Patches 1-7 of version 2 of this patch series (to add support for the BCM4359 chipset with SDIO interface to the brcmfmac wireless network driver) are already picked up for wireless-drivers-next. So this version 3 only contains the patches 8-9 from v2.

applied both for 5.6

Thanks
Heiko