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