arm64: dts: rk3399-android-6.0: remove iep device node
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / boot / dts / rockchip / rk3368-r88.dts
1 /*
2  * Copyright (c) 2015 Heiko Stuebner <heiko@sntech.de>
3  *
4  * This file is dual-licensed: you can use it either under the terms
5  * of the GPL or the X11 license, at your option. Note that this dual
6  * licensing only applies to this file, and not this project as a
7  * whole.
8  *
9  *  a) This file is free software; you can redistribute it and/or
10  *     modify it under the terms of the GNU General Public License as
11  *     published by the Free Software Foundation; either version 2 of the
12  *     License, or (at your option) any later version.
13  *
14  *     This file is distributed in the hope that it will be useful,
15  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *     GNU General Public License for more details.
18  *
19  * Or, alternatively,
20  *
21  *  b) Permission is hereby granted, free of charge, to any person
22  *     obtaining a copy of this software and associated documentation
23  *     files (the "Software"), to deal in the Software without
24  *     restriction, including without limitation the rights to use,
25  *     copy, modify, merge, publish, distribute, sublicense, and/or
26  *     sell copies of the Software, and to permit persons to whom the
27  *     Software is furnished to do so, subject to the following
28  *     conditions:
29  *
30  *     The above copyright notice and this permission notice shall be
31  *     included in all copies or substantial portions of the Software.
32  *
33  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40  *     OTHER DEALINGS IN THE SOFTWARE.
41  */
42
43 /dts-v1/;
44 #include "rk3368.dtsi"
45
46 / {
47         model = "Rockchip R88";
48         compatible = "rockchip,r88", "rockchip,rk3368";
49
50         chosen {
51                 stdout-path = "serial2:115200n8";
52         };
53
54         memory {
55                 device_type = "memory";
56                 reg = <0x0 0x0 0x0 0x40000000>;
57         };
58
59         emmc_pwrseq: emmc-pwrseq {
60                 compatible = "mmc-pwrseq-emmc";
61                 pinctrl-0 = <&emmc_reset>;
62                 pinctrl-names = "default";
63                 reset-gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
64         };
65
66         keys: gpio-keys {
67                 compatible = "gpio-keys";
68                 #address-cells = <1>;
69                 #size-cells = <0>;
70                 pinctrl-names = "default";
71                 pinctrl-0 = <&pwr_key>;
72
73                 button@0 {
74                         gpio-key,wakeup = <1>;
75                         gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
76                         label = "GPIO Power";
77                         linux,code = <116>;
78                 };
79         };
80
81         leds: gpio-leds {
82                 compatible = "gpio-leds";
83
84                 work {
85                         gpios = <&gpio3 29 GPIO_ACTIVE_HIGH>;
86                         label = "r88:green:led";
87                         pinctrl-names = "default";
88                         pinctrl-0 = <&led_ctl>;
89                 };
90         };
91
92         ir: ir-receiver {
93                 compatible = "gpio-ir-receiver";
94                 gpios = <&gpio3 30 GPIO_ACTIVE_LOW>;
95                 pinctrl-names = "default";
96                 pinctrl-0 = <&ir_int>;
97         };
98
99         sdio_pwrseq: sdio-pwrseq {
100                 compatible = "mmc-pwrseq-simple";
101                 clocks = <&hym8563>;
102                 clock-names = "ext_clock";
103                 pinctrl-names = "default";
104                 pinctrl-0 = <&bt_rst>, <&wifi_reg_on>;
105
106                 reset-gpios =
107                         /* BT_RST_N */
108                         <&gpio3 5 GPIO_ACTIVE_LOW>,
109
110                         /* WL_REG_ON */
111                         <&gpio3 4 GPIO_ACTIVE_LOW>;
112         };
113
114         vcc_18: vcc18-regulator {
115                 compatible = "regulator-fixed";
116                 regulator-name = "vcc_18";
117                 regulator-min-microvolt = <1800000>;
118                 regulator-max-microvolt = <1800000>;
119                 regulator-always-on;
120                 regulator-boot-on;
121                 vin-supply = <&vcc_sys>;
122         };
123
124         /* supplies both host and otg */
125         vcc_host: vcc-host-regulator {
126                 compatible = "regulator-fixed";
127                 enable-active-high;
128                 gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>;
129                 pinctrl-names = "default";
130                 pinctrl-0 = <&host_vbus_drv>;
131                 regulator-name = "vcc_host";
132                 regulator-always-on;
133                 regulator-boot-on;
134                 vin-supply = <&vcc_sys>;
135         };
136
137         vcc_io: vcc-io-regulator {
138                 compatible = "regulator-fixed";
139                 regulator-name = "vcc_io";
140                 regulator-min-microvolt = <3300000>;
141                 regulator-max-microvolt = <3300000>;
142                 regulator-always-on;
143                 regulator-boot-on;
144                 vin-supply = <&vcc_sys>;
145         };
146
147         vcc_lan: vcc-lan-regulator {
148                 compatible = "regulator-fixed";
149                 regulator-name = "vcc_lan";
150                 regulator-min-microvolt = <3300000>;
151                 regulator-max-microvolt = <3300000>;
152                 regulator-always-on;
153                 regulator-boot-on;
154                 vin-supply = <&vcc_io>;
155         };
156
157         vcc_sys: vcc-sys-regulator {
158                 compatible = "regulator-fixed";
159                 regulator-name = "vcc_sys";
160                 regulator-min-microvolt = <5000000>;
161                 regulator-max-microvolt = <5000000>;
162                 regulator-always-on;
163                 regulator-boot-on;
164         };
165
166         vccio_wl: vccio-wl-regulator {
167                 compatible = "regulator-fixed";
168                 regulator-name = "vccio_wl";
169                 regulator-min-microvolt = <3300000>;
170                 regulator-max-microvolt = <3300000>;
171                 regulator-always-on;
172                 regulator-boot-on;
173                 vin-supply = <&vcc_io>;
174         };
175
176         vdd_10: vdd-10-regulator {
177                 compatible = "regulator-fixed";
178                 regulator-name = "vdd_10";
179                 regulator-min-microvolt = <1000000>;
180                 regulator-max-microvolt = <1000000>;
181                 regulator-always-on;
182                 regulator-boot-on;
183                 vin-supply = <&vcc_sys>;
184         };
185 };
186
187 &emmc {
188         broken-cd;
189         bus-width = <8>;
190         cap-mmc-highspeed;
191         mmc-hs200-1_8v;
192         disable-wp;
193         mmc-pwrseq = <&emmc_pwrseq>;
194         non-removable;
195         num-slots = <1>;
196         pinctrl-names = "default";
197         pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
198         status = "okay";
199 };
200
201 &gmac {
202         phy-supply = <&vcc_lan>;
203         phy-mode = "rmii";
204         clock_in_out = "output";
205         snps,reset-gpio = <&gpio3 12 0>;
206         snps,reset-active-low;
207         snps,reset-delays-us = <0 10000 1000000>;
208         pinctrl-names = "default";
209         pinctrl-0 = <&rmii_pins>;
210         tx_delay = <0x30>;
211         rx_delay = <0x10>;
212         status = "ok";
213 };
214
215 &i2c0 {
216         status = "okay";
217
218         vdd_cpu: syr827@40 {
219                 compatible = "silergy,syr827";
220                 reg = <0x40>;
221                 fcs,suspend-voltage-selector = <1>;
222                 regulator-name = "vdd_cpu";
223                 regulator-enable-ramp-delay = <300>;
224                 regulator-min-microvolt = <712500>;
225                 regulator-max-microvolt = <1500000>;
226                 regulator-ramp-delay = <8000>;
227                 regulator-always-on;
228                 regulator-boot-on;
229                 vin-supply = <&vcc_sys>;
230         };
231
232         hym8563: hym8563@51 {
233                 compatible = "haoyu,hym8563";
234                 reg = <0x51>;
235                 #clock-cells = <0>;
236                 clock-frequency = <32768>;
237                 clock-output-names = "xin32k";
238                 /* rtc_int is not connected */
239         };
240 };
241
242 &io_domains {
243         status = "ok";
244
245         audio-supply = <&vcc_io>;
246         gpio30-supply = <&vcc_io>;
247         gpio1830-supply = <&vcc_io>;
248         wifi-supply = <&vccio_wl>;
249 };
250
251 &sdio0 {
252         assigned-clocks = <&cru SCLK_SDIO0>;
253         assigned-clock-parents = <&cru PLL_CPLL>;
254         broken-cd;
255         bus-width = <4>;
256         cap-sd-highspeed;
257         cap-sdio-irq;
258         keep-power-in-suspend;
259         mmc-pwrseq = <&sdio_pwrseq>;
260         non-removable;
261         num-slots = <1>;
262         pinctrl-names = "default";
263         pinctrl-0 = <&sdio0_clk &sdio0_cmd &sdio0_bus4>;
264         vmmc-supply = <&vcc_io>;
265         vqmmc-supply = <&vccio_wl>;
266         status = "okay";
267 };
268
269 &pinctrl {
270         pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
271                 bias-disable;
272                 drive-strength = <8>;
273         };
274
275         pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
276                 bias-pull-up;
277                 drive-strength = <8>;
278         };
279
280         emmc {
281                 emmc_bus8: emmc-bus8 {
282                         rockchip,pins = <1 18 RK_FUNC_2 &pcfg_pull_up_drv_8ma>,
283                                         <1 19 RK_FUNC_2 &pcfg_pull_up_drv_8ma>,
284                                         <1 20 RK_FUNC_2 &pcfg_pull_up_drv_8ma>,
285                                         <1 21 RK_FUNC_2 &pcfg_pull_up_drv_8ma>,
286                                         <1 22 RK_FUNC_2 &pcfg_pull_up_drv_8ma>,
287                                         <1 23 RK_FUNC_2 &pcfg_pull_up_drv_8ma>,
288                                         <1 24 RK_FUNC_2 &pcfg_pull_up_drv_8ma>,
289                                         <1 25 RK_FUNC_2 &pcfg_pull_up_drv_8ma>;
290                 };
291
292                 emmc-clk {
293                         rockchip,pins = <2 4 RK_FUNC_2 &pcfg_pull_none_drv_8ma>;
294                 };
295
296                 emmc-cmd {
297                         rockchip,pins = <1 26 RK_FUNC_2 &pcfg_pull_up_drv_8ma>;
298                 };
299
300                 emmc_reset: emmc-reset {
301                         rockchip,pins = <2 3 RK_FUNC_GPIO &pcfg_pull_none>;
302                 };
303         };
304
305         ir {
306                 ir_int: ir-int {
307                         rockchip,pins = <3 30 RK_FUNC_GPIO &pcfg_pull_up>;
308                 };
309         };
310
311         keys {
312                 pwr_key: pwr-key {
313                         rockchip,pins = <0 2 RK_FUNC_GPIO &pcfg_pull_up>;
314                 };
315         };
316
317         leds {
318                 stby_pwren: stby-pwren {
319                         rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
320                 };
321
322                 led_ctl: led-ctl {
323                         rockchip,pins = <3 29 RK_FUNC_GPIO &pcfg_pull_none>;
324                 };
325         };
326
327         sdio {
328                 wifi_reg_on: wifi-reg-on {
329                         rockchip,pins = <3 4 RK_FUNC_GPIO &pcfg_pull_none>;
330                 };
331
332                 bt_rst: bt-rst {
333                         rockchip,pins = <3 5 RK_FUNC_GPIO &pcfg_pull_none>;
334                 };
335         };
336
337         usb {
338                 host_vbus_drv: host-vbus-drv {
339                         rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_none>;
340                 };
341         };
342 };
343
344 &pmu_io_domains {
345         status = "okay";
346
347         pmu-supply = <&vcc_io>;
348         vop-supply = <&vcc_io>;
349 };
350
351 &saradc {
352         vref-supply = <&vcc_18>;
353         status = "okay";
354 };
355
356 &uart2 {
357         status = "okay";
358 };
359
360 &usb_host0_ehci {
361         status = "okay";
362 };
363
364 &usb_otg {
365         dr_mode = "host";
366         status = "okay";
367 };
368
369 &wdt {
370         status = "okay";
371 };