0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Copyright (c) 2014, 2015 FUKAUMI Naoki <naobsd@gmail.com>
0004 */
0005
0006 /dts-v1/;
0007 #include <dt-bindings/input/input.h>
0008 #include "rk3066a.dtsi"
0009
0010 / {
0011 model = "Rayeager PX2";
0012 compatible = "chipspark,rayeager-px2", "rockchip,rk3066a";
0013
0014 aliases {
0015 mmc0 = &mmc0;
0016 mmc1 = &mmc1;
0017 mmc2 = &emmc;
0018 };
0019
0020 memory@60000000 {
0021 device_type = "memory";
0022 reg = <0x60000000 0x40000000>;
0023 };
0024
0025 ir: ir-receiver {
0026 compatible = "gpio-ir-receiver";
0027 gpios = <&gpio6 RK_PA1 GPIO_ACTIVE_LOW>;
0028 pinctrl-names = "default";
0029 pinctrl-0 = <&ir_int>;
0030 };
0031
0032 keys: gpio-keys {
0033 compatible = "gpio-keys";
0034
0035 key-power {
0036 wakeup-source;
0037 gpios = <&gpio6 RK_PA2 GPIO_ACTIVE_LOW>;
0038 label = "GPIO Power";
0039 linux,code = <KEY_POWER>;
0040 pinctrl-names = "default";
0041 pinctrl-0 = <&pwr_key>;
0042 };
0043 };
0044
0045 vdd_log: vdd-log {
0046 compatible = "pwm-regulator";
0047 pwms = <&pwm3 0 1000>;
0048 regulator-name = "vdd_log";
0049 regulator-min-microvolt = <1200000>;
0050 regulator-max-microvolt = <1200000>;
0051 regulator-always-on;
0052 voltage-table = <1000000 100>,
0053 <1200000 42>;
0054 status = "okay";
0055 };
0056
0057 vsys: vsys-regulator {
0058 compatible = "regulator-fixed";
0059 regulator-name = "vsys";
0060 regulator-min-microvolt = <5000000>;
0061 regulator-max-microvolt = <5000000>;
0062 regulator-always-on;
0063 regulator-boot-on;
0064 };
0065
0066 /* input for 5V_STDBY is VSYS or DC5V, selectable by jumper J4 */
0067 vcc_stdby: stdby-regulator {
0068 compatible = "regulator-fixed";
0069 regulator-name = "5v_stdby";
0070 regulator-min-microvolt = <5000000>;
0071 regulator-max-microvolt = <5000000>;
0072 regulator-always-on;
0073 regulator-boot-on;
0074 };
0075
0076 vcc_emmc: emmc-regulator {
0077 compatible = "regulator-fixed";
0078 regulator-name = "emmc_vccq";
0079 regulator-min-microvolt = <3000000>;
0080 regulator-max-microvolt = <3000000>;
0081 vin-supply = <&vsys>;
0082 };
0083
0084 vcc_sata: sata-regulator {
0085 compatible = "regulator-fixed";
0086 enable-active-high;
0087 gpio = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
0088 pinctrl-names = "default";
0089 pinctrl-0 = <&sata_pwr>;
0090 regulator-name = "usb_5v";
0091 regulator-min-microvolt = <5000000>;
0092 regulator-max-microvolt = <5000000>;
0093 regulator-always-on;
0094 vin-supply = <&vcc_stdby>;
0095 };
0096
0097 vcc_sd: sdmmc-regulator {
0098 compatible = "regulator-fixed";
0099 gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_LOW>;
0100 pinctrl-names = "default";
0101 pinctrl-0 = <&sdmmc_pwr>;
0102 regulator-name = "vcc_sd";
0103 regulator-min-microvolt = <3300000>;
0104 regulator-max-microvolt = <3300000>;
0105 startup-delay-us = <100000>;
0106 vin-supply = <&vcc_io>;
0107 };
0108
0109 vcc_host: usb-host-regulator {
0110 compatible = "regulator-fixed";
0111 enable-active-high;
0112 gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
0113 pinctrl-names = "default";
0114 pinctrl-0 = <&host_drv>;
0115 regulator-name = "host-pwr";
0116 regulator-min-microvolt = <5000000>;
0117 regulator-max-microvolt = <5000000>;
0118 regulator-always-on;
0119 vin-supply = <&vcc_stdby>;
0120 };
0121
0122 vcc_otg: usb-otg-regulator {
0123 compatible = "regulator-fixed";
0124 enable-active-high;
0125 gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
0126 pinctrl-names = "default";
0127 pinctrl-0 = <&otg_drv>;
0128 regulator-name = "vcc_otg";
0129 regulator-min-microvolt = <5000000>;
0130 regulator-max-microvolt = <5000000>;
0131 regulator-always-on;
0132 vin-supply = <&vcc_stdby>;
0133 };
0134 };
0135
0136 &cpu0 {
0137 cpu-supply = <&vdd_arm>;
0138 };
0139
0140 &cpu1 {
0141 cpu-supply = <&vdd_arm>;
0142 };
0143
0144 &emac {
0145 pinctrl-names = "default";
0146 pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&rmii_rst>;
0147 phy = <&phy0>;
0148 phy-supply = <&vcc_rmii>;
0149 status = "okay";
0150
0151 phy0: ethernet-phy@0 {
0152 reg = <0>;
0153 reset-gpios = <&gpio1 RK_PD6 GPIO_ACTIVE_LOW>;
0154 };
0155 };
0156
0157 &emmc {
0158 bus-width = <8>;
0159 cap-mmc-highspeed;
0160 non-removable;
0161 pinctrl-names = "default";
0162 pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_rst>;
0163 vmmc-supply = <&vcc_emmc>;
0164 vqmmc-supply = <&vcc_emmc>;
0165 status = "okay";
0166 };
0167
0168 &i2c0 {
0169 clock-frequency = <400000>;
0170 status = "okay";
0171
0172 ak8963: ak8963@d {
0173 compatible = "asahi-kasei,ak8975";
0174 reg = <0x0d>;
0175 interrupt-parent = <&gpio4>;
0176 interrupts = <RK_PC1 IRQ_TYPE_EDGE_RISING>;
0177 pinctrl-names = "default";
0178 pinctrl-0 = <&comp_int>;
0179 };
0180
0181 mma8452: mma8452@1d {
0182 compatible = "fsl,mma8452";
0183 reg = <0x1d>;
0184 interrupt-parent = <&gpio4>;
0185 interrupts = <RK_PC0 IRQ_TYPE_EDGE_RISING>;
0186 pinctrl-names = "default";
0187 pinctrl-0 = <&gsensor_int>;
0188 };
0189 };
0190
0191 &i2c1 {
0192 clock-frequency = <400000>;
0193 status = "okay";
0194
0195 tps: tps@2d {
0196 reg = <0x2d>;
0197 interrupt-parent = <&gpio6>;
0198 interrupts = <RK_PA4 IRQ_TYPE_EDGE_RISING>;
0199 pinctrl-names = "default";
0200 pinctrl-0 = <&pmic_int>, <&pwr_hold>;
0201
0202 vcc1-supply = <&vsys>;
0203 vcc2-supply = <&vsys>;
0204 vcc3-supply = <&vsys>;
0205 vcc4-supply = <&vsys>;
0206 vcc5-supply = <&vcc_io>;
0207 vcc6-supply = <&vcc_io>;
0208 vcc7-supply = <&vsys>;
0209 vccio-supply = <&vsys>;
0210
0211 regulators {
0212 vcc_rtc: regulator@0 {
0213 regulator-name = "vcc_rtc";
0214 regulator-always-on;
0215 };
0216
0217 vcc_io: regulator@1 {
0218 regulator-name = "vcc_io";
0219 regulator-min-microvolt = <3300000>;
0220 regulator-max-microvolt = <3300000>;
0221 regulator-always-on;
0222 };
0223
0224 vdd_arm: regulator@2 {
0225 regulator-name = "vdd_arm";
0226 regulator-min-microvolt = <600000>;
0227 regulator-max-microvolt = <1500000>;
0228 regulator-always-on;
0229 regulator-boot-on;
0230 };
0231
0232 vcc_ddr: regulator@3 {
0233 regulator-name = "vcc_ddr";
0234 regulator-min-microvolt = <600000>;
0235 regulator-max-microvolt = <1500000>;
0236 regulator-always-on;
0237 regulator-boot-on;
0238 };
0239
0240 vcc18: regulator@5 {
0241 regulator-name = "vcc18";
0242 regulator-min-microvolt = <1800000>;
0243 regulator-max-microvolt = <1800000>;
0244 regulator-always-on;
0245 };
0246
0247 vdd_11: regulator@6 {
0248 regulator-name = "vdd_11";
0249 regulator-min-microvolt = <1100000>;
0250 regulator-max-microvolt = <1100000>;
0251 regulator-always-on;
0252 };
0253
0254 vcc_25: regulator@7 {
0255 regulator-name = "vcc_25";
0256 regulator-min-microvolt = <2500000>;
0257 regulator-max-microvolt = <2500000>;
0258 regulator-always-on;
0259 };
0260
0261 vccio_wl: regulator@8 {
0262 regulator-name = "vccio_wl";
0263 regulator-min-microvolt = <1800000>;
0264 regulator-max-microvolt = <1800000>;
0265 };
0266
0267 vcc25_hdmi: regulator@9 {
0268 regulator-name = "vcc25_hdmi";
0269 regulator-min-microvolt = <2500000>;
0270 regulator-max-microvolt = <2500000>;
0271 };
0272
0273 vcca_33: regulator@10 {
0274 regulator-name = "vcca_33";
0275 regulator-min-microvolt = <3300000>;
0276 regulator-max-microvolt = <3300000>;
0277 };
0278
0279 vcc_rmii: regulator@11 {
0280 regulator-name = "vcc_rmii";
0281 regulator-min-microvolt = <3300000>;
0282 regulator-max-microvolt = <3300000>;
0283 };
0284
0285 vcc28_cif: regulator@12 {
0286 regulator-name = "vcc28_cif";
0287 regulator-min-microvolt = <2800000>;
0288 regulator-max-microvolt = <2800000>;
0289 };
0290 };
0291 };
0292 };
0293
0294 #include "tps65910.dtsi"
0295
0296 &i2c2 {
0297 status = "okay";
0298 };
0299
0300 &i2c3 {
0301 status = "okay";
0302 };
0303
0304 &i2c4 {
0305 status = "okay";
0306 };
0307
0308 &mmc0 {
0309 bus-width = <4>;
0310 disable-wp;
0311 pinctrl-names = "default";
0312 pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
0313 vmmc-supply = <&vcc_sd>;
0314 cap-mmc-highspeed;
0315 cap-sd-highspeed;
0316 status = "okay";
0317 };
0318
0319 &mmc1 {
0320 bus-width = <4>;
0321 non-removable;
0322 pinctrl-names = "default";
0323 pinctrl-0 = <&sd1_clk>, <&sd1_cmd>, <&sd1_bus4>;
0324 vmmc-supply = <&vccio_wl>;
0325 status = "okay";
0326 };
0327
0328 &pinctrl {
0329 pcfg_output_high: pcfg-output-high {
0330 output-high;
0331 };
0332
0333 ak8963 {
0334 comp_int: comp-int {
0335 rockchip,pins = <4 RK_PC1 RK_FUNC_GPIO &pcfg_pull_default>;
0336 };
0337 };
0338
0339 emac {
0340 rmii_rst: rmii-rst {
0341 rockchip,pins = <1 RK_PD6 RK_FUNC_GPIO &pcfg_output_high>;
0342 };
0343 };
0344
0345 ir {
0346 ir_int: ir-int {
0347 rockchip,pins = <6 RK_PA1 RK_FUNC_GPIO &pcfg_pull_default>;
0348 };
0349 };
0350
0351 keys {
0352 pwr_key: pwr-key {
0353 rockchip,pins = <6 RK_PA2 RK_FUNC_GPIO &pcfg_pull_default>;
0354 };
0355 };
0356
0357 mma8452 {
0358 gsensor_int: gsensor-int {
0359 rockchip,pins = <4 RK_PC0 RK_FUNC_GPIO &pcfg_pull_default>;
0360 };
0361 };
0362
0363 mmc {
0364 sdmmc_pwr: sdmmc-pwr {
0365 rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_default>;
0366 };
0367 };
0368
0369 usb_host {
0370 host_drv: host-drv {
0371 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_default>;
0372 };
0373
0374 hub_rst: hub-rst {
0375 rockchip,pins = <1 RK_PD7 RK_FUNC_GPIO &pcfg_output_high>;
0376 };
0377
0378 sata_pwr: sata-pwr {
0379 rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_default>;
0380 };
0381
0382 sata_reset: sata-reset {
0383 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_output_high>;
0384 };
0385 };
0386
0387 usb_otg {
0388 otg_drv: otg-drv {
0389 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_default>;
0390 };
0391 };
0392
0393 tps {
0394 pmic_int: pmic-int {
0395 rockchip,pins = <6 RK_PA4 RK_FUNC_GPIO &pcfg_pull_default>;
0396 };
0397
0398 pwr_hold: pwr-hold {
0399 rockchip,pins = <6 RK_PB0 RK_FUNC_GPIO &pcfg_output_high>;
0400 };
0401 };
0402 };
0403
0404 &pwm1 {
0405 status = "okay";
0406 };
0407
0408 &pwm2 {
0409 status = "okay";
0410 };
0411
0412 &pwm3 {
0413 status = "okay";
0414 };
0415
0416 &saradc {
0417 vref-supply = <&vcc_25>;
0418 status = "okay";
0419 };
0420
0421 &spi0 {
0422 status = "okay";
0423 };
0424
0425 &uart0 {
0426 pinctrl-names = "default";
0427 pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
0428 status = "okay";
0429 };
0430
0431 &uart2 {
0432 status = "okay";
0433 };
0434
0435 &uart3 {
0436 pinctrl-names = "default";
0437 pinctrl-0 = <&uart3_xfer>, <&uart3_cts>, <&uart3_rts>;
0438 status = "okay";
0439 };
0440
0441 &usb_host {
0442 pinctrl-names = "default";
0443 pinctrl-0 = <&hub_rst>, <&sata_reset>;
0444 status = "okay";
0445 };
0446
0447 &usbphy {
0448 status = "okay";
0449 };
0450
0451 &usb_otg {
0452 status = "okay";
0453 };
0454
0455 &wdt {
0456 status = "okay";
0457 };