Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de>
0004  */
0005 
0006 /dts-v1/;
0007 #include <dt-bindings/input/input.h>
0008 #include "rk3188.dtsi"
0009 
0010 / {
0011         model = "Radxa Rock";
0012         compatible = "radxa,rock", "rockchip,rk3188";
0013 
0014         aliases {
0015                 mmc0 = &mmc0;
0016         };
0017 
0018         memory@60000000 {
0019                 device_type = "memory";
0020                 reg = <0x60000000 0x80000000>;
0021         };
0022 
0023         gpio-keys {
0024                 compatible = "gpio-keys";
0025                 autorepeat;
0026 
0027                 key-power {
0028                         gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
0029                         linux,code = <KEY_POWER>;
0030                         label = "GPIO Key Power";
0031                         linux,input-type = <1>;
0032                         wakeup-source;
0033                         debounce-interval = <100>;
0034                 };
0035         };
0036 
0037         gpio-leds {
0038                 compatible = "gpio-leds";
0039 
0040                 green_led: led-0 {
0041                         label = "rock:green:user1";
0042                         gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_LOW>;
0043                         default-state = "off";
0044                 };
0045 
0046                 blue_led: led-1 {
0047                         label = "rock:blue:user2";
0048                         gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>;
0049                         default-state = "off";
0050                 };
0051 
0052                 sleep_led: led-2 {
0053                         label = "rock:red:power";
0054                         gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
0055                         default-state = "off";
0056                 };
0057         };
0058 
0059         sound {
0060                 compatible = "simple-audio-card";
0061                 simple-audio-card,name = "SPDIF";
0062 
0063                 simple-audio-card,dai-link@1 {  /* S/PDIF - S/PDIF */
0064                         cpu { sound-dai = <&spdif>; };
0065                         codec { sound-dai = <&spdif_out>; };
0066                 };
0067         };
0068 
0069         spdif_out: spdif-out {
0070                 compatible = "linux,spdif-dit";
0071                 #sound-dai-cells = <0>;
0072         };
0073 
0074         ir_recv: gpio-ir-receiver {
0075                 compatible = "gpio-ir-receiver";
0076                 gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
0077                 pinctrl-names = "default";
0078                 pinctrl-0 = <&ir_recv_pin>;
0079         };
0080 
0081         vcc_otg: usb-otg-regulator {
0082                 compatible = "regulator-fixed";
0083                 enable-active-high;
0084                 gpio = <&gpio2 RK_PD7 GPIO_ACTIVE_HIGH>;
0085                 pinctrl-names = "default";
0086                 pinctrl-0 = <&otg_vbus_drv>;
0087                 regulator-name = "otg-vbus";
0088                 regulator-min-microvolt = <5000000>;
0089                 regulator-max-microvolt = <5000000>;
0090                 regulator-always-on;
0091                 regulator-boot-on;
0092         };
0093 
0094         vcc_sd0: sdmmc-regulator {
0095                 compatible = "regulator-fixed";
0096                 regulator-name = "sdmmc-supply";
0097                 regulator-min-microvolt = <3300000>;
0098                 regulator-max-microvolt = <3300000>;
0099                 gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>;
0100                 pinctrl-names = "default";
0101                 pinctrl-0 = <&sdmmc_pwr>;
0102                 startup-delay-us = <100000>;
0103                 vin-supply = <&vcc_io>;
0104         };
0105 
0106         vcc_host: usb-host-regulator {
0107                 compatible = "regulator-fixed";
0108                 enable-active-high;
0109                 gpio = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>;
0110                 pinctrl-names = "default";
0111                 pinctrl-0 = <&host_vbus_drv>;
0112                 regulator-name = "host-pwr";
0113                 regulator-min-microvolt = <5000000>;
0114                 regulator-max-microvolt = <5000000>;
0115                 regulator-always-on;
0116                 regulator-boot-on;
0117         };
0118 
0119         vsys: vsys-regulator {
0120                 compatible = "regulator-fixed";
0121                 regulator-name = "vsys";
0122                 regulator-min-microvolt = <5000000>;
0123                 regulator-max-microvolt = <5000000>;
0124                 regulator-boot-on;
0125         };
0126 };
0127 
0128 &emac {
0129         status = "okay";
0130 
0131         pinctrl-names = "default";
0132         pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&phy_int>;
0133 
0134         phy = <&phy0>;
0135         phy-supply = <&vcc_rmii>;
0136 
0137         phy0: ethernet-phy@0 {
0138                 reg = <0>;
0139                 interrupt-parent = <&gpio3>;
0140                 interrupts = <RK_PD2 IRQ_TYPE_LEVEL_LOW>;
0141         };
0142 };
0143 
0144 &cpu0 {
0145         cpu-supply = <&vdd_arm>;
0146 };
0147 
0148 &cpu1 {
0149         cpu-supply = <&vdd_arm>;
0150 };
0151 
0152 &cpu2 {
0153         cpu-supply = <&vdd_arm>;
0154 };
0155 
0156 &cpu3 {
0157         cpu-supply = <&vdd_arm>;
0158 };
0159 
0160 &gpu {
0161         status = "okay";
0162 };
0163 
0164 &i2c1 {
0165         status = "okay";
0166         clock-frequency = <400000>;
0167 
0168         rtc@51 {
0169                 compatible = "haoyu,hym8563";
0170                 reg = <0x51>;
0171                 interrupt-parent = <&gpio0>;
0172                 interrupts = <RK_PB5 IRQ_TYPE_EDGE_FALLING>;
0173                 pinctrl-names = "default";
0174                 pinctrl-0 = <&rtc_int>;
0175                 #clock-cells = <0>;
0176                 clock-output-names = "xin32k";
0177         };
0178 
0179         act8846: act8846@5a {
0180                 compatible = "active-semi,act8846";
0181                 reg = <0x5a>;
0182                 status = "okay";
0183                 system-power-controller;
0184 
0185                 pinctrl-names = "default";
0186                 pinctrl-0 = <&act8846_dvs0_ctl>;
0187 
0188                 vp1-supply = <&vsys>;
0189                 vp2-supply = <&vsys>;
0190                 vp3-supply = <&vsys>;
0191                 vp4-supply = <&vsys>;
0192                 inl1-supply = <&vcc_io>;
0193                 inl2-supply = <&vsys>;
0194                 inl3-supply = <&vsys>;
0195 
0196                 regulators {
0197                         vcc_ddr: REG1 {
0198                                 regulator-name = "VCC_DDR";
0199                                 regulator-min-microvolt = <1200000>;
0200                                 regulator-max-microvolt = <1200000>;
0201                                 regulator-always-on;
0202                         };
0203 
0204                         vdd_log: REG2 {
0205                                 regulator-name = "VDD_LOG";
0206                                 regulator-min-microvolt = <1000000>;
0207                                 regulator-max-microvolt = <1000000>;
0208                                 regulator-always-on;
0209                         };
0210 
0211                         vdd_arm: REG3 {
0212                                 regulator-name = "VDD_ARM";
0213                                 regulator-min-microvolt = <875000>;
0214                                 regulator-max-microvolt = <1350000>;
0215                                 regulator-always-on;
0216                         };
0217 
0218                         vcc_io: REG4 {
0219                                 regulator-name = "VCC_IO";
0220                                 regulator-min-microvolt = <3300000>;
0221                                 regulator-max-microvolt = <3300000>;
0222                                 regulator-always-on;
0223                         };
0224 
0225                         vdd_10: REG5 {
0226                                 regulator-name = "VDD_10";
0227                                 regulator-min-microvolt = <1000000>;
0228                                 regulator-max-microvolt = <1000000>;
0229                                 regulator-always-on;
0230                         };
0231 
0232                         vdd_hdmi: REG6 {
0233                                 regulator-name = "VDD_HDMI";
0234                                 regulator-min-microvolt = <2500000>;
0235                                 regulator-max-microvolt = <2500000>;
0236                                 regulator-always-on;
0237                         };
0238 
0239                         vcc18: REG7 {
0240                                 regulator-name = "VCC_18";
0241                                 regulator-min-microvolt = <1800000>;
0242                                 regulator-max-microvolt = <1800000>;
0243                                 regulator-always-on;
0244                         };
0245 
0246                         vcca_33: REG8 {
0247                                 regulator-name = "VCCA_33";
0248                                 regulator-min-microvolt = <3300000>;
0249                                 regulator-max-microvolt = <3300000>;
0250                                 regulator-always-on;
0251                         };
0252 
0253                         vcc_rmii: REG9 {
0254                                 regulator-name = "VCC_RMII";
0255                                 regulator-min-microvolt = <3300000>;
0256                                 regulator-max-microvolt = <3300000>;
0257                         };
0258 
0259                         vccio_wl: REG10 {
0260                                 regulator-name = "VCCIO_WL";
0261                                 regulator-min-microvolt = <3300000>;
0262                                 regulator-max-microvolt = <3300000>;
0263                                 regulator-always-on;
0264                         };
0265 
0266                         vcc_18: REG11 {
0267                                 regulator-name = "VCC18_IO";
0268                                 regulator-min-microvolt = <1800000>;
0269                                 regulator-max-microvolt = <1800000>;
0270                                 regulator-always-on;
0271                         };
0272 
0273                         vcc28: REG12 {
0274                                 regulator-name = "VCC_28";
0275                                 regulator-min-microvolt = <2800000>;
0276                                 regulator-max-microvolt = <2800000>;
0277                                 regulator-always-on;
0278                         };
0279                 };
0280         };
0281 };
0282 
0283 &mmc0 {
0284         status = "okay";
0285         pinctrl-names = "default";
0286         pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
0287         vmmc-supply = <&vcc_sd0>;
0288 
0289         bus-width = <4>;
0290         cap-mmc-highspeed;
0291         cap-sd-highspeed;
0292         disable-wp;
0293 };
0294 
0295 &pwm1 {
0296         status = "okay";
0297 };
0298 
0299 &pwm2 {
0300         status = "okay";
0301 };
0302 
0303 &pwm3 {
0304         status = "okay";
0305 };
0306 
0307 &pinctrl {
0308         pcfg_output_low: pcfg-output-low {
0309                 output-low;
0310         };
0311 
0312         act8846 {
0313                 act8846_dvs0_ctl: act8846-dvs0-ctl {
0314                         rockchip,pins = <3 RK_PD3 RK_FUNC_GPIO &pcfg_output_low>;
0315                 };
0316         };
0317 
0318         hym8563 {
0319                 rtc_int: rtc-int {
0320                         rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
0321                 };
0322         };
0323 
0324         lan8720a  {
0325                 phy_int: phy-int {
0326                         rockchip,pins = <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>;
0327                 };
0328         };
0329 
0330         ir-receiver {
0331                 ir_recv_pin: ir-recv-pin {
0332                         rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
0333                 };
0334         };
0335 
0336         sd0 {
0337                 sdmmc_pwr: sdmmc-pwr {
0338                         rockchip,pins = <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
0339                 };
0340         };
0341 
0342         usb {
0343                 host_vbus_drv: host-vbus-drv {
0344                         rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
0345                 };
0346                 otg_vbus_drv: otg-vbus-drv {
0347                         rockchip,pins = <2 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>;
0348                 };
0349         };
0350 };
0351 
0352 &spdif {
0353         status = "okay";
0354 };
0355 
0356 &uart0 {
0357         status = "okay";
0358 };
0359 
0360 &uart1 {
0361         status = "okay";
0362 };
0363 
0364 &uart2 {
0365         status = "okay";
0366 };
0367 
0368 &uart3 {
0369         status = "okay";
0370 };
0371 
0372 &usbphy {
0373         status = "okay";
0374 };
0375 
0376 &usb_host {
0377         status = "okay";
0378 };
0379 
0380 &usb_otg {
0381         status = "okay";
0382 };
0383 
0384 &wdt {
0385         status = "okay";
0386 };