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