tizen 2.4 release
[profile/mobile/platform/kernel/linux-3.10-sc7730.git] / arch / arm / boot / dts / sprd-scx35_grandprime_dtv.dts
1 /*
2  * Copyright (C) 2013 Spreadtrum Communication Incorporated
3  *              http://www.spreadtrum.com/
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation.
8  */
9 /dts-v1/;
10
11 /* memory reserved for SMEM */
12 /memreserve/ 0x87800000 0x240000; /* 2MK+256K */
13
14 /* memory reserved for CPW modem */
15 /memreserve/ 0x88000000 0x1c00000; /* 28M */
16
17 /* memory reserved for fb */
18 /memreserve/ 0x9F61B000 0x5EF000; /* 540*960*4*3, 4K alignment */
19
20 /* memory reserved for ION */
21 /memreserve/ 0x9FC0A000 0x3F6000; /* 540*960*4*2, 8K alignment*/
22
23 /include/ "sprd-scx35_2.dtsi"
24 /include/ "sprd-scx35_sc7730.dtsi"
25
26 / {
27         model = "Spreadtrum SP7730G board";
28
29         chosen {
30                 bootargs = "loglevel=1 init=/init root=/dev/ram0 rw";
31                 linux,initrd-start = <0x85500000>;
32                 linux,initrd-end   = <0x855a3212>;
33         };
34
35         aliases {
36                 i2c4 = &i2c4;
37                 i2c_gpio6 = &i2c_gpio6;
38                 i2c_gpio7 = &i2c_gpio7;
39                  /*i2c_gpio8 = &i2c_gpio8;*/
40         };
41
42         memory {
43                 device_type = "memory";
44                 reg = <0x80000000 0x40000000>;
45         };
46
47
48         sprd_simdet {
49                 compatible = "sprd,sim_detect";
50                 sprd,name = "simdet";
51                 gpios = <&d_gpio_gpio 162 0>;
52                 irq_trigger_level_detect = <1>;
53                 delay_time = <100>;
54         };
55
56         rfkill {
57                 compatible = "broadcom,rfkill";
58                 gpios = <&d_gpio_gpio 231 0>;
59         };
60
61
62 i2c4: i2c@70900000 {
63         compatible = "sprd,i2c";
64         interrupts = <0 15 0x0>;
65         reg = <0x70900000 0x1000>;
66         #address-cells = <1>;
67         #size-cells = <0>;
68         sensor_i2c_vcm0@0x18 {
69                 compatible = "sprd,sensor_i2c_vcm0";
70                 reg = <0x18>;
71         };
72 };
73
74 i2c_gpio6: i2c_gpio@1 {
75                            compatible = "i2c-gpio";
76                            #address-cells = <1>;
77                            #size-cells = <0>;
78                            gpios = <&d_gpio_gpio 159 0 /* sda */
79                                    &d_gpio_gpio 160 0 >; /* scl */
80                            i2c-gpio,delay-us = <10>;    /* ~100 kHz */
81                            i2c-gpio,timeout-ms = <0>;
82                            status = "okay";
83
84                 sm5701-i2c@49 {
85                         compatible = "sm,sm5701";
86                         reg = <0x49>;
87                         chargermfd {
88                                 charger {
89                                         compatible = "sm,sm5701-charger";
90                                         chgen-gpio = <&d_gpio_gpio 215 0>;
91                                         chgirq-gpio = <&d_gpio_gpio 161 0>;
92                                         chg-float-voltage = <4400>;
93                                 };
94                         };
95                         leds_sm5701 {
96                                         compatible = "sm,leds_sm5701";
97                                         flashen-gpio = <&d_gpio_gpio 232 0>;
98                                         flashtorch-gpio = <&d_gpio_gpio 233 0>;
99                         };
100
101                 };
102         };
103
104 i2c_gpio7: i2c_gpio@2 {
105                            compatible = "i2c-gpio";
106                            #address-cells = <1>;
107                            #size-cells = <0>;
108                            gpios = <&d_gpio_gpio 150 0 /* sda */
109                                    &d_gpio_gpio 151 0 >; /* scl */
110                            i2c-gpio,delay-us = <10>;    /* ~100 kHz */
111                            i2c-gpio,timeout-ms = <0>;
112
113                            sm5504@14 {
114                                    compatible = "SiliconMitus,sm5504";
115                                    reg = <0x14>;
116                                    interrupt-parent = <&d_gpio_gpio>;
117                                    sm5504,irq-gpio = <&d_gpio_gpio 149 0>;
118                            };
119                    };
120
121                    gps {
122                            compatible = "lsi,s5n6420";
123                            gps-pwr-en = <&d_gpio_gpio 168 0>;   /*GPS_PWON*/
124                            gps-reset = <&d_gpio_gpio 235 0>;    /*GPS_RESET*/
125                            gps-regulator = "vddsdio";
126                    };
127
128                    sec_thermistor {
129                            compatible = "sec,thermistor";
130                    };
131
132                    sec-fuelgauge {
133                            compatible = "samsung,sec-fuelgauge";
134                            capacity-max = <1000>;
135                            capacity-max-margin = <1000>;
136                            capacity-min = <10>;
137                            fg-irq-attr = <0>;
138                            fuel-alert-soc = <1000>;
139                            temp_adc_channel = <0>;
140                            chg_bat_safety_vol = <4600>;
141                            gpios = <&a_eic_gpio 0 0>;/* chg int */
142                            soft_vbat_uvlo = <3050>;
143                            vmode = <0>; /* 1=Voltage mode, 0=mixed mode */
144                            alm_soc = <5>; /* SOC alm level %*/
145                            alm_vbat = <3500>; /* Vbat alm level mV*/
146                            rint = <220>; /*battery internal impedance*/
147                            cnom = <3600>; /* nominal capacity in mAh */
148                            rsense_real = <206>; /* sense resistor 0.1mOhm from real environment*/
149                            rsense_spec = <200>; /* sense resistor 0.1mOhm from specification*/
150                            relax_current = <50>; /* current for relaxation in mA (< C/20) */
151                            ocv_table = <4343 100
152                                    4285 95
153                                    4231 90
154                                    4179 85
155                                    4128 80
156                                    4080 75
157                                    4035 70
158                                    3983 65
159                                    3949 60
160                                    3896 55
161                                    3861 50
162                                    3836 45
163                                    3816 40
164                                    3798 35
165                                    3785 30
166                                    3773 25
167                                    3757 20
168                                    3734 15
169                                    3694 10
170                                    3688 5
171                                    3400 0>;
172 sprd_fgu: sprd_fgu{
173                           compatible  = "sprd,sprd_fgu";
174                           interrupt-parent = <&adi>;
175                           interrupts = <4 0x0>;
176                   };
177                    };
178
179                    sec-battery {
180                            compatible = "samsung,sec-battery";
181                            battery,vendor = "SDI SDI";
182                            battery,charger_name = "sec-charger";
183                            battery,fuelgauge_name = "sec-fuelgauge";
184                            battery,technology = <2>; /* POWER_SUPPLY_TECHNOLOGY_LION */
185
186                            battery,chip_vendor = "SPRD";
187                            battery,temp_adc_type = <1>; /* SEC_BATTERY_ADC_TYPE_AP */
188
189                            battery,polling_time = <10 30 30 30 3600>;
190
191                            battery,adc_check_count = <5>;
192
193                            battery,cable_check_type = <5>; /* SEC_BATTERY_CABLE_CHECK_PSY */
194                            battery,cable_source_type = <3>; /* SEC_BATTERY_CABLE_SOURCE_EXTERNAL */
195                            battery,event_waiting_time = <600>;
196                            battery,polling_type = <1>; /* SEC_BATTERY_MONITOR_ALARM */
197                            battery,monitor_initial_count = <3>;
198
199                 battery,battery_check_type = <5>; /* SEC_BATTERY_CHECK_CHARGER */
200                 battery,check_count = <0>;
201                 battery,check_adc_max = <1440>;
202                 battery,check_adc_min = <0>;
203
204                 battery,ovp_uvlo_check_type = <3>; /* SEC_BATTERY_OVP_UVLO_CHGPOLLING */
205
206                 battery,thermal_source = <2>; /* SEC_BATTERY_THERMAL_SOURCE_ADC */
207
208                 battery,temp_table_adc = <501 615 738 795 846 956 1065 1088 1180 1307 1392 1477 1627 1777 1922 2098
209                         2144 2182 2212 2260 2302 2452 2555>;
210                 battery,temp_table_data = <700 650 600 580 550 500 460 450 400 350 300 250 200 150 100
211                         50 20 0 (-20) (-50) (-70) (-150) (-200)>;
212
213                 battery,temp_check_type = <2>; /* SEC_BATTERY_TEMP_CHECK_TEMP */
214                 battery,temp_check_count = <1>;
215                 battery,temp_high_threshold_event = <600>;
216                 battery,temp_high_recovery_event = <460>;
217                 battery,temp_low_threshold_event = <(-50)>;
218                 battery,temp_low_recovery_event = <0>;
219                 battery,temp_high_threshold_normal = <600>;
220                 battery,temp_high_recovery_normal = <460>;
221                 battery,temp_low_threshold_normal = <(-50)>;
222                 battery,temp_low_recovery_normal = <0>;
223                 battery,temp_high_threshold_lpm = <600>;
224                 battery,temp_high_recovery_lpm = <460>;
225                 battery,temp_low_threshold_lpm = <(-50)>;
226                 battery,temp_low_recovery_lpm = <0>;
227                 battery,full_check_type = <7>; /* SEC_BATTERY_FULLCHARGED_CHGPSY */
228                 battery,full_check_type_2nd = <3>; /* SEC_BATTERY_FULLCHARGED_TIME */
229                 battery,full_check_count = <1>;
230                 battery,chg_gpio_full_check = <0>;
231                 battery,chg_polarity_full_check = <1>;
232
233                 battery,full_condition_type = <13>;
234                 battery,full_condition_soc = <95>;
235                 battery,full_condition_vcell = <4200>;
236
237                 battery,recharge_check_count = <1>;
238                 battery,recharge_condition_type = <4>; /* SEC_BATTERY_RECHARGE_CONDITION_VCELL */
239                 battery,recharge_condition_soc = <95>;
240                 battery,recharge_condition_vcell = <4350>;
241
242                 battery,charging_total_time = <21600>;
243                 battery,recharging_total_time = <5400>;
244                 battery,charging_reset_time = <0>;
245
246                 /* Charger */
247                 charger,vbus_ctrl_gpio = <&d_gpio_gpio 64 0x00>;
248                 battery,input_current_limit = <700 460 460 700 460 700 700 460 460 700 700 700 700 460 700 300 700 700 300 700 700 460 460>;
249                 battery,fast_charging_current = <975 0 975 975 975 975 975 975 0 975 975 975 975 (-1) 975 975 975 975 975 975 975 0 0>;
250                 battery,full_check_current_1st = <175 0 175 175 175 175 175 175 0 175 175 175 175 0 175 175 175 175 175 175 175 0 0>;
251                 battery,full_check_current_2nd = <1800 0 1800 1800 1800 1800 1800 1800 0 1800 1800 1800 1800 0 1800 1800 1800 1800 1800 1800 1800 0 0>;
252         };
253
254
255                    panel_cabc_bl {
256                            compatible = "sprd,panel_cabc_bl";
257                    };
258
259                    sprd_pwm_bl {
260                         compatible = "sprd,sprd_pwm_bl";
261                         reg = <0x40260000 0xf>;
262                            brightness_max = <170>;
263                            brightness_min = <12>;
264                            pwm_index = <2>;
265                            gpio_ctrl_pin = <214>;
266                            gpio_active_level = <1>;
267                    };
268
269         sprd-marlin {
270                 compatible = "sprd,marlin";
271                 gpios = <&d_gpio_gpio 148 0 /*marlin gpio0 */
272                         &d_gpio_gpio 45 0  /*marlin gpio1 */
273                         &d_gpio_gpio 46 0  /*marlin gpio2 */
274                         &d_gpio_gpio 47 0  /*marlin gpio3 */
275                         &d_gpio_gpio 230 0>;  /*marlin reset*/
276                 cp-rfctl-offset = <0xd8>;  /*coex func. marlin gpio3*/
277                 vdd-download = "vddcamd"; /*vdd 1.6v*/
278                 vdd-pa = "vddwifipa"; /*vdd 3.3v*/
279                 clk-name = "clk_aux0"; /*clk 32k*/
280                 sdhci-name = "sdio_wifi";
281         };
282 };
283
284 &pinctrl {
285         pwr_domain ="vdd18", /* "vdd18" */ /* VIO_2_0_ms */
286                            "vdd18", /* "vdd28" */ /* VIO_2_1_ms */
287                            "vddsim0",
288                            "vddsim1",
289                            "vdd18", /* "vddsim2" */
290                            "vddsdcore",
291                            "vdd18";
292 };
293
294 &i2c0 {
295         sensor_main@0x3c {
296                 compatible = "sprd,sensor_main";
297                 reg = <0x3c>;
298         };
299         sensor_sub@0x21 {
300                 compatible = "sprd,sensor_sub";
301                 reg = <0x21>;
302         };
303 };
304
305 &i2c1 { /* TSP */
306         bt541_ts@20 {
307                 compatible = "Zinitix,bt541_ts";
308                 reg = <0x20>;
309                 gpios = <&d_gpio_gpio 153 0>;
310                 bt541,x_resolution  = <539>;
311                 bt541,y_resolution = <959>;
312                 bt541,orientation = <0>;
313                 bt541,page_size = <128>;
314                 tsp_vdd_supply_type = <0>;
315                 gpio_ldo_en = <&d_gpio_gpio 152 0>;
316         };
317 };
318
319 &i2c2 {
320 #size-cells = <0>;
321         status = "okay";
322         k2hh@1D {
323                 compatible = "stm,k2hh";
324                 reg = <0x1D>;
325                 interrupt-parent = <&d_gpio_gpio>;
326                 interrupts = <164 0>;
327                 stm,irq_gpio = <&d_gpio_gpio 164 0x00>;
328                 stm,sda = <&d_gpio_gpio 208 0x00>;
329                 stm,scl = <&d_gpio_gpio 207 0x00>;
330                 stm,reg_vdd-supply = <&vdd18>;
331                 stm,axis_map_x = <0>;
332                 stm,axis_map_y = <1>;
333                 stm,axis_map_z = <2>;
334                 stm,negate_x = <0>;
335                 stm,negate_y = <0>;
336                 stm,negate_z = <1>;
337                 stm,poll_interval = <100>;
338                 stm,min_interval = <2>;
339         };
340
341         sx9500-i2c@28 {
342                 compatible = "sx9500-i2c";
343                 reg = <0x28>;
344                 sx9500-i2c,vdd-supply = <&vddsim1>;
345                 sx9500-i2c,nirq-gpio = <&d_gpio_gpio 167 0x0>;
346         };
347 };
348
349 &usb {
350         tune_value = <0x44073e37>;
351 };
352
353 &keypad0 {
354         ngpios = <2>;
355         gpios = <&a_eic_gpio 2 0>;
356         sprd,keypad-num-rows = <1>;
357         sprd,keypad-num-columns = <2>;
358         interrupts = <0 36 0x0>;
359         sprd,keypad-rows-choose-hw = <0x30000>;
360         sprd,keypad-cols-choose-hw = <0x300>;
361         sprd,debounce_time = <5000>;
362         linux,keypad-no-autorepeat;
363
364         key_volume_up {
365                 keypad,row = <0>;
366                 keypad,column = <0>;
367                 linux,code = <115>;
368         };
369
370         key_home {
371                 keypad,row = <0>;
372                 keypad,column = <1>;
373                 linux,code = <102>;
374         };
375 };
376
377 &l_sprd_sensor {
378         gpios = <&d_gpio_gpio 186 0           /*main reset*/
379                 &d_gpio_gpio 188 0    /*main power down*/
380                 &d_gpio_gpio 238 0    /*sub reset*/
381                 &d_gpio_gpio 187 0  /*sub power down*/
382                 &d_gpio_gpio 162 0    /*none*/
383                 &d_gpio_gpio 0 0    /*none*/
384                 &d_gpio_gpio 0 0    /*none*/
385                 &d_gpio_gpio 0 0>;  /*none*/
386 };
387
388 &l_ion {
389         sprd,ion-heap@1 {
390                 sprd,ion-heap-mem = <0x0 0x0>;
391         };
392
393         sprd,ion-heap@2 {
394                 sprd,ion-heap-mem = <0x0 0x0>;
395         };
396
397         sprd,ion-heap@3 {
398                 sprd,ion-heap-mem = <0x9FC0A000 0x3F6000>;
399         };
400 };
401
402 &adi {
403         headset_detect {
404                 compatible = "sprd,headset-detect";
405                 gpio_switch = <0>;
406                 gpio_detect = <237>;
407                 gpio_button = <239>;
408                 irq_trigger_level_detect = <0>;
409                 irq_trigger_level_button = <0>;
410                 adc_threshold_3pole_detect = <1700>;
411                 adc_threshold_4pole_detect = <2700>;
412                 irq_threshold_buttont = <1>;
413                 voltage_headmicbias = <3000000>;
414                 nbuttons = <3>;
415                 headset_buttons_media {
416                         adc_min = <0>;
417                         adc_max = <190>;
418                         code = <226>;
419                         type = <0>;
420                 };
421
422                 headset_buttons_up {
423                         adc_min = <191>;
424                         adc_max = <347>;
425                         code = <115>;
426                         type = <0>;
427                 };
428
429                 headset_buttons_down {
430                         adc_min = <348>;
431                         adc_max =<760>;
432                         code = <114>;
433                         type = <0>;
434                 };
435         };
436
437         headset_sprd_sc2723 {
438                 compatible = "sprd,headset_sprd_sc2723";
439                 gpio_switch = <0>;
440                 gpio_detect = <237>;
441                 gpio_button = <239>;
442                 irq_trigger_level_detect = <0>;
443                 irq_trigger_level_button = <0>;
444                 adc_threshold_3pole_detect = <100>;
445                 adc_threshold_4pole_detect = <3100>;
446                 irq_threshold_buttont = <1>;
447                 voltage_headmicbias = <3000000>;
448                 nbuttons = <3>;
449                 headset_buttons_media {
450                         adc_min = <0>;
451                         adc_max = <570>;
452                         code = <226>;
453                         type = <0>;
454                 };
455
456                 headset_buttons_up {
457                         adc_min = <571>;
458                         adc_max = <1041>;
459                         code = <115>;
460                         type = <0>;
461                 };
462
463                 headset_buttons_down {
464                         adc_min = <1042>;
465                         adc_max =<2280>;
466                         code = <114>;
467                         type = <0>;
468                 };
469         };
470
471
472         sprd_eic_keys {
473                 compatible = "sprd,sprd-eic-keys";
474                 key_volumedown {
475                         label = "Volumedown Key";
476                         linux,code = <114>;
477                         gpios = <&a_eic_gpio 10 0>;
478                         debounce-interval = <2>;
479                         gpio-key,wakeup;
480                 };
481         };
482 };
483
484 &sdio0 {
485         detect_gpio = <71>;
486         SD_Pwr_Name = "vddsdcore";
487         /*_1_8V_signal_Name = "vddsdio";*/
488 };
489
490 &fb0 {
491         sprd,fb_mem = <0x9F61B000 0x5EF000>;
492         sprd,fb_display_size = <540 960>;
493 };