1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2022 Rockchip Electronics Co., Ltd. 4 * 5 */ 6 7#include "rk3528.dtsi" 8#include <dt-bindings/gpio/gpio.h> 9#include <dt-bindings/input/rk-input.h> 10#include <dt-bindings/pinctrl/rockchip.h> 11#include "rk-stb-ir-keymap.dtsi" 12 13/ { 14 acodec_sound: acodec-sound { 15 status = "okay"; 16 compatible = "simple-audio-card"; 17 simple-audio-card,name = "rk3528-acodec"; 18 simple-audio-card,format = "i2s"; 19 simple-audio-card,mclk-fs = <256>; 20 simple-audio-card,cpu { 21 sound-dai = <&sai2>; 22 }; 23 simple-audio-card,codec { 24 sound-dai = <&acodec>; 25 }; 26 }; 27 28 adc_keys: adc-keys { 29 status = "okay"; 30 compatible = "adc-keys"; 31 io-channels = <&saradc 1>; 32 io-channel-names = "buttons"; 33 keyup-threshold-microvolt = <1800000>; 34 poll-interval = <100>; 35 36 vol-up-key { 37 label = "volume up"; 38 linux,code = <KEY_VOLUMEUP>; 39 press-threshold-microvolt = <1750>; 40 }; 41 }; 42 43 bt_sco: bt-sco { 44 status = "disabled"; 45 compatible = "delta,dfbmcs320"; 46 #sound-dai-cells = <1>; 47 }; 48 49 bt_sound: bt-sound { 50 status = "disabled"; 51 compatible = "simple-audio-card"; 52 simple-audio-card,format = "dsp_a"; 53 simple-audio-card,bitclock-inversion = <0>; 54 simple-audio-card,mclk-fs = <256>; 55 simple-audio-card,name = "rockchip,bt"; 56 simple-audio-card,cpu { 57 sound-dai = <&sai0>; 58 }; 59 simple-audio-card,codec { 60 sound-dai = <&bt_sco 1>; 61 }; 62 }; 63 64 dc_12v: dc-12v { 65 compatible = "regulator-fixed"; 66 regulator-name = "dc_12v"; 67 regulator-always-on; 68 regulator-boot-on; 69 regulator-min-microvolt = <12000000>; 70 regulator-max-microvolt = <12000000>; 71 }; 72 73 leds: gpio-leds { 74 compatible = "gpio-leds"; 75 ir { 76 gpios = <&gpio4 RK_PB7 GPIO_ACTIVE_HIGH>; 77 linux,default-trigger = "none"; 78 default-state = "off"; 79 }; 80 net-red { 81 gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>; 82 linux,default-trigger = "none"; 83 default-state = "off"; 84 }; 85 net-green { 86 gpios = <&gpio4 RK_PC0 GPIO_ACTIVE_HIGH>; 87 linux,default-trigger = "none"; 88 default-state = "off"; 89 }; 90 pwr-red { 91 gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; 92 linux,default-trigger = "none"; 93 default-state = "off"; 94 retain-state-suspended; 95 retain-state-shutdown; 96 }; 97 pwr-green { 98 gpios = <&gpio4 RK_PC1 GPIO_ACTIVE_HIGH>; 99 linux,default-trigger = "none"; 100 default-state = "on"; 101 retain-state-suspended; 102 retain-state-shutdown; 103 }; 104 }; 105 106 hdmi_sound: hdmi-sound { 107 compatible = "rockchip,hdmi"; 108 rockchip,mclk-fs = <128>; 109 rockchip,card-name = "rockchip,hdmi"; 110 rockchip,cpu = <&sai3>; 111 rockchip,codec = <&hdmi>; 112 rockchip,jack-det; 113 }; 114 115 pdmics: dummy-codec { 116 status = "disabled"; 117 compatible = "rockchip,dummy-codec"; 118 #sound-dai-cells = <0>; 119 }; 120 121 pdm_mic_array: pdm-mic-array { 122 status = "disabled"; 123 compatible = "simple-audio-card"; 124 simple-audio-card,name = "rockchip,pdm-mic-array"; 125 simple-audio-card,cpu { 126 sound-dai = <&pdm>; 127 }; 128 simple-audio-card,codec { 129 sound-dai = <&pdmics>; 130 }; 131 }; 132 133 spdif-sound { 134 status = "okay"; 135 compatible = "simple-audio-card"; 136 simple-audio-card,name = "ROCKCHIP,SPDIF"; 137 simple-audio-card,cpu { 138 sound-dai = <&spdif_8ch>; 139 }; 140 simple-audio-card,codec { 141 sound-dai = <&spdif_out>; 142 }; 143 }; 144 145 spdif_out: spdif-out { 146 status = "okay"; 147 compatible = "linux,spdif-dit"; 148 #sound-dai-cells = <0>; 149 }; 150 151 vcc5v0_sys: vcc5v0-sys { 152 compatible = "regulator-fixed"; 153 regulator-name = "vcc5v0_sys"; 154 regulator-always-on; 155 regulator-boot-on; 156 regulator-min-microvolt = <5000000>; 157 regulator-max-microvolt = <5000000>; 158 vin-supply = <&dc_12v>; 159 }; 160 161 vcc5v0_host: vcc5v0-host-regulator { 162 compatible = "regulator-fixed"; 163 regulator-name = "vcc5v0_host"; 164 regulator-boot-on; 165 regulator-always-on; 166 regulator-min-microvolt = <5000000>; 167 regulator-max-microvolt = <5000000>; 168 enable-active-high; 169 gpio = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; 170 vin-supply = <&vcc5v0_sys>; 171 pinctrl-names = "default"; 172 pinctrl-0 = <&vcc5v0_host_en>; 173 }; 174 175 vdd_logic: vdd-logic { 176 compatible = "pwm-regulator"; 177 pwms = <&pwm2 0 5000 1>; 178 regulator-name = "vdd_logic"; 179 regulator-min-microvolt = <703000>; 180 regulator-max-microvolt = <1006000>; 181 regulator-init-microvolt = <900000>; 182 regulator-always-on; 183 regulator-boot-on; 184 regulator-settling-time-up-us = <250>; 185 pwm-supply = <&vcc5v0_sys>; 186 status = "okay"; 187 }; 188 189 vdd_cpu: vdd-cpu { 190 compatible = "pwm-regulator"; 191 pwms = <&pwm1 0 5000 1>; 192 regulator-name = "vdd_cpu"; 193 regulator-min-microvolt = <746000>; 194 regulator-max-microvolt = <1201000>; 195 regulator-init-microvolt = <953000>; 196 regulator-always-on; 197 regulator-boot-on; 198 regulator-settling-time-up-us = <250>; 199 pwm-supply = <&vcc5v0_sys>; 200 status = "okay"; 201 }; 202 203 vdd_0v9_s3: vdd-0v9-s3 { 204 compatible = "regulator-fixed"; 205 regulator-name = "vdd_0v9_s3"; 206 regulator-always-on; 207 regulator-boot-on; 208 regulator-min-microvolt = <900000>; 209 regulator-max-microvolt = <900000>; 210 vin-supply = <&vcc5v0_sys>; 211 }; 212 213 vdd_1v8_s3: vdd-1v8-s3 { 214 compatible = "regulator-fixed"; 215 regulator-name = "vdd_1v8_s3"; 216 regulator-always-on; 217 regulator-boot-on; 218 regulator-min-microvolt = <1800000>; 219 regulator-max-microvolt = <1800000>; 220 vin-supply = <&vcc5v0_sys>; 221 }; 222 223 vcc_3v3_s3: vcc-3v3-s3 { 224 compatible = "regulator-fixed"; 225 regulator-name = "vcc_3v3_s3"; 226 regulator-always-on; 227 regulator-boot-on; 228 regulator-min-microvolt = <3300000>; 229 regulator-max-microvolt = <3300000>; 230 vin-supply = <&vcc5v0_sys>; 231 }; 232 233 vcc_ddr_s3: vcc-ddr-s3 { 234 compatible = "regulator-fixed"; 235 regulator-name = "vcc_ddr_s3"; 236 regulator-always-on; 237 regulator-boot-on; 238 regulator-min-microvolt = <1200000>; 239 regulator-max-microvolt = <1200000>; 240 vin-supply = <&vcc5v0_sys>; 241 }; 242}; 243 244&acodec { 245 pa-ctl-gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; 246 status = "okay"; 247}; 248 249&avsd { 250 status = "okay"; 251}; 252 253&cpu0 { 254 cpu-supply = <&vdd_cpu>; 255}; 256 257&crypto { 258 status = "okay"; 259}; 260 261&dfi { 262 status = "okay"; 263}; 264 265&display_subsystem { 266 status = "okay"; 267}; 268 269&dmc { 270 center-supply = <&vdd_logic>; 271 status = "okay"; 272}; 273 274&gmac0 { 275 status = "okay"; 276}; 277 278&gpu { 279 mali-supply = <&vdd_logic>; 280 status = "okay"; 281}; 282 283&gpu_bus { 284 bus-supply = <&vdd_logic>; 285 status = "okay"; 286}; 287 288&hdmi { 289 status = "okay"; 290}; 291 292&hdmi_in_vp0 { 293 status = "okay"; 294}; 295 296&hdmiphy { 297 status = "okay"; 298}; 299 300&iep { 301 status = "okay"; 302}; 303 304&iep_mmu { 305 status = "okay"; 306}; 307 308&jpegd { 309 status = "okay"; 310}; 311 312&jpegd_mmu { 313 status = "okay"; 314}; 315 316&mpp_srv { 317 status = "okay"; 318}; 319 320&pinctrl { 321 usb { 322 vcc5v0_host_en: vcc5v0-host-en { 323 rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; 324 }; 325 }; 326}; 327 328&pwm1 { 329 status = "okay"; 330}; 331 332&pwm2 { 333 status = "okay"; 334}; 335 336&pwm3 { 337 compatible = "rockchip,remotectl-pwm"; 338 pinctrl-names = "default"; 339 pinctrl-0 = <&pwm3m0_pins>; 340 remote_pwm_id = <3>; 341 handle_cpu_id = <1>; 342 remote_support_psci = <0>; 343 status = "okay"; 344}; 345 346&rga2 { 347 status = "okay"; 348}; 349 350&rga2_mmu { 351 status = "okay"; 352}; 353 354&rkvdec { 355 status = "okay"; 356}; 357 358&rkvdec_mmu { 359 status = "okay"; 360}; 361 362&rkvenc { 363 status = "okay"; 364}; 365 366&rkvenc_mmu { 367 status = "okay"; 368}; 369 370&rmii0_phy { 371 /delete-property/ pinctrl-names; 372 /delete-property/ pinctrl-0; 373}; 374 375&rockchip_suspend { 376 status = "okay"; 377 rockchip,sleep-debug-en = <1>; 378 rockchip,virtual-poweroff = <1>; 379 rockchip,sleep-mode-config = < 380 (0 381 | RKPM_SLP_ARMPD 382 ) 383 >; 384 rockchip,wakeup-config = < 385 (0 386 | RKPM_CPU0_WKUP_EN 387 | RKPM_GPIO_WKUP_EN 388 ) 389 >; 390 rockchip,pwm-regulator-config = < 391 (0 392 | RKPM_PWM1_M0_REGULATOR_EN 393 ) 394 >; 395}; 396 397&sai0 { 398 pinctrl-0 = <&i2s0m0_lrck &i2s0m0_sclk &i2s0m0_sdi &i2s0m0_sdo>; 399 status = "disabled"; 400}; 401 402&sai2 { 403 status = "okay"; 404}; 405 406&sai3 { 407 status = "okay"; 408}; 409 410&saradc { 411 status = "okay"; 412 vref-supply = <&vdd_1v8_s3>; 413}; 414 415&sdhci { 416 bus-width = <8>; 417 supports-emmc; 418 non-removable; 419 mmc-hs400-1_8v; 420 mmc-hs400-enhanced-strobe; 421 max-frequency = <200000000>; 422 fixed-emmc-driver-type = <4>; 423 status = "okay"; 424}; 425 426&spdif_8ch { 427 status = "okay"; 428}; 429 430&tsadc { 431 status = "okay"; 432}; 433 434&tve { 435 status = "okay"; 436}; 437 438&tve_in_vp1 { 439 status = "okay"; 440}; 441 442&u2phy_host { 443 phy-supply = <&vcc5v0_host>; 444 status = "okay"; 445}; 446 447&u2phy_otg { 448 phy-supply = <&vcc5v0_host>; 449 status = "okay"; 450}; 451 452&usb2phy { 453 status = "okay"; 454}; 455 456&usb_host0_ehci { 457 status = "okay"; 458}; 459 460&usb_host0_ohci { 461 status = "okay"; 462}; 463 464&usbdrd30 { 465 status = "okay"; 466}; 467 468&usbdrd_dwc3 { 469 dr_mode = "otg"; 470 maximum-speed = "high-speed"; 471 extcon = <&usb2phy>; 472 phys = <&u2phy_otg>; 473 phy-names = "usb2-phy"; 474 snps,dis_u2_susphy_quirk; 475 snps,usb2-lpm-disable; 476 status = "okay"; 477}; 478 479&vdpp { 480 status = "okay"; 481}; 482 483&vdpu { 484 status = "okay"; 485}; 486 487&vdpu_mmu { 488 status = "okay"; 489}; 490 491&vop { 492 status = "okay"; 493}; 494 495&vop_mmu { 496 status = "okay"; 497}; 498