Skip to content

Commit 0ba8e91

Browse files
committed
Merge tag 'spacemit-dt-for-7.1-1' of https://github.com/spacemit-com/linux into soc/dt
RISC-V SpacemiT DT changes for 7.1 For K3 SoC - Add I2C support - Add PMIC regulator tree - Add ethernet support - Add pinctrl/GPIO/Clock - Enable full UART support For K1 SoC On Milk-V Jupiter - Enable PCIe/USB on - Enable QSPI/SPI NOR - Enable EEPROM, LEDs Others - Fix PMIC supply properties - Fix PCIe missing power regulator * tag 'spacemit-dt-for-7.1-1' of https://github.com/spacemit-com/linux: dts: riscv: spacemit: k3: add P1 PMIC regulator tree dts: riscv: spacemit: k3: Add i2c nodes riscv: dts: spacemit: enable PCIe ports on Milk-V Jupiter riscv: dts: spacemit: enable USB 3 ports on Milk-V Jupiter riscv: dts: spacemit: enable QSPI and add SPI NOR on Milk-V Jupiter riscv: dts: spacemit: add i2c aliases on Milk-V Jupiter riscv: dts: spacemit: add 24c04 eeprom on Milk-V Jupiter riscv: dts: spacemit: add LEDs for Milk-V Jupiter board riscv: dts: spacemit: Add ethernet device for K3 riscv: dts: spacemit: drop incorrect pinctrl for combo PHY riscv: dts: spacemit: reorder phy nodes for K1 riscv: dts: spacemit: k3: add full resource to UART riscv: dts: spacemit: k3: add GPIO support riscv: dts: spacemit: k3: add pinctrl support riscv: dts: spacemit: k3: add clock tree dt-bindings: serial: 8250: spacemit: fix clock property for K3 SoC riscv: dts: spacemit: Add 'linux,pci-domain' to PCIe nodes for K1 riscv: dts: spacemit: adapt regulator node name to preferred form riscv: dts: spacemit: Update PMIC supply properties for BPI-F3 and Jupiter riscv: dts: spacemit: pcie: fix missing power regulator Signed-off-by: Linus Walleij <linusw@kernel.org>
2 parents b5bfa8a + af62a09 commit 0ba8e91

7 files changed

Lines changed: 876 additions & 79 deletions

File tree

Documentation/devicetree/bindings/serial/8250.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ allOf:
6363
properties:
6464
compatible:
6565
contains:
66-
const: spacemit,k1-uart
66+
enum:
67+
- spacemit,k1-uart
68+
- spacemit,k3-uart
6769
then:
6870
properties:
6971
clock-names:
@@ -76,6 +78,7 @@ allOf:
7678
contains:
7779
enum:
7880
- spacemit,k1-uart
81+
- spacemit,k3-uart
7982
- nxp,lpc1850-uart
8083
then:
8184
required:

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

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@
3333
};
3434
};
3535

36-
pcie_vcc_3v3: pcie-vcc3v3 {
36+
pcie_vcc_3v3: regulator-pcie-vcc3v3 {
3737
compatible = "regulator-fixed";
3838
regulator-name = "PCIE_VCC3V3";
3939
regulator-min-microvolt = <3300000>;
4040
regulator-max-microvolt = <3300000>;
4141
regulator-always-on;
4242
};
4343

44-
reg_dc_in: dc-in-12v {
44+
reg_dc_in: regulator-dc-in-12v {
4545
compatible = "regulator-fixed";
4646
regulator-name = "dc_in_12v";
4747
regulator-min-microvolt = <12000000>;
@@ -50,7 +50,7 @@
5050
regulator-always-on;
5151
};
5252

53-
reg_vcc_4v: vcc-4v {
53+
reg_vcc_4v: regulator-vcc-4v {
5454
compatible = "regulator-fixed";
5555
regulator-name = "vcc_4v";
5656
regulator-min-microvolt = <4000000>;
@@ -60,7 +60,7 @@
6060
vin-supply = <&reg_dc_in>;
6161
};
6262

63-
usb3-vbus-5v {
63+
regulator-usb3-vbus-5v {
6464
compatible = "regulator-fixed";
6565
regulator-name = "USB30_VBUS";
6666
regulator-min-microvolt = <5000000>;
@@ -70,7 +70,7 @@
7070
enable-active-high;
7171
};
7272

73-
usb3_hub_5v: usb3-hub-5v {
73+
usb3_hub_5v: regulator-usb3-hub-5v {
7474
compatible = "regulator-fixed";
7575
regulator-name = "USB30_HUB";
7676
regulator-min-microvolt = <5000000>;
@@ -81,8 +81,6 @@
8181
};
8282

8383
&combo_phy {
84-
pinctrl-names = "default";
85-
pinctrl-0 = <&pcie0_3_cfg>;
8684
status = "okay";
8785
};
8886

@@ -190,7 +188,15 @@
190188
compatible = "spacemit,p1";
191189
reg = <0x41>;
192190
interrupts = <64>;
193-
vin-supply = <&reg_vcc_4v>;
191+
vin1-supply = <&reg_vcc_4v>;
192+
vin2-supply = <&reg_vcc_4v>;
193+
vin3-supply = <&reg_vcc_4v>;
194+
vin4-supply = <&reg_vcc_4v>;
195+
vin5-supply = <&reg_vcc_4v>;
196+
vin6-supply = <&reg_vcc_4v>;
197+
aldoin-supply = <&reg_vcc_4v>;
198+
dldoin1-supply = <&buck5>;
199+
dldoin2-supply = <&buck5>;
194200

195201
regulators {
196202
buck1 {
@@ -221,7 +227,7 @@
221227
regulator-always-on;
222228
};
223229

224-
buck5 {
230+
buck5: buck5 {
225231
regulator-min-microvolt = <500000>;
226232
regulator-max-microvolt = <3450000>;
227233
regulator-ramp-delay = <5000>;
@@ -305,6 +311,7 @@
305311

306312
&pcie1_port {
307313
phys = <&pcie1_phy>;
314+
vpcie3v3-supply = <&pcie_vcc_3v3>;
308315
};
309316

310317
&pcie1 {
@@ -320,6 +327,7 @@
320327

321328
&pcie2_port {
322329
phys = <&pcie2_phy>;
330+
vpcie3v3-supply = <&pcie_vcc_3v3>;
323331
};
324332

325333
&pcie2 {

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

Lines changed: 199 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,42 @@
1515
ethernet0 = &eth0;
1616
ethernet1 = &eth1;
1717
serial0 = &uart0;
18+
i2c2 = &i2c2;
19+
i2c8 = &i2c8;
1820
};
1921

2022
chosen {
2123
stdout-path = "serial0";
2224
};
2325

24-
reg_dc_in: dc-in-12v {
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 {
2554
compatible = "regulator-fixed";
2655
regulator-name = "dc_in_12v";
2756
regulator-min-microvolt = <12000000>;
@@ -30,7 +59,7 @@
3059
regulator-always-on;
3160
};
3261

33-
reg_vcc_4v: vcc-4v {
62+
reg_vcc_4v: regulator-vcc-4v {
3463
compatible = "regulator-fixed";
3564
regulator-name = "vcc_4v";
3665
regulator-min-microvolt = <4000000>;
@@ -39,6 +68,41 @@
3968
regulator-always-on;
4069
vin-supply = <&reg_dc_in>;
4170
};
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";
42106
};
43107

44108
&eth0 {
@@ -91,6 +155,28 @@
91155
status = "okay";
92156
};
93157

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+
94180
&i2c8 {
95181
pinctrl-0 = <&i2c8_cfg>;
96182
pinctrl-names = "default";
@@ -100,7 +186,15 @@
100186
compatible = "spacemit,p1";
101187
reg = <0x41>;
102188
interrupts = <64>;
103-
vin-supply = <&reg_vcc_4v>;
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>;
104198

105199
regulators {
106200
buck1 {
@@ -124,14 +218,14 @@
124218
regulator-always-on;
125219
};
126220

127-
buck4 {
221+
buck4_3v3: buck4 {
128222
regulator-min-microvolt = <500000>;
129223
regulator-max-microvolt = <3300000>;
130224
regulator-ramp-delay = <5000>;
131225
regulator-always-on;
132226
};
133227

134-
buck5 {
228+
buck5: buck5 {
135229
regulator-min-microvolt = <500000>;
136230
regulator-max-microvolt = <3450000>;
137231
regulator-ramp-delay = <5000>;
@@ -207,8 +301,108 @@
207301
};
208302
};
209303

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@a00000 {
371+
reg = <0xa0000 0x760000>;
372+
};
373+
};
374+
};
375+
};
376+
210377
&uart0 {
211378
pinctrl-names = "default";
212379
pinctrl-0 = <&uart0_2_cfg>;
213380
status = "okay";
214381
};
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+
};

0 commit comments

Comments
 (0)