Debian Codegraph @

scripts/dtc/include-prefixes/riscv/spacemit/k1-bananapi-f3.dts

raw
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: regulator-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: regulator-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: regulator-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 regulator-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: regulator-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 pinctrl-names = "default";
85 pinctrl-0 = <&pcie0_3_cfg>;
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 vin-supply = <&reg_vcc_4v>;
194
195 regulators {
196 buck1 {
197 regulator-min-microvolt = <500000>;
198 regulator-max-microvolt = <3450000>;
199 regulator-ramp-delay = <5000>;
200 regulator-always-on;
201 };
202
203 buck2 {
204 regulator-min-microvolt = <500000>;
205 regulator-max-microvolt = <3450000>;
206 regulator-ramp-delay = <5000>;
207 regulator-always-on;
208 };
209
210 buck3_1v8: buck3 {
211 regulator-min-microvolt = <500000>;
212 regulator-max-microvolt = <1800000>;
213 regulator-ramp-delay = <5000>;
214 regulator-always-on;
215 };
216
217 buck4 {
218 regulator-min-microvolt = <500000>;
219 regulator-max-microvolt = <3300000>;
220 regulator-ramp-delay = <5000>;
221 regulator-always-on;
222 };
223
224 buck5 {
225 regulator-min-microvolt = <500000>;
226 regulator-max-microvolt = <3450000>;
227 regulator-ramp-delay = <5000>;
228 regulator-always-on;
229 };
230
231 buck6 {
232 regulator-min-microvolt = <500000>;
233 regulator-max-microvolt = <3450000>;
234 regulator-ramp-delay = <5000>;
235 regulator-always-on;
236 };
237
238 aldo1 {
239 regulator-min-microvolt = <500000>;
240 regulator-max-microvolt = <3400000>;
241 regulator-boot-on;
242 };
243
244 aldo2 {
245 regulator-min-microvolt = <500000>;
246 regulator-max-microvolt = <3400000>;
247 };
248
249 aldo3 {
250 regulator-min-microvolt = <500000>;
251 regulator-max-microvolt = <3400000>;
252 };
253
254 aldo4 {
255 regulator-min-microvolt = <500000>;
256 regulator-max-microvolt = <3400000>;
257 };
258
259 dldo1 {
260 regulator-min-microvolt = <500000>;
261 regulator-max-microvolt = <3400000>;
262 regulator-boot-on;
263 };
264
265 dldo2 {
266 regulator-min-microvolt = <500000>;
267 regulator-max-microvolt = <3400000>;
268 };
269
270 dldo3 {
271 regulator-min-microvolt = <500000>;
272 regulator-max-microvolt = <3400000>;
273 };
274
275 dldo4 {
276 regulator-min-microvolt = <500000>;
277 regulator-max-microvolt = <3400000>;
278 regulator-always-on;
279 };
280
281 dldo5 {
282 regulator-min-microvolt = <500000>;
283 regulator-max-microvolt = <3400000>;
284 };
285
286 dldo6 {
287 regulator-min-microvolt = <500000>;
288 regulator-max-microvolt = <3400000>;
289 regulator-always-on;
290 };
291
292 dldo7 {
293 regulator-min-microvolt = <500000>;
294 regulator-max-microvolt = <3400000>;
295 };
296 };
297 };
298 };
299
300 &pcie1_phy {
301 pinctrl-names = "default";
302 pinctrl-0 = <&pcie1_3_cfg>;
303 status = "okay";
304 };
305
306 &pcie1_port {
307 phys = <&pcie1_phy>;
308 };
309
310 &pcie1 {
311 vpcie3v3-supply = <&pcie_vcc_3v3>;
312 status = "okay";
313 };
314
315 &pcie2_phy {
316 pinctrl-names = "default";
317 pinctrl-0 = <&pcie2_4_cfg>;
318 status = "okay";
319 };
320
321 &pcie2_port {
322 phys = <&pcie2_phy>;
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 };