arm64: dts: rockchip: Add nodes for SDIO/UART Wi-Fi/Bluetooth modules to Radxa Rock 3A
authorShengyu Qu <wiagn233@outlook.com>
Sat, 29 Oct 2022 17:09:08 +0000 (01:09 +0800)
committerHeiko Stuebner <heiko@sntech.de>
Sun, 30 Oct 2022 19:40:42 +0000 (20:40 +0100)
This patch adds related bus/pinctrl/power nodes to enable support for
Radxa's Wi-Fi Bluetooth combo module.
Tested with RADXA A6 module, which uses AP6275S (BCM43752A2)

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Link: https://lore.kernel.org/r/OS3P286MB25972313C916A68698B1CD8698359@OS3P286MB2597.JPNP286.PROD.OUTLOOK.COM
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts

index c932ca4..ef9b490 100644 (file)
                };
        };
 
+       sdio_pwrseq: sdio-pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               clocks = <&rk809 1>;
+               clock-names = "ext_clock";
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_enable>;
+               post-power-on-delay-ms = <100>;
+               power-off-delay-us = <5000000>;
+               reset-gpios = <&gpio3 RK_PD4 GPIO_ACTIVE_LOW>;
+       };
+
        vcc12v_dcin: vcc12v-dcin-regulator {
                compatible = "regulator-fixed";
                regulator-name = "vcc12v_dcin";
                        rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
+
+       bt {
+               bt_enable: bt-enable {
+                       rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+
+               bt_host_wake: bt-host-wake {
+                       rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down>;
+               };
+
+               bt_wake: bt-wake {
+                       rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
+       sdio-pwrseq {
+               wifi_enable: wifi-enable {
+                       rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
 };
 
 &pmu_io_domains {
        status = "okay";
 };
 
+&sdmmc2 {
+       supports-sdio;
+       bus-width = <4>;
+       disable-wp;
+       cap-sd-highspeed;
+       cap-sdio-irq;
+       keep-power-in-suspend;
+       mmc-pwrseq = <&sdio_pwrseq>;
+       non-removable;
+       pinctrl-names = "default";
+       pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
+       sd-uhs-sdr104;
+       vmmc-supply = <&vcc3v3_sys>;
+       vqmmc-supply = <&vcc_1v8>;
+       status = "okay";
+};
+
 &tsadc {
        rockchip,hw-tshut-mode = <1>;
        rockchip,hw-tshut-polarity = <0>;
        status = "okay";
 };
 
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn &uart1m0_rtsn>;
+       uart-has-rtscts;
+       status = "okay";
+
+       bluetooth {
+               compatible = "brcm,bcm43438-bt";
+               clocks = <&rk809 1>;
+               clock-names = "lpo";
+               device-wakeup-gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>;
+               host-wakeup-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>;
+               shutdown-gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&bt_host_wake &bt_wake &bt_enable>;
+               vbat-supply = <&vcc3v3_sys>;
+               vddio-supply = <&vcc_1v8>;
+               /* vddio comes from regulator on module, use IO bank voltage instead */
+       };
+};
+
 &uart2 {
        status = "okay";
 };