1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2022 Rockchip Electronics Co., Ltd. 4 * 5 */ 6 7/dts-v1/; 8#include <dt-bindings/pwm/pwm.h> 9#include "rk3368.dtsi" 10#include "rk3368-android.dtsi" 11 12/ { 13 model = "Rockchip Sheep board"; 14 compatible = "rockchip,sheep", "rockchip,rk3368"; 15 16 sound { 17 compatible = "simple-audio-card"; 18 simple-audio-card,format = "i2s"; 19 simple-audio-card,name = "rockchip,rt5640-codec"; 20 simple-audio-card,mclk-fs = <256>; 21 simple-audio-card,widgets = 22 "Microphone", "Mic Jack", 23 "Headphone", "Headphone Jack"; 24 simple-audio-card,routing = 25 "Mic Jack", "MICBIAS1", 26 "IN1P", "Mic Jack", 27 "Headphone Jack", "HPOL", 28 "Headphone Jack", "HPOR"; 29 simple-audio-card,cpu { 30 sound-dai = <&i2s_8ch>; 31 }; 32 simple-audio-card,codec { 33 sound-dai = <&rt5640>; 34 }; 35 }; 36 37 backlight: backlight { 38 compatible = "pwm-backlight"; 39 pwms = <&pwm0 0 25000 PWM_POLARITY_INVERTED>; 40 brightness-levels = < 41 135 135 136 136 137 137 138 138 42 139 139 140 140 141 141 142 142 43 143 143 143 144 144 145 145 146 44 146 147 147 148 148 149 149 150 45 150 151 151 151 152 152 153 153 46 154 154 155 155 156 156 157 157 47 158 158 159 159 159 160 160 161 48 161 162 162 163 163 164 164 165 49 165 166 166 167 167 167 168 168 50 169 169 170 170 171 171 172 172 51 173 173 174 174 175 175 175 176 52 176 177 177 178 178 179 179 180 53 180 181 181 182 182 183 183 183 54 184 184 185 185 186 186 187 187 55 188 188 189 189 190 190 191 191 56 191 192 192 193 193 194 194 195 57 195 196 196 197 197 198 198 199 58 199 199 200 200 201 201 202 202 59 203 203 204 204 205 205 206 206 60 207 207 207 208 208 209 209 210 61 210 211 211 212 212 213 213 214 62 214 215 215 215 216 216 217 217 63 218 218 219 219 220 220 221 221 64 222 222 223 223 223 224 224 225 65 225 226 226 227 227 228 228 229 66 229 230 230 231 231 231 232 232 67 233 233 234 234 235 235 236 236 68 237 237 238 238 239 239 239 240 69 240 241 241 242 242 243 243 244 70 244 245 245 246 246 247 247 247 71 248 248 249 249 250 250 251 251 72 252 252 253 253 254 254 255 255>; 73 default-brightness-level = <200>; 74 enable-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>; 75 }; 76 77 rk_key: rockchip-key { 78 compatible = "rockchip,key"; 79 status = "okay"; 80 81 io-channels = <&saradc 1>; 82 83 vol-up-key { 84 linux,code = <115>; 85 label = "volume up"; 86 rockchip,adc_value = <1>; 87 }; 88 89 vol-down-key { 90 linux,code = <114>; 91 label = "volume down"; 92 rockchip,adc_value = <170>; 93 }; 94 95 power-key { 96 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; 97 linux,code = <116>; 98 label = "power"; 99 gpio-key,wakeup; 100 }; 101 102 menu-key { 103 linux,code = <59>; 104 label = "menu"; 105 rockchip,adc_value = <355>; 106 }; 107 108 home-key { 109 linux,code = <102>; 110 label = "home"; 111 rockchip,adc_value = <746>; 112 }; 113 114 back-key { 115 linux,code = <158>; 116 label = "back"; 117 rockchip,adc_value = <560>; 118 }; 119 120 camera-key { 121 linux,code = <212>; 122 label = "camera"; 123 rockchip,adc_value = <450>; 124 }; 125 }; 126 127 vcc_sys: vcc-sys { 128 compatible = "regulator-fixed"; 129 regulator-name = "vcc_sys"; 130 regulator-always-on; 131 regulator-boot-on; 132 regulator-min-microvolt = <3800000>; 133 regulator-max-microvolt = <3800000>; 134 }; 135 136 vcc_host: vcc-host { 137 compatible = "regulator-fixed"; 138 enable-active-high; 139 gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>; 140 pinctrl-names = "default"; 141 pinctrl-0 = <&host_vbus_drv>; 142 regulator-name = "vcc_host"; 143 regulator-always-on; 144 }; 145 146 xin32k: xin32k { 147 compatible = "fixed-clock"; 148 clock-frequency = <32768>; 149 clock-output-names = "xin32k"; 150 #clock-cells = <0>; 151 }; 152 153 panel { 154 compatible = "simple-panel"; 155 backlight = <&backlight>; 156 enable-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>; 157 bus-format = <MEDIA_BUS_FMT_RGB888_1X7X4_SPWG>; 158 159 display-timings { 160 native-mode = <&timing0>; 161 162 timing0: timing0 { 163 clock-frequency = <54000000>; 164 hactive = <1024>; 165 vactive = <600>; 166 hback-porch = <134>; 167 hfront-porch = <134>; 168 vback-porch = <10>; 169 vfront-porch = <10>; 170 hsync-len = <134>; 171 vsync-len = <10>; 172 hsync-active = <0>; 173 vsync-active = <0>; 174 de-active = <0>; 175 pixelclk-active = <0>; 176 }; 177 }; 178 179 port { 180 panel_in_lvds: endpoint { 181 remote-endpoint = <&lvds_out_panel>; 182 }; 183 }; 184 }; 185}; 186 187&firmware_android { 188 compatible = "android,firmware"; 189 fstab { 190 compatible = "android,fstab"; 191 system { 192 compatible = "android,system"; 193 dev = "/dev/block/by-name/system"; 194 type = "ext4"; 195 mnt_flags = "ro,barrier=1,inode_readahead_blks=8"; 196 fsmgr_flags = "wait,verify"; 197 }; 198 vendor { 199 compatible = "android,vendor"; 200 dev = "/dev/block/by-name/vendor"; 201 type = "ext4"; 202 mnt_flags = "ro,barrier=1,inode_readahead_blks=8"; 203 fsmgr_flags = "wait,verify"; 204 }; 205 }; 206}; 207 208&emmc { 209 status = "okay"; 210 bus-width = <8>; 211 cap-mmc-highspeed; 212 mmc-hs200-1_8v; 213 no-sdio; 214 no-sd; 215 disable-wp; 216 non-removable; 217 num-slots = <1>; 218 pinctrl-names = "default"; 219 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>; 220}; 221 222&sdmmc { 223 status = "okay"; 224 clock-frequency = <37500000>; 225 clock-freq-min-max = <400000 37500000>; 226 no-sdio; 227 no-mmc; 228 cap-mmc-highspeed; 229 cap-sd-highspeed; 230 card-detect-delay = <200>; 231 disable-wp; 232 num-slots = <1>; 233 pinctrl-names = "default"; 234 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; 235}; 236 237&i2c0 { 238 status = "okay"; 239 240 syr827: syr827@40 { 241 compatible = "silergy,syr827"; 242 reg = <0x40>; 243 status = "okay"; 244 245 regulator-compatible = "fan53555-reg"; 246 regulator-name = "vdd_arm"; 247 regulator-min-microvolt = <712500>; 248 regulator-max-microvolt = <1500000>; 249 regulator-ramp-delay = <1000>; 250 fcs,suspend-voltage-selector = <1>; 251 regulator-always-on; 252 regulator-boot-on; 253 regulator-initial-state = <3>; 254 regulator-state-mem { 255 regulator-off-in-suspend; 256 regulator-suspend-microvolt = <900000>; 257 }; 258 }; 259 260 rk818: pmic@1c { 261 compatible = "rockchip,rk818"; 262 reg = <0x1c>; 263 status = "okay"; 264 265 clock-output-names = "rk818-clkout1", "wifibt_32kin"; 266 interrupt-parent = <&gpio0>; 267 interrupts = <1 IRQ_TYPE_LEVEL_LOW>; 268 pinctrl-names = "default"; 269 pinctrl-0 = <&pmic_int_l>; 270 rockchip,system-power-controller; 271 wakeup-source; 272 #clock-cells = <1>; 273 274 vcc1-supply = <&vcc_sys>; 275 vcc2-supply = <&vcc_sys>; 276 vcc3-supply = <&vcc_sys>; 277 vcc4-supply = <&vcc_sys>; 278 vcc6-supply = <&vcc_sys>; 279 vcc7-supply = <&vcc_sys>; 280 vcc8-supply = <&vcc_sys>; 281 vcc9-supply = <&vcc_io>; 282 283 regulators { 284 vdd_logic: DCDC_REG1 { 285 regulator-name = "vdd_logic"; 286 regulator-always-on; 287 regulator-boot-on; 288 regulator-min-microvolt = <750000>; 289 regulator-max-microvolt = <1450000>; 290 regulator-ramp-delay = <6001>; 291 regulator-state-mem { 292 regulator-on-in-suspend; 293 regulator-suspend-microvolt = <1000000>; 294 }; 295 }; 296 297 vdd_gpu: DCDC_REG2 { 298 regulator-name = "vdd_gpu"; 299 regulator-always-on; 300 regulator-boot-on; 301 regulator-min-microvolt = <800000>; 302 regulator-max-microvolt = <1250000>; 303 regulator-ramp-delay = <6001>; 304 regulator-state-mem { 305 regulator-on-in-suspend; 306 regulator-suspend-microvolt = <1000000>; 307 }; 308 }; 309 310 vcc_ddr: DCDC_REG3 { 311 regulator-always-on; 312 regulator-boot-on; 313 regulator-name = "vcc_ddr"; 314 regulator-state-mem { 315 regulator-on-in-suspend; 316 }; 317 }; 318 319 vcc_io: DCDC_REG4 { 320 regulator-always-on; 321 regulator-boot-on; 322 regulator-min-microvolt = <3300000>; 323 regulator-max-microvolt = <3300000>; 324 regulator-name = "vcc_io"; 325 regulator-state-mem { 326 regulator-on-in-suspend; 327 regulator-suspend-microvolt = <3300000>; 328 }; 329 }; 330 331 vcca_codec: LDO_REG1 { 332 regulator-always-on; 333 regulator-boot-on; 334 regulator-min-microvolt = <3300000>; 335 regulator-max-microvolt = <3300000>; 336 regulator-name = "vcca_codec"; 337 regulator-state-mem { 338 regulator-on-in-suspend; 339 regulator-suspend-microvolt = <3300000>; 340 }; 341 }; 342 343 vcc_tp: LDO_REG2 { 344 regulator-boot-on; 345 regulator-min-microvolt = <3000000>; 346 regulator-max-microvolt = <3000000>; 347 regulator-name = "vcc_tp"; 348 regulator-state-mem { 349 regulator-off-in-suspend; 350 }; 351 }; 352 353 vdd_10: LDO_REG3 { 354 regulator-always-on; 355 regulator-boot-on; 356 regulator-min-microvolt = <1000000>; 357 regulator-max-microvolt = <1000000>; 358 regulator-name = "vdd_10"; 359 regulator-state-mem { 360 regulator-on-in-suspend; 361 regulator-suspend-microvolt = <1000000>; 362 }; 363 }; 364 365 vcc18_lcd: LDO_REG4 { 366 regulator-always-on; 367 regulator-boot-on; 368 regulator-min-microvolt = <1800000>; 369 regulator-max-microvolt = <1800000>; 370 regulator-name = "vcc18_lcd"; 371 regulator-state-mem { 372 regulator-on-in-suspend; 373 regulator-suspend-microvolt = <1800000>; 374 }; 375 }; 376 377 vccio_pmu: LDO_REG5 { 378 regulator-always-on; 379 regulator-boot-on; 380 regulator-min-microvolt = <1800000>; 381 regulator-max-microvolt = <1800000>; 382 regulator-name = "vccio_pmu"; 383 regulator-state-mem { 384 regulator-on-in-suspend; 385 regulator-suspend-microvolt = <1800000>; 386 }; 387 }; 388 389 vdd10_lcd: LDO_REG6 { 390 regulator-always-on; 391 regulator-boot-on; 392 regulator-min-microvolt = <1000000>; 393 regulator-max-microvolt = <1000000>; 394 regulator-name = "vdd10_lcd"; 395 regulator-state-mem { 396 regulator-on-in-suspend; 397 regulator-suspend-microvolt = <1000000>; 398 }; 399 }; 400 401 vcc_18: LDO_REG7 { 402 regulator-always-on; 403 regulator-boot-on; 404 regulator-min-microvolt = <1800000>; 405 regulator-max-microvolt = <1800000>; 406 regulator-name = "vcc_18"; 407 regulator-state-mem { 408 regulator-on-in-suspend; 409 regulator-suspend-microvolt = <1800000>; 410 }; 411 }; 412 413 vccio_wl: LDO_REG8 { 414 regulator-always-on; 415 regulator-boot-on; 416 regulator-min-microvolt = <1800000>; 417 regulator-max-microvolt = <3300000>; 418 regulator-name = "vccio_wl"; 419 regulator-state-mem { 420 regulator-on-in-suspend; 421 regulator-suspend-microvolt = <3300000>; 422 }; 423 }; 424 425 vccio_sd: LDO_REG9 { 426 regulator-always-on; 427 regulator-boot-on; 428 regulator-min-microvolt = <1800000>; 429 regulator-max-microvolt = <3300000>; 430 regulator-name = "vccio_sd"; 431 regulator-state-mem { 432 regulator-on-in-suspend; 433 regulator-suspend-microvolt = <3300000>; 434 }; 435 }; 436 437 vcc_sd: SWITCH_REG { 438 regulator-always-on; 439 regulator-boot-on; 440 regulator-name = "vcc_sd"; 441 regulator-state-mem { 442 regulator-on-in-suspend; 443 }; 444 }; 445 446 boost_otg: DCDC_BOOST { 447 regulator-name = "boost_otg"; 448 regulator-always-on; 449 regulator-boot-on; 450 regulator-min-microvolt = <5000000>; 451 regulator-max-microvolt = <5000000>; 452 regulator-state-mem { 453 regulator-on-in-suspend; 454 regulator-suspend-microvolt = <5000000>; 455 }; 456 }; 457 }; 458 }; 459}; 460 461&cpu_l0 { 462 cpu-supply = <&syr827>; 463}; 464 465&cpu_l1 { 466 cpu-supply = <&syr827>; 467}; 468 469&cpu_l2 { 470 cpu-supply = <&syr827>; 471}; 472 473&cpu_l3 { 474 cpu-supply = <&syr827>; 475}; 476 477&cpu_b0 { 478 cpu-supply = <&syr827>; 479}; 480 481&cpu_b1 { 482 cpu-supply = <&syr827>; 483}; 484 485&cpu_b2 { 486 cpu-supply = <&syr827>; 487}; 488 489&cpu_b3 { 490 cpu-supply = <&syr827>; 491}; 492 493&gpu { 494 logic-supply = <&vdd_logic>; 495}; 496 497&i2c1 { 498 status = "okay"; 499 500 rt5640: rt5640@1c { 501 compatible = "realtek,rt5640"; 502 reg = <0x1c>; 503 #sound-dai-cells = <0>; 504 clocks = <&cru SCLK_I2S_8CH_OUT>; 505 clock-names = "mclk"; 506 pinctrl-names = "default"; 507 pinctrl-0 = <&i2s_8ch_mclk>; 508 realtek,in1-differential; 509 status = "okay"; 510 }; 511}; 512 513&i2c2 { 514 status = "okay"; 515 516 gt9xx: gt9xx@14 { 517 compatible = "goodix,gt9xx"; 518 reg = <0x14>; 519 touch-gpio = <&gpio0 12 IRQ_TYPE_LEVEL_LOW>; 520 reset-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>; 521 max-x = <1200>; 522 max-y = <1900>; 523 tp-size = <911>; 524 tp-supply = <&vcc_tp>; 525 status = "okay"; 526 }; 527}; 528 529&i2s_8ch { 530 status = "okay"; 531 rockchip,i2s-broken-burst-len; 532 rockchip,playback-channels = <8>; 533 rockchip,capture-channels = <2>; 534 #sound-dai-cells = <0>; 535}; 536 537&io_domains { 538 status = "okay"; 539 dvp-supply = <&vcc_18>; 540 audio-supply = <&vcc_io>; 541 gpio30-supply = <&vcc_io>; 542 gpio1830-supply = <&vcc_io>; 543 sdcard-supply = <&vccio_sd>; 544 wifi-supply = <&vccio_wl>; 545}; 546 547&pmu_io_domains { 548 status = "okay"; 549 pmu-supply = <&vcc_io>; 550 vop-supply = <&vcc_io>; 551}; 552 553&pwm0 { 554 status = "okay"; 555}; 556 557&u2phy { 558 status = "okay"; 559 560 u2phy_host: host-port { 561 phy-supply = <&vcc_host>; 562 status = "okay"; 563 }; 564}; 565 566&usb_host0_ehci { 567 status = "okay"; 568}; 569 570&usb_host0_ohci { 571 status = "okay"; 572}; 573 574&mailbox { 575 status = "okay"; 576}; 577 578&mailbox_scpi { 579 status = "okay"; 580}; 581 582&lvds { 583 status = "okay"; 584 585 ports { 586 port@1 { 587 reg = <1>; 588 589 lvds_out_panel: endpoint { 590 remote-endpoint = <&panel_in_lvds>; 591 }; 592 }; 593 }; 594 595}; 596 597&route_lvds { 598 status = "okay"; 599}; 600 601&saradc { 602 status = "okay"; 603}; 604 605&tsadc { 606 tsadc-supply = <&syr827>; 607 status = "okay"; 608}; 609 610&hdmi { 611 status = "okay"; 612}; 613 614&pinctrl { 615 pmic { 616 pmic_int_l: pmic-int-l { 617 rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; 618 }; 619 }; 620 621 usb2 { 622 host_vbus_drv: host-vbus-drv { 623 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; 624 }; 625 }; 626}; 627