| 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 = ð0; |
| 16 |
ethernet1 = ð1; |
| 17 |
serial0 = &uart0; |
| 18 |
i2c2 = &i2c2; |
| 19 |
i2c8 = &i2c8; |
| 20 |
}; |
| 21 |
|
| 22 |
chosen { |
| 23 |
stdout-path = "serial0"; |
| 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 = <®_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 = <®_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 = <®_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 = <®_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 = <®_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 |
ð0 { |
| 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 |
ð1 { |
| 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 |
vin-supply = <®_vcc_4v>; |
| 190 |
|
| 191 |
regulators { |
| 192 |
buck1 { |
| 193 |
regulator-min-microvolt = <500000>; |
| 194 |
regulator-max-microvolt = <3450000>; |
| 195 |
regulator-ramp-delay = <5000>; |
| 196 |
regulator-always-on; |
| 197 |
}; |
| 198 |
|
| 199 |
buck2 { |
| 200 |
regulator-min-microvolt = <500000>; |
| 201 |
regulator-max-microvolt = <3450000>; |
| 202 |
regulator-ramp-delay = <5000>; |
| 203 |
regulator-always-on; |
| 204 |
}; |
| 205 |
|
| 206 |
buck3_1v8: buck3 { |
| 207 |
regulator-min-microvolt = <500000>; |
| 208 |
regulator-max-microvolt = <1800000>; |
| 209 |
regulator-ramp-delay = <5000>; |
| 210 |
regulator-always-on; |
| 211 |
}; |
| 212 |
|
| 213 |
buck4_3v3: buck4 { |
| 214 |
regulator-min-microvolt = <500000>; |
| 215 |
regulator-max-microvolt = <3300000>; |
| 216 |
regulator-ramp-delay = <5000>; |
| 217 |
regulator-always-on; |
| 218 |
}; |
| 219 |
|
| 220 |
buck5 { |
| 221 |
regulator-min-microvolt = <500000>; |
| 222 |
regulator-max-microvolt = <3450000>; |
| 223 |
regulator-ramp-delay = <5000>; |
| 224 |
regulator-always-on; |
| 225 |
}; |
| 226 |
|
| 227 |
buck6 { |
| 228 |
regulator-min-microvolt = <500000>; |
| 229 |
regulator-max-microvolt = <3450000>; |
| 230 |
regulator-ramp-delay = <5000>; |
| 231 |
regulator-always-on; |
| 232 |
}; |
| 233 |
|
| 234 |
aldo1 { |
| 235 |
regulator-min-microvolt = <500000>; |
| 236 |
regulator-max-microvolt = <3400000>; |
| 237 |
regulator-boot-on; |
| 238 |
}; |
| 239 |
|
| 240 |
aldo2 { |
| 241 |
regulator-min-microvolt = <500000>; |
| 242 |
regulator-max-microvolt = <3400000>; |
| 243 |
}; |
| 244 |
|
| 245 |
aldo3 { |
| 246 |
regulator-min-microvolt = <500000>; |
| 247 |
regulator-max-microvolt = <3400000>; |
| 248 |
}; |
| 249 |
|
| 250 |
aldo4 { |
| 251 |
regulator-min-microvolt = <500000>; |
| 252 |
regulator-max-microvolt = <3400000>; |
| 253 |
}; |
| 254 |
|
| 255 |
dldo1 { |
| 256 |
regulator-min-microvolt = <500000>; |
| 257 |
regulator-max-microvolt = <3400000>; |
| 258 |
regulator-boot-on; |
| 259 |
}; |
| 260 |
|
| 261 |
dldo2 { |
| 262 |
regulator-min-microvolt = <500000>; |
| 263 |
regulator-max-microvolt = <3400000>; |
| 264 |
}; |
| 265 |
|
| 266 |
dldo3 { |
| 267 |
regulator-min-microvolt = <500000>; |
| 268 |
regulator-max-microvolt = <3400000>; |
| 269 |
}; |
| 270 |
|
| 271 |
dldo4 { |
| 272 |
regulator-min-microvolt = <500000>; |
| 273 |
regulator-max-microvolt = <3400000>; |
| 274 |
regulator-always-on; |
| 275 |
}; |
| 276 |
|
| 277 |
dldo5 { |
| 278 |
regulator-min-microvolt = <500000>; |
| 279 |
regulator-max-microvolt = <3400000>; |
| 280 |
}; |
| 281 |
|
| 282 |
dldo6 { |
| 283 |
regulator-min-microvolt = <500000>; |
| 284 |
regulator-max-microvolt = <3400000>; |
| 285 |
regulator-always-on; |
| 286 |
}; |
| 287 |
|
| 288 |
dldo7 { |
| 289 |
regulator-min-microvolt = <500000>; |
| 290 |
regulator-max-microvolt = <3400000>; |
| 291 |
}; |
| 292 |
}; |
| 293 |
}; |
| 294 |
}; |
| 295 |
|
| 296 |
&pcie1_phy { |
| 297 |
pinctrl-names = "default"; |
| 298 |
pinctrl-0 = <&pcie1_3_cfg>; |
| 299 |
status = "okay"; |
| 300 |
}; |
| 301 |
|
| 302 |
&pcie1_port { |
| 303 |
phys = <&pcie1_phy>; |
| 304 |
vpcie3v3-supply = <&pcie_vcc_3v3>; |
| 305 |
}; |
| 306 |
|
| 307 |
&pcie1 { |
| 308 |
vpcie3v3-supply = <&pcie_vcc_3v3>; |
| 309 |
status = "okay"; |
| 310 |
}; |
| 311 |
|
| 312 |
&pcie2_phy { |
| 313 |
pinctrl-names = "default"; |
| 314 |
pinctrl-0 = <&pcie2_4_cfg>; |
| 315 |
status = "okay"; |
| 316 |
}; |
| 317 |
|
| 318 |
&pcie2_port { |
| 319 |
phys = <&pcie2_phy>; |
| 320 |
vpcie3v3-supply = <&pcie_vcc_3v3>; |
| 321 |
}; |
| 322 |
|
| 323 |
&pcie2 { |
| 324 |
vpcie3v3-supply = <&pcie_vcc_3v3>; |
| 325 |
status = "okay"; |
| 326 |
}; |
| 327 |
|
| 328 |
&qspi { |
| 329 |
pinctrl-names = "default"; |
| 330 |
pinctrl-0 = <&qspi_cfg>; |
| 331 |
status = "okay"; |
| 332 |
|
| 333 |
flash@0 { |
| 334 |
compatible = "jedec,spi-nor"; |
| 335 |
reg = <0>; |
| 336 |
spi-max-frequency = <26500000>; |
| 337 |
spi-rx-bus-width = <4>; |
| 338 |
spi-tx-bus-width = <4>; |
| 339 |
vcc-supply = <&buck4_3v3>; /* QSPI_VCC1833 */ |
| 340 |
m25p,fast-read; |
| 341 |
|
| 342 |
partitions { |
| 343 |
compatible = "fixed-partitions"; |
| 344 |
#address-cells = <1>; |
| 345 |
#size-cells = <1>; |
| 346 |
|
| 347 |
bootinfo@0 { |
| 348 |
reg = <0x0 0x10000>; |
| 349 |
}; |
| 350 |
private@10000 { |
| 351 |
reg = <0x10000 0x10000>; |
| 352 |
}; |
| 353 |
fsbl@20000 { |
| 354 |
reg = <0x20000 0x40000>; |
| 355 |
}; |
| 356 |
env@60000 { |
| 357 |
reg = <0x60000 0x10000>; |
| 358 |
}; |
| 359 |
opensbi@70000 { |
| 360 |
reg = <0x70000 0x30000>; |
| 361 |
}; |
| 362 |
uboot@a00000 { |
| 363 |
reg = <0xa0000 0x760000>; |
| 364 |
}; |
| 365 |
}; |
| 366 |
}; |
| 367 |
}; |
| 368 |
|
| 369 |
&uart0 { |
| 370 |
pinctrl-names = "default"; |
| 371 |
pinctrl-0 = <&uart0_2_cfg>; |
| 372 |
status = "okay"; |
| 373 |
}; |
| 374 |
|
| 375 |
&usbphy2 { |
| 376 |
status = "okay"; |
| 377 |
}; |
| 378 |
|
| 379 |
&usb_dwc3 { |
| 380 |
dr_mode = "host"; |
| 381 |
#address-cells = <1>; |
| 382 |
#size-cells = <0>; |
| 383 |
status = "okay"; |
| 384 |
|
| 385 |
hub_2_0: hub@1 { |
| 386 |
compatible = "usb2109,2817"; |
| 387 |
reg = <0x1>; |
| 388 |
vdd-supply = <&usb3_hub_5v>; |
| 389 |
peer-hub = <&hub_3_0>; |
| 390 |
reset-gpios = <&gpio K1_GPIO(124) GPIO_ACTIVE_LOW>; |
| 391 |
}; |
| 392 |
|
| 393 |
hub_3_0: hub@2 { |
| 394 |
compatible = "usb2109,817"; |
| 395 |
reg = <0x2>; |
| 396 |
vdd-supply = <&usb3_hub_5v>; |
| 397 |
peer-hub = <&hub_2_0>; |
| 398 |
reset-gpios = <&gpio K1_GPIO(124) GPIO_ACTIVE_LOW>; |
| 399 |
}; |
| 400 |
}; |