1/* 2 * (C) Copyright 2016 Rockchip Electronics Co., Ltd 3 * 4 * SPDX-License-Identifier: GPL-2.0+ X11 5 */ 6 7#include "rk3288.dtsi" 8#include "rk3288-u-boot.dtsi" 9#include <dt-bindings/input/input.h> 10 11/ { 12 memory { 13 reg = <0 0x80000000>; 14 }; 15 16 adc-keys { 17 compatible = "adc-keys"; 18 io-channels = <&saradc 1>; 19 20 volup-key { 21 linux,code = <KEY_VOLUMEUP>; 22 label = "volume up"; 23 press-threshold-microvolt = <18000>; 24 }; 25 }; 26 27 ext_gmac: external-gmac-clock { 28 compatible = "fixed-clock"; 29 #clock-cells = <0>; 30 clock-frequency = <125000000>; 31 clock-output-names = "ext_gmac"; 32 }; 33 34 keys: gpio-keys { 35 compatible = "gpio-keys"; 36 #address-cells = <1>; 37 #size-cells = <0>; 38 39 button@0 { 40 gpio-key,wakeup = <1>; 41 gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; 42 label = "GPIO Power"; 43 linux,code = <116>; 44 pinctrl-names = "default"; 45 pinctrl-0 = <&pwr_key>; 46 }; 47 }; 48 49 vcc_sys: vsys-regulator { 50 compatible = "regulator-fixed"; 51 regulator-name = "vcc_sys"; 52 regulator-min-microvolt = <5000000>; 53 regulator-max-microvolt = <5000000>; 54 regulator-always-on; 55 regulator-boot-on; 56 }; 57 58 vcc_flash: flash-regulator { 59 compatible = "regulator-fixed"; 60 regulator-name = "vcc_flash"; 61 regulator-min-microvolt = <1800000>; 62 regulator-max-microvolt = <1800000>; 63 vin-supply = <&vcc_io>; 64 }; 65 66 vcc_5v: usb-regulator { 67 compatible = "regulator-fixed"; 68 regulator-name = "vcc_5v"; 69 regulator-min-microvolt = <5000000>; 70 regulator-max-microvolt = <5000000>; 71 regulator-always-on; 72 regulator-boot-on; 73 vin-supply = <&vcc_sys>; 74 }; 75 76 vcc_host_5v: usb-host-regulator { 77 compatible = "regulator-fixed"; 78 enable-active-high; 79 gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>; 80 pinctrl-names = "default"; 81 pinctrl-0 = <&host_vbus_drv>; 82 regulator-name = "vcc_host_5v"; 83 regulator-min-microvolt = <5000000>; 84 regulator-max-microvolt = <5000000>; 85 regulator-always-on; 86 vin-supply = <&vcc_5v>; 87 }; 88 89 vcc_otg_5v: usb-otg-regulator { 90 compatible = "regulator-fixed"; 91 enable-active-high; 92 gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>; 93 pinctrl-names = "default"; 94 pinctrl-0 = <&otg_vbus_drv>; 95 regulator-name = "vcc_otg_5v"; 96 regulator-min-microvolt = <5000000>; 97 regulator-max-microvolt = <5000000>; 98 regulator-always-on; 99 vin-supply = <&vcc_5v>; 100 }; 101 102 backlight: backlight { 103 compatible = "pwm-backlight"; 104 power-supply = <&vcc_sys>; 105 enable-gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>; 106 brightness-levels = < 107 0 1 2 3 4 5 6 7 108 8 9 10 11 12 13 14 15 109 16 17 18 19 20 21 22 23 110 24 25 26 27 28 29 30 31 111 32 33 34 35 36 37 38 39 112 40 41 42 43 44 45 46 47 113 48 49 50 51 52 53 54 55 114 56 57 58 59 60 61 62 63 115 64 65 66 67 68 69 70 71 116 72 73 74 75 76 77 78 79 117 80 81 82 83 84 85 86 87 118 88 89 90 91 92 93 94 95 119 96 97 98 99 100 101 102 103 120 104 105 106 107 108 109 110 111 121 112 113 114 115 116 117 118 119 122 120 121 122 123 124 125 126 127 123 128 129 130 131 132 133 134 135 124 136 137 138 139 140 141 142 143 125 144 145 146 147 148 149 150 151 126 152 153 154 155 156 157 158 159 127 160 161 162 163 164 165 166 167 128 168 169 170 171 172 173 174 175 129 176 177 178 179 180 181 182 183 130 184 185 186 187 188 189 190 191 131 192 193 194 195 196 197 198 199 132 200 201 202 203 204 205 206 207 133 208 209 210 211 212 213 214 215 134 216 217 218 219 220 221 222 223 135 224 225 226 227 228 229 230 231 136 232 233 234 235 236 237 238 239 137 240 241 242 243 244 245 246 247 138 248 249 250 251 252 253 254 255>; 139 default-brightness-level = <50>; 140 pwms = <&pwm0 0 25000 0>; 141 pinctrl-names = "default"; 142 pinctrl-0 = <&pwm0_pin>; 143 pwm-delay-us = <10000>; 144 status = "okay"; 145 }; 146 147 edp_panel: edp-panel { 148 compatible ="lg,lp079qx1-sp0v", "simple-panel"; 149 backlight = <&backlight>; 150 power-supply = <&vcc_io>; 151 enable-gpios = <&gpio7 4 GPIO_ACTIVE_HIGH>; 152 prepare-delay-ms = <20>; 153 enable-delay-ms = <20>; 154 155 ports { 156 panel_in: endpoint { 157 remote-endpoint = <&edp_out>; 158 }; 159 }; 160 }; 161 162}; 163 164&cpu0 { 165 cpu0-supply = <&vdd_cpu>; 166}; 167 168&display_subsystem { 169 status = "okay"; 170}; 171 172&edp { 173 status = "okay"; 174 175 ports { 176 port@1 { 177 reg = <1>; 178 edp_out: endpoint { 179 remote-endpoint = <&panel_in>; 180 }; 181 }; 182 }; 183}; 184 185&emmc { 186 broken-cd; 187 bus-width = <8>; 188 cap-mmc-highspeed; 189 disable-wp; 190 non-removable; 191 num-slots = <1>; 192 pinctrl-names = "default"; 193 pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>; 194 vqmmc-supply = <&vcc_flash>; 195 status = "okay"; 196}; 197 198&gmac { 199 phy-mode = "rgmii"; 200 clock_in_out = "input"; 201 snps,reset-gpio = <&gpio4 7 0>; 202 snps,reset-active-low; 203 snps,reset-delays-us = <0 10000 1000000>; 204 assigned-clocks = <&cru SCLK_MAC>; 205 assigned-clock-parents = <&ext_gmac>; 206 pinctrl-names = "default"; 207 pinctrl-0 = <&rgmii_pins>; 208 tx_delay = <0x30>; 209 rx_delay = <0x10>; 210 status = "okay"; 211}; 212 213&hdmi { 214 ddc-i2c-bus = <&i2c5>; 215 status = "okay"; 216}; 217 218&i2c0 { 219 clock-frequency = <400000>; 220 status = "okay"; 221 222 vdd_cpu: syr827@40 { 223 compatible = "silergy,syr827"; 224 fcs,suspend-voltage-selector = <1>; 225 reg = <0x40>; 226 regulator-name = "vdd_cpu"; 227 regulator-min-microvolt = <850000>; 228 regulator-max-microvolt = <1350000>; 229 regulator-always-on; 230 regulator-boot-on; 231 vin-supply = <&vcc_sys>; 232 }; 233 234 vdd_gpu: syr828@41 { 235 compatible = "silergy,syr828"; 236 fcs,suspend-voltage-selector = <1>; 237 reg = <0x41>; 238 regulator-name = "vdd_gpu"; 239 regulator-min-microvolt = <850000>; 240 regulator-max-microvolt = <1350000>; 241 regulator-always-on; 242 vin-supply = <&vcc_sys>; 243 }; 244 245 hym8563: hym8563@51 { 246 compatible = "haoyu,hym8563"; 247 reg = <0x51>; 248 #clock-cells = <0>; 249 clock-frequency = <32768>; 250 clock-output-names = "xin32k"; 251 interrupt-parent = <&gpio7>; 252 interrupts = <4 IRQ_TYPE_EDGE_FALLING>; 253 pinctrl-names = "default"; 254 pinctrl-0 = <&rtc_int>; 255 }; 256 257 act8846: act8846@5a { 258 compatible = "active-semi,act8846"; 259 reg = <0x5a>; 260 pinctrl-names = "default"; 261 pinctrl-0 = <&pwr_hold>; 262 system-power-controller; 263 264 regulators { 265 vcc_ddr: REG1 { 266 regulator-name = "vcc_ddr"; 267 regulator-min-microvolt = <1200000>; 268 regulator-max-microvolt = <1200000>; 269 regulator-always-on; 270 }; 271 272 vcc_io: REG2 { 273 regulator-name = "vcc_io"; 274 regulator-min-microvolt = <3300000>; 275 regulator-max-microvolt = <3300000>; 276 regulator-always-on; 277 }; 278 279 vdd_log: REG3 { 280 regulator-name = "vdd_log"; 281 regulator-min-microvolt = <1100000>; 282 regulator-max-microvolt = <1100000>; 283 regulator-always-on; 284 }; 285 286 vcc_20: REG4 { 287 regulator-name = "vcc_20"; 288 regulator-min-microvolt = <2000000>; 289 regulator-max-microvolt = <2000000>; 290 regulator-always-on; 291 }; 292 293 vccio_sd: REG5 { 294 regulator-name = "vccio_sd"; 295 regulator-min-microvolt = <3300000>; 296 regulator-max-microvolt = <3300000>; 297 regulator-always-on; 298 }; 299 300 vdd10_lcd: REG6 { 301 regulator-name = "vdd10_lcd"; 302 regulator-min-microvolt = <1000000>; 303 regulator-max-microvolt = <1000000>; 304 regulator-always-on; 305 }; 306 307 vcca_codec: REG7 { 308 regulator-name = "vcca_codec"; 309 regulator-min-microvolt = <3300000>; 310 regulator-max-microvolt = <3300000>; 311 }; 312 313 vcc_tp: REG8 { 314 regulator-name = "vcca_33"; 315 regulator-min-microvolt = <3300000>; 316 regulator-max-microvolt = <3300000>; 317 }; 318 319 vccio_pmu: REG9 { 320 regulator-name = "vccio_pmu"; 321 regulator-min-microvolt = <3300000>; 322 regulator-max-microvolt = <3300000>; 323 }; 324 325 vdd_10: REG10 { 326 regulator-name = "vdd_10"; 327 regulator-min-microvolt = <1000000>; 328 regulator-max-microvolt = <1000000>; 329 regulator-always-on; 330 }; 331 332 vcc_18: REG11 { 333 regulator-name = "vcc_18"; 334 regulator-min-microvolt = <1800000>; 335 regulator-max-microvolt = <1800000>; 336 regulator-always-on; 337 }; 338 339 vcc18_lcd: REG12 { 340 regulator-name = "vcc18_lcd"; 341 regulator-min-microvolt = <1800000>; 342 regulator-max-microvolt = <1800000>; 343 regulator-always-on; 344 }; 345 }; 346 }; 347}; 348 349&i2c1 { 350 status = "okay"; 351}; 352 353&i2c2 { 354 status = "okay"; 355}; 356 357&i2c4 { 358 status = "okay"; 359}; 360 361&i2c5 { 362 status = "okay"; 363}; 364 365&pinctrl { 366 pcfg_output_high: pcfg-output-high { 367 output-high; 368 }; 369 370 pcfg_output_low: pcfg-output-low { 371 output-low; 372 }; 373 374 act8846 { 375 pwr_hold: pwr-hold { 376 rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_output_high>; 377 }; 378 }; 379 380 hym8563 { 381 rtc_int: rtc-int { 382 rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>; 383 }; 384 }; 385 386 keys { 387 pwr_key: pwr-key { 388 rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>; 389 }; 390 }; 391 392 sdmmc { 393 sdmmc_pwr: sdmmc-pwr { 394 rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>; 395 }; 396 }; 397 398 usb_host { 399 host_vbus_drv: host-vbus-drv { 400 rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>; 401 }; 402 }; 403 404 usb_otg { 405 otg_vbus_drv: otg-vbus-drv { 406 rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>; 407 }; 408 }; 409}; 410 411&pwm0 { 412 status = "okay"; 413}; 414 415&route_edp { 416 status = "okay"; 417}; 418 419&saradc { 420 vref-supply = <&vcc_18>; 421 status = "okay"; 422}; 423 424&sdio0 { 425 broken-cd; 426 bus-width = <4>; 427 disable-wp; 428 non-removable; 429 num-slots = <1>; 430 pinctrl-names = "default"; 431 pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>; 432 vmmc-supply = <&vcc_18>; 433 status = "disabled"; 434}; 435 436&sdmmc { 437 bus-width = <4>; 438 cap-mmc-highspeed; 439 cap-sd-highspeed; 440 card-detect-delay = <200>; 441 disable-wp; 442 num-slots = <1>; 443 pinctrl-names = "default"; 444 pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>; 445 vmmc-supply = <&vccio_sd>; 446 status = "okay"; 447}; 448 449&spi0 { 450 pinctrl-names = "default"; 451 pinctrl-0 = <&spi0_clk>, <&spi0_cs0>, <&spi0_tx>, <&spi0_rx>, <&spi0_cs1>; 452 status = "okay"; 453}; 454 455&uart0 { 456 pinctrl-names = "default"; 457 pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>; 458 status = "okay"; 459}; 460 461&uart1 { 462 status = "okay"; 463}; 464 465&uart2 { 466 status = "okay"; 467}; 468 469&uart3 { 470 status = "okay"; 471}; 472 473&usb_host1 { 474 status = "okay"; 475}; 476 477&usb_otg { 478 status = "okay"; 479}; 480 481&vopl { 482 status = "okay"; 483}; 484 485&wdt { 486 status = "okay"; 487}; 488