xref: /linux/scripts/dtc/include-prefixes/riscv/spacemit/k3-pico-itx.dts (revision 67f8bc848ee31831336bd478e57d2f993551902e)
1// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2/*
3 * Copyright (c) 2026 SpacemiT (Hangzhou) Technology Co. Ltd
4 * Copyright (c) 2026 Guodong Xu <guodong@riscstar.com>
5 */
6#include <dt-bindings/gpio/gpio.h>
7
8#include "k3.dtsi"
9#include "k3-pinctrl.dtsi"
10
11/ {
12	model = "SpacemiT K3 Pico-ITX";
13	compatible = "spacemit,k3-pico-itx", "spacemit,k3";
14
15	aliases {
16		ethernet0 = &eth0;
17		i2c2 = &i2c2;
18		i2c8 = &i2c8;
19		serial0 = &uart0;
20	};
21
22	chosen {
23		stdout-path = "serial0:115200n8";
24	};
25
26	memory@100000000 {
27		device_type = "memory";
28		reg = <0x1 0x00000000 0x4 0x00000000>;
29	};
30
31	reg_aux_vcc3v3: regulator-aux-vcc3v3 {
32		compatible = "regulator-fixed";
33		regulator-name = "AUX_VCC3V3";
34		regulator-min-microvolt = <3300000>;
35		regulator-max-microvolt = <3300000>;
36		regulator-always-on;
37	};
38
39	reg_aux_vcc5v: regulator-aux-vcc5v {
40		compatible = "regulator-fixed";
41		regulator-name = "AUX_VCC5V";
42		regulator-min-microvolt = <5000000>;
43		regulator-max-microvolt = <5000000>;
44		regulator-always-on;
45	};
46};
47
48&i2c2 {
49	pinctrl-names = "default";
50	pinctrl-0 = <&i2c2_1_cfg>;
51	status = "okay";
52
53	eeprom@50 {
54		compatible = "atmel,24c02";
55		reg = <0x50>;
56		pagesize = <8>;
57		read-only;
58		size = <256>;
59		status = "okay";
60
61		nvmem-layout {
62			compatible = "onie,tlv-layout";
63
64			mac-address {
65				#nvmem-cell-cells = <1>;
66			};
67
68			num-macs {
69			};
70
71			part-number {
72			};
73
74			product-name {
75			};
76
77			serial-number {
78			};
79
80		};
81	};
82};
83
84&i2c8 {
85	pinctrl-names = "default";
86	pinctrl-0 = <&i2c8_cfg>;
87	status = "okay";
88
89	p1@41 {
90		compatible = "spacemit,p1";
91		reg = <0x41>;
92		interrupts = <64 IRQ_TYPE_LEVEL_HIGH>;
93		vin1-supply = <&reg_aux_vcc5v>;
94		vin2-supply = <&reg_aux_vcc5v>;
95		vin3-supply = <&reg_aux_vcc5v>;
96		vin4-supply = <&reg_aux_vcc5v>;
97		vin5-supply = <&reg_aux_vcc5v>;
98		vin6-supply = <&reg_aux_vcc5v>;
99		aldoin-supply = <&reg_aux_vcc5v>;
100		dldoin1-supply = <&buck4>;
101		dldoin2-supply = <&buck4>;
102
103		regulators {
104			buck1: buck1 {
105				regulator-min-microvolt = <1050000>;
106				regulator-max-microvolt = <1050000>;
107				regulator-ramp-delay = <5000>;
108				regulator-always-on;
109			};
110
111			buck2: buck2 {
112				regulator-min-microvolt = <1050000>;
113				regulator-max-microvolt = <1050000>;
114				regulator-ramp-delay = <5000>;
115				regulator-always-on;
116			};
117
118			buck3: buck3 {
119				regulator-min-microvolt = <800000>;
120				regulator-max-microvolt = <800000>;
121				regulator-ramp-delay = <5000>;
122				regulator-always-on;
123			};
124
125			buck4: buck4 {
126				regulator-min-microvolt = <2100000>;
127				regulator-max-microvolt = <2100000>;
128				regulator-ramp-delay = <5000>;
129				regulator-always-on;
130			};
131
132			buck5: buck5 {
133				regulator-min-microvolt = <1800000>;
134				regulator-max-microvolt = <1800000>;
135				regulator-ramp-delay = <5000>;
136				regulator-always-on;
137			};
138
139			buck6: buck6 {
140				regulator-min-microvolt = <500000>;
141				regulator-max-microvolt = <500000>;
142				regulator-ramp-delay = <5000>;
143				regulator-always-on;
144			};
145
146			aldo1: aldo1 {
147				regulator-min-microvolt = <1800000>;
148				regulator-max-microvolt = <3300000>;
149				regulator-always-on;
150				regulator-boot-on;
151			};
152
153			aldo2: aldo2 {
154				regulator-min-microvolt = <1800000>;
155				regulator-max-microvolt = <1800000>;
156				regulator-always-on;
157				regulator-boot-on;
158			};
159
160			aldo3: aldo3 {
161				regulator-min-microvolt = <500000>;
162				regulator-max-microvolt = <3400000>;
163			};
164
165			aldo4: aldo4 {
166				regulator-min-microvolt = <3300000>;
167				regulator-max-microvolt = <3300000>;
168				regulator-always-on;
169				regulator-boot-on;
170			};
171
172			dldo1: dldo1 {
173				regulator-min-microvolt = <1200000>;
174				regulator-max-microvolt = <1200000>;
175				regulator-always-on;
176				regulator-boot-on;
177			};
178
179			dldo2: dldo2 {
180				regulator-min-microvolt = <900000>;
181				regulator-max-microvolt = <900000>;
182				regulator-always-on;
183				regulator-boot-on;
184			};
185
186			dldo3: dldo3 {
187				regulator-min-microvolt = <800000>;
188				regulator-max-microvolt = <800000>;
189				regulator-always-on;
190				regulator-boot-on;
191			};
192
193			dldo4: dldo4 {
194				regulator-min-microvolt = <1800000>;
195				regulator-max-microvolt = <1800000>;
196				regulator-boot-on;
197			};
198
199			dldo5: dldo5 {
200				regulator-min-microvolt = <1800000>;
201				regulator-max-microvolt = <1800000>;
202				regulator-always-on;
203				regulator-boot-on;
204			};
205
206			dldo6: dldo6 {
207				regulator-min-microvolt = <1800000>;
208				regulator-max-microvolt = <1800000>;
209				regulator-always-on;
210				regulator-boot-on;
211			};
212
213			dldo7: dldo7 {
214				regulator-min-microvolt = <1800000>;
215				regulator-max-microvolt = <1800000>;
216				regulator-always-on;
217				regulator-boot-on;
218			};
219		};
220	};
221};
222
223&combophy {
224	spacemit,apmu = <&syscon_apmu 0x11>;
225	status = "okay";
226};
227
228&eth0 {
229	pinctrl-names = "default";
230	pinctrl-0 = <&gmac0_rgmii_0_cfg>, <&gmac0_phy_0_cfg>;
231	phy-mode = "rgmii-id";
232	phy-handle = <&phy0>;
233	status = "okay";
234
235	mdio {
236		phy0: ethernet-phy@1 {
237			compatible = "ethernet-phy-id001c.c916";
238			reg = <1>;
239			reset-gpios = <&gpio 0 15 GPIO_ACTIVE_LOW>;
240			reset-assert-us = <10000>;
241			reset-deassert-us = <50000>;
242			realtek,aldps-enable;
243			realtek,clkout-disable;
244		};
245	};
246};
247
248&qspi_cfg {
249	qspi-pins {
250		power-source = <1800>;
251	};
252
253	qspi-cs0-pins {
254		power-source = <1800>;
255	};
256};
257
258&qspi {
259	pinctrl-names = "default";
260	pinctrl-0 = <&qspi_cfg>;
261	status = "okay";
262
263	flash@0 {
264		compatible = "jedec,spi-nor";
265		reg = <0>;
266		spi-max-frequency = <26500000>;
267		spi-rx-bus-width = <4>;
268		spi-tx-bus-width = <4>;
269		vcc-supply = <&aldo2>; /* PMIC_VCC1V8_QSPI */
270		m25p,fast-read;
271
272		partitions {
273			compatible = "fixed-partitions";
274			#address-cells = <1>;
275			#size-cells = <1>;
276
277			bootinfo@0 {
278				reg = <0x0 0x20000>;
279			};
280
281			fsbl@20000 {
282				reg = <0x20000 0x80000>;
283			};
284
285			env@a0000 {
286				reg = <0xa0000 0x10000>;
287			};
288
289			esos@b0000 {
290				reg = <0xb0000 0x100000>;
291			};
292
293			opensbi@1b0000 {
294				reg = <0x1b0000 0x60000>;
295			};
296
297			uboot@210000 {
298				reg = <0x210000 0x5f0000>;
299			};
300		};
301	};
302};
303
304&uart0 {
305	pinctrl-names = "default";
306	pinctrl-0 = <&uart0_0_cfg>;
307	status = "okay";
308};
309
310&usb2_host {
311	#address-cells = <1>;
312	#size-cells = <0>;
313	status = "okay";
314
315	hub@1 {
316		compatible = "usb1a40,0101";
317		reg = <1>;
318		vdd-supply = <&reg_aux_vcc3v3>;
319	};
320};
321
322&usb2_phy {
323	status = "okay";
324};
325
326&usb3d_u2phy {
327	status = "okay";
328};
329
330&usb3d {
331	status = "okay";
332};
333