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