Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | /* |
| 3 | * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd. |
| 4 | */ |
| 5 | |
| 6 | /dts-v1/; |
| 7 | |
| 8 | #include "dt-bindings/pwm/pwm.h" |
| 9 | #include "dt-bindings/input/input.h" |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 10 | #include "dt-bindings/usb/pd.h" |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 11 | #include "rk3399.dtsi" |
| 12 | #include "rk3399-opp.dtsi" |
| 13 | |
| 14 | / { |
| 15 | model = "Orange Pi RK3399 Board"; |
| 16 | compatible = "rockchip,rk3399-orangepi", "rockchip,rk3399"; |
| 17 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 18 | aliases { |
| 19 | mmc0 = &sdio0; |
| 20 | mmc1 = &sdmmc; |
| 21 | mmc2 = &sdhci; |
| 22 | }; |
| 23 | |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 24 | chosen { |
| 25 | stdout-path = "serial2:1500000n8"; |
| 26 | }; |
| 27 | |
| 28 | clkin_gmac: external-gmac-clock { |
| 29 | compatible = "fixed-clock"; |
| 30 | clock-frequency = <125000000>; |
| 31 | clock-output-names = "clkin_gmac"; |
| 32 | #clock-cells = <0>; |
| 33 | }; |
| 34 | |
| 35 | adc-keys { |
| 36 | compatible = "adc-keys"; |
| 37 | io-channels = <&saradc 1>; |
| 38 | io-channel-names = "buttons"; |
| 39 | keyup-threshold-microvolt = <1800000>; |
| 40 | poll-interval = <100>; |
| 41 | |
| 42 | button-up { |
| 43 | label = "Volume Up"; |
| 44 | linux,code = <KEY_VOLUMEUP>; |
| 45 | press-threshold-microvolt = <100000>; |
| 46 | }; |
| 47 | |
| 48 | button-down { |
| 49 | label = "Volume Down"; |
| 50 | linux,code = <KEY_VOLUMEDOWN>; |
| 51 | press-threshold-microvolt = <300000>; |
| 52 | }; |
| 53 | |
| 54 | back { |
| 55 | label = "Back"; |
| 56 | linux,code = <KEY_BACK>; |
| 57 | press-threshold-microvolt = <985000>; |
| 58 | }; |
| 59 | |
| 60 | menu { |
| 61 | label = "Menu"; |
| 62 | linux,code = <KEY_MENU>; |
| 63 | press-threshold-microvolt = <1314000>; |
| 64 | }; |
| 65 | }; |
| 66 | |
| 67 | dc_12v: dc-12v { |
| 68 | compatible = "regulator-fixed"; |
| 69 | regulator-name = "dc_12v"; |
| 70 | regulator-always-on; |
| 71 | regulator-boot-on; |
| 72 | regulator-min-microvolt = <12000000>; |
| 73 | regulator-max-microvolt = <12000000>; |
| 74 | }; |
| 75 | |
| 76 | keys: gpio-keys { |
| 77 | compatible = "gpio-keys"; |
| 78 | autorepeat; |
| 79 | |
| 80 | power { |
| 81 | debounce-interval = <100>; |
| 82 | gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; |
| 83 | label = "GPIO Power"; |
| 84 | linux,code = <KEY_POWER>; |
| 85 | linux,input-type = <1>; |
| 86 | pinctrl-names = "default"; |
| 87 | pinctrl-0 = <&pwr_btn>; |
| 88 | wakeup-source; |
| 89 | }; |
| 90 | }; |
| 91 | |
| 92 | sdio_pwrseq: sdio-pwrseq { |
| 93 | compatible = "mmc-pwrseq-simple"; |
| 94 | clocks = <&rk808 1>; |
| 95 | clock-names = "ext_clock"; |
| 96 | pinctrl-names = "default"; |
| 97 | pinctrl-0 = <&wifi_reg_on_h>; |
| 98 | reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; |
| 99 | }; |
| 100 | |
| 101 | /* switched by pmic_sleep */ |
| 102 | vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 { |
| 103 | compatible = "regulator-fixed"; |
| 104 | regulator-name = "vcc1v8_s3"; |
| 105 | regulator-always-on; |
| 106 | regulator-boot-on; |
| 107 | regulator-min-microvolt = <1800000>; |
| 108 | regulator-max-microvolt = <1800000>; |
| 109 | vin-supply = <&vcc_1v8>; |
| 110 | }; |
| 111 | |
| 112 | vcc3v0_sd: vcc3v0-sd { |
| 113 | compatible = "regulator-fixed"; |
| 114 | enable-active-high; |
| 115 | gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>; |
| 116 | pinctrl-names = "default"; |
| 117 | pinctrl-0 = <&sdmmc0_pwr_h>; |
| 118 | regulator-boot-on; |
| 119 | regulator-max-microvolt = <3000000>; |
| 120 | regulator-min-microvolt = <3000000>; |
| 121 | regulator-name = "vcc3v0_sd"; |
| 122 | vin-supply = <&vcc3v3_sys>; |
| 123 | }; |
| 124 | |
| 125 | vcc3v3_sys: vcc3v3-sys { |
| 126 | compatible = "regulator-fixed"; |
| 127 | regulator-name = "vcc3v3_sys"; |
| 128 | regulator-always-on; |
| 129 | regulator-boot-on; |
| 130 | regulator-min-microvolt = <3300000>; |
| 131 | regulator-max-microvolt = <3300000>; |
| 132 | vin-supply = <&vcc_sys>; |
| 133 | }; |
| 134 | |
| 135 | vcc5v0_host: vcc5v0-host-regulator { |
| 136 | compatible = "regulator-fixed"; |
| 137 | enable-active-high; |
| 138 | gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>; |
| 139 | pinctrl-names = "default"; |
| 140 | pinctrl-0 = <&vcc5v0_host_en>; |
| 141 | regulator-name = "vcc5v0_host"; |
| 142 | regulator-always-on; |
| 143 | vin-supply = <&vcc_sys>; |
| 144 | }; |
| 145 | |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 146 | vbus_typec: vbus-typec-regulator { |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 147 | compatible = "regulator-fixed"; |
| 148 | enable-active-high; |
| 149 | gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>; |
| 150 | pinctrl-names = "default"; |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 151 | pinctrl-0 = <&vcc5v0_typec_en>; |
| 152 | regulator-name = "vbus_typec"; |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 153 | vin-supply = <&vcc_sys>; |
| 154 | }; |
| 155 | |
| 156 | vcc_sys: vcc-sys { |
| 157 | compatible = "regulator-fixed"; |
| 158 | regulator-name = "vcc_sys"; |
| 159 | regulator-always-on; |
| 160 | regulator-boot-on; |
| 161 | regulator-min-microvolt = <5000000>; |
| 162 | regulator-max-microvolt = <5000000>; |
| 163 | vin-supply = <&dc_12v>; |
| 164 | }; |
| 165 | |
| 166 | vdd_log: vdd-log { |
| 167 | compatible = "pwm-regulator"; |
| 168 | pwms = <&pwm2 0 25000 1>; |
| 169 | regulator-name = "vdd_log"; |
| 170 | regulator-always-on; |
| 171 | regulator-boot-on; |
| 172 | regulator-min-microvolt = <800000>; |
| 173 | regulator-max-microvolt = <1400000>; |
| 174 | vin-supply = <&vcc_sys>; |
| 175 | }; |
| 176 | }; |
| 177 | |
| 178 | &cpu_l0 { |
| 179 | cpu-supply = <&vdd_cpu_l>; |
| 180 | }; |
| 181 | |
| 182 | &cpu_l1 { |
| 183 | cpu-supply = <&vdd_cpu_l>; |
| 184 | }; |
| 185 | |
| 186 | &cpu_l2 { |
| 187 | cpu-supply = <&vdd_cpu_l>; |
| 188 | }; |
| 189 | |
| 190 | &cpu_l3 { |
| 191 | cpu-supply = <&vdd_cpu_l>; |
| 192 | }; |
| 193 | |
| 194 | &cpu_b0 { |
| 195 | cpu-supply = <&vdd_cpu_b>; |
| 196 | }; |
| 197 | |
| 198 | &cpu_b1 { |
| 199 | cpu-supply = <&vdd_cpu_b>; |
| 200 | }; |
| 201 | |
| 202 | &emmc_phy { |
| 203 | status = "okay"; |
| 204 | }; |
| 205 | |
| 206 | &gmac { |
| 207 | assigned-clocks = <&cru SCLK_RMII_SRC>; |
| 208 | assigned-clock-parents = <&clkin_gmac>; |
| 209 | clock_in_out = "input"; |
| 210 | phy-supply = <&vcc3v3_s3>; |
| 211 | phy-mode = "rgmii"; |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 212 | phy-handle = <&rtl8211e>; |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 213 | pinctrl-names = "default"; |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 214 | pinctrl-0 = <&rgmii_pins>, <&phy_intb>, <&phy_rstb>; |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 215 | tx_delay = <0x28>; |
| 216 | rx_delay = <0x11>; |
| 217 | status = "okay"; |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 218 | |
| 219 | mdio { |
| 220 | compatible = "snps,dwmac-mdio"; |
| 221 | #address-cells = <1>; |
| 222 | #size-cells = <0>; |
| 223 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 224 | rtl8211e: ethernet-phy@1 { |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 225 | reg = <1>; |
| 226 | interrupt-parent = <&gpio3>; |
| 227 | interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>; |
| 228 | reset-assert-us = <10000>; |
| 229 | reset-deassert-us = <30000>; |
| 230 | reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; |
| 231 | }; |
| 232 | }; |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 233 | }; |
| 234 | |
| 235 | &gpu { |
| 236 | mali-supply = <&vdd_gpu>; |
| 237 | status = "okay"; |
| 238 | }; |
| 239 | |
| 240 | &hdmi { |
| 241 | ddc-i2c-bus = <&i2c3>; |
| 242 | status = "okay"; |
| 243 | }; |
| 244 | |
| 245 | &hdmi_sound { |
| 246 | status = "okay"; |
| 247 | }; |
| 248 | |
| 249 | &i2c0 { |
| 250 | clock-frequency = <400000>; |
| 251 | i2c-scl-rising-time-ns = <168>; |
| 252 | i2c-scl-falling-time-ns = <4>; |
| 253 | status = "okay"; |
| 254 | |
| 255 | rk808: pmic@1b { |
| 256 | compatible = "rockchip,rk808"; |
| 257 | reg = <0x1b>; |
| 258 | interrupt-parent = <&gpio1>; |
| 259 | interrupts = <21 IRQ_TYPE_LEVEL_LOW>; |
| 260 | #clock-cells = <1>; |
| 261 | clock-output-names = "rtc_clko_soc", "rtc_clko_wifi"; |
| 262 | pinctrl-names = "default"; |
| 263 | pinctrl-0 = <&pmic_int_l>; |
| 264 | rockchip,system-power-controller; |
| 265 | wakeup-source; |
| 266 | |
| 267 | vcc1-supply = <&vcc3v3_sys>; |
| 268 | vcc2-supply = <&vcc3v3_sys>; |
| 269 | vcc3-supply = <&vcc3v3_sys>; |
| 270 | vcc4-supply = <&vcc3v3_sys>; |
| 271 | vcc6-supply = <&vcc3v3_sys>; |
| 272 | vcc7-supply = <&vcc3v3_sys>; |
| 273 | vcc8-supply = <&vcc3v3_sys>; |
| 274 | vcc9-supply = <&vcc3v3_sys>; |
| 275 | vcc10-supply = <&vcc3v3_sys>; |
| 276 | vcc11-supply = <&vcc3v3_sys>; |
| 277 | vcc12-supply = <&vcc3v3_sys>; |
| 278 | vddio-supply = <&vcc_3v0>; |
| 279 | |
| 280 | regulators { |
| 281 | vdd_center: DCDC_REG1 { |
| 282 | regulator-name = "vdd_center"; |
| 283 | regulator-always-on; |
| 284 | regulator-boot-on; |
| 285 | regulator-min-microvolt = <700000>; |
| 286 | regulator-max-microvolt = <1500000>; |
| 287 | regulator-ramp-delay = <6001>; |
| 288 | regulator-state-mem { |
| 289 | regulator-off-in-suspend; |
| 290 | }; |
| 291 | }; |
| 292 | |
| 293 | vdd_cpu_l: DCDC_REG2 { |
| 294 | regulator-name = "vdd_cpu_l"; |
| 295 | regulator-always-on; |
| 296 | regulator-boot-on; |
| 297 | regulator-min-microvolt = <700000>; |
| 298 | regulator-max-microvolt = <1500000>; |
| 299 | regulator-ramp-delay = <6001>; |
| 300 | regulator-state-mem { |
| 301 | regulator-off-in-suspend; |
| 302 | }; |
| 303 | }; |
| 304 | |
| 305 | vcc_ddr: DCDC_REG3 { |
| 306 | regulator-name = "vcc_ddr"; |
| 307 | regulator-always-on; |
| 308 | regulator-boot-on; |
| 309 | regulator-state-mem { |
| 310 | regulator-on-in-suspend; |
| 311 | }; |
| 312 | }; |
| 313 | |
| 314 | vcc_1v8: DCDC_REG4 { |
| 315 | regulator-name = "vcc_1v8"; |
| 316 | regulator-always-on; |
| 317 | regulator-boot-on; |
| 318 | regulator-min-microvolt = <1800000>; |
| 319 | regulator-max-microvolt = <3300000>; |
| 320 | regulator-state-mem { |
| 321 | regulator-on-in-suspend; |
| 322 | regulator-suspend-microvolt = <1800000>; |
| 323 | }; |
| 324 | }; |
| 325 | |
| 326 | vcc1v8_dvp: LDO_REG1 { |
| 327 | regulator-name = "vcc1v8_dvp"; |
| 328 | regulator-always-on; |
| 329 | regulator-boot-on; |
| 330 | regulator-min-microvolt = <1800000>; |
| 331 | regulator-max-microvolt = <3400000>; |
| 332 | regulator-state-mem { |
| 333 | regulator-off-in-suspend; |
| 334 | }; |
| 335 | }; |
| 336 | |
| 337 | vcc3v0_tp: LDO_REG2 { |
| 338 | regulator-name = "vcc3v0_tp"; |
| 339 | regulator-always-on; |
| 340 | regulator-boot-on; |
| 341 | regulator-min-microvolt = <1800000>; |
| 342 | regulator-max-microvolt = <3400000>; |
| 343 | regulator-state-mem { |
| 344 | regulator-off-in-suspend; |
| 345 | }; |
| 346 | }; |
| 347 | |
| 348 | vcc1v8_pmupll: LDO_REG3 { |
| 349 | regulator-name = "vcc1v8_pmupll"; |
| 350 | regulator-always-on; |
| 351 | regulator-boot-on; |
| 352 | regulator-min-microvolt = <800000>; |
| 353 | regulator-max-microvolt = <2500000>; |
| 354 | regulator-state-mem { |
| 355 | regulator-on-in-suspend; |
| 356 | regulator-suspend-microvolt = <1800000>; |
| 357 | }; |
| 358 | }; |
| 359 | |
| 360 | vcc_sdio: LDO_REG4 { |
| 361 | regulator-name = "vcc_sdio"; |
| 362 | regulator-always-on; |
| 363 | regulator-boot-on; |
| 364 | regulator-min-microvolt = <1800000>; |
| 365 | regulator-max-microvolt = <3400000>; |
| 366 | regulator-state-mem { |
| 367 | regulator-on-in-suspend; |
| 368 | regulator-suspend-microvolt = <3000000>; |
| 369 | }; |
| 370 | }; |
| 371 | |
| 372 | vcca3v0_codec: LDO_REG5 { |
| 373 | regulator-name = "vcca3v0_codec"; |
| 374 | regulator-always-on; |
| 375 | regulator-boot-on; |
| 376 | regulator-min-microvolt = <1800000>; |
| 377 | regulator-max-microvolt = <3400000>; |
| 378 | regulator-state-mem { |
| 379 | regulator-off-in-suspend; |
| 380 | }; |
| 381 | }; |
| 382 | |
| 383 | vcc_1v5: LDO_REG6 { |
| 384 | regulator-name = "vcc_1v5"; |
| 385 | regulator-always-on; |
| 386 | regulator-boot-on; |
| 387 | regulator-min-microvolt = <800000>; |
| 388 | regulator-max-microvolt = <2500000>; |
| 389 | regulator-state-mem { |
| 390 | regulator-on-in-suspend; |
| 391 | regulator-suspend-microvolt = <1500000>; |
| 392 | }; |
| 393 | }; |
| 394 | |
| 395 | vcca1v8_codec: LDO_REG7 { |
| 396 | regulator-name = "vcca1v8_codec"; |
| 397 | regulator-always-on; |
| 398 | regulator-boot-on; |
| 399 | regulator-min-microvolt = <800000>; |
| 400 | regulator-max-microvolt = <2500000>; |
| 401 | regulator-state-mem { |
| 402 | regulator-off-in-suspend; |
| 403 | }; |
| 404 | }; |
| 405 | |
| 406 | vcc_3v0: LDO_REG8 { |
| 407 | regulator-name = "vcc_3v0"; |
| 408 | regulator-always-on; |
| 409 | regulator-boot-on; |
| 410 | regulator-min-microvolt = <1800000>; |
| 411 | regulator-max-microvolt = <3400000>; |
| 412 | regulator-state-mem { |
| 413 | regulator-on-in-suspend; |
| 414 | regulator-suspend-microvolt = <3000000>; |
| 415 | }; |
| 416 | }; |
| 417 | |
| 418 | vcc3v3_s3: SWITCH_REG1 { |
| 419 | regulator-name = "vcc3v3_s3"; |
| 420 | regulator-always-on; |
| 421 | regulator-boot-on; |
| 422 | regulator-state-mem { |
| 423 | regulator-off-in-suspend; |
| 424 | }; |
| 425 | }; |
| 426 | |
| 427 | vcc3v3_s0: SWITCH_REG2 { |
| 428 | regulator-name = "vcc3v3_s0"; |
| 429 | regulator-always-on; |
| 430 | regulator-boot-on; |
| 431 | regulator-state-mem { |
| 432 | regulator-off-in-suspend; |
| 433 | }; |
| 434 | }; |
| 435 | }; |
| 436 | }; |
| 437 | |
| 438 | vdd_cpu_b: regulator@40 { |
| 439 | compatible = "silergy,syr827"; |
| 440 | reg = <0x40>; |
| 441 | fcs,suspend-voltage-selector = <1>; |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 442 | pinctrl-names = "default"; |
| 443 | pinctrl-0 = <&cpu_b_sleep>; |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 444 | regulator-name = "vdd_cpu_b"; |
| 445 | regulator-min-microvolt = <712500>; |
| 446 | regulator-max-microvolt = <1500000>; |
| 447 | regulator-ramp-delay = <1000>; |
| 448 | regulator-always-on; |
| 449 | regulator-boot-on; |
| 450 | vin-supply = <&vcc3v3_sys>; |
| 451 | |
| 452 | regulator-state-mem { |
| 453 | regulator-off-in-suspend; |
| 454 | }; |
| 455 | }; |
| 456 | |
| 457 | vdd_gpu: regulator@41 { |
| 458 | compatible = "silergy,syr828"; |
| 459 | reg = <0x41>; |
| 460 | fcs,suspend-voltage-selector = <1>; |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 461 | pinctrl-names = "default"; |
| 462 | pinctrl-0 = <&gpu_sleep>; |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 463 | regulator-name = "vdd_gpu"; |
| 464 | regulator-min-microvolt = <712500>; |
| 465 | regulator-max-microvolt = <1500000>; |
| 466 | regulator-ramp-delay = <1000>; |
| 467 | regulator-always-on; |
| 468 | regulator-boot-on; |
| 469 | vin-supply = <&vcc3v3_sys>; |
| 470 | |
| 471 | regulator-state-mem { |
| 472 | regulator-off-in-suspend; |
| 473 | }; |
| 474 | }; |
| 475 | }; |
| 476 | |
| 477 | &i2c1 { |
| 478 | i2c-scl-rising-time-ns = <450>; |
| 479 | i2c-scl-falling-time-ns = <15>; |
| 480 | status = "okay"; |
| 481 | }; |
| 482 | |
| 483 | &i2c3 { |
| 484 | i2c-scl-rising-time-ns = <450>; |
| 485 | i2c-scl-falling-time-ns = <15>; |
| 486 | status = "okay"; |
| 487 | }; |
| 488 | |
| 489 | &i2c4 { |
| 490 | clock-frequency = <400000>; |
| 491 | i2c-scl-rising-time-ns = <450>; |
| 492 | i2c-scl-falling-time-ns = <15>; |
| 493 | status = "okay"; |
| 494 | |
| 495 | ak09911@c { |
| 496 | compatible = "asahi-kasei,ak09911"; |
| 497 | reg = <0x0c>; |
| 498 | vdd-supply = <&vcc3v3_s3>; |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 499 | vid-supply = <&vcc3v3_s3>; |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 500 | }; |
| 501 | |
| 502 | mpu6500@68 { |
| 503 | compatible = "invensense,mpu6500"; |
| 504 | reg = <0x68>; |
| 505 | interrupt-parent = <&gpio1>; |
| 506 | interrupts = <RK_PC6 IRQ_TYPE_EDGE_RISING>; |
| 507 | pinctrl-names = "default"; |
| 508 | pinctrl-0 = <&gsensor_int_l>; |
| 509 | vddio-supply = <&vcc3v3_s3>; |
| 510 | }; |
| 511 | |
| 512 | lsm6ds3@6a { |
| 513 | compatible = "st,lsm6ds3"; |
| 514 | reg = <0x6a>; |
| 515 | interrupt-parent = <&gpio1>; |
| 516 | interrupts = <RK_PD0 IRQ_TYPE_EDGE_RISING>; |
| 517 | pinctrl-names = "default"; |
| 518 | pinctrl-0 = <&gyr_int_l>; |
| 519 | vdd-supply = <&vcc3v3_s3>; |
| 520 | vddio-supply = <&vcc3v3_s3>; |
| 521 | }; |
| 522 | |
| 523 | cm32181@10 { |
| 524 | compatible = "capella,cm32181"; |
| 525 | reg = <0x10>; |
| 526 | interrupt-parent = <&gpio4>; |
| 527 | interrupts = <RK_PD0 IRQ_TYPE_EDGE_RISING>; |
| 528 | pinctrl-names = "default"; |
| 529 | pinctrl-0 = <&light_int_l>; |
| 530 | vdd-supply = <&vcc3v3_s3>; |
| 531 | }; |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 532 | |
| 533 | fusb302@22 { |
| 534 | compatible = "fcs,fusb302"; |
| 535 | reg = <0x22>; |
| 536 | interrupt-parent = <&gpio1>; |
| 537 | interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>; |
| 538 | pinctrl-names = "default"; |
| 539 | pinctrl-0 = <&chg_cc_int_l>; |
| 540 | vbus-supply = <&vbus_typec>; |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 541 | |
| 542 | typec_con: connector { |
| 543 | compatible = "usb-c-connector"; |
| 544 | data-role = "host"; |
| 545 | label = "USB-C"; |
| 546 | op-sink-microwatt = <1000000>; |
| 547 | power-role = "dual"; |
| 548 | sink-pdos = |
| 549 | <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>; |
| 550 | source-pdos = |
| 551 | <PDO_FIXED(5000, 1400, PDO_FIXED_USB_COMM)>; |
| 552 | try-power-role = "sink"; |
| 553 | |
| 554 | ports { |
| 555 | #address-cells = <1>; |
| 556 | #size-cells = <0>; |
| 557 | |
| 558 | port@0 { |
| 559 | reg = <0>; |
| 560 | typec_hs: endpoint { |
| 561 | remote-endpoint = <&u2phy0_typec_hs>; |
| 562 | }; |
| 563 | }; |
| 564 | port@1 { |
| 565 | reg = <1>; |
| 566 | typec_ss: endpoint { |
| 567 | remote-endpoint = <&tcphy0_typec_ss>; |
| 568 | }; |
| 569 | }; |
| 570 | port@2 { |
| 571 | reg = <2>; |
| 572 | typec_dp: endpoint { |
| 573 | remote-endpoint = <&tcphy0_typec_dp>; |
| 574 | }; |
| 575 | }; |
| 576 | }; |
| 577 | }; |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 578 | }; |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 579 | }; |
| 580 | |
| 581 | &io_domains { |
| 582 | status = "okay"; |
| 583 | bt656-supply = <&vcc_3v0>; |
| 584 | audio-supply = <&vcca1v8_codec>; |
| 585 | sdmmc-supply = <&vcc_sdio>; |
| 586 | gpio1830-supply = <&vcc_3v0>; |
| 587 | }; |
| 588 | |
| 589 | &pmu_io_domains { |
| 590 | status = "okay"; |
| 591 | pmu1830-supply = <&vcc_3v0>; |
| 592 | }; |
| 593 | |
| 594 | &pinctrl { |
| 595 | buttons { |
| 596 | pwr_btn: pwr-btn { |
| 597 | rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>; |
| 598 | }; |
| 599 | }; |
| 600 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 601 | gmac { |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 602 | phy_intb: phy-intb { |
| 603 | rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>; |
| 604 | }; |
| 605 | |
| 606 | phy_rstb: phy-rstb { |
| 607 | rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; |
| 608 | }; |
| 609 | }; |
| 610 | |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 611 | pmic { |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 612 | cpu_b_sleep: cpu-b-sleep { |
| 613 | rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>; |
| 614 | }; |
| 615 | |
| 616 | gpu_sleep: gpu-sleep { |
| 617 | rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>; |
| 618 | }; |
| 619 | |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 620 | pmic_int_l: pmic-int-l { |
| 621 | rockchip,pins = |
| 622 | <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>; |
| 623 | }; |
| 624 | }; |
| 625 | |
| 626 | sd { |
| 627 | sdmmc0_pwr_h: sdmmc0-pwr-h { |
| 628 | rockchip,pins = |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 629 | <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 630 | }; |
| 631 | }; |
| 632 | |
| 633 | usb2 { |
| 634 | vcc5v0_host_en: vcc5v0-host-en { |
| 635 | rockchip,pins = |
| 636 | <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>; |
| 637 | }; |
| 638 | |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 639 | vcc5v0_typec_en: vcc5v0-typec-en { |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 640 | rockchip,pins = |
| 641 | <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; |
| 642 | }; |
| 643 | }; |
| 644 | |
| 645 | sdio-pwrseq { |
| 646 | wifi_reg_on_h: wifi-reg-on-h { |
| 647 | rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; |
| 648 | }; |
| 649 | }; |
| 650 | |
| 651 | wifi { |
| 652 | wifi_host_wake_l: wifi-host-wake-l { |
| 653 | rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; |
| 654 | }; |
| 655 | }; |
| 656 | |
| 657 | bluetooth { |
| 658 | bt_reg_on_h: bt-enable-h { |
| 659 | rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>; |
| 660 | }; |
| 661 | |
| 662 | bt_host_wake_l: bt-host-wake-l { |
| 663 | rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; |
| 664 | }; |
| 665 | |
| 666 | bt_wake_l: bt-wake-l { |
| 667 | rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; |
| 668 | }; |
| 669 | }; |
| 670 | |
| 671 | mpu6500 { |
| 672 | gsensor_int_l: gsensor-int-l { |
| 673 | rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; |
| 674 | }; |
| 675 | }; |
| 676 | |
| 677 | lsm6ds3 { |
| 678 | gyr_int_l: gyr-int-l { |
| 679 | rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>; |
| 680 | }; |
| 681 | }; |
| 682 | |
| 683 | cm32181 { |
| 684 | light_int_l: light-int-l { |
| 685 | rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>; |
| 686 | }; |
| 687 | }; |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 688 | |
| 689 | fusb302 { |
| 690 | chg_cc_int_l: chg-cc-int-l { |
| 691 | rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>; |
| 692 | }; |
| 693 | }; |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 694 | }; |
| 695 | |
| 696 | &pwm0 { |
| 697 | status = "okay"; |
| 698 | }; |
| 699 | |
| 700 | &pwm2 { |
| 701 | status = "okay"; |
| 702 | }; |
| 703 | |
| 704 | &saradc { |
| 705 | vref-supply = <&vcca1v8_s3>; |
| 706 | status = "okay"; |
| 707 | }; |
| 708 | |
| 709 | &sdhci { |
| 710 | bus-width = <8>; |
| 711 | mmc-hs400-1_8v; |
| 712 | mmc-hs400-enhanced-strobe; |
| 713 | non-removable; |
| 714 | status = "okay"; |
| 715 | }; |
| 716 | |
| 717 | &sdio0 { |
| 718 | bus-width = <4>; |
| 719 | cap-sd-highspeed; |
| 720 | cap-sdio-irq; |
| 721 | clock-frequency = <50000000>; |
| 722 | disable-wp; |
| 723 | keep-power-in-suspend; |
| 724 | max-frequency = <50000000>; |
| 725 | mmc-pwrseq = <&sdio_pwrseq>; |
| 726 | non-removable; |
| 727 | pinctrl-names = "default"; |
| 728 | pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; |
| 729 | sd-uhs-sdr104; |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 730 | #address-cells = <1>; |
| 731 | #size-cells = <0>; |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 732 | status = "okay"; |
| 733 | |
| 734 | brcmf: wifi@1 { |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 735 | reg = <1>; |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 736 | compatible = "brcm,bcm4329-fmac"; |
| 737 | interrupt-parent = <&gpio0>; |
| 738 | interrupts = <RK_PA3 GPIO_ACTIVE_HIGH>; |
| 739 | interrupt-names = "host-wake"; |
| 740 | pinctrl-names = "default"; |
| 741 | pinctrl-0 = <&wifi_host_wake_l>; |
| 742 | }; |
| 743 | }; |
| 744 | |
| 745 | &sdmmc { |
| 746 | bus-width = <4>; |
| 747 | cap-mmc-highspeed; |
| 748 | cap-sd-highspeed; |
| 749 | cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; |
| 750 | clock-frequency = <150000000>; |
| 751 | disable-wp; |
| 752 | max-frequency = <150000000>; |
| 753 | pinctrl-names = "default"; |
| 754 | pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; |
| 755 | vmmc-supply = <&vcc3v0_sd>; |
| 756 | vqmmc-supply = <&vcc_sdio>; |
| 757 | status = "okay"; |
| 758 | }; |
| 759 | |
| 760 | &tcphy0 { |
| 761 | status = "okay"; |
| 762 | }; |
| 763 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 764 | &tcphy0_dp { |
| 765 | port { |
| 766 | tcphy0_typec_dp: endpoint { |
| 767 | remote-endpoint = <&typec_dp>; |
| 768 | }; |
| 769 | }; |
| 770 | }; |
| 771 | |
| 772 | &tcphy0_usb3 { |
| 773 | port { |
| 774 | tcphy0_typec_ss: endpoint { |
| 775 | remote-endpoint = <&typec_ss>; |
| 776 | }; |
| 777 | }; |
| 778 | }; |
| 779 | |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 780 | &tcphy1 { |
| 781 | status = "okay"; |
| 782 | }; |
| 783 | |
| 784 | &tsadc { |
| 785 | rockchip,hw-tshut-mode = <1>; |
| 786 | rockchip,hw-tshut-polarity = <1>; |
| 787 | status = "okay"; |
| 788 | }; |
| 789 | |
| 790 | &u2phy0 { |
| 791 | status = "okay"; |
| 792 | |
| 793 | u2phy0_otg: otg-port { |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 794 | phy-supply = <&vbus_typec>; |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 795 | status = "okay"; |
| 796 | }; |
| 797 | |
| 798 | u2phy0_host: host-port { |
| 799 | phy-supply = <&vcc5v0_host>; |
| 800 | status = "okay"; |
| 801 | }; |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 802 | |
| 803 | port { |
| 804 | u2phy0_typec_hs: endpoint { |
| 805 | remote-endpoint = <&typec_hs>; |
| 806 | }; |
| 807 | }; |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 808 | }; |
| 809 | |
| 810 | &u2phy1 { |
| 811 | status = "okay"; |
| 812 | |
| 813 | u2phy1_otg: otg-port { |
| 814 | status = "okay"; |
| 815 | }; |
| 816 | |
| 817 | u2phy1_host: host-port { |
| 818 | phy-supply = <&vcc5v0_host>; |
| 819 | status = "okay"; |
| 820 | }; |
| 821 | }; |
| 822 | |
| 823 | &uart0 { |
| 824 | pinctrl-names = "default"; |
| 825 | pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>; |
| 826 | status = "okay"; |
| 827 | |
| 828 | bluetooth { |
| 829 | compatible = "brcm,bcm43438-bt"; |
| 830 | clocks = <&rk808 1>; |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 831 | clock-names = "lpo"; |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 832 | device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>; |
| 833 | host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>; |
| 834 | shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>; |
| 835 | pinctrl-names = "default"; |
| 836 | pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_reg_on_h>; |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 837 | vbat-supply = <&vcc3v3_sys>; |
| 838 | vddio-supply = <&vcc_1v8>; |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 839 | }; |
| 840 | }; |
| 841 | |
| 842 | &uart2 { |
| 843 | status = "okay"; |
| 844 | }; |
| 845 | |
| 846 | &usb_host0_ehci { |
| 847 | status = "okay"; |
| 848 | }; |
| 849 | |
| 850 | &usb_host0_ohci { |
| 851 | status = "okay"; |
| 852 | }; |
| 853 | |
| 854 | &usb_host1_ehci { |
| 855 | status = "okay"; |
| 856 | }; |
| 857 | |
| 858 | &usb_host1_ohci { |
| 859 | status = "okay"; |
| 860 | }; |
| 861 | |
| 862 | &usbdrd3_0 { |
| 863 | status = "okay"; |
| 864 | }; |
| 865 | |
| 866 | &usbdrd_dwc3_0 { |
| 867 | status = "okay"; |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 868 | dr_mode = "host"; |
Jagan Teki | b1fdce4 | 2019-03-11 13:50:04 +0530 | [diff] [blame] | 869 | }; |
| 870 | |
| 871 | &usbdrd3_1 { |
| 872 | status = "okay"; |
| 873 | }; |
| 874 | |
| 875 | &usbdrd_dwc3_1 { |
| 876 | status = "okay"; |
| 877 | dr_mode = "host"; |
| 878 | }; |
| 879 | |
| 880 | &vopb { |
| 881 | status = "okay"; |
| 882 | }; |
| 883 | |
| 884 | &vopb_mmu { |
| 885 | status = "okay"; |
| 886 | }; |
| 887 | |
| 888 | &vopl { |
| 889 | status = "okay"; |
| 890 | }; |
| 891 | |
| 892 | &vopl_mmu { |
| 893 | status = "okay"; |
| 894 | }; |