2 * This file is dual-licensed: you can use it either under the terms
3 * of the GPL or the X11 license, at your option. Note that this dual
4 * licensing only applies to this file, and not this project as a
7 * a) This file is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of the
10 * License, or (at your option) any later version.
12 * This file is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
19 * b) Permission is hereby granted, free of charge, to any person
20 * obtaining a copy of this software and associated documentation
21 * files (the "Software"), to deal in the Software without
22 * restriction, including without limitation the rights to use,
23 * copy, modify, merge, publish, distribute, sublicense, and/or
24 * sell copies of the Software, and to permit persons to whom the
25 * Software is furnished to do so, subject to the following
28 * The above copyright notice and this permission notice shall be
29 * included in all copies or substantial portions of the Software.
31 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
33 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
34 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
35 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
36 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
37 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
38 * OTHER DEALINGS IN THE SOFTWARE.
42 #include <dt-bindings/input/input.h>
43 #include "rk3288-rock2-som.dtsi"
46 model = "Radxa Rock 2 Square";
47 compatible = "radxa,rock2-square", "rockchip,rk3288";
50 stdout-path = "serial2:115200n8";
54 compatible = "adc-keys";
55 io-channels = <&saradc 1>;
56 io-channel-names = "buttons";
57 keyup-threshold-microvolt = <1800000>;
61 linux,code = <KEY_VENDOR>;
62 press-threshold-microvolt = <0>;
67 compatible = "gpio-keys";
70 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
72 linux,code = <KEY_POWER>;
73 pinctrl-names = "default";
74 pinctrl-0 = <&pwr_key>;
80 compatible = "gpio-leds";
83 gpios = <&gpio7 RK_PB7 GPIO_ACTIVE_LOW>;
84 label = "rock2:green:state1";
85 linux,default-trigger = "heartbeat";
89 gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>;
90 label = "rock2:blue:state2";
91 linux,default-trigger = "mmc0";
96 compatible = "gpio-ir-receiver";
97 gpios = <&gpio8 RK_PA1 GPIO_ACTIVE_LOW>;
98 pinctrl-names = "default";
99 pinctrl-0 = <&ir_int>;
103 compatible = "simple-audio-card";
104 simple-audio-card,name = "SPDIF";
105 simple-audio-card,dai-link@1 { /* S/PDIF - S/PDIF */
106 cpu { sound-dai = <&spdif>; };
107 codec { sound-dai = <&spdif_out>; };
111 sata_pwr: sata-prw-regulator {
112 compatible = "regulator-fixed";
114 gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;
115 pinctrl-names = "default";
116 pinctrl-0 = <&sata_pwr_en>;
117 /* Always turn on the 5V sata power connector */
119 regulator-name = "sata_pwr";
122 spdif_out: spdif-out {
123 compatible = "linux,spdif-dit";
124 #sound-dai-cells = <0>;
128 compatible = "rockchip,rk3288-hdmi-analog";
129 pinctrl-names = "default";
130 pinctrl-0 = <&phone_ctl>, <&hp_det>;
131 rockchip,audio-codec = <&es8388>;
132 rockchip,hp-det-gpios = <&gpio7 7 GPIO_ACTIVE_HIGH>;
133 rockchip,hp-en-gpios = <&gpio8 0 GPIO_ACTIVE_HIGH>;
134 rockchip,i2s-controller = <&i2s>;
135 rockchip,model = "I2S";
136 rockchip,routing = "Analog", "LOUT2",
140 sdio_pwrseq: sdio-pwrseq {
141 compatible = "mmc-pwrseq-simple";
143 clock-names = "ext_clock";
144 pinctrl-names = "default";
145 pinctrl-0 = <&wifi_enable>;
146 reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>;
149 vcc_usb_host: vcc-host-regulator {
150 compatible = "regulator-fixed";
152 gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
153 pinctrl-names = "default";
154 pinctrl-0 = <&host_vbus_drv>;
155 regulator-name = "vcc_host";
158 vcc_sd: sdmmc-regulator {
159 compatible = "regulator-fixed";
160 gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
161 pinctrl-names = "default";
162 pinctrl-0 = <&sdmmc_pwr>;
163 regulator-name = "vcc_sd";
164 regulator-min-microvolt = <3300000>;
165 regulator-max-microvolt = <3300000>;
166 vin-supply = <&vcc_io>;
175 mmc-pwrseq = <&sdio_pwrseq>;
177 pinctrl-names = "default";
178 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk &sdio0_int>;
179 vmmc-supply = <&vcc_io>;
180 vqmmc-supply = <&vcc_18>;
188 card-detect-delay = <200>;
189 disable-wp; /* wp not hooked up */
190 pinctrl-names = "default";
191 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
192 vmmc-supply = <&vcc_sd>;
193 vqmmc-supply = <&vccio_sd>;
202 ddc-i2c-bus = <&i2c5>;
207 hym8563: hym8563@51 {
208 compatible = "haoyu,hym8563";
211 clock-frequency = <32768>;
212 clock-output-names = "xin32k";
213 interrupt-parent = <&gpio0>;
214 interrupts = <RK_PA4 IRQ_TYPE_EDGE_FALLING>;
215 pinctrl-names = "default";
216 pinctrl-0 = <&pmic_int>;
225 compatible = "everest,es8388", "everest,es8328";
227 AVDD-supply = <&vccio_codec>;
228 DVDD-supply = <&vccio_codec>;
229 HPVDD-supply = <&vccio_codec>;
230 PVDD-supply = <&vccio_codec>;
231 clocks = <&cru SCLK_I2S0_OUT>;
246 rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_up>;
252 rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
258 rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>;
264 rockchip,pins = <7 7 RK_FUNC_GPIO &pcfg_pull_none>;
267 phone_ctl: phone-ctl {
268 rockchip,pins = <8 0 RK_FUNC_GPIO &pcfg_pull_up>;
273 host_vbus_drv: host-vbus-drv {
274 rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
279 sata_pwr_en: sata-pwr-en {
280 rockchip,pins = <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
285 sdmmc_pwr: sdmmc-pwr {
286 rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
291 wifi_enable: wifi-enable {
292 rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>;
314 vbus-supply = <&vcc_usb_host>;