1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
4 #include <dt-bindings/input/input.h>
5 #include "rk3288-rock2-som.dtsi"
8 model = "Radxa Rock 2 Square";
9 compatible = "radxa,rock2-square", "rockchip,rk3288";
12 stdout-path = "serial2:115200n8";
16 compatible = "adc-keys";
17 io-channels = <&saradc 1>;
18 io-channel-names = "buttons";
19 keyup-threshold-microvolt = <1800000>;
23 linux,code = <KEY_VENDOR>;
24 press-threshold-microvolt = <0>;
29 compatible = "gpio-keys";
32 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_POWER>;
35 pinctrl-names = "default";
36 pinctrl-0 = <&pwr_key>;
42 compatible = "gpio-leds";
44 heartbeat_led: led-0 {
45 gpios = <&gpio7 RK_PB7 GPIO_ACTIVE_LOW>;
46 label = "rock2:green:state1";
47 linux,default-trigger = "heartbeat";
51 gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>;
52 label = "rock2:blue:state2";
53 linux,default-trigger = "mmc0";
58 compatible = "gpio-ir-receiver";
59 gpios = <&gpio8 RK_PA1 GPIO_ACTIVE_LOW>;
60 pinctrl-names = "default";
61 pinctrl-0 = <&ir_int>;
65 compatible = "simple-audio-card";
66 simple-audio-card,name = "SPDIF";
67 simple-audio-card,dai-link@1 { /* S/PDIF - S/PDIF */
68 cpu { sound-dai = <&spdif>; };
69 codec { sound-dai = <&spdif_out>; };
73 sata_pwr: sata-prw-regulator {
74 compatible = "regulator-fixed";
76 gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;
77 pinctrl-names = "default";
78 pinctrl-0 = <&sata_pwr_en>;
79 /* Always turn on the 5V sata power connector */
81 regulator-name = "sata_pwr";
84 spdif_out: spdif-out {
85 compatible = "linux,spdif-dit";
86 #sound-dai-cells = <0>;
90 compatible = "rockchip,rk3288-hdmi-analog";
91 pinctrl-names = "default";
92 pinctrl-0 = <&phone_ctl>, <&hp_det>;
93 rockchip,audio-codec = <&es8388>;
94 rockchip,hp-det-gpios = <&gpio7 7 GPIO_ACTIVE_HIGH>;
95 rockchip,hp-en-gpios = <&gpio8 0 GPIO_ACTIVE_HIGH>;
96 rockchip,i2s-controller = <&i2s>;
97 rockchip,model = "I2S";
98 rockchip,routing = "Analog", "LOUT2",
102 sdio_pwrseq: sdio-pwrseq {
103 compatible = "mmc-pwrseq-simple";
105 clock-names = "ext_clock";
106 pinctrl-names = "default";
107 pinctrl-0 = <&wifi_enable>;
108 reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>;
111 vcc_usb_host: vcc-host-regulator {
112 compatible = "regulator-fixed";
114 gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
115 pinctrl-names = "default";
116 pinctrl-0 = <&host_vbus_drv>;
117 regulator-name = "vcc_host";
120 vcc_sd: sdmmc-regulator {
121 compatible = "regulator-fixed";
122 gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
123 pinctrl-names = "default";
124 pinctrl-0 = <&sdmmc_pwr>;
125 regulator-name = "vcc_sd";
126 regulator-min-microvolt = <3300000>;
127 regulator-max-microvolt = <3300000>;
128 vin-supply = <&vcc_io>;
136 mmc-pwrseq = <&sdio_pwrseq>;
138 pinctrl-names = "default";
139 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk &sdio0_int>;
140 vmmc-supply = <&vcc_io>;
141 vqmmc-supply = <&vcc_18>;
149 card-detect-delay = <200>;
150 disable-wp; /* wp not hooked up */
151 pinctrl-names = "default";
152 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
153 vmmc-supply = <&vcc_sd>;
154 vqmmc-supply = <&vccio_sd>;
163 ddc-i2c-bus = <&i2c5>;
168 hym8563: hym8563@51 {
169 compatible = "haoyu,hym8563";
172 clock-frequency = <32768>;
173 clock-output-names = "xin32k";
174 interrupt-parent = <&gpio0>;
175 interrupts = <RK_PA4 IRQ_TYPE_EDGE_FALLING>;
176 pinctrl-names = "default";
177 pinctrl-0 = <&pmic_int>;
186 compatible = "everest,es8388", "everest,es8328";
188 AVDD-supply = <&vccio_codec>;
189 DVDD-supply = <&vccio_codec>;
190 HPVDD-supply = <&vccio_codec>;
191 PVDD-supply = <&vccio_codec>;
192 clocks = <&cru SCLK_I2S0_OUT>;
207 rockchip,pins = <8 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
213 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
219 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
225 rockchip,pins = <7 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
228 phone_ctl: phone-ctl {
229 rockchip,pins = <8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
234 host_vbus_drv: host-vbus-drv {
235 rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
240 sata_pwr_en: sata-pwr-en {
241 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
246 sdmmc_pwr: sdmmc-pwr {
247 rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
252 wifi_enable: wifi-enable {
253 rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
275 vbus-supply = <&vcc_usb_host>;