Debian Codegraph @

arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts

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