Merge branches 'intel_pstate', 'pm-cpufreq' and 'pm-cpufreq-sched'
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / rk3288-rock2-square.dts
1 /*
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
5  * whole.
6  *
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.
11  *
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.
16  *
17  * Or, alternatively,
18  *
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
26  *     conditions:
27  *
28  *     The above copyright notice and this permission notice shall be
29  *     included in all copies or substantial portions of the Software.
30  *
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.
39  */
40
41 /dts-v1/;
42 #include "rk3288-rock2-som.dtsi"
43
44 / {
45         model = "Radxa Rock 2 Square";
46         compatible = "radxa,rock2-square", "rockchip,rk3288";
47
48         chosen {
49                 stdout-path = "serial2:115200n8";
50         };
51
52         gpio-leds {
53                 compatible = "gpio-leds";
54
55                 heartbeat {
56                         gpios = <&gpio7 RK_PB7 GPIO_ACTIVE_LOW>;
57                         label = "rock2:green:state1";
58                         linux,default-trigger = "heartbeat";
59                 };
60
61                 mmc {
62                         gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>;
63                         label = "rock2:blue:state2";
64                         linux,default-trigger = "mmc0";
65                 };
66         };
67
68         ir: ir-receiver {
69                 compatible = "gpio-ir-receiver";
70                 gpios = <&gpio8 RK_PA1 GPIO_ACTIVE_LOW>;
71                 pinctrl-names = "default";
72                 pinctrl-0 = <&ir_int>;
73         };
74
75         sound {
76                 compatible = "simple-audio-card";
77                 simple-audio-card,name = "SPDIF";
78                 simple-audio-card,dai-link@1 {  /* S/PDIF - S/PDIF */
79                         cpu { sound-dai = <&spdif>; };
80                         codec { sound-dai = <&spdif_out>; };
81                 };
82         };
83
84         sata_pwr: sata-prw-regulator {
85                 compatible = "regulator-fixed";
86                 enable-active-high;
87                 gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;
88                 pinctrl-names = "default";
89                 pinctrl-0 = <&sata_pwr_en>;
90                 /* Always turn on the 5V sata power connector */
91                 regulator-always-on;
92                 regulator-name = "sata_pwr";
93         };
94
95         spdif_out: spdif-out {
96                 compatible = "linux,spdif-dit";
97                 #sound-dai-cells = <0>;
98         };
99
100         sound-i2s {
101                 compatible = "rockchip,rk3288-hdmi-analog";
102                 pinctrl-names = "default";
103                 pinctrl-0 = <&phone_ctl>, <&hp_det>;
104                 rockchip,audio-codec = <&es8388>;
105                 rockchip,hp-det-gpios = <&gpio7 7 GPIO_ACTIVE_HIGH>;
106                 rockchip,hp-en-gpios = <&gpio8 0 GPIO_ACTIVE_HIGH>;
107                 rockchip,i2s-controller = <&i2s>;
108                 rockchip,model = "I2S";
109                 rockchip,routing = "Analog", "LOUT2",
110                                    "Analog", "ROUT2";
111         };
112
113         sdio_pwrseq: sdio-pwrseq {
114                 compatible = "mmc-pwrseq-simple";
115                 clocks = <&hym8563>;
116                 clock-names = "ext_clock";
117                 pinctrl-names = "default";
118                 pinctrl-0 = <&wifi_enable>;
119                 reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>;
120         };
121
122         vcc_usb_host: vcc-host-regulator {
123                 compatible = "regulator-fixed";
124                 enable-active-high;
125                 gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
126                 pinctrl-names = "default";
127                 pinctrl-0 = <&host_vbus_drv>;
128                 /* Always on as the rockchip usb phy doesn't have a vbus-supply
129                  * property
130                  */
131                 regulator-always-on;
132                 regulator-name = "vcc_host";
133         };
134
135         vcc_sd: sdmmc-regulator {
136                 compatible = "regulator-fixed";
137                 gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
138                 pinctrl-names = "default";
139                 pinctrl-0 = <&sdmmc_pwr>;
140                 regulator-name = "vcc_sd";
141                 regulator-min-microvolt = <3300000>;
142                 regulator-max-microvolt = <3300000>;
143                 vin-supply = <&vcc_io>;
144         };
145 };
146
147 &sdio0 {
148         bus-width = <4>;
149         cap-sd-highspeed;
150         cap-sdio-irq;
151         disable-wp;
152         mmc-pwrseq = <&sdio_pwrseq>;
153         non-removable;
154         num-slots = <1>;
155         pinctrl-names = "default";
156         pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk &sdio0_int>;
157         vmmc-supply = <&vcc_io>;
158         vqmmc-supply = <&vcc_18>;
159         status = "okay";
160 };
161
162 &sdmmc {
163         bus-width = <4>;
164         cap-mmc-highspeed;
165         cap-sd-highspeed;
166         card-detect-delay = <200>;
167         disable-wp;     /* wp not hooked up */
168         num-slots = <1>;
169         pinctrl-names = "default";
170         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
171         vmmc-supply = <&vcc_sd>;
172         vqmmc-supply = <&vccio_sd>;
173         status = "okay";
174 };
175
176 &gmac {
177         status = "ok";
178 };
179
180 &hdmi {
181         ddc-i2c-bus = <&i2c5>;
182         status = "okay";
183 };
184
185 &i2c0 {
186         hym8563: hym8563@51 {
187                 compatible = "haoyu,hym8563";
188                 reg = <0x51>;
189                 #clock-cells = <0>;
190                 clock-frequency = <32768>;
191                 clock-output-names = "xin32k";
192                 interrupt-parent = <&gpio0>;
193                 interrupts = <RK_PA4 IRQ_TYPE_EDGE_FALLING>;
194                 pinctrl-names = "default";
195                 pinctrl-0 = <&pmic_int>;
196
197         };
198 };
199
200 &i2c2 {
201         status = "okay";
202
203         es8388: es8388@10 {
204                 compatible = "everest,es8388", "everest,es8328";
205                 reg = <0x10>;
206                 AVDD-supply = <&vccio_codec>;
207                 DVDD-supply = <&vccio_codec>;
208                 HPVDD-supply = <&vccio_codec>;
209                 PVDD-supply = <&vccio_codec>;
210                 clocks = <&cru SCLK_I2S0_OUT>;
211         };
212 };
213
214 &i2c5 {
215         status = "okay";
216 };
217
218 &i2s {
219         status = "okay";
220 };
221
222 &pinctrl {
223         ir {
224                 ir_int: ir-int {
225                         rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_up>;
226                 };
227         };
228
229         pmic {
230                 pmic_int: pmic-int {
231                         rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>;
232                 };
233         };
234
235         headphone {
236                 hp_det: hp-det {
237                         rockchip,pins = <7 7 RK_FUNC_GPIO &pcfg_pull_none>;
238                 };
239
240                 phone_ctl: phone-ctl {
241                         rockchip,pins = <8 0 RK_FUNC_GPIO &pcfg_pull_up>;
242                 };
243         };
244
245         usb {
246                 host_vbus_drv: host-vbus-drv {
247                         rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
248                 };
249         };
250
251         sata {
252                 sata_pwr_en: sata-pwr-en {
253                         rockchip,pins = <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
254                 };
255         };
256
257         sdmmc {
258                 sdmmc_pwr: sdmmc-pwr {
259                         rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
260                 };
261         };
262
263         sdio {
264                 wifi_enable: wifi-enable {
265                         rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>;
266                 };
267         };
268 };
269
270 &spdif {
271         status = "okay";
272 };
273
274 &uart2 {
275         status = "okay";
276 };
277
278 &usbphy {
279         status = "okay";
280 };
281
282 &usb_host0_ehci {
283         status = "okay";
284 };
285
286 &usb_host1 {
287         status = "okay";
288 };