0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Copyright (c) 2014, 2015 Andy Yan <andy.yan@rock-chips.com>
0004 */
0005
0006 /dts-v1/;
0007 #include <dt-bindings/input/input.h>
0008 #include "rk3288.dtsi"
0009
0010 / {
0011 model = "PopMetal-RK3288";
0012 compatible = "chipspark,popmetal-rk3288", "rockchip,rk3288";
0013
0014 memory@0 {
0015 device_type = "memory";
0016 reg = <0x0 0x0 0x0 0x80000000>;
0017 };
0018
0019 ext_gmac: external-gmac-clock {
0020 compatible = "fixed-clock";
0021 clock-frequency = <125000000>;
0022 clock-output-names = "ext_gmac";
0023 #clock-cells = <0>;
0024 };
0025
0026 gpio-keys {
0027 compatible = "gpio-keys";
0028 autorepeat;
0029
0030 pinctrl-names = "default";
0031 pinctrl-0 = <&pwrbtn>;
0032
0033 key-power {
0034 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
0035 linux,code = <KEY_POWER>;
0036 label = "GPIO Key Power";
0037 linux,input-type = <1>;
0038 wakeup-source;
0039 debounce-interval = <100>;
0040 };
0041 };
0042
0043 ir: ir-receiver {
0044 compatible = "gpio-ir-receiver";
0045 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
0046 pinctrl-names = "default";
0047 pinctrl-0 = <&ir_int>;
0048 };
0049
0050 vcc_flash: flash-regulator {
0051 compatible = "regulator-fixed";
0052 regulator-name = "vcc_flash";
0053 regulator-min-microvolt = <1800000>;
0054 regulator-max-microvolt = <1800000>;
0055 vin-supply = <&vcc_io>;
0056 };
0057
0058 vcc_sd: sdmmc-regulator {
0059 compatible = "regulator-fixed";
0060 gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
0061 pinctrl-names = "default";
0062 pinctrl-0 = <&sdmmc_pwr>;
0063 regulator-name = "vcc_sd";
0064 regulator-min-microvolt = <3300000>;
0065 regulator-max-microvolt = <3300000>;
0066 startup-delay-us = <100000>;
0067 vin-supply = <&vcc_io>;
0068 };
0069
0070 vcc_sys: vsys-regulator {
0071 compatible = "regulator-fixed";
0072 regulator-name = "vcc_sys";
0073 regulator-min-microvolt = <5000000>;
0074 regulator-max-microvolt = <5000000>;
0075 regulator-always-on;
0076 regulator-boot-on;
0077 };
0078
0079 /*
0080 * A PT5128 creates both dovdd_1v8 and vcc28_dvp, controlled
0081 * by the dvp_pwr pin.
0082 */
0083 vcc18_dvp: vcc18-dvp-regulator {
0084 compatible = "regulator-fixed";
0085 regulator-name = "vcc18-dvp";
0086 regulator-min-microvolt = <1800000>;
0087 regulator-max-microvolt = <1800000>;
0088 vin-supply = <&vcc28_dvp>;
0089 };
0090
0091 vcc28_dvp: vcc28-dvp-regulator {
0092 compatible = "regulator-fixed";
0093 enable-active-high;
0094 gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
0095 pinctrl-names = "default";
0096 pinctrl-0 = <&dvp_pwr>;
0097 regulator-name = "vcc28_dvp";
0098 regulator-min-microvolt = <2800000>;
0099 regulator-max-microvolt = <2800000>;
0100 regulator-always-on;
0101 vin-supply = <&vcc_io>;
0102 };
0103 };
0104
0105 &cpu0 {
0106 cpu-supply = <&vdd_cpu>;
0107 };
0108
0109 &cpu1 {
0110 cpu-supply = <&vdd_cpu>;
0111 };
0112
0113 &cpu2 {
0114 cpu-supply = <&vdd_cpu>;
0115 };
0116
0117 &cpu3 {
0118 cpu-supply = <&vdd_cpu>;
0119 };
0120
0121 &emmc {
0122 bus-width = <8>;
0123 cap-mmc-highspeed;
0124 mmc-ddr-1_8v;
0125 mmc-hs200-1_8v;
0126 non-removable;
0127 pinctrl-names = "default";
0128 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
0129 vmmc-supply = <&vcc_io>;
0130 vqmmc-supply = <&vcc_flash>;
0131 status = "okay";
0132 };
0133
0134 &sdmmc {
0135 bus-width = <4>;
0136 cap-mmc-highspeed;
0137 cap-sd-highspeed;
0138 card-detect-delay = <200>;
0139 disable-wp; /* wp not hooked up */
0140 pinctrl-names = "default";
0141 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
0142 sd-uhs-sdr12;
0143 sd-uhs-sdr25;
0144 sd-uhs-sdr50;
0145 sd-uhs-sdr104;
0146 vmmc-supply = <&vcc_sd>;
0147 vqmmc-supply = <&vccio_sd>;
0148 status = "okay";
0149 };
0150
0151 &gmac {
0152 phy-supply = <&vcc_lan>;
0153 phy-mode = "rgmii";
0154 clock_in_out = "input";
0155 snps,reset-gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
0156 snps,reset-active-low;
0157 snps,reset-delays-us = <0 10000 1000000>;
0158 assigned-clocks = <&cru SCLK_MAC>;
0159 assigned-clock-parents = <&ext_gmac>;
0160 pinctrl-names = "default";
0161 pinctrl-0 = <&rgmii_pins>;
0162 tx_delay = <0x30>;
0163 rx_delay = <0x10>;
0164 status = "okay";
0165 };
0166
0167 &hdmi {
0168 ddc-i2c-bus = <&i2c5>;
0169 status = "okay";
0170 };
0171
0172 &i2c0 {
0173 status = "okay";
0174 clock-frequency = <400000>;
0175
0176 rk808: pmic@1b {
0177 compatible = "rockchip,rk808";
0178 reg = <0x1b>;
0179 interrupt-parent = <&gpio0>;
0180 interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>;
0181 pinctrl-names = "default";
0182 pinctrl-0 = <&pmic_int &global_pwroff>;
0183 rockchip,system-power-controller;
0184 wakeup-source;
0185 #clock-cells = <1>;
0186 clock-output-names = "xin32k", "rk808-clkout2";
0187
0188 vcc1-supply = <&vcc_sys>;
0189 vcc2-supply = <&vcc_sys>;
0190 vcc3-supply = <&vcc_sys>;
0191 vcc4-supply = <&vcc_sys>;
0192 vcc6-supply = <&vcc_sys>;
0193 vcc7-supply = <&vcc_sys>;
0194 vcc8-supply = <&vcc_18>;
0195 vcc9-supply = <&vcc_io>;
0196 vcc10-supply = <&vcc_io>;
0197 vcc11-supply = <&vcc_sys>;
0198 vcc12-supply = <&vcc_io>;
0199 vddio-supply = <&vcc_io>;
0200
0201 regulators {
0202 vdd_cpu: DCDC_REG1 {
0203 regulator-always-on;
0204 regulator-boot-on;
0205 regulator-min-microvolt = <750000>;
0206 regulator-max-microvolt = <1350000>;
0207 regulator-name = "vdd_arm";
0208 regulator-state-mem {
0209 regulator-off-in-suspend;
0210 };
0211 };
0212
0213 vdd_gpu: DCDC_REG2 {
0214 regulator-always-on;
0215 regulator-boot-on;
0216 regulator-min-microvolt = <850000>;
0217 regulator-max-microvolt = <1250000>;
0218 regulator-name = "vdd_gpu";
0219 regulator-state-mem {
0220 regulator-on-in-suspend;
0221 regulator-suspend-microvolt = <1000000>;
0222 };
0223 };
0224
0225 vcc_ddr: DCDC_REG3 {
0226 regulator-always-on;
0227 regulator-boot-on;
0228 regulator-name = "vcc_ddr";
0229 regulator-state-mem {
0230 regulator-on-in-suspend;
0231 };
0232 };
0233
0234 vcc_io: DCDC_REG4 {
0235 regulator-always-on;
0236 regulator-boot-on;
0237 regulator-min-microvolt = <3300000>;
0238 regulator-max-microvolt = <3300000>;
0239 regulator-name = "vcc_io";
0240 regulator-state-mem {
0241 regulator-on-in-suspend;
0242 regulator-suspend-microvolt = <3300000>;
0243 };
0244 };
0245
0246 vcc_lan: LDO_REG1 {
0247 regulator-always-on;
0248 regulator-boot-on;
0249 regulator-min-microvolt = <3300000>;
0250 regulator-max-microvolt = <3300000>;
0251 regulator-name = "vcc_lan";
0252 regulator-state-mem {
0253 regulator-on-in-suspend;
0254 regulator-suspend-microvolt = <3300000>;
0255 };
0256 };
0257
0258 vccio_sd: LDO_REG2 {
0259 regulator-always-on;
0260 regulator-boot-on;
0261 regulator-min-microvolt = <1800000>;
0262 regulator-max-microvolt = <3300000>;
0263 regulator-name = "vccio_sd";
0264 regulator-state-mem {
0265 regulator-off-in-suspend;
0266 };
0267 };
0268
0269 vdd_10: LDO_REG3 {
0270 regulator-always-on;
0271 regulator-boot-on;
0272 regulator-min-microvolt = <1000000>;
0273 regulator-max-microvolt = <1000000>;
0274 regulator-name = "vdd_10";
0275 regulator-state-mem {
0276 regulator-on-in-suspend;
0277 regulator-suspend-microvolt = <1000000>;
0278 };
0279 };
0280
0281 vcc18_lcd: LDO_REG4 {
0282 regulator-always-on;
0283 regulator-boot-on;
0284 regulator-min-microvolt = <1800000>;
0285 regulator-max-microvolt = <1800000>;
0286 regulator-name = "vcc18_lcd";
0287 regulator-state-mem {
0288 regulator-on-in-suspend;
0289 regulator-suspend-microvolt = <1800000>;
0290 };
0291 };
0292
0293 ldo5: LDO_REG5 {
0294 regulator-always-on;
0295 regulator-min-microvolt = <1800000>;
0296 regulator-max-microvolt = <3300000>;
0297 regulator-name = "ldo5";
0298 };
0299
0300 vdd10_lcd: LDO_REG6 {
0301 regulator-always-on;
0302 regulator-boot-on;
0303 regulator-min-microvolt = <1000000>;
0304 regulator-max-microvolt = <1000000>;
0305 regulator-name = "vdd10_lcd";
0306 regulator-state-mem {
0307 regulator-on-in-suspend;
0308 regulator-suspend-microvolt = <1000000>;
0309 };
0310 };
0311
0312 vcc_18: LDO_REG7 {
0313 regulator-always-on;
0314 regulator-boot-on;
0315 regulator-min-microvolt = <1800000>;
0316 regulator-max-microvolt = <1800000>;
0317 regulator-name = "vcc_18";
0318 regulator-state-mem {
0319 regulator-on-in-suspend;
0320 regulator-suspend-microvolt = <1800000>;
0321 };
0322 };
0323
0324 vcca_33: LDO_REG8 {
0325 regulator-always-on;
0326 regulator-boot-on;
0327 regulator-min-microvolt = <3300000>;
0328 regulator-max-microvolt = <3300000>;
0329 regulator-name = "vcca_33";
0330 regulator-state-mem {
0331 regulator-on-in-suspend;
0332 regulator-suspend-microvolt = <3300000>;
0333 };
0334 };
0335
0336 vccio_wl: SWITCH_REG1 {
0337 regulator-always-on;
0338 regulator-boot-on;
0339 regulator-name = "vccio_wl";
0340 regulator-state-mem {
0341 regulator-on-in-suspend;
0342 };
0343 };
0344
0345 vcc_lcd: SWITCH_REG2 {
0346 regulator-always-on;
0347 regulator-boot-on;
0348 regulator-name = "vcc_lcd";
0349 regulator-state-mem {
0350 regulator-on-in-suspend;
0351 };
0352 };
0353 };
0354 };
0355 };
0356
0357 &i2c1 {
0358 status = "okay";
0359 clock-frequency = <400000>;
0360
0361 ak8963: ak8963@d {
0362 compatible = "asahi-kasei,ak8975";
0363 reg = <0x0d>;
0364 interrupt-parent = <&gpio8>;
0365 interrupts = <RK_PA1 IRQ_TYPE_EDGE_RISING>;
0366 pinctrl-names = "default";
0367 pinctrl-0 = <&comp_int>;
0368 vdd-supply = <&vcc_io>;
0369 vid-supply = <&vcc_io>;
0370 };
0371
0372 l3g4200d: l3g4200d@69 {
0373 compatible = "st,l3g4200d-gyro";
0374 st,drdy-int-pin = <2>;
0375 reg = <0x69>;
0376 vdd-supply = <&vcc_io>;
0377 vddio-supply = <&vcc_io>;
0378 };
0379
0380 mma8452: mma8452@1d {
0381 compatible = "fsl,mma8452";
0382 reg = <0x1d>;
0383 interrupt-parent = <&gpio8>;
0384 interrupts = <RK_PA0 IRQ_TYPE_EDGE_RISING>;
0385 pinctrl-names = "default";
0386 pinctrl-0 = <&gsensor_int>;
0387 };
0388 };
0389
0390 &i2c2 {
0391 status = "okay";
0392 };
0393
0394 &i2c3 {
0395 status = "okay";
0396 };
0397
0398 &i2c4 {
0399 status = "okay";
0400 };
0401
0402 &i2c5 {
0403 status = "okay";
0404 };
0405
0406 &io_domains {
0407 status = "okay";
0408
0409 audio-supply = <&vcca_33>;
0410 bb-supply = <&vcc_io>;
0411 dvp-supply = <&vcc18_dvp>;
0412 flash0-supply = <&vcc_flash>;
0413 flash1-supply = <&vcc_lan>;
0414 gpio30-supply = <&vcc_io>;
0415 gpio1830-supply = <&vcc_io>;
0416 lcdc-supply = <&vcc_io>;
0417 sdcard-supply = <&vccio_sd>;
0418 wifi-supply = <&vccio_wl>;
0419 };
0420
0421 &pinctrl {
0422 ak8963 {
0423 comp_int: comp-int {
0424 rockchip,pins = <8 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
0425 };
0426 };
0427
0428 buttons {
0429 pwrbtn: pwrbtn {
0430 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
0431 };
0432 };
0433
0434 dvp {
0435 dvp_pwr: dvp-pwr {
0436 rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
0437 };
0438 };
0439
0440 ir {
0441 ir_int: ir-int {
0442 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
0443 };
0444 };
0445
0446 mma8452 {
0447 gsensor_int: gsensor-int {
0448 rockchip,pins = <8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
0449 };
0450 };
0451
0452 pmic {
0453 pmic_int: pmic-int {
0454 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
0455 };
0456 };
0457
0458 sdmmc {
0459 sdmmc_pwr: sdmmc-pwr {
0460 rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
0461 };
0462 };
0463 };
0464
0465 &tsadc {
0466 rockchip,hw-tshut-mode = <0>;
0467 rockchip,hw-tshut-polarity = <0>;
0468 status = "okay";
0469 };
0470
0471 &vopb {
0472 status = "okay";
0473 };
0474
0475 &vopb_mmu {
0476 status = "okay";
0477 };
0478
0479 &vopl {
0480 status = "okay";
0481 };
0482
0483 &vopl_mmu {
0484 status = "okay";
0485 };
0486
0487 &uart0 {
0488 status = "okay";
0489 };
0490
0491 &uart1 {
0492 status = "okay";
0493 };
0494
0495 &uart2 {
0496 status = "okay";
0497 };
0498
0499 &uart3 {
0500 status = "okay";
0501 };
0502
0503 &uart4 {
0504 status = "okay";
0505 };
0506
0507 &usbphy {
0508 status = "okay";
0509 };
0510
0511 &usb_otg {
0512 status = "okay";
0513 };