arm: dts: rk3288-evb: modify panel to edp_panel
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3128-86v.dts
1 /dts-v1/;
2
3 #include "rk3128.dtsi"
4 #include "rk3128-cif-sensor.dtsi"
5 #include "rk312x-sdk.dtsi"
6 #include "lcd-rk3128-86v-LVDS1024x600.dtsi"
7
8 / {
9         compatible = "rockchip,rk3128";
10         backlight: backlight {
11                 compatible = "pwm-backlight";
12                 pwms = <&pwm0 0 25000>;
13                 brightness-levels = <18 18 18 18 19 19 19 19 20 20 20 20 20 20 21 21 21 21 21 21 22 22 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255>;
14                 default-brightness-level = <128>;
15                 enable-gpios = <&gpio0 GPIO_D0 GPIO_ACTIVE_HIGH>;
16         };
17
18         usb_control {
19                 compatible = "rockchip,rk3126-usb-control";
20
21                 //host_drv_gpio = <&gpio3 GPIO_C4 GPIO_ACTIVE_LOW>;
22                 //otg_drv_gpio = <&gpio3 GPIO_C1 GPIO_ACTIVE_LOW>;
23
24                 rockchip,remote_wakeup;
25                 rockchip,usb_irq_wakeup;
26         };
27
28
29         wireless-wlan {
30                 compatible = "wlan-platdata";
31
32                 /* wifi_chip_type - wifi chip define
33                  * ap6210, ap6330, ap6335
34                  * rtl8188eu, rtl8723bs, rtl8723bu
35                  * esp8089
36                 */
37                 wifi_chip_type = "rtl8188eu";
38                 sdio_vref = <1800>; //1800mv or 3300mv
39
40                 //      power_ctrl_by_pmu;
41                 //      pmu_regulator = "act_ldo3";
42                 //      pmu_enable_level = <1>; //1->HIGH, 0->LOW
43                 /* WIFI_HOST_WAKE = GPIO3_C7 */
44                 WIFI,host_wake_irq = <&gpio3 GPIO_C7 GPIO_ACTIVE_HIGH>;
45                 /* WIFI_REG_ON  = GPIO3_D3 */
46                 WIFI,poweren_gpio  = <&gpio3 GPIO_D3 GPIO_ACTIVE_HIGH>;
47
48                 status = "okay";
49         };
50         wireless-bluetooth {
51                 compatible = "bluetooth-platdata";
52
53                 //wifi-bt-power-toggle;
54
55                 uart_rts_gpios = <&gpio0 GPIO_C1 GPIO_ACTIVE_LOW>;
56                 pinctrl-names = "default","rts_gpio";
57                 pinctrl-0 = <&uart0_rts>;
58                 pinctrl-1 = <&uart0_rts_gpio>;
59
60
61                 /* BT_HOST_WAKE = GPIO3_C6 */
62                 /* BT_RST               = GPIO3_C5 */
63                 /* BT_WAKE              = GPIO3_D2 */
64                 //BT,power_gpio = <&gpio4 GPIO_D3 GPIO_ACTIVE_HIGH>;
65                 BT,reset_gpio = <&gpio3 GPIO_C5 GPIO_ACTIVE_HIGH>;
66                 BT,wake_gpio = <&gpio3 GPIO_D2 GPIO_ACTIVE_HIGH>;
67                 BT,wake_host_irq = <&gpio3 GPIO_C6 GPIO_ACTIVE_LOW>;
68
69                 status = "okay";
70         };
71
72         rockchip_suspend: rockchip_suspend {
73                            rockchip,ctrbits = <
74                            (0
75                            |RKPM_CTR_PWR_DMNS
76                            |RKPM_CTR_GTCLKS
77                            |RKPM_CTR_PLLS
78                            |RKPM_CTR_ARMOFF_LPMD
79                            |RKPM_CTR_IDLESRAM_MD
80                            |RKPM_CTR_DDR
81                    //        |RKPM_CTR_VOLTS
82                            |RKPM_CTR_BUS_IDLE
83                    //        |RKPM_CTR_VOL_PWM1
84                            )
85                    >;
86           rockchip,pmic-suspend_gpios = <GPIO3_C1>;
87      };
88
89 };
90
91 &gmac{
92         status = "disabled";
93 };
94
95 &uart0 {
96         status = "okay";
97         dma-names = "!tx", "!rx";
98         pinctrl-0 = <&uart0_xfer &uart0_cts>;
99 };
100
101 &rk818 { /* PMIC_INT == GPIO1_B1                                PMIC_SLEEP == GPIO3_C1*/
102     gpios =<&gpio1 GPIO_B1 GPIO_ACTIVE_HIGH>,<&gpio3 GPIO_C1 GPIO_ACTIVE_LOW>;
103 };
104 /*
105 &rk818_dcdc3_reg{
106         regulator-name= "vcc_ddr";
107 };
108
109 &rk818_ldo1_reg{
110         regulator-name= "vcc_tp";
111 };
112 */
113
114
115 &i2c2 {
116         status = "okay";
117         ts@40 {
118                 compatible = "gslX680";
119                 reg = <0x40>;
120                 touch-gpio = <&gpio1 GPIO_B0 IRQ_TYPE_LEVEL_LOW>;       /* TP_INT == GPIO1_B0 */
121                 reset-gpio = <&gpio0 GPIO_D1 GPIO_ACTIVE_LOW>;          /* TP_RST == GPIO0_D1 */
122                 //power-gpio = <&gpio0 GPIO_C5 GPIO_ACTIVE_LOW>;
123                 max-x = <1280>;
124                 max-y = <600>;
125                 status = "okay";
126         };
127
128         sensor@4c {
129                 compatible = "gs_mma7660";
130                 reg = <0x4c>;
131                 type = <SENSOR_TYPE_ACCEL>;
132                 irq-gpio = <&gpio1 GPIO_B2 IRQ_TYPE_LEVEL_LOW>;         /* GSENSOR_INT = GPIO1_B2 */
133                 irq_enable = <0>;
134                 poll_delay_ms = <30>;
135                 layout = <1>;
136         };
137 };
138
139 &adc{
140         status = "okay";
141         key: key {
142                 compatible = "rockchip,key";
143                 io-channels = <&adc 1>;
144
145                 vol-up-key {
146                         linux,code = <115>;
147                         label = "volume up";
148
149                         rockchip,adc_value = <1>;
150
151                 };
152
153                 vol-down-key {
154                         linux,code = <114>;
155                         label = "volume down";
156
157                         rockchip,adc_value = <512>;
158
159                 };
160                 /*  PWR_KEY == GPIO0_A2 */
161                 power-key {
162                         gpios = <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>;
163                         linux,code = <116>;
164                         label = "power";
165                         gpio-key,wakeup;
166                 };
167
168         };
169 };
170
171 &fb {
172         rockchip,disp-mode = <ONE_DUAL>;
173         rockchip,uboot-logo-on = <1>;
174 };
175
176 &rk_screen {
177         display-timings = <&disp_timings>;
178 };
179
180 &lvds {
181         status = "okay";
182
183         pinctrl-names = "lcdc";
184         pinctrl-0 = <&lcdc0_lcdc_d>;
185 };
186
187 &lcdc {
188         status = "okay";
189
190         //backlight = <&backlight>;
191         pinctrl-names = "default", "gpio";
192         pinctrl-0 = <&lcdc0_lcdc>;
193         pinctrl-1 = <&lcdc0_gpio>;
194
195         rockchip,fb-win-map = <FB_DEFAULT_ORDER>;
196         power_ctr: power_ctr {
197                 rockchip,debug = <0>;
198                 /*
199                 lcd_en: lcd_en {
200                         rockchip,power_type = <GPIO>;
201                         gpios = <&gpio3 GPIO_C4 GPIO_ACTIVE_HIGH>;
202                         rockchip,delay = <10>;
203                 };
204                 */
205         };
206 };
207
208 &hdmi {
209         status = "okay"; //"disabled";
210 };
211
212 &sdmmc {/* SDMMC_DET = GPIO1_C1 */
213         cd-gpios = <&gpio1 GPIO_C1 GPIO_ACTIVE_HIGH>;/*CD GPIO*/
214     status = "disabled";
215 };
216
217 &dwc_control_usb {
218         usb_uart {
219                 status = "ok";
220         };
221 };
222
223 &codec {
224                 spk_ctl_io = <&gpio0 GPIO_D6 GPIO_ACTIVE_HIGH>;/* SPK_CTL == GPIO0_D6 */
225         spk-mute-delay = <200>;
226         hp-mute-delay = <100>;
227         rk312x_for_mid = <1>;
228         is_rk3128 = <0>;/* is_rk3128 = <0> */
229         spk_volume = <25>;
230         hp_volume = <25>;
231         capture_volume = <26>;
232         gpio_debug = <1>;
233         codec_hp_det = <0>;
234 };
235
236 &rk3128_cif_sensor{
237         status = "okay";
238 };
239
240
241 &clk_core_dvfs_table {
242         operating-points = <
243                 /* KHz    uV */
244                 216000 925000
245                 408000 925000
246                 600000 950000
247                 696000 975000
248                 816000 1050000
249                 1008000 1175000
250                 1200000 1300000
251         //      1296000 1350000
252         //      1320000 1375000
253                 >;
254         status="okay";
255 };
256
257 &clk_gpu_dvfs_table {
258         operating-points = <
259                 /* KHz    uV */
260                 200000 1000000
261                 300000 1025000
262                 400000 1125000
263                 //480000 1175000
264                 >;
265         status="okay";
266 };
267
268 &clk_ddr_dvfs_table {
269         operating-points = <
270                 /* KHz    uV */
271                 200000 1000000
272                 300000 1000000
273                 400000 1075000
274                 533000 1250000
275                 >;
276
277         freq-table = <
278                 /*status                freq(KHz)*/
279                 SYS_STATUS_NORMAL       400000
280                 SYS_STATUS_SUSPEND      200000
281                 SYS_STATUS_VIDEO_1080P  240000
282                 SYS_STATUS_VIDEO_4K     400000
283                 SYS_STATUS_PERFORMANCE  528000
284                 SYS_STATUS_DUALVIEW     400000
285                 SYS_STATUS_BOOST        324000
286                 SYS_STATUS_ISP          533000
287                 >;
288         auto-freq-table = <
289                 240000
290                 324000
291                 396000
292                 528000
293                 >;
294         auto-freq=<0>;
295         status="okay";
296 };