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