Debian Codegraph @

scripts/dtc/include-prefixes/arm64/rockchip/rk3308-bpi-p2-pro.dts

raw
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3 /dts-v1/;
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/leds/common.h>
7 #include "rk3308.dtsi"
8
9 / {
10 model = "Banana Pi P2 Pro (RK3308) Board";
11 compatible = "sinovoip,rk3308-bpi-p2pro", "rockchip,rk3308";
12
13 aliases {
14 ethernet0 = &gmac;
15 mmc0 = &emmc;
16 mmc1 = &sdmmc;
17 mmc2 = &sdio;
18 };
19
20 chosen {
21 stdout-path = "serial2:1500000n8";
22 };
23
24 adc-keys {
25 compatible = "adc-keys";
26 io-channels = <&saradc 1>;
27 io-channel-names = "buttons";
28 keyup-threshold-microvolt = <1800000>;
29 poll-interval = <100>;
30
31 button-recovery {
32 label = "Recovery";
33 linux,code = <KEY_VENDOR>;
34 press-threshold-microvolt = <10000>;
35 };
36 };
37
38 analog-sound {
39 compatible = "audio-graph-card";
40 label = "rockchip,rk3308";
41
42 dais = <&i2s_8ch_2_p0>;
43 pinctrl-names = "default";
44 pinctrl-0 = <&phone_ctl>;
45 };
46
47 leds {
48 compatible = "gpio-leds";
49 pinctrl-names = "default";
50 pinctrl-0 = <&led_en0>, <&led_en1>;
51
52 blue-led {
53 color = <LED_COLOR_ID_BLUE>;
54 default-state = "on";
55 function = LED_FUNCTION_POWER;
56 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
57 label = "blue:power";
58 linux,default-trigger = "default-on";
59 };
60
61 green-led {
62 color = <LED_COLOR_ID_GREEN>;
63 default-state = "on";
64 function = LED_FUNCTION_HEARTBEAT;
65 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
66 label = "green:heartbeat";
67 linux,default-trigger = "heartbeat";
68 };
69 };
70
71 vdd_log: regulator-1v04-vdd-log {
72 compatible = "regulator-fixed";
73 regulator-name = "vdd_log";
74 regulator-always-on;
75 regulator-boot-on;
76 regulator-min-microvolt = <1040000>;
77 regulator-max-microvolt = <1040000>;
78 vin-supply = <&vcc_in>;
79 };
80
81 vcc_ddr: regulator-1v5-vcc-ddr {
82 compatible = "regulator-fixed";
83 regulator-name = "vcc_ddr";
84 regulator-always-on;
85 regulator-boot-on;
86 regulator-min-microvolt = <1500000>;
87 regulator-max-microvolt = <1500000>;
88 vin-supply = <&vcc_in>;
89 };
90
91 vcc_1v8: regulator-1v8-vcc {
92 compatible = "regulator-fixed";
93 regulator-name = "vcc_1v8";
94 regulator-always-on;
95 regulator-boot-on;
96 regulator-min-microvolt = <1800000>;
97 regulator-max-microvolt = <1800000>;
98 vin-supply = <&vcc_io>;
99 };
100
101 vcc_io: regulator-3v3-vcc-io {
102 compatible = "regulator-fixed";
103 regulator-name = "vcc_io";
104 regulator-always-on;
105 regulator-boot-on;
106 regulator-min-microvolt = <3300000>;
107 regulator-max-microvolt = <3300000>;
108 vin-supply = <&vcc_in>;
109 };
110
111 vcc_in: regulator-5v0-vcc-in {
112 compatible = "regulator-fixed";
113 regulator-name = "vcc_in";
114 regulator-always-on;
115 regulator-boot-on;
116 regulator-min-microvolt = <5000000>;
117 regulator-max-microvolt = <5000000>;
118 };
119
120 vdd_core: regulator-vdd-core {
121 compatible = "pwm-regulator";
122 pwms = <&pwm0 0 5000 1>;
123 pwm-supply = <&vcc_in>;
124 regulator-name = "vdd_core";
125 regulator-always-on;
126 regulator-boot-on;
127 regulator-min-microvolt = <827000>;
128 regulator-max-microvolt = <1340000>;
129 regulator-settling-time-up-us = <250>;
130 };
131
132 sdio_pwrseq: sdio-pwrseq {
133 compatible = "mmc-pwrseq-simple";
134 pinctrl-0 = <&wifi_reg_on>;
135 pinctrl-names = "default";
136 reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
137 };
138 };
139
140 &codec {
141 status = "okay";
142
143 port {
144 codec_p0_0: endpoint {
145 remote-endpoint = <&i2s_8ch_2_p0_0>;
146 };
147 };
148 };
149
150 &cpu0 {
151 cpu-supply = <&vdd_core>;
152 };
153
154 &emmc {
155 cap-mmc-highspeed;
156 mmc-hs200-1_8v;
157 no-sd;
158 no-sdio;
159 non-removable;
160 pinctrl-names = "default";
161 pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_pwren>;
162 status = "okay";
163 };
164
165 &gmac {
166 assigned-clocks = <&cru SCLK_MAC>;
167 assigned-clock-parents = <&mac_clkin>;
168 clock_in_out = "input";
169 phy-handle = <&rtl8201f>;
170 phy-supply = <&vcc_io>;
171 status = "okay";
172
173 mdio {
174 #address-cells = <1>;
175 #size-cells = <0>;
176 compatible = "snps,dwmac-mdio";
177
178 rtl8201f: ethernet-phy@1 {
179 compatible = "ethernet-phy-ieee802.3-c22";
180 reg = <1>;
181 pinctrl-names = "default";
182 pinctrl-0 = <&mac_rst>;
183 reset-assert-us = <50000>;
184 reset-deassert-us = <50000>;
185 reset-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
186 };
187 };
188 };
189
190 &i2s_8ch_2 {
191 #sound-dai-cells = <0>;
192 status = "okay";
193
194 i2s_8ch_2_p0: port {
195 i2s_8ch_2_p0_0: endpoint {
196 dai-format = "i2s";
197 mclk-fs = <256>;
198 remote-endpoint = <&codec_p0_0>;
199 };
200 };
201 };
202
203 &io_domains {
204 vccio0-supply = <&vcc_io>;
205 vccio1-supply = <&vcc_io>;
206 vccio2-supply = <&vcc_io>;
207 vccio3-supply = <&vcc_io>;
208 vccio4-supply = <&vcc_1v8>;
209 vccio5-supply = <&vcc_io>;
210 status = "okay";
211 };
212
213 &pinctrl {
214 pinctrl-names = "default";
215 pinctrl-0 = <&rtc_32k>;
216
217 bt {
218 bt_reg_on: bt-reg-on {
219 rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
220 };
221
222 bt_wake_host: bt-wake-host {
223 rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
224 };
225
226 host_wake_bt: host-wake-bt {
227 rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
228 };
229 };
230
231 gmac {
232 mac_rst: mac-rst {
233 rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
234 };
235 };
236
237 leds {
238 led_en0: led-en0 {
239 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
240 };
241
242 led_en1: led-en1 {
243 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
244 };
245 };
246
247 sound {
248 phone_ctl: phone-ctl {
249 rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
250 };
251 };
252
253 wifi {
254 wifi_reg_on: wifi-reg-on {
255 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
256 };
257
258 wifi_wake_host: wifi-wake-host {
259 rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
260 };
261 };
262 };
263
264 &pwm0 {
265 pinctrl-names = "default";
266 pinctrl-0 = <&pwm0_pin_pull_down>;
267 status = "okay";
268 };
269
270 &saradc {
271 vref-supply = <&vcc_1v8>;
272 status = "okay";
273 };
274
275 /* WIFI part of the AP6256 connected with SDIO */
276 &sdio {
277 #address-cells = <1>;
278 #size-cells = <0>;
279 cap-sd-highspeed;
280 cap-sdio-irq;
281 disable-wp;
282 keep-power-in-suspend;
283 mmc-pwrseq = <&sdio_pwrseq>;
284 no-mmc;
285 no-sd;
286 non-removable;
287 sd-uhs-sdr104;
288 status = "okay";
289
290 ap6256: wifi@1 {
291 compatible = "brcm,bcm43456-fmac", "brcm,bcm4329-fmac";
292 reg = <1>;
293 interrupt-parent = <&gpio0>;
294 interrupts = <RK_PA0 IRQ_TYPE_LEVEL_HIGH>;
295 interrupt-names = "host-wake";
296 pinctrl-names = "default";
297 pinctrl-0 = <&wifi_wake_host>;
298 };
299 };
300
301 &sdmmc {
302 cap-mmc-highspeed;
303 cap-sd-highspeed;
304 disable-wp;
305 vmmc-supply = <&vcc_io>;
306 status = "okay";
307 };
308
309 &u2phy {
310 status = "okay";
311 };
312
313 &u2phy_host {
314 status = "okay";
315 };
316
317 &u2phy_otg {
318 status = "okay";
319 };
320
321 &uart2 {
322 status = "okay";
323 };
324
325 /* BT part of the AP6256 connected with UART */
326 &uart4 {
327 uart-has-rtscts;
328 status = "okay";
329
330 bluetooth {
331 compatible = "brcm,bcm4345c5";
332 clocks = <&cru SCLK_RTC32K>;
333 clock-names = "lpo";
334 interrupt-parent = <&gpio4>;
335 interrupts = <RK_PB4 IRQ_TYPE_LEVEL_HIGH>;
336 interrupt-names = "host-wakeup";
337 device-wakeup-gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>;
338 shutdown-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
339 max-speed = <1500000>;
340 pinctrl-names = "default";
341 pinctrl-0 = <&bt_reg_on &bt_wake_host &host_wake_bt>;
342 vbat-supply = <&vcc_io>;
343 vddio-supply = <&vcc_1v8>;
344 };
345 };
346
347 &usb20_otg {
348 dr_mode = "peripheral";
349 status = "okay";
350 };
351
352 &usb_host_ehci {
353 status = "okay";
354 };
355
356 &usb_host_ohci {
357 status = "okay";
358 };
359
360 &wdt {
361 status = "okay";
362 };