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