ARM: rockchip: rk3288 support msch setup
[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 &i2c0 {
53         status = "okay";
54         rk808: rk808@1b {
55                 reg = <0x1b>;
56                 status = "okay";
57         };
58         
59         bq24296: bq24296@6b {
60                 compatible = "ti,bq24296";
61                 reg = <0x6b>;
62                 gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>;
63                 bq24296,chg_current = <1000 500 2000>;
64                 status = "disable";
65         };
66         bq27320: bq27320@55 {
67                 compatible = "ti,bq27320";
68                 reg = <0x55>;
69         /*   gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>; */
70                 status = "disable";
71         };
72 };
73
74 &i2c1 {
75         status = "okay";
76         rtc@51 {
77                 compatible = "nxp,pcf8563";
78                 reg = <0x51>;
79         };
80         
81         sensor@1d {
82                 compatible = "gs_mma8452";
83                 reg = <0x1d>;
84                 type = <SENSOR_TYPE_ACCEL>;
85                 irq-gpio = <&gpio8 GPIO_A0 IRQ_TYPE_EDGE_FALLING>;
86                 irq_enable = <1>;
87                 poll_delay_ms = <30>;
88                 layout = <1>;
89         };
90                 sensor@19 {
91                 compatible = "gs_lis3dh";
92                 reg = <0x19>;
93                 type = <SENSOR_TYPE_ACCEL>;
94                 irq-gpio = <&gpio0 GPIO_A0 IRQ_TYPE_LEVEL_LOW>;
95                 irq_enable = <1>;
96                 poll_delay_ms = <30>;
97                 layout = <1>;
98         };
99                 sensor@0d {
100                 compatible = "ak8963";
101                 reg = <0x0d>;
102                 type = <SENSOR_TYPE_COMPASS>;
103                 irq-gpio = <&gpio8 GPIO_A2 IRQ_TYPE_EDGE_RISING>;
104                 irq_enable = <1>;
105                 poll_delay_ms = <30>;
106                 layout = <1>;
107         };
108
109                 sensor@6b {
110                 compatible = "l3g20d_gyro";
111                 reg = <0x6b>;
112                 type = <SENSOR_TYPE_GYROSCOPE>;
113                 irq-gpio = <&gpio8 GPIO_A3 IRQ_TYPE_LEVEL_LOW>;
114                 irq_enable = <1>;
115                 poll_delay_ms = <30>;
116                 layout = <1>;
117         };
118         
119 };
120
121 &i2c2 {
122         status = "okay";
123 };
124
125 &i2c3 {
126         status = "okay";
127 };
128
129 &i2c4 {
130         status = "okay";
131         ts@55 {
132                 compatible = "goodix,gt8xx";
133                 reg = <0x55>;
134                 touch-gpio = <&gpio7 GPIO_A6 IRQ_TYPE_LEVEL_LOW>;
135                 reset-gpio = <&gpio7 GPIO_A5 GPIO_ACTIVE_LOW>;
136                 //power-gpio = <&gpio0 GPIO_C5 GPIO_ACTIVE_LOW>;
137                 max-x = <1280>;
138                 max-y = <800>;
139         };
140         
141         ts@01 {
142                 compatible = "ct,ct36x";
143                 reg = <0x01>;
144                 ct-model = <365>;
145                 touch-gpio = <&gpio7 GPIO_A6 IRQ_TYPE_LEVEL_LOW>;
146                 reset-gpio = <&gpio7 GPIO_A5 GPIO_ACTIVE_HIGH>;
147                 max-x = <1280>;
148                 max-y = <800>;
149                 orientation=<1 0 0 1>;
150         };
151 };
152
153 &i2c5 {
154         status = "okay";
155 };
156
157 &fb {
158         rockchip,disp-mode = <DUAL>;
159 };
160
161 &rk_screen {
162          display-timings = <&disp_timings>;
163 };
164
165 &lcdc0 {
166         status = "okay";
167         power_ctr: power_ctr {
168                 rockchip,debug = <0>;
169                 /*lcd_en:lcd_en {
170                         rockchip,power_type = <GPIO>;
171                         gpios = <&gpio7 GPIO_A3 GPIO_ACTIVE_HIGH>;
172                         rockchip,delay = <10>;
173                 };
174
175                            
176                 lcd_cs:lcd_cs {
177                         rockchip,power_type = <REGULATOR>;
178                         rockchip,delay = <10>;
179                 };
180
181                 lcd_rst:lcd_rst {
182                         rockchip,power_type = <GPIO>;
183                         gpios = <&gpio3 GPIO_D6 GPIO_ACTIVE_HIGH>;
184                         rockchip,delay = <5>;
185                 };*/
186
187         };
188 };
189
190 &lcdc1 {
191         status = "okay";
192 };
193
194
195 &adc {
196         status = "okay";
197
198         key {
199                 compatible = "rockchip,key";
200                 io-channels = <&adc 1>;
201
202                 vol-up-key {
203                         linux,code = <115>;
204                         label = "volume up";
205                         rockchip,adc_value = <1>;
206                 };
207
208                 vol-down-key {
209                         linux,code = <114>;
210                         label = "volume down";
211                         rockchip,adc_value = <170>;
212                 };
213
214                 power-key {
215                         gpios = <&gpio0 GPIO_A4 GPIO_ACTIVE_LOW>;
216                         linux,code = <116>;
217                         label = "power";
218                         gpio-key,wakeup;
219                 };
220
221                 menu-key {
222                         linux,code = <139>;
223                         label = "menu";
224                         rockchip,adc_value = <355>;
225                 };
226
227                 home-key {
228                         linux,code = <102>;
229                         label = "home";
230                         rockchip,adc_value = <746>;
231                 };
232
233                 back-key {
234                         linux,code = <158>;
235                         label = "back";
236                         rockchip,adc_value = <560>;
237                 };
238
239                 camera-key {
240                         linux,code = <212>;
241                         label = "camera";
242                         rockchip,adc_value = <450>;
243                 };
244         };
245 };
246
247 &pwm1 {
248         status = "okay";
249 };
250
251 /include/ "rk808.dtsi"
252 &rk808 {
253         gpios =<&gpio0 GPIO_A4 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_B3 GPIO_ACTIVE_LOW>;
254
255         regulators {
256                 
257                 rk808_dcdc1_reg: regulator@0{
258                         regulator-name= "vdd_arm";
259                         regulator-always-on;
260                         regulator-boot-on;
261                 };
262
263                 rk808_dcdc2_reg: regulator@1 {
264                         regulator-name= "vdd_gpu";
265                         regulator-always-on;
266                         regulator-boot-on;
267                 };
268
269                 rk808_dcdc3_reg: regulator@2 {
270                         regulator-name= "rk_dcdc3";
271                         regulator-min-microvolt = <1200000>;
272                         regulator-max-microvolt = <1200000>;
273                         regulator-always-on;
274                         regulator-boot-on;
275                 };
276
277                 rk808_dcdc4_reg: regulator@3 {
278                         regulator-name= "vccio";
279                         regulator-min-microvolt = <1800000>;
280                         regulator-max-microvolt = <3300000>;
281                         regulator-always-on;
282                         regulator-boot-on;
283                 };
284
285                 rk808_ldo1_reg: regulator@4 {
286                         regulator-name= "rk_ldo1";
287                         regulator-min-microvolt = <3300000>;
288                         regulator-max-microvolt = <3300000>;
289                         regulator-always-on;
290                         regulator-boot-on;
291                 };
292
293                 rk808_ldo2_reg: regulator@5 {
294                         regulator-name= "rk_ldo2";
295                         regulator-min-microvolt = <3300000>;
296                         regulator-max-microvolt = <3300000>;
297                         regulator-always-on;
298                         regulator-boot-on;
299                 };
300
301                 rk808_ldo3_reg: regulator@6 {
302                         regulator-name= "rk_ldo3";
303                         regulator-min-microvolt = <1000000>;
304                         regulator-max-microvolt = <1000000>;
305                         regulator-always-on;
306                         regulator-boot-on;
307                 };
308
309                 rk808_ldo4_reg:regulator@7 {
310                         regulator-name= "rk_ldo4";
311                         regulator-min-microvolt = <1800000>;
312                         regulator-max-microvolt = <1800000>;
313                         regulator-always-on;
314                         regulator-boot-on;
315                 };
316
317                 rk808_ldo5_reg: regulator@8 {
318                         regulator-name= "rk_ldo5";
319                         regulator-min-microvolt = <3300000>;
320                         regulator-max-microvolt = <3300000>;
321                         regulator-always-on;
322                         regulator-boot-on;
323                 };
324
325                 rk808_ldo6_reg: regulator@9 {
326                         regulator-name= "rk_ldo6";
327                         regulator-min-microvolt = <1000000>;
328                         regulator-max-microvolt = <1000000>;
329                         regulator-always-on;
330                         regulator-boot-on;
331                 };
332
333                 rk808_ldo7_reg: regulator@10 {
334                         regulator-name= "rk_ldo7";
335                         regulator-min-microvolt = <1800000>;
336                         regulator-max-microvolt = <1800000>;
337                         regulator-always-on;
338                         regulator-boot-on;
339                 };
340
341                 rk808_ldo8_reg: regulator@11 {
342                         regulator-name= "rk_ldo8";
343                         regulator-min-microvolt = <3300000>;
344                         regulator-max-microvolt = <3300000>;
345                         regulator-always-on;
346                         regulator-boot-on;
347                 };
348         };
349 };