Skip to contentSkip to conversation

arm64: dts: rockchip: Add AP6275S support for 9Tripod X3568 v4

PATCH Applied Coia Prant 2 participants 3 messages Jul 1 – Jul 2

Subsystems (2)
lore
Share & tools
lore

Coia Prant

author
#0 lore raw

PATCH 1/2 arm64: dts: rockchip: Add AP6275S support for 9Tripod X3568 v4

Add the missing Broadcom Wi-Fi and Bluetooth child nodes for the 9Tripod X3568 v4 board.

The Bluetooth subnode is attached to uart8 with hardware flow control enabled via RTS/CTS pins.

The Wi-Fi subnode is connected via the sdmmc2 bus.

Additionally, change the status of the i2s3_2ch node to "disabled" since the required rk3568-codec-digital driver for Bluetooth audio is currently unavailable in the mainline tree.

---
 .../dts/rockchip/rk3568-9tripod-x3568-v4.dts  | 57 +++++++++++++++++--
 1 file changed, 53 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/rockchip/rk3568-9tripod-x3568-v4.dts +53 -4
index 4db00489be40f..c3ffb3fd51cd4 100644
@@ -582,9 +582,9 @@ &i2s1_8ch {
 	status = "okay";
 };
 
-/* used for AP6275S Bluetooth Sound */
+/* required rk3568-codec-digital for AP6275S Bluetooth Sound */
 &i2s3_2ch {
-	status = "okay";
+	status = "disabled";
 };
 
 &mdio0 {
@@ -664,6 +664,20 @@ &pdm {
 };
 
 &pinctrl {
+	bluetooth {
+		bt_reg_on_h: bt-reg-on-h {
+			rockchip,pins = <3 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		bt_wake_host_h: bt-wake-host-h {
+			rockchip,pins = <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_down>;
+		};
+
+		host_wake_bt_h: host-wake-bt-h {
+			rockchip,pins = <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	leds {
 		led_work_en: led_work_en {
 			rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -699,6 +713,12 @@ vcc3v3_pcie_en_pin: vcc3v3-pcie-en-pin {
 			rockchip,pins = <3 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 	};
+
+	wifi-irq {
+		wifi_host_wake_irq: wifi-host-wake-irq {
+			rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_down>;
+		};
+	};
 };
 
 &pmu_io_domains {
@@ -759,6 +779,9 @@ &sdmmc0 {
 
 /* used for AP6275S WiFi */
 &sdmmc2 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
 	bus-width = <4>;
 	cap-sd-highspeed;
 	cap-sdio-irq;
@@ -771,6 +794,16 @@ &sdmmc2 {
 	vmmc-supply = <&vcc3v3_sys>;
 	vqmmc-supply = <&vcc_1v8>;
 	status = "okay";
+
+	wifi@1 {
+		compatible = "brcm,bcm43752-fmac", "brcm,bcm4329-fmac";
+		reg = <1>;
+		interrupt-parent = <&gpio3>;
+		interrupts = <RK_PD4 IRQ_TYPE_LEVEL_LOW>;
+		interrupt-names = "host-wake";
+		pinctrl-names = "default";
+		pinctrl-0 = <&wifi_host_wake_irq>;
+	};
 };
 
 &spdif {
@@ -798,10 +831,26 @@ &uart4 {
 	status = "okay";
 };
 
-/* used for WiFi/BT AP6275S */
+/* used for AP6275S Bluetooth */
 &uart8 {
-	pinctrl-0 = <&uart8m0_xfer &uart8m0_ctsn>;
+	dma-names = "tx", "rx";
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart8m0_xfer &uart8m0_ctsn &uart8m0_rtsn>;
+	uart-has-rtscts;
 	status = "okay";
+
+	bluetooth {
+		compatible = "brcm,bcm43438-bt";
+		clocks = <&rk809 1>;
+		clock-names = "lpo";
+		device-wakeup-gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
+		host-wakeup-gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
+		max-speed = <1500000>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&bt_reg_on_h &bt_wake_host_h &host_wake_bt_h>;
+		shutdown-gpios = <&gpio3 RK_PA0 GPIO_ACTIVE_HIGH>;
+		vddio-supply = <&vcc_1v8>;
+	};
 };
 
 &uart9 {
Signature · 1 line
2.47.3
author
#1 lore raw

PATCH 2/2 arm64: dts: rockchip: Replace deprecated 'gpio' property with 'gpios' for 9Tripod X3568 v4

The 'gpio' property for fixed regulators has been deprecated in favor of the plural 'gpios' form according to the regulator-fixed binding.

Update the USB host and USB OTG fixed regulators for the 9Tripod X3568 v4 board to use the modern 'gpios' property to conform with current devicetree binding standards.

---
 arch/arm64/boot/dts/rockchip/rk3568-9tripod-x3568-v4.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3568-9tripod-x3568-v4.dts +2 -2
index c3ffb3fd51cd4..e3f53fcf80e02 100644
@@ -205,7 +205,7 @@ vcc5v0_usb: regulator-vcc5v0-usb {
 	vcc5v0_usb_host: regulator-vcc5v0-usb-host {
 		compatible = "regulator-fixed";
 		enable-active-high;
-		gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
+		gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&vcc5v0_usb_host_en>;
 		regulator-name = "vcc5v0_usb_host";
@@ -217,7 +217,7 @@ vcc5v0_usb_host: regulator-vcc5v0-usb-host {
 	vcc5v0_usb_otg: regulator-vcc5v0-usb-otg {
 		compatible = "regulator-fixed";
 		enable-active-high;
-		gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
+		gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&vcc5v0_usb_otg_en>;
 		regulator-name = "vcc5v0_usb_otg";
Signature · 1 line
2.47.3
maintainer Applied
#2 lore raw
In reply to Coia Prant
Quoted 9 lines · Coia Prant

Add the missing Broadcom Wi-Fi and Bluetooth child nodes for the 9Tripod X3568 v4 board.

The Bluetooth subnode is attached to uart8 with hardware flow control enabled via RTS/CTS pins.

The Wi-Fi subnode is connected via the sdmmc2 bus.

[...]

Applied, thanks!

[1/2] arm64: dts: rockchip: Add AP6275S support for 9Tripod X3568 v4

      commit: 993555b5476cf02009c2ef5c21e8403baee945d1
[2/2] arm64: dts: rockchip: Replace deprecated 'gpio' property with 'gpios' for 9Tripod X3568 v4
      commit: 187e7567bfba38fc3759c0fbcd2886c5239ad415

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>