1// SPDX-License-Identifier: GPL-2.0-only OR MIT 2 3/dts-v1/; 4 5#include <dt-bindings/gpio/gpio.h> 6#include <dt-bindings/regulator/richtek,rt5190a-regulator.h> 7 8#include "mt7988a.dtsi" 9 10/ { 11 chosen { 12 stdout-path = "serial0:115200n8"; 13 }; 14 15 fan: pwm-fan { 16 compatible = "pwm-fan"; 17 /* cooling level (0, 1, 2, 3) : (0% duty, 30% duty, 50% duty, 100% duty) */ 18 cooling-levels = <0 80 128 255>; 19 #cooling-cells = <2>; 20 pwms = <&pwm 0 50000>; 21 status = "okay"; 22 }; 23 24 reg_1p8v: regulator-1p8v { 25 compatible = "regulator-fixed"; 26 regulator-name = "fixed-1.8V"; 27 regulator-min-microvolt = <1800000>; 28 regulator-max-microvolt = <1800000>; 29 regulator-boot-on; 30 regulator-always-on; 31 }; 32 33 reg_3p3v: regulator-3p3v { 34 compatible = "regulator-fixed"; 35 regulator-name = "fixed-3.3V"; 36 regulator-min-microvolt = <3300000>; 37 regulator-max-microvolt = <3300000>; 38 regulator-boot-on; 39 regulator-always-on; 40 }; 41}; 42 43&cpu0 { 44 proc-supply = <&rt5190_buck3>; 45}; 46 47&cpu1 { 48 proc-supply = <&rt5190_buck3>; 49}; 50 51&cpu2 { 52 proc-supply = <&rt5190_buck3>; 53}; 54 55&cpu3 { 56 proc-supply = <&rt5190_buck3>; 57}; 58 59&cpu_thermal { 60 trips { 61 cpu_trip_hot: hot { 62 temperature = <120000>; 63 hysteresis = <2000>; 64 type = "hot"; 65 }; 66 67 cpu_trip_active_high: active-high { 68 temperature = <115000>; 69 hysteresis = <2000>; 70 type = "active"; 71 }; 72 73 cpu_trip_active_med: active-med { 74 temperature = <85000>; 75 hysteresis = <2000>; 76 type = "active"; 77 }; 78 79 cpu_trip_active_low: active-low { 80 temperature = <40000>; 81 hysteresis = <2000>; 82 type = "active"; 83 }; 84 }; 85 86 cooling-maps { 87 map-cpu-active-high { 88 /* active: set fan to cooling level 2 */ 89 cooling-device = <&fan 3 3>; 90 trip = <&cpu_trip_active_high>; 91 }; 92 93 map-cpu-active-med { 94 /* active: set fan to cooling level 1 */ 95 cooling-device = <&fan 2 2>; 96 trip = <&cpu_trip_active_med>; 97 }; 98 99 map-cpu-active-low { 100 /* active: set fan to cooling level 0 */ 101 cooling-device = <&fan 1 1>; 102 trip = <&cpu_trip_active_low>; 103 }; 104 }; 105}; 106 107&i2c0 { 108 pinctrl-names = "default"; 109 pinctrl-0 = <&i2c0_pins>; 110 status = "okay"; 111 112 rt5190a_64: rt5190a@64 { 113 compatible = "richtek,rt5190a"; 114 reg = <0x64>; 115 vin2-supply = <&rt5190_buck1>; 116 vin3-supply = <&rt5190_buck1>; 117 vin4-supply = <&rt5190_buck1>; 118 119 regulators { 120 rt5190_buck1: buck1 { 121 regulator-name = "rt5190a-buck1"; 122 regulator-min-microvolt = <5090000>; 123 regulator-max-microvolt = <5090000>; 124 regulator-allowed-modes = 125 <RT5190A_OPMODE_AUTO>, <RT5190A_OPMODE_FPWM>; 126 regulator-boot-on; 127 regulator-always-on; 128 }; 129 buck2 { 130 regulator-name = "vcore"; 131 regulator-min-microvolt = <600000>; 132 regulator-max-microvolt = <1400000>; 133 regulator-boot-on; 134 regulator-always-on; 135 }; 136 rt5190_buck3: buck3 { 137 regulator-name = "vproc"; 138 regulator-min-microvolt = <600000>; 139 regulator-max-microvolt = <1400000>; 140 regulator-boot-on; 141 }; 142 buck4 { 143 regulator-name = "rt5190a-buck4"; 144 regulator-min-microvolt = <1800000>; 145 regulator-max-microvolt = <1800000>; 146 regulator-allowed-modes = 147 <RT5190A_OPMODE_AUTO>, <RT5190A_OPMODE_FPWM>; 148 regulator-boot-on; 149 regulator-always-on; 150 }; 151 ldo { 152 regulator-name = "rt5190a-ldo"; 153 regulator-min-microvolt = <1800000>; 154 regulator-max-microvolt = <1800000>; 155 regulator-boot-on; 156 regulator-always-on; 157 }; 158 }; 159 }; 160}; 161 162&i2c2 { 163 pinctrl-names = "default"; 164 pinctrl-0 = <&i2c2_1_pins>; 165 status = "okay"; 166 167 pca9545: i2c-mux@70 { 168 compatible = "nxp,pca9545"; 169 reg = <0x70>; 170 reset-gpios = <&pio 5 GPIO_ACTIVE_LOW>; 171 #address-cells = <1>; 172 #size-cells = <0>; 173 174 i2c@0 { 175 #address-cells = <1>; 176 #size-cells = <0>; 177 reg = <0>; 178 179 pcf8563: rtc@51 { 180 compatible = "nxp,pcf8563"; 181 reg = <0x51>; 182 #clock-cells = <0>; 183 }; 184 185 eeprom@57 { 186 compatible = "atmel,24c02"; 187 reg = <0x57>; 188 size = <256>; 189 }; 190 191 }; 192 193 i2c_sfp1: i2c@1 { 194 #address-cells = <1>; 195 #size-cells = <0>; 196 reg = <1>; 197 }; 198 }; 199}; 200 201/* mPCIe SIM2 */ 202&pcie0 { 203 status = "okay"; 204}; 205 206/* mPCIe SIM3 */ 207&pcie1 { 208 status = "okay"; 209}; 210 211/* M.2 key-B SIM1 */ 212&pcie2 { 213 status = "okay"; 214}; 215 216/* M.2 key-M SSD */ 217&pcie3 { 218 status = "okay"; 219}; 220 221&pio { 222 mdio0_pins: mdio0-pins { 223 mux { 224 function = "eth"; 225 groups = "mdc_mdio0"; 226 }; 227 228 conf { 229 pins = "SMI_0_MDC", "SMI_0_MDIO"; 230 drive-strength = <8>; 231 }; 232 }; 233 234 i2c0_pins: i2c0-g0-pins { 235 mux { 236 function = "i2c"; 237 groups = "i2c0_1"; 238 }; 239 }; 240 241 i2c1_pins: i2c1-g0-pins { 242 mux { 243 function = "i2c"; 244 groups = "i2c1_0"; 245 }; 246 }; 247 248 i2c1_sfp_pins: i2c1-sfp-g0-pins { 249 mux { 250 function = "i2c"; 251 groups = "i2c1_sfp"; 252 }; 253 }; 254 255 i2c2_0_pins: i2c2-g0-pins { 256 mux { 257 function = "i2c"; 258 groups = "i2c2_0"; 259 }; 260 }; 261 262 i2c2_1_pins: i2c2-g1-pins { 263 mux { 264 function = "i2c"; 265 groups = "i2c2_1"; 266 }; 267 }; 268 269 gbe0_led0_pins: gbe0-led0-pins { 270 mux { 271 function = "led"; 272 groups = "gbe0_led0"; 273 }; 274 }; 275 276 gbe1_led0_pins: gbe1-led0-pins { 277 mux { 278 function = "led"; 279 groups = "gbe1_led0"; 280 }; 281 }; 282 283 gbe2_led0_pins: gbe2-led0-pins { 284 mux { 285 function = "led"; 286 groups = "gbe2_led0"; 287 }; 288 }; 289 290 gbe3_led0_pins: gbe3-led0-pins { 291 mux { 292 function = "led"; 293 groups = "gbe3_led0"; 294 }; 295 }; 296 297 gbe0_led1_pins: gbe0-led1-pins { 298 mux { 299 function = "led"; 300 groups = "gbe0_led1"; 301 }; 302 }; 303 304 gbe1_led1_pins: gbe1-led1-pins { 305 mux { 306 function = "led"; 307 groups = "gbe1_led1"; 308 }; 309 }; 310 311 gbe2_led1_pins: gbe2-led1-pins { 312 mux { 313 function = "led"; 314 groups = "gbe2_led1"; 315 }; 316 }; 317 318 gbe3_led1_pins: gbe3-led1-pins { 319 mux { 320 function = "led"; 321 groups = "gbe3_led1"; 322 }; 323 }; 324 325 i2p5gbe_led0_pins: 2p5gbe-led0-pins { 326 mux { 327 function = "led"; 328 groups = "2p5gbe_led0"; 329 }; 330 }; 331 332 i2p5gbe_led1_pins: 2p5gbe-led1-pins { 333 mux { 334 function = "led"; 335 groups = "2p5gbe_led1"; 336 }; 337 }; 338 339 mmc0_pins_emmc_45: mmc0-emmc-45-pins { 340 mux { 341 function = "flash"; 342 groups = "emmc_45"; 343 }; 344 }; 345 346 mmc0_pins_emmc_51: mmc0-emmc-51-pins { 347 mux { 348 function = "flash"; 349 groups = "emmc_51"; 350 }; 351 }; 352 353 mmc0_pins_sdcard: mmc0-sdcard-pins { 354 mux { 355 function = "flash"; 356 groups = "sdcard"; 357 }; 358 }; 359 360 snfi_pins: snfi-pins { 361 mux { 362 function = "flash"; 363 groups = "snfi"; 364 }; 365 }; 366 367 spi0_pins: spi0-pins { 368 mux { 369 function = "spi"; 370 groups = "spi0"; 371 }; 372 }; 373 374 spi0_flash_pins: spi0-flash-pins { 375 mux { 376 function = "spi"; 377 groups = "spi0", "spi0_wp_hold"; 378 }; 379 }; 380 381 spi2_pins: spi2-pins { 382 mux { 383 function = "spi"; 384 groups = "spi2"; 385 }; 386 }; 387 388 spi2_flash_pins: spi2-flash-pins { 389 mux { 390 function = "spi"; 391 groups = "spi2", "spi2_wp_hold"; 392 }; 393 }; 394}; 395 396&pwm { 397 status = "okay"; 398}; 399 400&serial0 { 401 status = "okay"; 402}; 403 404&spi0 { 405 pinctrl-names = "default"; 406 pinctrl-0 = <&spi0_flash_pins>; 407 status = "okay"; 408 409 spi_nand: flash@0 { 410 compatible = "spi-nand"; 411 reg = <0>; 412 spi-max-frequency = <52000000>; 413 spi-tx-bus-width = <4>; 414 spi-rx-bus-width = <4>; 415 }; 416}; 417 418&spi1 { 419 status = "okay"; 420}; 421 422&spi_nand { 423 partitions { 424 compatible = "fixed-partitions"; 425 #address-cells = <1>; 426 #size-cells = <1>; 427 428 partition@0 { 429 label = "bl2"; 430 reg = <0x0 0x200000>; 431 read-only; 432 }; 433 }; 434}; 435 436&ssusb1 { 437 status = "okay"; 438}; 439 440&tphy { 441 status = "okay"; 442}; 443 444&watchdog { 445 status = "okay"; 446}; 447 448&xsphy { 449 status = "okay"; 450}; 451