1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2021 Rockchip Electronics Co., Ltd. 4 * 5 */ 6 7#include "rk3566.dtsi" 8#include <dt-bindings/gpio/gpio.h> 9#include <dt-bindings/pinctrl/rockchip.h> 10#include <dt-bindings/input/rk-input.h> 11#include <dt-bindings/display/drm_mipi_dsi.h> 12#include <dt-bindings/sensor-dev.h> 13 14/ { 15 adc_keys: adc-keys { 16 compatible = "adc-keys"; 17 io-channels = <&saradc 0>; 18 io-channel-names = "buttons"; 19 keyup-threshold-microvolt = <1800000>; 20 poll-interval = <100>; 21 22 vol-up-key { 23 label = "volume up"; 24 linux,code = <KEY_VOLUMEUP>; 25 press-threshold-microvolt = <1750>; 26 }; 27 28 vol-down-key { 29 label = "volume down"; 30 linux,code = <KEY_VOLUMEDOWN>; 31 press-threshold-microvolt = <297500>; 32 }; 33 }; 34 35 bt_sco: bt-sco { 36 status = "disabled"; 37 compatible = "delta,dfbmcs320"; 38 #sound-dai-cells = <1>; 39 }; 40 41 bt_sound: bt-sound { 42 status = "disabled"; 43 compatible = "simple-audio-card"; 44 simple-audio-card,format = "dsp_a"; 45 simple-audio-card,bitclock-inversion = <0>; 46 simple-audio-card,mclk-fs = <256>; 47 simple-audio-card,name = "rockchip,bt"; 48 simple-audio-card,cpu { 49 sound-dai = <&i2s2_2ch>; 50 }; 51 simple-audio-card,codec { 52 sound-dai = <&bt_sco 1>; 53 }; 54 }; 55 56 dc_12v: dc-12v { 57 compatible = "regulator-fixed"; 58 regulator-name = "dc_12v"; 59 regulator-always-on; 60 regulator-boot-on; 61 regulator-min-microvolt = <12000000>; 62 regulator-max-microvolt = <12000000>; 63 }; 64 65 hdmi_sound: hdmi-sound { 66 compatible = "simple-audio-card"; 67 simple-audio-card,format = "i2s"; 68 simple-audio-card,mclk-fs = <256>; 69 simple-audio-card,name = "hdmi-sound"; 70 status = "okay"; 71 72 simple-audio-card,cpu { 73 sound-dai = <&i2s0_8ch>; 74 }; 75 simple-audio-card,codec { 76 sound-dai = <&hdmi>; 77 }; 78 }; 79 80 reserved-memory { 81 #address-cells = <2>; 82 #size-cells = <2>; 83 ranges; 84 85 rknpu_reserved: rknpu { 86 compatible = "shared-dma-pool"; 87 inactive; 88 reusable; 89 size = <0x0 0x20000000>; 90 alignment = <0x0 0x1000>; 91 status = "disabled"; 92 }; 93 }; 94 95 spdif-sound { 96 status = "okay"; 97 compatible = "simple-audio-card"; 98 simple-audio-card,name = "ROCKCHIP,SPDIF"; 99 simple-audio-card,mclk-fs = <128>; 100 simple-audio-card,cpu { 101 sound-dai = <&spdif_8ch>; 102 }; 103 simple-audio-card,codec { 104 sound-dai = <&spdif_out>; 105 }; 106 }; 107 108 spdif_out: spdif-out { 109 status = "okay"; 110 compatible = "linux,spdif-dit"; 111 #sound-dai-cells = <0>; 112 }; 113 114 vcc3v3_sys: vcc3v3-sys { 115 compatible = "regulator-fixed"; 116 regulator-name = "vcc3v3_sys"; 117 regulator-always-on; 118 regulator-boot-on; 119 regulator-min-microvolt = <3300000>; 120 regulator-max-microvolt = <3300000>; 121 vin-supply = <&dc_12v>; 122 }; 123 124 vcc5v0_sys: vcc5v0-sys { 125 compatible = "regulator-fixed"; 126 regulator-name = "vcc5v0_sys"; 127 regulator-always-on; 128 regulator-boot-on; 129 regulator-min-microvolt = <5000000>; 130 regulator-max-microvolt = <5000000>; 131 vin-supply = <&dc_12v>; 132 }; 133 134 vcc_1v8: vcc_1v8 { 135 compatible = "regulator-fixed"; 136 regulator-name = "vcc_1v8"; 137 regulator-always-on; 138 regulator-boot-on; 139 regulator-min-microvolt = <1800000>; 140 regulator-max-microvolt = <1800000>; 141 vin-supply = <&vcc5v0_sys>; 142 }; 143 144 vcc_3v3: vcc_3v3{ 145 compatible = "regulator-fixed"; 146 regulator-name = "vcc_3v3"; 147 regulator-always-on; 148 regulator-boot-on; 149 regulator-min-microvolt = <3300000>; 150 regulator-max-microvolt = <3300000>; 151 vin-supply = <&vcc5v0_sys>; 152 }; 153 154 vdd_fixed: vdd-fixed { 155 compatible = "regulator-fixed"; 156 regulator-name = "vdd_fixed"; 157 regulator-min-microvolt = <950000>; 158 regulator-max-microvolt = <950000>; 159 regulator-always-on; 160 regulator-boot-on; 161 vin-supply = <&vcc5v0_sys>; 162 }; 163 164 vdd_cpu: vdd-cpu { 165 compatible = "pwm-regulator"; 166 pwms = <&pwm0 0 5000 1>; 167 regulator-name = "vdd_cpu"; 168 regulator-min-microvolt = <800000>; 169 regulator-max-microvolt = <1200000>; 170 regulator-init-microvolt = <950000>; 171 regulator-always-on; 172 regulator-boot-on; 173 regulator-settling-time-up-us = <250>; 174 pwm-supply = <&vcc5v0_sys>; 175 status = "okay"; 176 }; 177 178 vdd_logic: vdd-logic { 179 compatible = "pwm-regulator"; 180 pwms = <&pwm1 0 5000 1>; 181 regulator-name = "vdd_logic"; 182 regulator-min-microvolt = <800000>; 183 regulator-max-microvolt = <1100000>; 184 regulator-init-microvolt = <950000>; 185 regulator-always-on; 186 regulator-boot-on; 187 regulator-settling-time-up-us = <250>; 188 pwm-supply = <&vcc5v0_sys>; 189 status = "okay"; 190 }; 191}; 192 193&bus_npu { 194 bus-supply = <&vdd_logic>; 195 pvtm-supply = <&vdd_cpu>; 196 status = "okay"; 197}; 198 199&cpu0 { 200 cpu-supply = <&vdd_cpu>; 201}; 202 203&dfi { 204 status = "okay"; 205}; 206 207&dmc { 208 auto-freq-en = <0>; 209 center-supply = <&vdd_fixed>; 210 status = "okay"; 211}; 212 213&gpu { 214 mali-supply = <&vdd_fixed>; 215 status = "okay"; 216}; 217 218&gpu_opp_table { 219 /delete-node/ opp-800000000; 220}; 221 222&hdmi { 223 status = "okay"; 224 rockchip,phy-table = 225 <92812500 0x8009 0x0000 0x0270>, 226 <165000000 0x800b 0x0000 0x026d>, 227 <185625000 0x800b 0x0000 0x01ed>, 228 <297000000 0x800b 0x0000 0x01ad>, 229 <594000000 0x8029 0x0000 0x0088>, 230 <000000000 0x0000 0x0000 0x0000>; 231}; 232 233&hdmi_in_vp0 { 234 status = "okay"; 235}; 236 237&hdmi_in_vp1 { 238 status = "disabled"; 239}; 240 241&i2s0_8ch { 242 status = "okay"; 243}; 244 245&i2s1_8ch { 246 status = "okay"; 247 rockchip,clk-trcm = <1>; 248 pinctrl-names = "default"; 249 pinctrl-0 = <&i2s1m0_sclktx 250 &i2s1m0_lrcktx 251 &i2s1m0_sdi0 252 &i2s1m0_sdo0>; 253}; 254 255&i2s2_2ch { 256 pinctrl-0 = <&i2s2m0_sclktx &i2s2m0_lrcktx &i2s2m0_sdi &i2s2m0_sdo>; 257 rockchip,bclk-fs = <32>; 258 status = "disabled"; 259}; 260 261&iep { 262 status = "okay"; 263}; 264 265&iep_mmu { 266 status = "okay"; 267}; 268 269&jpegd { 270 status = "okay"; 271}; 272 273&jpegd_mmu { 274 status = "okay"; 275}; 276 277&video_phy0 { 278 status = "okay"; 279}; 280 281&video_phy1 { 282 status = "okay"; 283}; 284 285&mpp_srv { 286 status = "okay"; 287}; 288 289&pwm0 { 290 status = "okay"; 291 pinctrl-names = "active"; 292}; 293 294&pwm1 { 295 status = "okay"; 296 pinctrl-names = "active"; 297}; 298 299&rk_rga { 300 status = "okay"; 301}; 302 303&rknpu { 304 memory-region = <&rknpu_reserved>; 305 rknpu-supply = <&vdd_fixed>; 306 status = "okay"; 307}; 308 309&rknpu_mmu { 310 status = "disabled"; 311}; 312 313&rkvdec { 314 status = "okay"; 315}; 316 317&rkvdec_mmu { 318 status = "okay"; 319}; 320 321&rkvenc { 322 status = "okay"; 323}; 324 325&rkvenc_mmu { 326 status = "okay"; 327}; 328 329&rockchip_suspend { 330 status = "okay"; 331 rockchip,sleep-mode-config = < 332 (0 333 | RKPM_SLP_CENTER_OFF 334 | RKPM_SLP_HW_PLLS_OFF 335 | RKPM_SLP_PMUALIVE_32K 336 | RKPM_SLP_PMIC_LP 337 | RKPM_SLP_32K_PVTM 338 ) 339 >; 340 rockchip,wakeup-config = < 341 (0 342 | RKPM_PWM0_WKUP_EN 343 | RKPM_CPU0_WKUP_EN 344 ) 345 >; 346}; 347 348&route_hdmi { 349 status = "okay"; 350 connect = <&vp0_out_hdmi>; 351}; 352 353&saradc { 354 status = "okay"; 355 vref-supply = <&vcc_1v8>; 356}; 357 358&sdhci { 359 bus-width = <8>; 360 no-sdio; 361 no-sd; 362 non-removable; 363 status = "okay"; 364}; 365 366&sfc { 367 status = "okay"; 368 369 flash@0 { 370 compatible = "spi-nand"; 371 reg = <0>; 372 spi-max-frequency = <75000000>; 373 spi-rx-bus-width = <4>; 374 spi-tx-bus-width = <1>; 375 }; 376}; 377 378&spdif_8ch { 379 status = "okay"; 380}; 381 382&tsadc { 383 status = "okay"; 384}; 385 386&u2phy0_host { 387 status = "okay"; 388}; 389 390&u2phy0_otg { 391 status = "okay"; 392}; 393 394&usb2phy0 { 395 status = "okay"; 396}; 397 398&u2phy1_host { 399 status = "disabled"; 400}; 401 402&u2phy1_otg { 403 status = "disabled"; 404}; 405 406&usb2phy1 { 407 status = "disabled"; 408}; 409 410&usb_host0_ehci { 411 status = "disabled"; 412}; 413 414&usb_host0_ohci { 415 status = "disabled"; 416}; 417 418&usb_host1_ehci { 419 status = "disabled"; 420}; 421 422&usb_host1_ohci { 423 status = "disabled"; 424}; 425 426&usbdrd_dwc3 { 427 dr_mode = "otg"; 428 phys = <&u2phy0_otg>; 429 maximum-speed = "high-speed"; 430 extcon = <&usb2phy0>; 431 status = "okay"; 432}; 433 434&usbdrd30 { 435 status = "okay"; 436}; 437 438&usbhost_dwc3 { 439 status = "okay"; 440}; 441 442&usbhost30 { 443 status = "okay"; 444}; 445 446&vdpu { 447 status = "okay"; 448}; 449 450&vdpu_mmu { 451 status = "okay"; 452}; 453 454&vepu { 455 status = "okay"; 456}; 457 458&vepu_mmu { 459 status = "okay"; 460}; 461 462&vop { 463 status = "okay"; 464 assigned-clocks = <&cru DCLK_VOP1>; 465 assigned-clock-parents = <&cru PLL_VPLL>; 466}; 467 468&vop_mmu { 469 status = "okay"; 470}; 471 472 473