Skip to content

Commit a7e6dbd

Browse files
tomfitzhenrymmind
authored andcommitted
arm64: dts: rockchip: add BT/wifi nodes to Pinephone Pro
Pinephone Pro includes a AzureWave AW-CM256SM wifi (sdio0) and bt (uart0) combo module, which is based on Cypress CYP43455 (BCM43455). The CYP43455 datasheet ("Power-Up Sequence and Timing") documents: * needing to wait 10ms between consecutive WL_REG_ON toggles * needing to wait 110ms between power-on and SDIO access. Signed-off-by: Tom Fitzhenry <tom@tom-fitzhenry.me.uk> Reviewed-by: Ondřej Jirman <megi@xff.cz> Link: https://lore.kernel.org/r/20221002092809.451501-1-tom@tom-fitzhenry.me.uk Signed-off-by: Heiko Stuebner <heiko@sntech.de>
1 parent 0522cd8 commit a7e6dbd

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,27 @@
8181
regulator-max-microvolt = <1800000>;
8282
vin-supply = <&vcc3v3_sys>;
8383
};
84+
85+
wifi_pwrseq: sdio-wifi-pwrseq {
86+
compatible = "mmc-pwrseq-simple";
87+
clocks = <&rk818 1>;
88+
clock-names = "ext_clock";
89+
pinctrl-names = "default";
90+
pinctrl-0 = <&wifi_enable_h_pin>;
91+
/*
92+
* Wait between power-on and SDIO access for CYP43455
93+
* POR circuit.
94+
*/
95+
post-power-on-delay-ms = <110>;
96+
/*
97+
* Wait between consecutive toggles for CYP43455 CBUCK
98+
* regulator discharge.
99+
*/
100+
power-off-delay-us = <10000>;
101+
102+
/* WL_REG_ON on module */
103+
reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
104+
};
84105
};
85106

86107
&cpu_l0 {
@@ -360,11 +381,45 @@
360381
};
361382
};
362383

384+
sdio-pwrseq {
385+
wifi_enable_h_pin: wifi-enable-h-pin {
386+
rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
387+
};
388+
};
389+
363390
sound {
364391
vcc1v8_codec_en: vcc1v8-codec-en {
365392
rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>;
366393
};
367394
};
395+
396+
wireless-bluetooth {
397+
bt_wake_pin: bt-wake-pin {
398+
rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
399+
};
400+
401+
bt_host_wake_pin: bt-host-wake-pin {
402+
rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
403+
};
404+
405+
bt_reset_pin: bt-reset-pin {
406+
rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
407+
};
408+
};
409+
};
410+
411+
&sdio0 {
412+
bus-width = <4>;
413+
cap-sd-highspeed;
414+
cap-sdio-irq;
415+
disable-wp;
416+
keep-power-in-suspend;
417+
mmc-pwrseq = <&wifi_pwrseq>;
418+
non-removable;
419+
pinctrl-names = "default";
420+
pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
421+
sd-uhs-sdr104;
422+
status = "okay";
368423
};
369424

370425
&sdmmc {
@@ -393,6 +448,27 @@
393448
status = "okay";
394449
};
395450

451+
&uart0 {
452+
pinctrl-names = "default";
453+
pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
454+
uart-has-rtscts;
455+
status = "okay";
456+
457+
bluetooth {
458+
compatible = "brcm,bcm4345c5";
459+
clocks = <&rk818 1>;
460+
clock-names = "lpo";
461+
device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
462+
host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
463+
max-speed = <1500000>;
464+
pinctrl-names = "default";
465+
pinctrl-0 = <&bt_host_wake_pin &bt_wake_pin &bt_reset_pin>;
466+
shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
467+
vbat-supply = <&vcc3v3_sys>;
468+
vddio-supply = <&vcc_1v8>;
469+
};
470+
};
471+
396472
&uart2 {
397473
status = "okay";
398474
};

0 commit comments

Comments
 (0)