Merge remote-tracking branches 'regulator/fix/88pm800', 'regulator/fix/max8973',...
[linux-drm-fsl-dcu.git] / arch / arm / boot / dts / rk3288-evb.dtsi
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 #include <dt-bindings/pwm/pwm.h>
42 #include "rk3288.dtsi"
43
44 / {
45         memory {
46                 reg = <0x0 0x80000000>;
47         };
48
49         backlight {
50                 compatible = "pwm-backlight";
51                 brightness-levels = <
52                           0   1   2   3   4   5   6   7
53                           8   9  10  11  12  13  14  15
54                          16  17  18  19  20  21  22  23
55                          24  25  26  27  28  29  30  31
56                          32  33  34  35  36  37  38  39
57                          40  41  42  43  44  45  46  47
58                          48  49  50  51  52  53  54  55
59                          56  57  58  59  60  61  62  63
60                          64  65  66  67  68  69  70  71
61                          72  73  74  75  76  77  78  79
62                          80  81  82  83  84  85  86  87
63                          88  89  90  91  92  93  94  95
64                          96  97  98  99 100 101 102 103
65                         104 105 106 107 108 109 110 111
66                         112 113 114 115 116 117 118 119
67                         120 121 122 123 124 125 126 127
68                         128 129 130 131 132 133 134 135
69                         136 137 138 139 140 141 142 143
70                         144 145 146 147 148 149 150 151
71                         152 153 154 155 156 157 158 159
72                         160 161 162 163 164 165 166 167
73                         168 169 170 171 172 173 174 175
74                         176 177 178 179 180 181 182 183
75                         184 185 186 187 188 189 190 191
76                         192 193 194 195 196 197 198 199
77                         200 201 202 203 204 205 206 207
78                         208 209 210 211 212 213 214 215
79                         216 217 218 219 220 221 222 223
80                         224 225 226 227 228 229 230 231
81                         232 233 234 235 236 237 238 239
82                         240 241 242 243 244 245 246 247
83                         248 249 250 251 252 253 254 255>;
84                 default-brightness-level = <128>;
85                 enable-gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;
86                 pinctrl-names = "default";
87                 pinctrl-0 = <&bl_en>;
88                 pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>;
89         };
90
91         gpio-keys {
92                 compatible = "gpio-keys";
93                 #address-cells = <1>;
94                 #size-cells = <0>;
95                 autorepeat;
96
97                 pinctrl-names = "default";
98                 pinctrl-0 = <&pwrbtn>;
99
100                 button@0 {
101                         gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
102                         linux,code = <116>;
103                         label = "GPIO Key Power";
104                         linux,input-type = <1>;
105                         gpio-key,wakeup = <1>;
106                         debounce-interval = <100>;
107                 };
108         };
109
110         /* This turns on USB vbus for both host0 (ehci) and host1 (dwc2) */
111         vcc_host: vcc-host-regulator {
112                 compatible = "regulator-fixed";
113                 enable-active-high;
114                 gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
115                 pinctrl-names = "default";
116                 pinctrl-0 = <&host_vbus_drv>;
117                 regulator-name = "vcc_host";
118                 regulator-always-on;
119                 regulator-boot-on;
120         };
121
122         vcc_phy: vcc-phy-regulator {
123                 compatible = "regulator-fixed";
124                 enable-active-high;
125                 gpio = <&gpio0 6 GPIO_ACTIVE_HIGH>;
126                 pinctrl-names = "default";
127                 pinctrl-0 = <&eth_phy_pwr>;
128                 regulator-name = "vcc_phy";
129                 regulator-min-microvolt = <3300000>;
130                 regulator-max-microvolt = <3300000>;
131                 regulator-always-on;
132                 regulator-boot-on;
133         };
134
135         vcc_sys: vsys-regulator {
136                 compatible = "regulator-fixed";
137                 regulator-name = "vcc_sys";
138                 regulator-min-microvolt = <5000000>;
139                 regulator-max-microvolt = <5000000>;
140                 regulator-always-on;
141                 regulator-boot-on;
142         };
143
144         /*
145          * NOTE: vcc_sd isn't hooked up on v1.0 boards where power comes from
146          * vcc_io directly.  Those boards won't be able to power cycle SD cards
147          * but it shouldn't hurt to toggle this pin there anyway.
148          */
149         vcc_sd: sdmmc-regulator {
150                 compatible = "regulator-fixed";
151                 gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
152                 pinctrl-names = "default";
153                 pinctrl-0 = <&sdmmc_pwr>;
154                 regulator-name = "vcc_sd";
155                 regulator-min-microvolt = <3300000>;
156                 regulator-max-microvolt = <3300000>;
157                 startup-delay-us = <100000>;
158                 vin-supply = <&vcc_io>;
159         };
160 };
161
162 &emmc {
163         broken-cd;
164         bus-width = <8>;
165         cap-mmc-highspeed;
166         disable-wp;
167         non-removable;
168         num-slots = <1>;
169         pinctrl-names = "default";
170         pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
171         status = "okay";
172 };
173
174 &hdmi {
175         ddc-i2c-bus = <&i2c5>;
176         status = "okay";
177 };
178
179 &sdmmc {
180         bus-width = <4>;
181         cap-mmc-highspeed;
182         cap-sd-highspeed;
183         card-detect-delay = <200>;
184         disable-wp;                     /* wp not hooked up */
185         num-slots = <1>;
186         pinctrl-names = "default";
187         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
188         status = "okay";
189         vmmc-supply = <&vcc_sd>;
190         vqmmc-supply = <&vccio_sd>;
191 };
192
193 &i2c0 {
194         status = "okay";
195 };
196
197 &i2c5 {
198         status = "okay";
199 };
200
201 &wdt {
202         status = "okay";
203 };
204
205 &pwm0 {
206         status = "okay";
207 };
208
209 &uart0 {
210         status = "okay";
211 };
212
213 &uart1 {
214         status = "okay";
215 };
216
217 &uart2 {
218         status = "okay";
219 };
220
221 &uart3 {
222         status = "okay";
223 };
224
225 &uart4 {
226         status = "okay";
227 };
228
229 &tsadc {
230         rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
231         rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
232         status = "okay";
233 };
234
235 &pinctrl {
236         pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
237                 drive-strength = <8>;
238         };
239
240         pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
241                 bias-pull-up;
242                 drive-strength = <8>;
243         };
244
245         backlight {
246                 bl_en: bl-en {
247                         rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>;
248                 };
249         };
250
251         buttons {
252                 pwrbtn: pwrbtn {
253                         rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
254                 };
255         };
256
257         pmic {
258                 pmic_int: pmic-int {
259                         rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
260                 };
261         };
262
263         sdmmc {
264                 /*
265                  * Default drive strength isn't enough to achieve even
266                  * high-speed mode on EVB board so bump up to 8ma.
267                  */
268                 sdmmc_bus4: sdmmc-bus4 {
269                         rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
270                                         <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
271                                         <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
272                                         <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
273                 };
274
275                 sdmmc_clk: sdmmc-clk {
276                         rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_drv_8ma>;
277                 };
278
279                 sdmmc_cmd: sdmmc-cmd {
280                         rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
281                 };
282
283                 sdmmc_pwr: sdmmc-pwr {
284                         rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
285                 };
286         };
287
288         usb {
289                 host_vbus_drv: host-vbus-drv {
290                         rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
291                 };
292         };
293
294         eth_phy {
295                 eth_phy_pwr: eth-phy-pwr {
296                         rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_none>;
297                 };
298         };
299 };
300
301 &usbphy {
302         status = "okay";
303 };
304
305 &usb_host0_ehci {
306         status = "okay";
307 };
308
309 &usb_host1 {
310         status = "okay";
311 };
312
313 &vopb {
314         status = "okay";
315 };
316
317 &vopb_mmu {
318         status = "okay";
319 };
320
321 &vopl {
322         status = "okay";
323 };
324
325 &vopl_mmu {
326         status = "okay";
327 };