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