arm: dts: rk3288-evb: modify panel to edp_panel
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3126-86v.dts
1 /dts-v1/;
2
3 #include "rk3126.dtsi"
4 #include "lcd-86v-rgb1024x600.dtsi"
5 #include "rk3126-cif-sensor.dtsi"
6 #include "rk312x-sdk.dtsi"
7 //#include "lcd-y81349.dtsi"
8
9 / {
10          compatible = "rockchip,rk3126";
11         backlight: backlight {
12                 compatible = "pwm-backlight";
13                 pwms = <&pwm0 0 25000>;
14                           brightness-levels = <255 169 168 168 167 166 166 165 164 164 163 162 162 161 160 160 159 158 158 157 156 156 155 154 154 153 152 152 151 150 150 149 148 148 147 146 146 145 144 144 143 142 142 141 140 140 139 138 138 137 136 136 135 134 134 133 132 132 131 130 130 129 128 128 127 126 126 125 124 124 123 122 122 121 120 120 119 118 118 117 116 116 115 114 114 113 112 112 111 110 110 109 108 108 107 106 106 105 104 104 103 102 102 101 100 100 99 98 98 97 96 96 95 94 94 93 92 92 91 90 90 89 88 88 87 86 86 85 84 84 83 82 82 81 80 80 79 78 78 77 76 76 75 74 74 73 72 72 71 70 70 69 68 68 67 66 66 65 64 64 63 62 62 61 60 60 59 58 58 57 56 56 55 54 54 53 52 52 51 50 50 49 48 48 47 46 46 45 44 44 43 42 42 41 40 40 39 38 38 37 36 36 35 34 34 33 32 32 31 30 30 29 28 28 27 26 26 25 24 24 23 22 22 21 20 20 19 18 18 17 16 16 15 14 14 13 12 12 11 10 10 9 8 8 7 6 6 5 4 4 3 2 2 1 1 1 0 >;
15                           default-brightness-level = <128>;
16                 enable-gpios = <&gpio3 GPIO_C1 GPIO_ACTIVE_HIGH>;
17         };
18
19         gpio_poweroff {
20                 compatible = "gpio-poweroff";
21                 gpios = <&gpio1 GPIO_A2 GPIO_ACTIVE_LOW>;
22         };
23
24         usb_control {
25                 compatible = "rockchip,rk3126-usb-control";
26                 //host_drv_gpio = <&gpio2 GPIO_B4 GPIO_ACTIVE_LOW>;
27                 //otg_drv_gpio = <&gpio2 GPIO_B6 GPIO_ACTIVE_LOW>;
28
29                 rockchip,remote_wakeup;
30                 rockchip,usb_irq_wakeup;
31                 };
32
33         wireless-wlan {
34         compatible = "wlan-platdata";
35
36                 /* wifi_chip_type - wifi chip define
37                  * ap6210, ap6330, ap6335
38                  * rtl8188eu, rtl8723bs, rtl8723bu
39                  * esp8089
40                 */
41                 wifi_chip_type = "rtl8188eu";
42         sdio_vref = <1800>; //1800mv or 3300mv
43
44         //power_ctrl_by_pmu;
45        // pmu_regulator = "act_ldo3";
46        // pmu_enable_level = <1>; //1->HIGH, 0->LOW
47
48         WIFI,poweren_gpio = <&gpio1 GPIO_A1 GPIO_ACTIVE_HIGH>;
49        // WIFI,host_wake_irq = <&gpio4 GPIO_D6 GPIO_ACTIVE_HIGH>;
50         //WIFI,reset_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>;
51
52         status = "okay";
53     };
54
55         rockchip_suspend: rockchip_suspend {
56                 rockchip,ctrbits = <
57                         (0
58                         |RKPM_CTR_PWR_DMNS
59                         |RKPM_CTR_GTCLKS
60                         |RKPM_CTR_PLLS
61                         |RKPM_CTR_ARMOFF_LPMD
62                         |RKPM_CTR_IDLESRAM_MD
63                         |RKPM_CTR_DDR
64                         |RKPM_CTR_VOLTS
65                                                 |RKPM_CTR_BUS_IDLE
66                         |RKPM_CTR_VOL_PWM1
67                         )
68                 >;
69                 rockchip,pmic-suspend_gpios = <0>;
70         };
71
72     chosen {
73         bootargs = "vmalloc=496M cma=4M rockchip_jtag";
74        };
75
76 };
77
78 &vd_arm {
79         pd_ddr {
80                  clk_ddr {
81                         operating-points = <
82                                 /* KHz    uV */
83                                 200000 1100000
84                                 300000 1100000
85                                 400000 1100000
86                                 533000 1250000
87                                 >;
88
89                         freq-table = <
90                                 /*status                freq(KHz)*/
91                                 SYS_STATUS_NORMAL       400000
92                                 SYS_STATUS_SUSPEND      200000
93                                 //SYS_STATUS_VIDEO_1080P  240000
94                                 //SYS_STATUS_VIDEO_4K     400000
95                                 SYS_STATUS_PERFORMANCE  528000
96                                 //SYS_STATUS_DUALVIEW   400000
97                                 //SYS_STATUS_BOOST      324000
98                                 //SYS_STATUS_ISP                533000
99                                 >;
100                         auto-freq-table = <
101                                 240000
102                                 324000
103                                 396000
104                                 528000
105                                 >;
106                         auto-freq=<0>;
107                         status="okay";
108                         };
109                 };
110         pd_gpu {
111                  clk_gpu {
112                         operating-points = <
113                                 /* KHz    uV */
114                                 200000 1100000
115                                 300000 1100000
116                                 400000  1150000
117                                 //480000  1250000
118                                 >;
119                                 status = "okay";
120                         };
121                 };
122         pd_core {
123                  clk_core {
124                         operating-points = <
125                                 /* KHz    uV */
126                                 216000 1000000
127                                 408000 1000000
128                                 600000 1100000
129                                 696000 1150000
130                                 816000 1200000
131                                 1008000 1350000
132                                 1200000 1425000
133                                 >;
134                         virt-temp-limit-1-cpu-busy = <
135                         /* target-temp  limit-freq */
136                                 75      1008000
137                                 85      1200000
138                                 95      1200000
139                                 100     1200000
140                                 >;
141                         virt-temp-limit-2-cpu-busy = <
142                         /* target-temp  limit-freq */
143                                 75      912000
144                                 85      1008000
145                                 95      1104000
146                                 100     1200000
147                                 >;
148                         virt-temp-limit-3-cpu-busy = <
149                         /* target-temp  limit-freq */
150                                 75      816000
151                                 85      912000
152                                 95      100800
153                                 100     110400
154                                 >;
155                         virt-temp-limit-4-cpu-busy = <
156                         /* target-temp  limit-freq */
157                                 75      816000
158                                 85      912000
159                                 95      100800
160                                 100     110400
161                                 >;
162                         temp-limit-enable = <1>;
163                         target-temp = <85>;
164                         status = "okay";
165                 };
166          };
167 };
168
169 &vd_logic {
170                         regulator_name = "vdd_logic";
171                         status = "disabled";
172
173         };
174
175
176
177 &pwm_regulator1 {
178         status = "okay";
179 };
180
181 &pwm1 {
182         status = "okay";
183 };
184
185 &fb {
186         rockchip,disp-mode = <NO_DUAL>;
187         rockchip,uboot-logo-on = <1>;
188 };
189
190 &rk_screen {
191         display-timings = <&disp_timings>;
192 };
193
194 &lvds {
195         status = "okay";
196
197         pinctrl-names = "lcdc";
198         pinctrl-0 = <&lcdc0_lcdc_d>;
199 };
200
201 &lcdc {
202         status = "okay";
203
204         backlight = <&backlight>;
205         pinctrl-names = "default", "gpio";
206         pinctrl-0 = <&lcdc0_lcdc>;
207         pinctrl-1 = <&lcdc0_gpio>;
208
209         rockchip,fb-win-map = <FB_DEFAULT_ORDER>;
210
211         power_ctr: power_ctr {
212                 rockchip,debug = <0>;
213                 lcd_en: lcd_en {
214                         rockchip,power_type = <GPIO>;
215                         gpios = <&gpio3 GPIO_B3 GPIO_ACTIVE_HIGH>;
216                         rockchip,delay = <10>;
217                 };
218         };
219 };
220
221 &hdmi {
222         status = "disabled";
223 };
224
225 &adc {
226         status = "okay";
227
228         key: key {
229                 compatible = "rockchip,key";
230                 io-channels = <&adc 2>;
231
232                 vol-up-key {
233                         linux,code = <115>;
234                         label = "volume up";
235
236                         rockchip,adc_value = <1>;
237
238                 };
239
240                 vol-down-key {
241                         linux,code = <114>;
242                         label = "volume down";
243
244                         rockchip,adc_value = <512>;
245
246                 };
247
248                 power-key {
249                         gpios = <&gpio1 GPIO_A4 GPIO_ACTIVE_LOW>;
250                         linux,code = <116>;
251                         label = "power";
252                         gpio-key,wakeup;
253                 };
254
255         };
256         
257         adc-battery {
258                         status = "okay";
259                 compatible = "rk30-adc-battery";
260                 io-channels = <&adc 0>, <&adc 3>;
261                 dc_det_gpio = <&gpio2 GPIO_B1 GPIO_ACTIVE_LOW>;
262                 auto_calibration = <0>;
263                 ref_voltage = <3300>;
264                 //bat_low_gpio = <&gpio0 GPIO_A7 GPIO_ACTIVE_LOW>;
265                 //chg_ok_gpio = <&gpio0 GPIO_B1 GPIO_ACTIVE_HIGH>;
266                 bat_table = <0 0 0 0 100 100
267                  3500 3619 3678 3734 3742 3783 3813 3884 3968 4110 4220
268                  3750 3710 3770 3830 3850 3880 3910 3980 4060 4240 4300
269                 >;
270                 is_dc_charge = <1>;
271                 is_usb_charge = <0>;
272
273         };
274         
275 };
276
277 &i2c0 {
278         status = "disabled";
279         rk818: rk818@1c {
280                 reg = <0x1c>;
281                 status = "disabled";
282         };
283 };
284
285
286 &i2c1 {
287         status = "okay";
288
289                 sensor@4c {
290                 compatible = "gs_mc3230";
291                 reg = <0x4c>;
292                 type = <SENSOR_TYPE_ACCEL>;
293                 //irq-gpio = <&gpio2 GPIO_B2 IRQ_TYPE_LEVEL_LOW>;
294                 irq_enable = <0>;
295                 poll_delay_ms = <30>;
296                 layout = <1>;
297         };
298         
299             rtc@51 {
300         compatible = "rtc,hym8563";
301         reg = <0x51>;
302         irq_gpio = <&gpio1 GPIO_A5 IRQ_TYPE_EDGE_FALLING>;
303     };  
304 };
305
306 &i2c2 {
307         status = "okay";
308         
309                 ts@76 {
310                 compatible = "zet6221-ts";
311                 reg = <0x76>;
312                 pinctrl-names = "default", "gpio";
313                 pinctrl-0 = <&i2c0_sda &i2c0_scl>;
314                 pinctrl-1 = <&i2c0_gpio>;
315                 //gpios = <&gpio0 GPIO_A1 GPIO_ACTIVE_LOW>, <&gpio0 GPIO_A0 GPIO_ACTIVE_LOW>;
316                 irq_gpio_number = <&gpio0 GPIO_A1 IRQ_TYPE_LEVEL_LOW>;
317                 rst_gpio_number = <&gpio0 GPIO_A0 GPIO_ACTIVE_HIGH>;
318         };
319         
320                 ts@55 {
321                 compatible = "goodix,gt8xx";
322                 reg = <0x55>;
323                 touch-gpio = <&gpio1 GPIO_B0 IRQ_TYPE_LEVEL_LOW>;
324                 reset-gpio = <&gpio2 GPIO_C1 GPIO_ACTIVE_LOW>;
325                 //power-gpio = <&gpio0 GPIO_C5 GPIO_ACTIVE_LOW>;
326                 max-x = <1280>;
327                 max-y = <800>;
328                 status = "disabled";
329         };
330         
331
332 };
333
334
335 &sdmmc {
336         cd-gpios = <&gpio2 GPIO_A7 GPIO_ACTIVE_HIGH>;/*CD GPIO*/
337         status = "disabled";
338 };
339
340 &sdio {
341         status = "disabled";
342 };
343
344
345 &codec {
346         spk_ctl_io = <&gpio1 GPIO_B0 GPIO_ACTIVE_HIGH>;
347         spk-mute-delay = <200>;
348         hp-mute-delay = <100>;
349         rk312x_for_mid = <1>;
350         is_rk3128 = <0>;
351         spk_volume = <25>;
352         hp_volume = <25>;
353         capture_volume = <26>;
354         gpio_debug = <0>;
355         codec_hp_det = <0>;
356 };
357
358
359
360 &dwc_control_usb {
361         usb_uart {
362                 status = "disable";
363         };
364 };
365
366 &rk3126_cif_sensor{
367         status = "okay";
368 };
369
370 &gmac {
371         status = "disabled";
372 };