Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
0004  */
0005 
0006 /dts-v1/;
0007 #include <dt-bindings/gpio/gpio.h>
0008 #include <dt-bindings/input/input.h>
0009 #include <dt-bindings/pinctrl/rockchip.h>
0010 #include "px30.dtsi"
0011 
0012 / {
0013         model = "Rockchip PX30 EVB";
0014         compatible = "rockchip,px30-evb", "rockchip,px30";
0015 
0016         aliases {
0017                 mmc0 = &sdmmc;
0018                 mmc1 = &sdio;
0019                 mmc2 = &emmc;
0020         };
0021 
0022         chosen {
0023                 stdout-path = "serial5:115200n8";
0024         };
0025 
0026         adc-keys {
0027                 compatible = "adc-keys";
0028                 io-channels = <&saradc 2>;
0029                 io-channel-names = "buttons";
0030                 keyup-threshold-microvolt = <1800000>;
0031                 poll-interval = <100>;
0032 
0033                 esc-key {
0034                         label = "esc";
0035                         linux,code = <KEY_ESC>;
0036                         press-threshold-microvolt = <1310000>;
0037                 };
0038 
0039                 home-key {
0040                         label = "home";
0041                         linux,code = <KEY_HOME>;
0042                         press-threshold-microvolt = <624000>;
0043                 };
0044 
0045                 menu-key {
0046                         label = "menu";
0047                         linux,code = <KEY_MENU>;
0048                         press-threshold-microvolt = <987000>;
0049                 };
0050 
0051                 vol-down-key {
0052                         label = "volume down";
0053                         linux,code = <KEY_VOLUMEDOWN>;
0054                         press-threshold-microvolt = <300000>;
0055                 };
0056 
0057                 vol-up-key {
0058                         label = "volume up";
0059                         linux,code = <KEY_VOLUMEUP>;
0060                         press-threshold-microvolt = <17000>;
0061                 };
0062         };
0063 
0064         backlight: backlight {
0065                 compatible = "pwm-backlight";
0066                 pwms = <&pwm1 0 25000 0>;
0067                 power-supply = <&vcc3v3_lcd>;
0068         };
0069 
0070         emmc_pwrseq: emmc-pwrseq {
0071                 compatible = "mmc-pwrseq-emmc";
0072                 pinctrl-0 = <&emmc_reset>;
0073                 pinctrl-names = "default";
0074                 reset-gpios = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>;
0075         };
0076 
0077         sdio_pwrseq: sdio-pwrseq {
0078                 compatible = "mmc-pwrseq-simple";
0079                 pinctrl-names = "default";
0080                 pinctrl-0 = <&wifi_enable_h>;
0081 
0082                 /*
0083                  * On the module itself this is one of these (depending
0084                  * on the actual card populated):
0085                  * - SDIO_RESET_L_WL_REG_ON
0086                  * - PDN (power down when low)
0087                  */
0088                 reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; /* GPIO3_A4 */
0089         };
0090 
0091         vcc5v0_sys: vccsys {
0092                 compatible = "regulator-fixed";
0093                 regulator-name = "vcc5v0_sys";
0094                 regulator-always-on;
0095                 regulator-boot-on;
0096                 regulator-min-microvolt = <5000000>;
0097                 regulator-max-microvolt = <5000000>;
0098         };
0099 };
0100 
0101 &cpu0 {
0102         cpu-supply = <&vdd_arm>;
0103 };
0104 
0105 &cpu1 {
0106         cpu-supply = <&vdd_arm>;
0107 };
0108 
0109 &cpu2 {
0110         cpu-supply = <&vdd_arm>;
0111 };
0112 
0113 &cpu3 {
0114         cpu-supply = <&vdd_arm>;
0115 };
0116 
0117 &csi_dphy {
0118         status = "okay";
0119 };
0120 
0121 &display_subsystem {
0122         status = "okay";
0123 };
0124 
0125 &dsi {
0126         status = "okay";
0127 
0128         ports {
0129                 mipi_out: port@1 {
0130                         reg = <1>;
0131 
0132                         mipi_out_panel: endpoint {
0133                                 remote-endpoint = <&mipi_in_panel>;
0134                         };
0135                 };
0136         };
0137 
0138         panel@0 {
0139                 compatible = "xinpeng,xpp055c272";
0140                 reg = <0>;
0141                 backlight = <&backlight>;
0142                 iovcc-supply = <&vcc_1v8>;
0143                 vci-supply = <&vcc3v3_lcd>;
0144 
0145                 port {
0146                         mipi_in_panel: endpoint {
0147                                 remote-endpoint = <&mipi_out_panel>;
0148                         };
0149                 };
0150         };
0151 };
0152 
0153 &dsi_dphy {
0154         status = "okay";
0155 };
0156 
0157 &emmc {
0158         cap-mmc-highspeed;
0159         mmc-hs200-1_8v;
0160         non-removable;
0161         mmc-pwrseq = <&emmc_pwrseq>;
0162         vmmc-supply = <&vcc_3v0>;
0163         vqmmc-supply = <&vccio_flash>;
0164         status = "okay";
0165 };
0166 
0167 &gmac {
0168         clock_in_out = "output";
0169         phy-supply = <&vcc_rmii>;
0170         snps,reset-gpio = <&gpio2 13 GPIO_ACTIVE_LOW>;
0171         snps,reset-active-low;
0172         snps,reset-delays-us = <0 50000 50000>;
0173         status = "okay";
0174 };
0175 
0176 &gpu {
0177         mali-supply = <&vdd_log>;
0178         status = "okay";
0179 };
0180 
0181 &i2c0 {
0182         status = "okay";
0183 
0184         rk809: pmic@20 {
0185                 compatible = "rockchip,rk809";
0186                 reg = <0x20>;
0187                 interrupt-parent = <&gpio0>;
0188                 interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
0189                 pinctrl-names = "default";
0190                 pinctrl-0 = <&pmic_int>;
0191                 rockchip,system-power-controller;
0192                 wakeup-source;
0193                 #clock-cells = <0>;
0194                 clock-output-names = "xin32k";
0195 
0196                 vcc1-supply = <&vcc5v0_sys>;
0197                 vcc2-supply = <&vcc5v0_sys>;
0198                 vcc3-supply = <&vcc5v0_sys>;
0199                 vcc4-supply = <&vcc5v0_sys>;
0200                 vcc5-supply = <&vcc3v3_sys>;
0201                 vcc6-supply = <&vcc3v3_sys>;
0202                 vcc7-supply = <&vcc3v3_sys>;
0203                 vcc8-supply = <&vcc3v3_sys>;
0204                 vcc9-supply = <&vcc5v0_sys>;
0205 
0206                 regulators {
0207                         vdd_log: DCDC_REG1 {
0208                                 regulator-name = "vdd_log";
0209                                 regulator-min-microvolt = <950000>;
0210                                 regulator-max-microvolt = <1350000>;
0211                                 regulator-ramp-delay = <6001>;
0212                                 regulator-always-on;
0213                                 regulator-boot-on;
0214 
0215                                 regulator-state-mem {
0216                                         regulator-on-in-suspend;
0217                                         regulator-suspend-microvolt = <950000>;
0218                                 };
0219                         };
0220 
0221                         vdd_arm: DCDC_REG2 {
0222                                 regulator-name = "vdd_arm";
0223                                 regulator-min-microvolt = <950000>;
0224                                 regulator-max-microvolt = <1350000>;
0225                                 regulator-ramp-delay = <6001>;
0226                                 regulator-always-on;
0227                                 regulator-boot-on;
0228 
0229                                 regulator-state-mem {
0230                                         regulator-off-in-suspend;
0231                                         regulator-suspend-microvolt = <950000>;
0232                                 };
0233                         };
0234 
0235                         vcc_ddr: DCDC_REG3 {
0236                                 regulator-name = "vcc_ddr";
0237                                 regulator-always-on;
0238                                 regulator-boot-on;
0239 
0240                                 regulator-state-mem {
0241                                         regulator-on-in-suspend;
0242                                 };
0243                         };
0244 
0245                         vcc_3v0: vcc_rmii: DCDC_REG4 {
0246                                 regulator-name = "vcc_3v0";
0247                                 regulator-min-microvolt = <3000000>;
0248                                 regulator-max-microvolt = <3000000>;
0249                                 regulator-always-on;
0250                                 regulator-boot-on;
0251 
0252                                 regulator-state-mem {
0253                                         regulator-on-in-suspend;
0254                                         regulator-suspend-microvolt = <3000000>;
0255                                 };
0256                         };
0257 
0258                         vcc3v3_sys: DCDC_REG5 {
0259                                 regulator-name = "vcc3v3_sys";
0260                                 regulator-min-microvolt = <3300000>;
0261                                 regulator-max-microvolt = <3300000>;
0262                                 regulator-always-on;
0263                                 regulator-boot-on;
0264 
0265                                 regulator-state-mem {
0266                                         regulator-on-in-suspend;
0267                                         regulator-suspend-microvolt = <3300000>;
0268                                 };
0269                         };
0270 
0271                         vcc_1v0: LDO_REG1 {
0272                                 regulator-name = "vcc_1v0";
0273                                 regulator-min-microvolt = <1000000>;
0274                                 regulator-max-microvolt = <1000000>;
0275                                 regulator-always-on;
0276                                 regulator-boot-on;
0277 
0278                                 regulator-state-mem {
0279                                         regulator-on-in-suspend;
0280                                         regulator-suspend-microvolt = <1000000>;
0281                                 };
0282                         };
0283 
0284                         vcc_1v8: vccio_flash: vccio_sdio: LDO_REG2 {
0285                                 regulator-name = "vcc_1v8";
0286                                 regulator-min-microvolt = <1800000>;
0287                                 regulator-max-microvolt = <1800000>;
0288                                 regulator-always-on;
0289                                 regulator-boot-on;
0290 
0291                                 regulator-state-mem {
0292                                         regulator-on-in-suspend;
0293                                         regulator-suspend-microvolt = <1800000>;
0294                                 };
0295                         };
0296 
0297                         vdd_1v0: LDO_REG3 {
0298                                 regulator-name = "vdd_1v0";
0299                                 regulator-min-microvolt = <1000000>;
0300                                 regulator-max-microvolt = <1000000>;
0301                                 regulator-always-on;
0302                                 regulator-boot-on;
0303 
0304                                 regulator-state-mem {
0305                                         regulator-on-in-suspend;
0306                                         regulator-suspend-microvolt = <1000000>;
0307                                 };
0308                         };
0309 
0310                         vcc3v0_pmu: LDO_REG4 {
0311                                 regulator-name = "vcc3v0_pmu";
0312                                 regulator-min-microvolt = <3000000>;
0313                                 regulator-max-microvolt = <3000000>;
0314                                 regulator-always-on;
0315                                 regulator-boot-on;
0316 
0317                                 regulator-state-mem {
0318                                         regulator-on-in-suspend;
0319                                         regulator-suspend-microvolt = <3000000>;
0320                                 };
0321                         };
0322 
0323                         vccio_sd: LDO_REG5 {
0324                                 regulator-name = "vccio_sd";
0325                                 regulator-min-microvolt = <1800000>;
0326                                 regulator-max-microvolt = <3300000>;
0327                                 regulator-always-on;
0328                                 regulator-boot-on;
0329 
0330                                 regulator-state-mem {
0331                                         regulator-on-in-suspend;
0332                                         regulator-suspend-microvolt = <3300000>;
0333                                 };
0334                         };
0335 
0336                         vcc_sd: LDO_REG6 {
0337                                 regulator-name = "vcc_sd";
0338                                 regulator-min-microvolt = <3300000>;
0339                                 regulator-max-microvolt = <3300000>;
0340                                 regulator-boot-on;
0341 
0342                                 regulator-state-mem {
0343                                         regulator-on-in-suspend;
0344                                         regulator-suspend-microvolt = <3300000>;
0345                                 };
0346                         };
0347 
0348                         vcc2v8_dvp: LDO_REG7 {
0349                                 regulator-name = "vcc2v8_dvp";
0350                                 regulator-min-microvolt = <2800000>;
0351                                 regulator-max-microvolt = <2800000>;
0352                                 regulator-boot-on;
0353 
0354                                 regulator-state-mem {
0355                                         regulator-off-in-suspend;
0356                                         regulator-suspend-microvolt = <2800000>;
0357                                 };
0358                         };
0359 
0360                         vcc1v8_dvp: LDO_REG8 {
0361                                 regulator-name = "vcc1v8_dvp";
0362                                 regulator-min-microvolt = <1800000>;
0363                                 regulator-max-microvolt = <1800000>;
0364                                 regulator-boot-on;
0365 
0366                                 regulator-state-mem {
0367                                         regulator-on-in-suspend;
0368                                         regulator-suspend-microvolt = <1800000>;
0369                                 };
0370                         };
0371 
0372                         vcc1v5_dvp: LDO_REG9 {
0373                                 regulator-name = "vcc1v5_dvp";
0374                                 regulator-min-microvolt = <1500000>;
0375                                 regulator-max-microvolt = <1500000>;
0376                                 regulator-boot-on;
0377 
0378                                 regulator-state-mem {
0379                                         regulator-off-in-suspend;
0380                                         regulator-suspend-microvolt = <1500000>;
0381                                 };
0382                         };
0383 
0384                         vcc3v3_lcd: SWITCH_REG1 {
0385                                 regulator-name = "vcc3v3_lcd";
0386                                 regulator-boot-on;
0387                         };
0388 
0389                         vcc5v0_host: SWITCH_REG2 {
0390                                 regulator-name = "vcc5v0_host";
0391                                 regulator-always-on;
0392                                 regulator-boot-on;
0393                         };
0394                 };
0395         };
0396 };
0397 
0398 &i2c1 {
0399         status = "okay";
0400 
0401         sensor@d {
0402                 compatible = "asahi-kasei,ak8963";
0403                 reg = <0x0d>;
0404                 gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
0405                 vdd-supply = <&vcc3v0_pmu>;
0406                 mount-matrix = "1", /* x0 */
0407                                "0", /* y0 */
0408                                "0", /* z0 */
0409                                "0", /* x1 */
0410                                "1", /* y1 */
0411                                "0", /* z1 */
0412                                "0", /* x2 */
0413                                "0", /* y2 */
0414                                "1"; /* z2 */
0415         };
0416 
0417         touchscreen@14 {
0418                 compatible = "goodix,gt1151";
0419                 reg = <0x14>;
0420                 interrupt-parent = <&gpio0>;
0421                 interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
0422                 irq-gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
0423                 reset-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
0424                 VDDIO-supply = <&vcc3v3_lcd>;
0425         };
0426 
0427         sensor@4c {
0428                 compatible = "fsl,mma7660";
0429                 reg = <0x4c>;
0430                 interrupt-parent = <&gpio0>;
0431                 interrupts = <RK_PB7 IRQ_TYPE_LEVEL_LOW>;
0432         };
0433 };
0434 
0435 &i2c2 {
0436         status = "okay";
0437 
0438         clock-frequency = <100000>;
0439 
0440         /* These are relatively safe rise/fall times; TODO: measure */
0441         i2c-scl-falling-time-ns = <50>;
0442         i2c-scl-rising-time-ns = <300>;
0443 
0444         ov5695: ov5695@36 {
0445                 compatible = "ovti,ov5695";
0446                 reg = <0x36>;
0447                 avdd-supply = <&vcc2v8_dvp>;
0448                 clocks = <&cru SCLK_CIF_OUT>;
0449                 clock-names = "xvclk";
0450                 dvdd-supply = <&vcc1v5_dvp>;
0451                 dovdd-supply = <&vcc1v8_dvp>;
0452                 pinctrl-names = "default";
0453                 pinctrl-0 = <&cif_clkout_m0>;
0454                 reset-gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
0455 
0456                 port {
0457                         ucam_out: endpoint {
0458                                 remote-endpoint = <&mipi_in_ucam>;
0459                                 data-lanes = <1 2>;
0460                         };
0461                 };
0462         };
0463 };
0464 
0465 &i2s1_2ch {
0466         status = "okay";
0467 };
0468 
0469 &io_domains {
0470         status = "okay";
0471 
0472         vccio1-supply = <&vccio_sdio>;
0473         vccio2-supply = <&vccio_sd>;
0474         vccio3-supply = <&vcc_3v0>;
0475         vccio4-supply = <&vcc3v0_pmu>;
0476         vccio5-supply = <&vcc_3v0>;
0477         vccio6-supply = <&vccio_flash>;
0478 };
0479 
0480 &isp {
0481         status = "okay";
0482 
0483         ports {
0484                 port@0 {
0485                         mipi_in_ucam: endpoint@0 {
0486                                 reg = <0>;
0487                                 data-lanes = <1 2>;
0488                                 remote-endpoint = <&ucam_out>;
0489                         };
0490                 };
0491         };
0492 };
0493 
0494 &isp_mmu {
0495         status = "okay";
0496 };
0497 
0498 &pinctrl {
0499         headphone {
0500                 hp_det: hp-det {
0501                         rockchip,pins =
0502                                 <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>;
0503                 };
0504         };
0505 
0506         emmc {
0507                 emmc_reset: emmc-reset {
0508                         rockchip,pins = <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
0509                 };
0510         };
0511 
0512         pmic {
0513                 pmic_int: pmic_int {
0514                         rockchip,pins =
0515                                 <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
0516                 };
0517 
0518                 soc_slppin_gpio: soc_slppin_gpio {
0519                         rockchip,pins =
0520                                 <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>;
0521                 };
0522 
0523                 soc_slppin_slp: soc_slppin_slp {
0524                         rockchip,pins =
0525                                 <0 RK_PA4 1 &pcfg_pull_none>;
0526                 };
0527 
0528                 soc_slppin_rst: soc_slppin_rst {
0529                         rockchip,pins =
0530                                 <0 RK_PA4 2 &pcfg_pull_none>;
0531                 };
0532         };
0533 
0534         sdio-pwrseq {
0535                 wifi_enable_h: wifi-enable-h {
0536                         rockchip,pins =
0537                                 <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
0538                 };
0539         };
0540 };
0541 
0542 &pmu_io_domains {
0543         status = "okay";
0544 
0545         pmuio1-supply = <&vcc3v0_pmu>;
0546         pmuio2-supply = <&vcc3v0_pmu>;
0547 };
0548 
0549 &pwm1 {
0550         status = "okay";
0551 };
0552 
0553 &saradc {
0554         vref-supply = <&vcc_1v8>;
0555         status = "okay";
0556 };
0557 
0558 &sdmmc {
0559         cap-mmc-highspeed;
0560         cap-sd-highspeed;
0561         card-detect-delay = <800>;
0562         sd-uhs-sdr12;
0563         sd-uhs-sdr25;
0564         sd-uhs-sdr50;
0565         sd-uhs-sdr104;
0566         vmmc-supply = <&vcc_sd>;
0567         vqmmc-supply = <&vccio_sd>;
0568         status = "okay";
0569 };
0570 
0571 &sdio {
0572         cap-sd-highspeed;
0573         keep-power-in-suspend;
0574         non-removable;
0575         mmc-pwrseq = <&sdio_pwrseq>;
0576         sd-uhs-sdr104;
0577         status = "okay";
0578 };
0579 
0580 &tsadc {
0581         rockchip,hw-tshut-mode = <1>;
0582         rockchip,hw-tshut-polarity = <1>;
0583         status = "okay";
0584 };
0585 
0586 &u2phy {
0587         status = "okay";
0588 
0589         u2phy_host: host-port {
0590                 status = "okay";
0591         };
0592 
0593         u2phy_otg: otg-port {
0594                 status = "okay";
0595         };
0596 };
0597 
0598 &uart1 {
0599         pinctrl-names = "default";
0600         pinctrl-0 = <&uart1_xfer &uart1_cts>;
0601         status = "okay";
0602 };
0603 
0604 &uart5 {
0605         status = "okay";
0606 };
0607 
0608 &usb20_otg {
0609         status = "okay";
0610 };
0611 
0612 &usb_host0_ehci {
0613         status = "okay";
0614 };
0615 
0616 &usb_host0_ohci {
0617         status = "okay";
0618 };
0619 
0620 &vopb {
0621         status = "okay";
0622 };
0623 
0624 &vopb_mmu {
0625         status = "okay";
0626 };
0627 
0628 &vopl {
0629         status = "okay";
0630 };
0631 
0632 &vopl_mmu {
0633         status = "okay";
0634 };