9855b9e1a600409561cce1c1d4dac66b487adb40
[openwrt/staging/linusw.git] /
1 From af5a803bf212e077e5fb7a1d4cf6be02f74a74ca Mon Sep 17 00:00:00 2001
2 From: Jagan Teki <jagan@amarulasolutions.com>
3 Date: Wed, 25 Jan 2023 21:40:23 +0530
4 Subject: [PATCH] arm64: dts: rockchip: rk3566: Enable WiFi, BT support for
5 Radxa CM3
6
7 Radxa Compute Module 3 has an onboard AW_CM256SM WiFi/BT module.
8
9 Add nodes for enabling it.
10
11 Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
12 Link: https://lore.kernel.org/r/20230125161023.12115-2-jagan@amarulasolutions.com
13 Signed-off-by: Heiko Stuebner <heiko@sntech.de>
14 ---
15 .../boot/dts/rockchip/rk3566-radxa-cm3.dtsi | 80 +++++++++++++++++++
16 1 file changed, 80 insertions(+)
17
18 --- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
19 +++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
20 @@ -66,6 +66,15 @@
21 regulator-max-microvolt = <1800000>;
22 vin-supply = <&vcc_1v8_p>;
23 };
24 +
25 + sdio_pwrseq: pwrseq-sdio {
26 + compatible = "mmc-pwrseq-simple";
27 + clocks = <&rk817 1>;
28 + clock-names = "ext_clock";
29 + pinctrl-names = "default";
30 + pinctrl-0 = <&wifi_reg_on_h>;
31 + reset-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_LOW>;
32 + };
33 };
34
35 &cpu0 {
36 @@ -287,6 +296,20 @@
37 };
38
39 &pinctrl {
40 + bluetooth {
41 + bt_host_wake_h: bt-host-wake-h {
42 + rockchip,pins = <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
43 + };
44 +
45 + bt_reg_on_h: bt-reg-on-h {
46 + rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
47 + };
48 +
49 + bt_wake_host_h: bt-wake-host-h {
50 + rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
51 + };
52 + };
53 +
54 pmic {
55 pmic_int_l: pmic-int-l {
56 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
57 @@ -298,6 +321,16 @@
58 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
59 };
60 };
61 +
62 + wifi {
63 + wifi_reg_on_h: wifi-reg-on-h {
64 + rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
65 + };
66 +
67 + wifi_host_wake_h: wifi-host-wake-h {
68 + rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
69 + };
70 + };
71 };
72
73 &pmu_io_domains {
74 @@ -318,6 +351,34 @@
75 status = "okay";
76 };
77
78 +&sdmmc1 {
79 + #address-cells = <1>;
80 + #size-cells = <0>;
81 + bus-width = <4>;
82 + disable-wp;
83 + cap-sd-highspeed;
84 + cap-sdio-irq;
85 + keep-power-in-suspend;
86 + mmc-pwrseq = <&sdio_pwrseq>;
87 + non-removable;
88 + pinctrl-names = "default";
89 + pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_clk &sdmmc1_cmd>;
90 + sd-uhs-sdr104;
91 + vmmc-supply = <&vcc_3v3>;
92 + vqmmc-supply = <&vcc_1v8>;
93 + status = "okay";
94 +
95 + wifi@1 {
96 + compatible = "brcm,bcm43455-fmac";
97 + reg = <1>;
98 + interrupt-parent = <&gpio2>;
99 + interrupts = <RK_PC1 IRQ_TYPE_LEVEL_HIGH>;
100 + interrupt-names = "host-wake";
101 + pinctrl-names = "default";
102 + pinctrl-0 = <&wifi_host_wake_h>;
103 + };
104 +};
105 +
106 &sdhci {
107 bus-width = <8>;
108 max-frequency = <200000000>;
109 @@ -330,6 +391,25 @@
110 status = "okay";
111 };
112
113 +&uart1 {
114 + pinctrl-names = "default";
115 + pinctrl-0 = <&uart1m0_ctsn &uart1m0_rtsn &uart1m0_xfer>;
116 + status = "okay";
117 +
118 + bluetooth {
119 + compatible = "brcm,bcm4345c5";
120 + clocks = <&rk817 1>;
121 + clock-names = "lpo";
122 + device-wakeup-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>;
123 + host-wakeup-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>;
124 + reset-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_LOW>;
125 + pinctrl-names = "default";
126 + pinctrl-0 = <&bt_host_wake_h &bt_reg_on_h &bt_wake_host_h>;
127 + vbat-supply = <&vcc_3v3>;
128 + vddio-supply = <&vcc_1v8>;
129 + };
130 +};
131 +
132 &usb2phy0 {
133 status = "okay";
134 };