Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux...
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3036-sdk.dts
1 /dts-v1/;
2 #include <dt-bindings/rkfb/rk_fb.h>
3 #include "rk3036.dtsi"
4 #include "rk3036-pinctrl.dtsi"
5 #include "lcd-box.dtsi"
6 #include <dt-bindings/input/input.h>
7
8 / {
9
10         fiq-debugger {
11                 status = "okay";
12         };
13
14         pwm_regulator {
15                 compatible = "rockchip_pwm_regulator";
16                 pwms = <&pwm2 0 25000>;
17                 rockchip,pwm_id= <2>;
18                 rockchip,pwm_voltage_map= <950000 975000 1000000 1025000 1050000 1075000 1100000 1125000 1150000 1175000 1200000 1225000 1250000 1275000 1300000 1325000 1350000 1375000 1400000 1425000 1450000>;
19                 rockchip,pwm_voltage= <1300000>;
20                 rockchip,pwm_min_voltage= <950000>;
21                 rockchip,pwm_max_voltage= <1450000>;
22                 rockchip,pwm_suspend_voltage= <1000000>;
23                 rockchip,pwm_coefficient= <500>;
24                 status = "okay";
25                 regulators {
26                         #address-cells = <1>;
27                         #size-cells = <0>;
28                         pwm_reg0: regulator@0 {
29                                 regulator-compatible = "pwm_dcdc1";
30                                 regulator-name= "vdd_arm";
31                                 regulator-min-microvolt = <950000>;
32                                 regulator-max-microvolt = <1450000>;
33                                 regulator-always-on;
34                                 regulator-boot-on;
35                         };
36                 };
37         };
38
39         gpio_poweroff {
40                 compatible = "gpio-poweroff";
41                 gpios = <&gpio1 GPIO_A2 GPIO_ACTIVE_LOW>;
42         };
43
44         wireless-wlan {
45                 compatible = "wlan-platdata";
46
47                 /* wifi_chip_type - wifi chip define
48                 * bcmwifi ==> like ap6xxx, rk90x;
49                 * rtkwifi ==> like rtl8188xx, rtl8723xx,rtl8812auv;
50                 * esp8089 ==> esp8089;
51                 * other   ==> for other wifi;
52                 */
53                 wifi_chip_type = "esp8089";
54                 sdio_vref = <0>; //1800mv or 3300mv
55
56                 //power_ctrl_by_pmu;
57                 //keep_wifi_power_on;
58                 //power_pmu_regulator = "act_ldo3";
59                 //power_pmu_enable_level = <1>; //1->HIGH, 0->LOW
60
61                 //vref_ctrl_enable;
62                 //vref_ctrl_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_HIGH>;
63                 //vref_pmu_regulator = "act_ldo3";
64                 //vref_pmu_enable_level = <1>; //1->HIGH, 0->LOW
65
66                 WIFI,poweren_gpio = <&gpio2 GPIO_D6 GPIO_ACTIVE_HIGH>;
67                 WIFI,host_wake_irq = <&gpio2 GPIO_C4 GPIO_ACTIVE_HIGH>;
68                 //WIFI,reset_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>;
69
70                 status = "okay";
71     };
72
73         /* wireless-bluetooth {
74                 compatible = "bluetooth-platdata";
75                 //wifi-bt-power-toggle;
76
77                 uart_rts_gpios = <&gpio4 GPIO_C3 GPIO_ACTIVE_LOW>;
78                 pinctrl-names = "default","rts_gpio";
79                 pinctrl-0 = <&uart0_rts>;
80                 pinctrl-1 = <&uart0_rts_gpio>;
81
82                 //BT,power_gpio = <&gpio4 GPIO_D3 GPIO_ACTIVE_HIGH>;
83                 BT,reset_gpio = <&gpio4 GPIO_D5 GPIO_ACTIVE_HIGH>;
84                 BT,wake_gpio = <&gpio4 GPIO_D2 GPIO_ACTIVE_HIGH>;
85                 BT,wake_host_irq = <&gpio4 GPIO_D7 GPIO_ACTIVE_LOW>;
86
87                 status = "okay";
88
89         };*/
90
91         usb_control {
92                 compatible = "rockchip,rk3036-usb-control";
93                 host_drv_gpio = <&gpio2 GPIO_C7 GPIO_ACTIVE_LOW>;
94                 otg_drv_gpio = <&gpio0 GPIO_D2 GPIO_ACTIVE_LOW>;
95
96                 rockchip,remote_wakeup;
97                 rockchip,usb_irq_wakeup;
98         };
99
100         key {
101                 compatible = "rockchip,key";
102         };
103
104         codec_hdmi_spdif: codec-hdmi-spdif {
105                 compatible = "hdmi-spdif";
106         };
107
108         rockchip-hdmi-spdif {
109                 compatible = "rockchip-hdmi-spdif";
110                 dais {
111                         dai0 {
112                                 audio-codec = <&codec_hdmi_spdif>;
113                                 audio-controller = <&spdif>;
114                         };
115                 };
116         };
117
118         rockchip-spdif-card {
119                 compatible = "rockchip-spdif-card";
120                 dais {
121                         dai0 {
122                                 audio-codec = <&codec_hdmi_spdif>;
123                                 audio-controller = <&spdif>;
124                         };
125                 };
126         };
127
128         rockchip-audio {
129                 compatible = "rk3036-audio";
130                 dais {
131                         dai0 {
132                                 audio-codec = <&codec>;
133                                 audio-controller = <&i2s>;
134                                 format = "i2s";
135                                 //continuous-clock;
136                                 //bitclock-inversion;
137                                 //frame-inversion;
138                                 //bitclock-master;
139                                 //frame-master;
140                         };
141                 };
142         };
143 };
144
145 &uart0{
146         status = "okay";
147         dma-names = "!tx", "!rx";
148         pinctrl-0 = <&uart0_xfer &uart0_cts>;
149 };
150
151 &nandc {
152         status = "okay"; // used nand set "okay" ,used emmc set "disabled"
153 };
154
155 &nandc0reg {
156         status = "disabled"; // used nand set "disabled" ,used emmc set "okay"
157 };
158
159 &emmc {
160         clock-frequency = <37500000>;
161         clock-freq-min-max = <400000 37500000>;
162
163         supports-highspeed;
164         supports-emmc;
165         bootpart-no-access;
166
167         supports-DDR_MODE;
168
169         ignore-pm-notify;
170         keep-power-in-suspend;
171
172         //poll-hw-reset
173         status = "disabled";
174 };
175
176 &sdmmc {
177                 clock-frequency = <37500000>;
178                 clock-freq-min-max = <400000 37500000>;
179                 supports-highspeed;
180                 supports-sd;
181                 broken-cd;
182                 card-detect-delay = <200>;
183
184                 ignore-pm-notify;
185                 keep-power-in-suspend;
186
187                 //vmmc-supply = <&rk808_ldo5_reg>;
188                 status = "okay";
189 };
190
191 &sdio {
192                 clock-frequency = <37500000>;
193                 clock-freq-min-max = <200000 37500000>;
194                 supports-highspeed;
195                 supports-sdio;
196                 ignore-pm-notify;
197                 keep-power-in-suspend;
198                 cap-sdio-irq;
199                 status = "okay";
200 };
201
202
203 &i2c1 {
204         status = "okay";
205         rtc@51 {
206                 compatible = "rtc,hym8563";
207                 reg = <0x51>;
208                 //irq_gpio = <&gpio0 GPIO_A4 IRQ_TYPE_EDGE_FALLING>;
209         };
210 };
211
212
213 &rk_screen {
214          display-timings = <&disp_timings>;
215 };
216
217 &fb {
218         rockchip,disp-mode = <NO_DUAL>;
219         rockchip,uboot-logo-on = <1>;
220 };
221
222 &lcdc {
223         status = "okay";
224 };
225
226 &tve {
227         status = "okay";
228 };
229
230 &hdmi {
231         status = "okay";
232         //rockchips,hdmi_audio_source = <0>;
233 };
234
235 &vmac {
236 //      pmu_regulator = "act_ldo5";
237 //      pmu_enable_level = <1>; //1->HIGH, 0->LOW
238 //      power-gpio = <&gpio0 GPIO_A6 GPIO_ACTIVE_HIGH>;
239         reset-gpio = <&gpio2 GPIO_C6 GPIO_ACTIVE_LOW>;
240 };
241
242 &dwc_control_usb {
243         usb_uart {
244                 status = "disabled";
245         };
246 };
247
248 &pwm2 {
249         status = "okay";
250 };
251
252 &remotectl {
253         handle_cpu_id = <1>;
254         ir_key1{
255                 rockchip,usercode = <0x4040>;
256                 rockchip,key_table =
257                         <0xf2   KEY_REPLY>,
258                         <0xba   KEY_BACK>,
259                         <0xf4   KEY_UP>,
260                         <0xf1   KEY_DOWN>,
261                         <0xef   KEY_LEFT>,
262                         <0xee   KEY_RIGHT>,
263                         <0xbd   KEY_HOME>,
264                         <0xea   KEY_VOLUMEUP>,
265                         <0xe3   KEY_VOLUMEDOWN>,
266                         <0xe2   KEY_SEARCH>,
267                         <0xb2   KEY_POWER>,
268                         <0xbc   KEY_MUTE>,
269                         <0xec   KEY_MENU>,
270                         <0xbf   0x190>,
271                         <0xe0   0x191>,
272                         <0xe1   0x192>,
273                         <0xe9   183>,
274                         <0xe6   248>,
275                         <0xe8   185>,
276                         <0xe7   186>,
277                         <0xf0   388>,
278                         <0xbe   0x175>;
279         };
280         ir_key2{
281                 rockchip,usercode = <0xff00>;
282                 rockchip,key_table =
283                         <0xf9   KEY_HOME>,
284                         <0xbf   KEY_BACK>,
285                         <0xfb   KEY_MENU>,
286                         <0xaa   KEY_REPLY>,
287                         <0xb9   KEY_UP>,
288                         <0xe9   KEY_DOWN>,
289                         <0xb8   KEY_LEFT>,
290                         <0xea   KEY_RIGHT>,
291                         <0xeb   KEY_VOLUMEDOWN>,
292                         <0xef   KEY_VOLUMEUP>,
293                         <0xf7   KEY_MUTE>,
294                         <0xe7   KEY_POWER>,
295                         <0xfc   KEY_POWER>,
296                         <0xa9   KEY_VOLUMEDOWN>,
297                         <0xa8   KEY_VOLUMEDOWN>,
298                         <0xe0   KEY_VOLUMEDOWN>,
299                         <0xa5   KEY_VOLUMEDOWN>,
300                         <0xab   183>,
301                         <0xb7   388>,
302                         <0xf8   184>,
303                         <0xaf   185>,
304                         <0xed   KEY_VOLUMEDOWN>,
305                         <0xee   186>,
306                         <0xb3   KEY_VOLUMEDOWN>,
307                         <0xf1   KEY_VOLUMEDOWN>,
308                         <0xf2   KEY_VOLUMEDOWN>,
309                         <0xf3   KEY_SEARCH>,
310                         <0xb4   KEY_VOLUMEDOWN>,
311                         <0xbe   KEY_SEARCH>;
312         };
313         ir_key3{
314                 rockchip,usercode = <0x1dcc>;
315                 rockchip,key_table =
316                         <0xee   KEY_REPLY>,
317                         <0xf0   KEY_BACK>,
318                         <0xf8   KEY_UP>,
319                         <0xbb   KEY_DOWN>,
320                         <0xef   KEY_LEFT>,
321                         <0xed   KEY_RIGHT>,
322                         <0xfc   KEY_HOME>,
323                         <0xf1   KEY_VOLUMEUP>,
324                         <0xfd   KEY_VOLUMEDOWN>,
325                         <0xb7   KEY_SEARCH>,
326                         <0xff   KEY_POWER>,
327                         <0xf3   KEY_MUTE>,
328                         <0xbf   KEY_MENU>,
329                         <0xf9   0x191>,
330                         <0xf5   0x192>,
331                         <0xb3   388>,
332                         <0xbe   KEY_1>,
333                         <0xba   KEY_2>,
334                         <0xb2   KEY_3>,
335                         <0xbd   KEY_4>,
336                         <0xf9   KEY_5>,
337                         <0xb1   KEY_6>,
338                         <0xfc   KEY_7>,
339                         <0xf8   KEY_8>,
340                         <0xb0   KEY_9>,
341                         <0xb6   KEY_0>,
342                         <0xb5   KEY_BACKSPACE>;
343         };
344 };