HDMI: modify dts file and add hdmi pclk
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3288-tb.dts
1 /dts-v1/;
2
3 #include "rk3288.dtsi"
4 #include "lcd-b101ew05.dtsi"
5
6 / {
7         fiq-debugger {
8                 status = "okay";
9         };
10
11         backlight {
12                 compatible = "pwm-backlight";
13                 pwms = <&pwm0 0 25000>;
14                 brightness-levels = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 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>;
15                 default-brightness-level = <128>;
16                 enable-gpios = <&gpio7 GPIO_A2 GPIO_ACTIVE_HIGH>;
17         };
18
19         pwm_regulator {
20                 compatible = "rockchip_pwm_regulator";
21                 pwms = <&pwm1 0 25000>;
22                 rockchip,pwm_id= <1>;
23                 rockchip,pwm_voltage_map= <925000 950000 975000 1000000 1025000 1050000 1075000 1100000 1125000 1150000 1175000 1200000 1225000 1250000 1275000 1300000 1325000 1350000 1375000 1400000>;
24                 rockchip,pwm_voltage= <1000000>;
25                 rockchip,pwm_min_voltage= <925000>;
26                 rockchip,pwm_max_voltage= <1400000>;
27                 rockchip,pwm_suspend_voltage= <950000>;
28                 rockchip,pwm_coefficient= <475>;
29                 regulators {
30                         #address-cells = <1>;
31                         #size-cells = <0>;
32                         pwm_reg0: regulator@0 {
33                                 regulator-compatible = "pwm_dcdc1";
34                                 regulator-name= "vdd_logic";
35                                 regulator-min-microvolt = <925000>;
36                                 regulator-max-microvolt = <1400000>;
37                                 regulator-always-on;
38                                 regulator-boot-on;
39                         };
40                 };
41         };
42
43         codec_hdmi_i2s: codec-hdmi-i2s {
44                 compatible = "hdmi-i2s";
45         };
46
47         codec_hdmi_spdif: codec-hdmi-spdif {
48                 compatible = "hdmi-spdif";
49         };
50 };
51
52 &emmc {
53         clock-frequency = <50000000>;
54         clock-freq-min-max = <400000 50000000>;
55
56         supports-highspeed;
57         supports-emmc;
58         bootpart-no-access;
59         
60         status = "okay";
61 };
62     
63 &sdmmc {
64         clock-frequency = <50000000>;
65         lock-freq-min-max = <400000 50000000>;              
66             
67         supports-highspeed;
68         supports-sd;
69         broken-cd;
70         card-detect-delay = <200>;
71
72         pwr-gpios = <&gpio3 GPIO_A1 GPIO_ACTIVE_LOW>; /*pwr_en = GPIO3_A1*/
73
74         status = "okay";
75 };
76                 
77 &sdio {
78         clock-frequency = <50000000>;
79         clock-freq-min-max = <200000 50000000>;
80                 
81         supports-highspeed;             
82         supports-sdio;
83
84         status = "diabled";
85 };
86 &i2c0 {
87         status = "okay";
88         rk808: rk808@1b {
89                 reg = <0x1b>;
90                 status = "okay";
91         };
92         
93         bq24296: bq24296@6b {
94                 compatible = "ti,bq24296";
95                 reg = <0x6b>;
96                 gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>;
97                 bq24296,chg_current = <1000 500 2000>;
98                 status = "disable";
99         };
100         bq27320: bq27320@55 {
101                 compatible = "ti,bq27320";
102                 reg = <0x55>;
103         /*   gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>; */
104                 status = "disable";
105         };
106 };
107
108 &i2c1 {
109         status = "okay";
110         rtc@51 {
111                 compatible = "nxp,pcf8563";
112                 reg = <0x51>;
113         };
114         
115         sensor@1d {
116                 compatible = "gs_mma8452";
117                 reg = <0x1d>;
118                 type = <SENSOR_TYPE_ACCEL>;
119                 irq-gpio = <&gpio8 GPIO_A0 IRQ_TYPE_EDGE_FALLING>;
120                 irq_enable = <1>;
121                 poll_delay_ms = <30>;
122                 layout = <1>;
123         };
124                 sensor@19 {
125                 compatible = "gs_lis3dh";
126                 reg = <0x19>;
127                 type = <SENSOR_TYPE_ACCEL>;
128                 irq-gpio = <&gpio0 GPIO_A0 IRQ_TYPE_LEVEL_LOW>;
129                 irq_enable = <1>;
130                 poll_delay_ms = <30>;
131                 layout = <1>;
132         };
133                 sensor@0d {
134                 compatible = "ak8963";
135                 reg = <0x0d>;
136                 type = <SENSOR_TYPE_COMPASS>;
137                 irq-gpio = <&gpio8 GPIO_A2 IRQ_TYPE_EDGE_RISING>;
138                 irq_enable = <1>;
139                 poll_delay_ms = <30>;
140                 layout = <1>;
141         };
142
143                 sensor@6b {
144                 compatible = "l3g20d_gyro";
145                 reg = <0x6b>;
146                 type = <SENSOR_TYPE_GYROSCOPE>;
147                 irq-gpio = <&gpio8 GPIO_A3 IRQ_TYPE_LEVEL_LOW>;
148                 irq_enable = <1>;
149                 poll_delay_ms = <30>;
150                 layout = <1>;
151         };
152         
153 };
154
155 &i2c2 {
156         status = "okay";
157 };
158
159 &i2c3 {
160         status = "okay";
161 };
162
163 &i2c4 {
164         status = "okay";
165         ts@55 {
166                 compatible = "goodix,gt8xx";
167                 reg = <0x55>;
168                 touch-gpio = <&gpio7 GPIO_A6 IRQ_TYPE_LEVEL_LOW>;
169                 reset-gpio = <&gpio7 GPIO_A5 GPIO_ACTIVE_LOW>;
170                 //power-gpio = <&gpio0 GPIO_C5 GPIO_ACTIVE_LOW>;
171                 max-x = <1280>;
172                 max-y = <800>;
173         };
174         
175         ts@01 {
176                 compatible = "ct,ct36x";
177                 reg = <0x01>;
178                 ct-model = <365>;
179                 touch-gpio = <&gpio7 GPIO_A6 IRQ_TYPE_LEVEL_LOW>;
180                 reset-gpio = <&gpio7 GPIO_A5 GPIO_ACTIVE_HIGH>;
181                 max-x = <1280>;
182                 max-y = <800>;
183                 orientation=<1 0 0 1>;
184         };
185 };
186
187 &i2c5 {
188         status = "okay";
189 };
190
191 &fb {
192         rockchip,disp-mode = <DUAL>;
193 };
194
195 &rk_screen {
196          display-timings = <&disp_timings>;
197 };
198
199 /*lcdc1 as PRMRY(LCD),lcdc0 as EXTEND(HDMI)*/
200 &lcdc1 {
201         status = "okay";
202         power_ctr: power_ctr {
203                 rockchip,debug = <0>;
204                 rockchip,mirror = <NO_MIRROR>;
205                 lcd_en:lcd_en {
206                         rockchip,power_type = <GPIO>;
207                         gpios = <&gpio7 GPIO_A3 GPIO_ACTIVE_HIGH>;
208                         rockchip,delay = <10>;
209                 };
210                 
211                 /*lcd_cs:lcd_cs {
212                         rockchip,power_type = <REGULATOR>;
213                         rockchip,delay = <10>;
214                 };
215
216                 lcd_rst:lcd_rst {
217                         rockchip,power_type = <GPIO>;
218                         gpios = <&gpio3 GPIO_D6 GPIO_ACTIVE_HIGH>;
219                         rockchip,delay = <5>;
220                 };*/
221
222         };
223 };
224
225 &lcdc0 {
226         status = "okay";
227 };
228
229 &hdmi {
230         status = "okay";
231         rockchips,hdmi_audio_source = <0>;
232 };
233
234 &adc {
235         status = "okay";
236
237         key {
238                 compatible = "rockchip,key";
239                 io-channels = <&adc 1>;
240
241                 vol-up-key {
242                         linux,code = <115>;
243                         label = "volume up";
244                         rockchip,adc_value = <1>;
245                 };
246
247                 vol-down-key {
248                         linux,code = <114>;
249                         label = "volume down";
250                         rockchip,adc_value = <170>;
251                 };
252
253                 power-key {
254                         gpios = <&gpio0 GPIO_A4 GPIO_ACTIVE_LOW>;
255                         linux,code = <116>;
256                         label = "power";
257                         gpio-key,wakeup;
258                 };
259
260                 menu-key {
261                         linux,code = <139>;
262                         label = "menu";
263                         rockchip,adc_value = <355>;
264                 };
265
266                 home-key {
267                         linux,code = <102>;
268                         label = "home";
269                         rockchip,adc_value = <746>;
270                 };
271
272                 back-key {
273                         linux,code = <158>;
274                         label = "back";
275                         rockchip,adc_value = <560>;
276                 };
277
278                 camera-key {
279                         linux,code = <212>;
280                         label = "camera";
281                         rockchip,adc_value = <450>;
282                 };
283         };
284 };
285
286 &pwm1 {
287         status = "okay";
288 };
289
290 /include/ "rk808.dtsi"
291 &rk808 {
292         gpios =<&gpio0 GPIO_A4 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_B3 GPIO_ACTIVE_LOW>;
293
294         regulators {
295                 
296                 rk808_dcdc1_reg: regulator@0{
297                         regulator-name= "vdd_arm";
298                         regulator-always-on;
299                         regulator-boot-on;
300                 };
301
302                 rk808_dcdc2_reg: regulator@1 {
303                         regulator-name= "vdd_gpu";
304                         regulator-always-on;
305                         regulator-boot-on;
306                 };
307
308                 rk808_dcdc3_reg: regulator@2 {
309                         regulator-name= "rk_dcdc3";
310                         regulator-min-microvolt = <1200000>;
311                         regulator-max-microvolt = <1200000>;
312                         regulator-always-on;
313                         regulator-boot-on;
314                 };
315
316                 rk808_dcdc4_reg: regulator@3 {
317                         regulator-name= "vccio";
318                         regulator-min-microvolt = <1800000>;
319                         regulator-max-microvolt = <3300000>;
320                         regulator-always-on;
321                         regulator-boot-on;
322                 };
323
324                 rk808_ldo1_reg: regulator@4 {
325                         regulator-name= "rk_ldo1";
326                         regulator-min-microvolt = <3300000>;
327                         regulator-max-microvolt = <3300000>;
328                         regulator-always-on;
329                         regulator-boot-on;
330                 };
331
332                 rk808_ldo2_reg: regulator@5 {
333                         regulator-name= "rk_ldo2";
334                         regulator-min-microvolt = <3300000>;
335                         regulator-max-microvolt = <3300000>;
336                         regulator-always-on;
337                         regulator-boot-on;
338                 };
339
340                 rk808_ldo3_reg: regulator@6 {
341                         regulator-name= "rk_ldo3";
342                         regulator-min-microvolt = <1000000>;
343                         regulator-max-microvolt = <1000000>;
344                         regulator-always-on;
345                         regulator-boot-on;
346                 };
347
348                 rk808_ldo4_reg:regulator@7 {
349                         regulator-name= "rk_ldo4";
350                         regulator-min-microvolt = <1800000>;
351                         regulator-max-microvolt = <1800000>;
352                         regulator-always-on;
353                         regulator-boot-on;
354                 };
355
356                 rk808_ldo5_reg: regulator@8 {
357                         regulator-name= "rk_ldo5";
358                         regulator-min-microvolt = <3300000>;
359                         regulator-max-microvolt = <3300000>;
360                         regulator-always-on;
361                         regulator-boot-on;
362                 };
363
364                 rk808_ldo6_reg: regulator@9 {
365                         regulator-name= "rk_ldo6";
366                         regulator-min-microvolt = <1000000>;
367                         regulator-max-microvolt = <1000000>;
368                         regulator-always-on;
369                         regulator-boot-on;
370                 };
371
372                 rk808_ldo7_reg: regulator@10 {
373                         regulator-name= "rk_ldo7";
374                         regulator-min-microvolt = <1800000>;
375                         regulator-max-microvolt = <1800000>;
376                         regulator-always-on;
377                         regulator-boot-on;
378                 };
379
380                 rk808_ldo8_reg: regulator@11 {
381                         regulator-name= "rk_ldo8";
382                         regulator-min-microvolt = <3300000>;
383                         regulator-max-microvolt = <3300000>;
384                         regulator-always-on;
385                         regulator-boot-on;
386                 };
387         };
388 };