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