Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 
0003 /dts-v1/;
0004 #include <dt-bindings/input/input.h>
0005 #include "rk3288-rock2-som.dtsi"
0006 
0007 / {
0008         model = "Radxa Rock 2 Square";
0009         compatible = "radxa,rock2-square", "rockchip,rk3288";
0010 
0011         chosen {
0012                 stdout-path = "serial2:115200n8";
0013         };
0014 
0015         adc-keys {
0016                 compatible = "adc-keys";
0017                 io-channels = <&saradc 1>;
0018                 io-channel-names = "buttons";
0019                 keyup-threshold-microvolt = <1800000>;
0020 
0021                 button-recovery {
0022                         label = "Recovery";
0023                         linux,code = <KEY_VENDOR>;
0024                         press-threshold-microvolt = <0>;
0025                 };
0026         };
0027 
0028         gpio-keys {
0029                 compatible = "gpio-keys";
0030 
0031                 key-power {
0032                         gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
0033                         label = "GPIO Power";
0034                         linux,code = <KEY_POWER>;
0035                         pinctrl-names = "default";
0036                         pinctrl-0 = <&pwr_key>;
0037                         wakeup-source;
0038                 };
0039         };
0040 
0041         gpio-leds {
0042                 compatible = "gpio-leds";
0043 
0044                 heartbeat_led: led-0 {
0045                         gpios = <&gpio7 RK_PB7 GPIO_ACTIVE_LOW>;
0046                         label = "rock2:green:state1";
0047                         linux,default-trigger = "heartbeat";
0048                 };
0049 
0050                 mmc_led: led-1 {
0051                         gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>;
0052                         label = "rock2:blue:state2";
0053                         linux,default-trigger = "mmc0";
0054                 };
0055         };
0056 
0057         ir: ir-receiver {
0058                 compatible = "gpio-ir-receiver";
0059                 gpios = <&gpio8 RK_PA1 GPIO_ACTIVE_LOW>;
0060                 pinctrl-names = "default";
0061                 pinctrl-0 = <&ir_int>;
0062         };
0063 
0064         sound {
0065                 compatible = "simple-audio-card";
0066                 simple-audio-card,name = "SPDIF";
0067                 simple-audio-card,dai-link@1 {  /* S/PDIF - S/PDIF */
0068                         cpu { sound-dai = <&spdif>; };
0069                         codec { sound-dai = <&spdif_out>; };
0070                 };
0071         };
0072 
0073         sata_pwr: sata-prw-regulator {
0074                 compatible = "regulator-fixed";
0075                 enable-active-high;
0076                 gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;
0077                 pinctrl-names = "default";
0078                 pinctrl-0 = <&sata_pwr_en>;
0079                 /* Always turn on the 5V sata power connector */
0080                 regulator-always-on;
0081                 regulator-name = "sata_pwr";
0082         };
0083 
0084         spdif_out: spdif-out {
0085                 compatible = "linux,spdif-dit";
0086                 #sound-dai-cells = <0>;
0087         };
0088 
0089         sound-i2s {
0090                 compatible = "rockchip,rk3288-hdmi-analog";
0091                 pinctrl-names = "default";
0092                 pinctrl-0 = <&phone_ctl>, <&hp_det>;
0093                 rockchip,audio-codec = <&es8388>;
0094                 rockchip,hp-det-gpios = <&gpio7 7 GPIO_ACTIVE_HIGH>;
0095                 rockchip,hp-en-gpios = <&gpio8 0 GPIO_ACTIVE_HIGH>;
0096                 rockchip,i2s-controller = <&i2s>;
0097                 rockchip,model = "I2S";
0098                 rockchip,routing = "Analog", "LOUT2",
0099                                    "Analog", "ROUT2";
0100         };
0101 
0102         sdio_pwrseq: sdio-pwrseq {
0103                 compatible = "mmc-pwrseq-simple";
0104                 clocks = <&hym8563>;
0105                 clock-names = "ext_clock";
0106                 pinctrl-names = "default";
0107                 pinctrl-0 = <&wifi_enable>;
0108                 reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>;
0109         };
0110 
0111         vcc_usb_host: vcc-host-regulator {
0112                 compatible = "regulator-fixed";
0113                 enable-active-high;
0114                 gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
0115                 pinctrl-names = "default";
0116                 pinctrl-0 = <&host_vbus_drv>;
0117                 regulator-name = "vcc_host";
0118         };
0119 
0120         vcc_sd: sdmmc-regulator {
0121                 compatible = "regulator-fixed";
0122                 gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
0123                 pinctrl-names = "default";
0124                 pinctrl-0 = <&sdmmc_pwr>;
0125                 regulator-name = "vcc_sd";
0126                 regulator-min-microvolt = <3300000>;
0127                 regulator-max-microvolt = <3300000>;
0128                 vin-supply = <&vcc_io>;
0129         };
0130 };
0131 
0132 &sdio0 {
0133         bus-width = <4>;
0134         cap-sd-highspeed;
0135         cap-sdio-irq;
0136         mmc-pwrseq = <&sdio_pwrseq>;
0137         non-removable;
0138         pinctrl-names = "default";
0139         pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk &sdio0_int>;
0140         vmmc-supply = <&vcc_io>;
0141         vqmmc-supply = <&vcc_18>;
0142         status = "okay";
0143 };
0144 
0145 &sdmmc {
0146         bus-width = <4>;
0147         cap-mmc-highspeed;
0148         cap-sd-highspeed;
0149         card-detect-delay = <200>;
0150         disable-wp;     /* wp not hooked up */
0151         pinctrl-names = "default";
0152         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
0153         vmmc-supply = <&vcc_sd>;
0154         vqmmc-supply = <&vccio_sd>;
0155         status = "okay";
0156 };
0157 
0158 &gmac {
0159         status = "okay";
0160 };
0161 
0162 &hdmi {
0163         ddc-i2c-bus = <&i2c5>;
0164         status = "okay";
0165 };
0166 
0167 &i2c0 {
0168         hym8563: hym8563@51 {
0169                 compatible = "haoyu,hym8563";
0170                 reg = <0x51>;
0171                 #clock-cells = <0>;
0172                 clock-frequency = <32768>;
0173                 clock-output-names = "xin32k";
0174                 interrupt-parent = <&gpio0>;
0175                 interrupts = <RK_PA4 IRQ_TYPE_EDGE_FALLING>;
0176                 pinctrl-names = "default";
0177                 pinctrl-0 = <&pmic_int>;
0178 
0179         };
0180 };
0181 
0182 &i2c2 {
0183         status = "okay";
0184 
0185         es8388: es8388@10 {
0186                 compatible = "everest,es8388", "everest,es8328";
0187                 reg = <0x10>;
0188                 AVDD-supply = <&vccio_codec>;
0189                 DVDD-supply = <&vccio_codec>;
0190                 HPVDD-supply = <&vccio_codec>;
0191                 PVDD-supply = <&vccio_codec>;
0192                 clocks = <&cru SCLK_I2S0_OUT>;
0193         };
0194 };
0195 
0196 &i2c5 {
0197         status = "okay";
0198 };
0199 
0200 &i2s {
0201         status = "okay";
0202 };
0203 
0204 &pinctrl {
0205         ir {
0206                 ir_int: ir-int {
0207                         rockchip,pins = <8 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
0208                 };
0209         };
0210 
0211         keys {
0212                 pwr_key: pwr-key {
0213                         rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
0214                 };
0215         };
0216 
0217         pmic {
0218                 pmic_int: pmic-int {
0219                         rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
0220                 };
0221         };
0222 
0223         headphone {
0224                 hp_det: hp-det {
0225                         rockchip,pins = <7 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
0226                 };
0227 
0228                 phone_ctl: phone-ctl {
0229                         rockchip,pins = <8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
0230                 };
0231         };
0232 
0233         usb {
0234                 host_vbus_drv: host-vbus-drv {
0235                         rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
0236                 };
0237         };
0238 
0239         sata {
0240                 sata_pwr_en: sata-pwr-en {
0241                         rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
0242                 };
0243         };
0244 
0245         sdmmc {
0246                 sdmmc_pwr: sdmmc-pwr {
0247                         rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
0248                 };
0249         };
0250 
0251         sdio {
0252                 wifi_enable: wifi-enable {
0253                         rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
0254                 };
0255         };
0256 };
0257 
0258 &saradc {
0259         status = "okay";
0260 };
0261 
0262 &spdif {
0263         status = "okay";
0264 };
0265 
0266 &uart2 {
0267         status = "okay";
0268 };
0269 
0270 &usbphy {
0271         status = "okay";
0272 };
0273 
0274 &usbphy1 {
0275         vbus-supply = <&vcc_usb_host>;
0276 };
0277 
0278 &usb_host0_ehci {
0279         status = "okay";
0280 };
0281 
0282 &usb_host1 {
0283         status = "okay";
0284 };
0285 
0286 &usb_otg {
0287         status = "okay";
0288 };