Debian Codegraph @

arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 // SPDX-License-Identifier: GPL-2.0 OR MIT
2 /*
3 * Copyright (C) 2024 Yangyu Chen <[email protected]>
4 */
5
6 #include "k1.dtsi"
7 #include "k1-pinctrl.dtsi"
8
9 / {
10 model = "Banana Pi BPI-F3";
11 compatible = "bananapi,bpi-f3", "spacemit,k1";
12
13 aliases {
14 ethernet0 = &eth0;
15 ethernet1 = &eth1;
16 serial0 = &uart0;
17 i2c2 = &i2c2;
18 i2c8 = &i2c8;
19 mmc0 = &emmc;
20 mmc1 = &sdhci0;
21 };
22
23 chosen {
24 stdout-path = "serial0";
25 };
26
27 leds {
28 compatible = "gpio-leds";
29
30 led1 {
31 label = "sys-led";
32 gpios = <&gpio K1_GPIO(96) GPIO_ACTIVE_HIGH>;
33 linux,default-trigger = "heartbeat";
34 default-state = "on";
35 };
36 };
37
38 pcie_vcc_3v3: regulator-pcie-vcc3v3 {
39 compatible = "regulator-fixed";
40 regulator-name = "PCIE_VCC3V3";
41 regulator-min-microvolt = <3300000>;
42 regulator-max-microvolt = <3300000>;
43 regulator-always-on;
44 };
45
46 reg_dc_in: regulator-dc-in-12v {
47 compatible = "regulator-fixed";
48 regulator-name = "dc_in_12v";
49 regulator-min-microvolt = <12000000>;
50 regulator-max-microvolt = <12000000>;
51 regulator-boot-on;
52 regulator-always-on;
53 };
54
55 reg_vcc_4v: regulator-vcc-4v {
56 compatible = "regulator-fixed";
57 regulator-name = "vcc_4v";
58 regulator-min-microvolt = <4000000>;
59 regulator-max-microvolt = <4000000>;
60 regulator-boot-on;
61 regulator-always-on;
62 vin-supply = <&reg_dc_in>;
63 };
64
65 regulator-usb3-vbus-5v {
66 compatible = "regulator-fixed";
67 regulator-name = "USB30_VBUS";
68 regulator-min-microvolt = <5000000>;
69 regulator-max-microvolt = <5000000>;
70 regulator-always-on;
71 gpio = <&gpio K1_GPIO(97) GPIO_ACTIVE_HIGH>;
72 enable-active-high;
73 };
74
75 usb3_hub_5v: regulator-usb3-hub-5v {
76 compatible = "regulator-fixed";
77 regulator-name = "USB30_HUB";
78 regulator-min-microvolt = <5000000>;
79 regulator-max-microvolt = <5000000>;
80 gpio = <&gpio K1_GPIO(123) GPIO_ACTIVE_HIGH>;
81 enable-active-high;
82 };
83 };
84
85 &combo_phy {
86 status = "okay";
87 };
88
89 &emmc {
90 bus-width = <8>;
91 mmc-hs400-1_8v;
92 mmc-hs400-enhanced-strobe;
93 non-removable;
94 no-sd;
95 no-sdio;
96 status = "okay";
97 };
98
99 &eth0 {
100 phy-handle = <&rgmii0>;
101 phy-mode = "rgmii-id";
102 pinctrl-names = "default";
103 pinctrl-0 = <&gmac0_cfg>;
104 rx-internal-delay-ps = <0>;
105 tx-internal-delay-ps = <0>;
106 status = "okay";
107
108 mdio-bus {
109 #address-cells = <0x1>;
110 #size-cells = <0x0>;
111
112 reset-gpios = <&gpio K1_GPIO(110) GPIO_ACTIVE_LOW>;
113 reset-delay-us = <10000>;
114 reset-post-delay-us = <100000>;
115
116 rgmii0: phy@1 {
117 reg = <0x1>;
118 };
119 };
120 };
121
122 &eth1 {
123 phy-handle = <&rgmii1>;
124 phy-mode = "rgmii-id";
125 pinctrl-names = "default";
126 pinctrl-0 = <&gmac1_cfg>;
127 rx-internal-delay-ps = <0>;
128 tx-internal-delay-ps = <250>;
129 status = "okay";
130
131 mdio-bus {
132 #address-cells = <0x1>;
133 #size-cells = <0x0>;
134
135 reset-gpios = <&gpio K1_GPIO(115) GPIO_ACTIVE_LOW>;
136 reset-delay-us = <10000>;
137 reset-post-delay-us = <100000>;
138
139 rgmii1: phy@1 {
140 reg = <0x1>;
141 };
142 };
143 };
144
145 &pdma {
146 status = "okay";
147 };
148
149 &qspi {
150 pinctrl-names = "default";
151 pinctrl-0 = <&qspi_cfg>;
152 status = "okay";
153 };
154
155 &i2c2 {
156 pinctrl-0 = <&i2c2_0_cfg>;
157 pinctrl-names = "default";
158 status = "okay";
159
160 eeprom@50 {
161 compatible = "atmel,24c02";
162 reg = <0x50>;
163 vcc-supply = <&buck3_1v8>; /* EEPROM_VCC1V8 */
164 pagesize = <16>;
165 read-only;
166 size = <256>;
167
168 nvmem-layout {
169 compatible = "onie,tlv-layout";
170
171 mac-address {
172 #nvmem-cell-cells = <1>;
173 };
174
175 num-macs {
176 };
177
178 serial-number {
179 };
180 };
181 };
182 };
183
184 &i2c8 {
185 pinctrl-0 = <&i2c8_cfg>;
186 pinctrl-names = "default";
187 status = "okay";
188
189 pmic@41 {
190 compatible = "spacemit,p1";
191 reg = <0x41>;
192 interrupts = <64>;
193 vin1-supply = <&reg_vcc_4v>;
194 vin2-supply = <&reg_vcc_4v>;
195 vin3-supply = <&reg_vcc_4v>;
196 vin4-supply = <&reg_vcc_4v>;
197 vin5-supply = <&reg_vcc_4v>;
198 vin6-supply = <&reg_vcc_4v>;
199 aldoin-supply = <&reg_vcc_4v>;
200 dldoin1-supply = <&buck5>;
201 dldoin2-supply = <&buck5>;
202
203 regulators {
204 buck1 {
205 regulator-min-microvolt = <500000>;
206 regulator-max-microvolt = <3450000>;
207 regulator-ramp-delay = <5000>;
208 regulator-always-on;
209 };
210
211 buck2 {
212 regulator-min-microvolt = <500000>;
213 regulator-max-microvolt = <3450000>;
214 regulator-ramp-delay = <5000>;
215 regulator-always-on;
216 };
217
218 buck3_1v8: buck3 {
219 regulator-min-microvolt = <500000>;
220 regulator-max-microvolt = <1800000>;
221 regulator-ramp-delay = <5000>;
222 regulator-always-on;
223 };
224
225 buck4: buck4 {
226 regulator-min-microvolt = <500000>;
227 regulator-max-microvolt = <3300000>;
228 regulator-ramp-delay = <5000>;
229 regulator-always-on;
230 };
231
232 buck5: buck5 {
233 regulator-min-microvolt = <500000>;
234 regulator-max-microvolt = <3450000>;
235 regulator-ramp-delay = <5000>;
236 regulator-always-on;
237 };
238
239 buck6 {
240 regulator-min-microvolt = <500000>;
241 regulator-max-microvolt = <3450000>;
242 regulator-ramp-delay = <5000>;
243 regulator-always-on;
244 };
245
246 aldo1: aldo1 {
247 regulator-min-microvolt = <500000>;
248 regulator-max-microvolt = <3400000>;
249 regulator-boot-on;
250 };
251
252 aldo2 {
253 regulator-min-microvolt = <500000>;
254 regulator-max-microvolt = <3400000>;
255 };
256
257 aldo3 {
258 regulator-min-microvolt = <500000>;
259 regulator-max-microvolt = <3400000>;
260 };
261
262 aldo4 {
263 regulator-min-microvolt = <500000>;
264 regulator-max-microvolt = <3400000>;
265 };
266
267 dldo1 {
268 regulator-min-microvolt = <500000>;
269 regulator-max-microvolt = <3400000>;
270 regulator-boot-on;
271 };
272
273 dldo2 {
274 regulator-min-microvolt = <500000>;
275 regulator-max-microvolt = <3400000>;
276 };
277
278 dldo3 {
279 regulator-min-microvolt = <500000>;
280 regulator-max-microvolt = <3400000>;
281 };
282
283 dldo4 {
284 regulator-min-microvolt = <500000>;
285 regulator-max-microvolt = <3400000>;
286 regulator-always-on;
287 };
288
289 dldo5 {
290 regulator-min-microvolt = <500000>;
291 regulator-max-microvolt = <3400000>;
292 };
293
294 dldo6 {
295 regulator-min-microvolt = <500000>;
296 regulator-max-microvolt = <3400000>;
297 regulator-always-on;
298 };
299
300 dldo7 {
301 regulator-min-microvolt = <500000>;
302 regulator-max-microvolt = <3400000>;
303 };
304 };
305 };
306 };
307
308 &pcie1_phy {
309 pinctrl-names = "default";
310 pinctrl-0 = <&pcie1_3_cfg>;
311 status = "okay";
312 };
313
314 &pcie1_port {
315 phys = <&pcie1_phy>;
316 vpcie3v3-supply = <&pcie_vcc_3v3>;
317 };
318
319 &pcie1 {
320 vpcie3v3-supply = <&pcie_vcc_3v3>;
321 status = "okay";
322 };
323
324 &pcie2_phy {
325 pinctrl-names = "default";
326 pinctrl-0 = <&pcie2_4_cfg>;
327 status = "okay";
328 };
329
330 &pcie2_port {
331 phys = <&pcie2_phy>;
332 vpcie3v3-supply = <&pcie_vcc_3v3>;
333 };
334
335 &pcie2 {
336 vpcie3v3-supply = <&pcie_vcc_3v3>;
337 status = "okay";
338 };
339
340 &uart0 {
341 pinctrl-names = "default";
342 pinctrl-0 = <&uart0_2_cfg>;
343 status = "okay";
344 };
345
346 &usbphy2 {
347 status = "okay";
348 };
349
350 &usb_dwc3 {
351 dr_mode = "host";
352 #address-cells = <1>;
353 #size-cells = <0>;
354 status = "okay";
355
356 hub_2_0: hub@1 {
357 compatible = "usb2109,2817";
358 reg = <0x1>;
359 vdd-supply = <&usb3_hub_5v>;
360 peer-hub = <&hub_3_0>;
361 reset-gpios = <&gpio K1_GPIO(124) GPIO_ACTIVE_LOW>;
362 };
363
364 hub_3_0: hub@2 {
365 compatible = "usb2109,817";
366 reg = <0x2>;
367 vdd-supply = <&usb3_hub_5v>;
368 peer-hub = <&hub_2_0>;
369 reset-gpios = <&gpio K1_GPIO(124) GPIO_ACTIVE_LOW>;
370 };
371 };
372
373 &sdhci0 {
374 pinctrl-names = "default", "uhs";
375 pinctrl-0 = <&mmc1_cfg>;
376 pinctrl-1 = <&mmc1_uhs_cfg>;
377 bus-width = <4>;
378 cd-gpios = <&gpio K1_GPIO(80) (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
379 no-mmc;
380 no-sdio;
381 disable-wp;
382 cap-sd-highspeed;
383 vmmc-supply = <&buck4>;
384 vqmmc-supply = <&aldo1>;
385 sd-uhs-sdr25;
386 sd-uhs-sdr50;
387 sd-uhs-sdr104;
388 status = "okay";
389 };