linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] arm64: dts: rockchip: RockPro64: enable wifi/bt
@ 2019-12-18 22:35 Soeren Moch
  2019-12-18 22:35 ` [PATCH v3 1/2] arm64: dts: rockchip: RockPro64: enable wifi module at sdio0 Soeren Moch
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Soeren Moch @ 2019-12-18 22:35 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Soeren Moch, Robin Murphy, linux-arm-kernel, linux-rockchip,
	linux-kernel

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 <heiko@sntech.de>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
--
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v3 1/2] arm64: dts: rockchip: RockPro64: enable wifi module at sdio0
  2019-12-18 22:35 [PATCH v3 0/2] arm64: dts: rockchip: RockPro64: enable wifi/bt Soeren Moch
@ 2019-12-18 22:35 ` Soeren Moch
  2019-12-18 22:35 ` [PATCH v3 2/2] arm64: dts: rockchip: RockPro64: hook up bluetooth at uart0 Soeren Moch
  2019-12-21 11:58 ` [PATCH v3 0/2] arm64: dts: rockchip: RockPro64: enable wifi/bt Heiko Stuebner
  2 siblings, 0 replies; 4+ messages in thread
From: Soeren Moch @ 2019-12-18 22:35 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Soeren Moch, Robin Murphy, linux-arm-kernel, linux-rockchip,
	linux-kernel

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).

Signed-off-by: Soeren Moch <smoch@web.de>
---
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.

Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 .../boot/dts/rockchip/rk3399-rockpro64.dts    | 21 ++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
index 7f4b2eba31d4..9fa92790d6e0 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
@@ -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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v3 2/2] arm64: dts: rockchip: RockPro64: hook up bluetooth at uart0
  2019-12-18 22:35 [PATCH v3 0/2] arm64: dts: rockchip: RockPro64: enable wifi/bt Soeren Moch
  2019-12-18 22:35 ` [PATCH v3 1/2] arm64: dts: rockchip: RockPro64: enable wifi module at sdio0 Soeren Moch
@ 2019-12-18 22:35 ` Soeren Moch
  2019-12-21 11:58 ` [PATCH v3 0/2] arm64: dts: rockchip: RockPro64: enable wifi/bt Heiko Stuebner
  2 siblings, 0 replies; 4+ messages in thread
From: Soeren Moch @ 2019-12-18 22:35 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Soeren Moch, Robin Murphy, linux-arm-kernel, linux-rockchip,
	linux-kernel

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.

Suggested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Soeren Moch <smoch@web.de>
---
changes in v3:
- fix bluetooth clock name as reported by Robin Murphy
changes in v2:
- new patch

Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 .../boot/dts/rockchip/rk3399-rockpro64.dts    | 29 ++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
index 9fa92790d6e0..d9206730c88c 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
@@ -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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 0/2] arm64: dts: rockchip: RockPro64: enable wifi/bt
  2019-12-18 22:35 [PATCH v3 0/2] arm64: dts: rockchip: RockPro64: enable wifi/bt Soeren Moch
  2019-12-18 22:35 ` [PATCH v3 1/2] arm64: dts: rockchip: RockPro64: enable wifi module at sdio0 Soeren Moch
  2019-12-18 22:35 ` [PATCH v3 2/2] arm64: dts: rockchip: RockPro64: hook up bluetooth at uart0 Soeren Moch
@ 2019-12-21 11:58 ` Heiko Stuebner
  2 siblings, 0 replies; 4+ messages in thread
From: Heiko Stuebner @ 2019-12-21 11:58 UTC (permalink / raw)
  To: Soeren Moch; +Cc: Robin Murphy, linux-arm-kernel, linux-rockchip, linux-kernel

Am Mittwoch, 18. Dezember 2019, 23:35:21 CET schrieb Soeren Moch:
> 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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-21 11:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18 22:35 [PATCH v3 0/2] arm64: dts: rockchip: RockPro64: enable wifi/bt Soeren Moch
2019-12-18 22:35 ` [PATCH v3 1/2] arm64: dts: rockchip: RockPro64: enable wifi module at sdio0 Soeren Moch
2019-12-18 22:35 ` [PATCH v3 2/2] arm64: dts: rockchip: RockPro64: hook up bluetooth at uart0 Soeren Moch
2019-12-21 11:58 ` [PATCH v3 0/2] arm64: dts: rockchip: RockPro64: enable wifi/bt Heiko Stuebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).