tizen 2.4 release
[profile/mobile/platform/kernel/linux-3.10-sc7730.git] / arch / arm / boot / dts / sprd-scx35-tizen_z3-r02.dtsi
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
10 /* memory reserved for SMEM */
11 /memreserve/ 0x87800000 0x240000; /* 2MK+256K */
12
13 /* memory reserved for CPW modem */
14 /memreserve/ 0x88000000 0x1c00000; /* 28M */
15
16 /* memory reserved for fb */
17 /memreserve/ 0x9F61B000 0x384000; /* 720*1280*4*1, 4K alignment */
18
19 /include/ "sprd-scx35_2.dtsi"
20 /include/ "sprd-scx35_sc7730.dtsi"
21 /include/ "sprd-scx35-drm.dtsi"
22
23 / {
24         model = "Spreadtrum SP7730G board";
25
26         chosen {
27                 bootargs = "loglevel=1 init=/init root=/dev/ram0 rw";
28                 linux,initrd-start = <0x85500000>;
29                 linux,initrd-end   = <0x855a3212>;
30         };
31
32         samsung_input_bridge{
33                 compatible = "samsung_input_bridge";
34                 input_bridge,num_map = <2>;
35                 input_bridge,map_codes ="input_bridge,logdump_map_code",
36                                         "input_bridge,safemode_map_code";
37                 input_bridge,logdump_map_code  = <115 114 115 114 116 114 115 116>;
38                 input_bridge,safemode_map_code  = <114>;
39                 input_bridge,env_str = "APPS_LOG", "SAFE_MODE";
40                 input_bridge,env_value = "ON", "ON";
41                 input_bridge,map_key = <1>;
42                 input_bridge,enable_uevent = <1>;
43                 input_bridge,uevent_action = <2>;
44                 input_bridge,num_dev = <2>;
45                 input_bridge,dev_name_str = "sci-keypad", "sprd-eic-keys";
46                 };
47
48         aliases {
49                 i2c4 = &i2c4;
50                 i2c_gpio6 = &i2c_gpio6;
51                 i2c_gpio7 = &i2c_gpio7;
52                 i2c_gpio8 = &i2c_gpio8;
53         };
54
55         memory {
56                 device_type = "memory";
57                 reg = <0x80000000 0x40000000>;
58         };
59
60         sprd_simdet {
61                 compatible = "sprd,sim_detect";
62                 sprd,name = "simdet";
63                 gpios = <&d_gpio_gpio 162 0>;
64                 irq_trigger_level_detect = <1>;
65                 delay_time = <100>;
66         };
67
68         i2c4: i2c@70900000 {
69                 compatible = "sprd,i2c";
70                 interrupts = <0 15 0x0>;
71                 reg = <0x70900000 0x1000>;
72                 #address-cells = <1>;
73                 #size-cells = <0>;
74                 sensor_i2c_vcm0@0x18 {
75                         compatible = "sprd,sensor_i2c_vcm0";
76                         reg = <0x18>;
77                 };
78         };
79
80         i2c_gpio6: i2c_gpio@1 {
81                 compatible = "i2c-gpio";
82                 #address-cells = <1>;
83                 #size-cells = <0>;
84                 gpios = <&d_gpio_gpio 159 0 /* sda */
85                         &d_gpio_gpio 160 0 >; /* scl */
86                 i2c-gpio,delay-us = <10>;    /* ~100 kHz */
87                 i2c-gpio,timeout-ms = <0>;
88                 status = "okay";
89
90                 sm5701-i2c@49 {
91                         compatible = "sm,sm5701";
92                         reg = <0x49>;
93                         chargermfd {
94                                 charger {
95                                         compatible = "sm,sm5701-charger";
96                                         chgen-gpio = <&d_gpio_gpio 215 0>;
97                                         chgirq-gpio = <&d_gpio_gpio 161 0>;
98                                         chg-float-voltage = <4350>;
99                                 };
100                         };
101
102                         leds_sm5701 {
103                                 compatible = "sm,leds_sm5701";
104                                 flashen-gpio = <&d_gpio_gpio 232 0>;
105                                 flashtorch-gpio = <&d_gpio_gpio 233 0>;
106                         };
107                 };
108         };
109         torch-sec1{
110                 compatible = "sm,torch-sec1";
111         };
112         i2c_gpio7: i2c_gpio@2 {
113                 compatible = "i2c-gpio";
114                 #address-cells = <1>;
115                 #size-cells = <0>;
116                 gpios = <&d_gpio_gpio 150 0 /* sda */
117                         &d_gpio_gpio 151 0 >; /* scl */
118                 i2c-gpio,delay-us = <10>;    /* ~100 kHz */
119                 i2c-gpio,timeout-ms = <0>;
120
121                 sm5504@14 {
122                         compatible = "SiliconMitus,sm5504";
123                         reg = <0x14>;
124                         interrupt-parent = <&d_gpio_gpio>;
125                         sm5504,irq-gpio = <&d_gpio_gpio 149 0>;
126                 };
127         };
128
129         i2c_gpio8: i2c_gpio@3 {
130                 compatible = "i2c-gpio";
131                 #address-cells = <1>;
132                 #size-cells = <0>;
133                 gpios = <&d_gpio_gpio 147 0 /* sda */
134                         &d_gpio_gpio 154 0 >; /* scl */
135                 i2c-gpio,delay-us = <10>;    /* ~100 kHz */
136                 i2c-gpio,timeout-ms = <0>;
137                 status = "okay";
138                  tc360@20 {
139                                         compatible = "coreriver,coreriver-tkey";
140                                         reg = <0x20>;
141                                         coreriver,vcc_en-gpio = <&d_gpio_gpio 235 0>;
142                                         coreriver,sda-gpio = <&d_gpio_gpio 147 0>;
143                                         coreriver,scl-gpio = <&d_gpio_gpio 154 0>;
144                                         coreriver,irq-gpio = <&d_gpio_gpio 165 0>;
145                                         coreriver,keycodes = <169 158>;
146                                         coreriver,i2c-pull-up = <1>;
147                                         coreriver,gpio_seperated = <1>;
148                                         coreriver,fw-name = "tc350_z3_3g";
149                                         coreriver,firm-up;
150                                 };
151         };
152
153         gps {
154                 compatible = "broadcom,bcm47522";
155                 gps-pwr-en = <&d_gpio_gpio 168 0>;      /*GPS_PWON*/
156                 gps-regulator = "vddcamd";
157                 tcxo-regulator = "vddsim2";         /* tcxo power */
158                 tcxo-regulator-volt = <3300000>;    /* 3.3V */
159         };
160
161
162         sec_thermistor {
163                 compatible = "sec,thermistor";
164         };
165
166         sec-fuelgauge {
167                 compatible = "samsung,sec-fuelgauge";
168                 capacity-max = <1000>;
169                 capacity-max-margin = <1000>;
170                 capacity-min = <10>;
171                 fg-irq-attr = <0>;
172                 fuel-alert-soc = <1000>;
173                 temp_adc_channel = <0>;
174                 chg_bat_safety_vol = <4600>;
175                 gpios = <&a_eic_gpio 0 0>;/* chg int */
176                 soft_vbat_uvlo = <3050>;
177                 vmode = <0>; /* 1=Voltage mode, 0=mixed mode */
178                 alm_soc = <5>; /* SOC alm level %*/
179                 alm_vbat = <3450>; /* Vbat alm level mV*/
180                 rint = <200>; /*battery internal impedance*/
181                 cnom = <2600>; /* nominal capacity in mAh */
182                 rsense_real = <203>; /* sense resistor 0.1mOhm from real environment*/
183                 rsense_spec = <200>; /* sense resistor 0.1mOhm from specification*/
184                 relax_current = <50>; /* current for relaxation in mA (< C/20) */
185                 cnom_temp_tab = <1025 2600      /*value = 1000 + temp*/
186                                 1010 2400
187                                 1000 2100>;
188                 rint_temp_tab = <1025 200
189                                 1010 500
190                                 1000 900>;
191                 ocv_table = <4320 100
192                                 4248 95
193                                 4191 90
194                                 4138 85
195                                 4086 80
196                                 4042 75
197                                 3987 70
198                                 3956 65
199                                 3917 60
200                                 3866 55
201                                 3832 50
202                                 3810 45
203                                 3794 40
204                                 3781 35
205                                 3775 30
206                                 3767 25
207                                 3743 20
208                                 3699 15
209                                 3688 10
210                                 3590 5
211                                 3400 0>;
212                 sprd_fgu: sprd_fgu{
213                         compatible  = "sprd,sprd_fgu";
214                         interrupt-parent = <&adi>;
215                         interrupts = <4 0x0>;
216                 };
217         };
218
219         sec-battery {
220                 compatible = "samsung,sec-battery";
221                 battery,vendor = "SDI SDI";
222                 battery,charger_name = "sec-charger";
223                 battery,fuelgauge_name = "sec-fuelgauge";
224                 battery,technology = <2>; /* POWER_SUPPLY_TECHNOLOGY_LION */
225
226                 battery,chip_vendor = "SPRD";
227                 battery,temp_adc_type = <1>; /* SEC_BATTERY_ADC_TYPE_AP */
228
229                 battery,polling_time = <10 30 30 30 3600>;
230
231                 battery,adc_check_count = <5>;
232
233                 battery,cable_check_type = <5>; /* SEC_BATTERY_CABLE_CHECK_PSY */
234                 battery,cable_source_type = <3>; /* SEC_BATTERY_CABLE_SOURCE_EXTERNAL */
235                 battery,event_waiting_time = <600>;
236                 battery,polling_type = <1>; /* SEC_BATTERY_MONITOR_ALARM */
237                 battery,monitor_initial_count = <3>;
238
239                 battery,battery_check_type = <5>; /* SEC_BATTERY_CHECK_CHARGER */
240                 battery,check_count = <0>;
241                 battery,check_adc_max = <1440>;
242                 battery,check_adc_min = <0>;
243
244                 battery,ovp_uvlo_check_type = <3>; /* SEC_BATTERY_OVP_UVLO_CHGPOLLING */
245
246                 battery,thermal_source = <2>; /* SEC_BATTERY_THERMAL_SOURCE_ADC */
247
248                 battery,temp_table_adc = <306 417 571 746 787 853 870 896 922 966 1039 1094 1152 1230 1371
249                         1509 1764 1890 1958 2004 2066 2109 2167 2197 2244 2274 2300 2338 2425>;
250                 battery,temp_table_data = <900 800 700 600 580 550 530 520 510 500 470 450 430 400 350
251                         300 200 150 120 100 70 50 20 0 (-30) (-50) (-70) (-100) (-200)>;
252
253                 battery,temp_check_type = <2>; /* SEC_BATTERY_TEMP_CHECK_TEMP */
254                 battery,temp_check_count = <1>;
255                 battery,temp_high_threshold_event = <580>;
256                 battery,temp_high_recovery_event = <530>;
257                 battery,temp_low_threshold_event = <(-50)>;
258                 battery,temp_low_recovery_event = <0>;
259                 battery,temp_high_threshold_normal = <580>;
260                 battery,temp_high_recovery_normal = <530>;
261                 battery,temp_low_threshold_normal = <(-50)>;
262                 battery,temp_low_recovery_normal = <0>;
263                 battery,temp_high_threshold_lpm = <580>;
264                 battery,temp_high_recovery_lpm = <530>;
265                 battery,temp_low_threshold_lpm = <(-50)>;
266                 battery,temp_low_recovery_lpm = <0>;
267                 battery,full_check_type = <7>; /* SEC_BATTERY_FULLCHARGED_CHGPSY */
268                 battery,full_check_type_2nd = <3>; /* SEC_BATTERY_FULLCHARGED_TIME */
269                 battery,full_check_count = <1>;
270                 battery,chg_gpio_full_check = <0>;
271                 battery,chg_polarity_full_check = <1>;
272
273                 battery,full_condition_type = <13>;
274                 battery,full_condition_soc = <95>;
275                 battery,full_condition_vcell = <4300>;
276
277                 battery,recharge_check_count = <1>;
278                 battery,recharge_condition_type = <4>; /* SEC_BATTERY_RECHARGE_CONDITION_VCELL */
279                 battery,recharge_condition_soc = <98>;
280                 battery,recharge_condition_vcell = <4300>;
281
282                 battery,charging_total_time = <21600>;
283                 battery,recharging_total_time = <5400>;
284                 battery,charging_reset_time = <0>;
285
286                 /* Charger */
287                 charger,vbus_ctrl_gpio = <&d_gpio_gpio 64 0x00>;
288                 charger,chg_float_voltage = <4350>;
289                 battery,input_current_limit = <1000 460 460 1000 460 1000 1000 460 460 1000 460 1000 1000 460 1000 300 1000 1000 300 1000 1000 460 460>;
290                 battery,fast_charging_current = <1550 975 975 1550 975 1550 1550 975 0 1550 975 1550 1550 (-1) 1550 300 1550 1550 300 1550 1550 0 0>;
291                 battery,full_check_current_1st = <200 0 200 200 200 200 200 200 0 200 200 200 200 0 200 200 200 200 200 200 200 0 0>;
292                 battery,full_check_current_2nd = <2400 0 2400 2400 2400 2400 2400 2400 0 2400 2400 2400 2400 0 2400 2400 2400 2400 2400 2400 2400 0 0>;
293         };
294
295         panel_cabc_bl {
296                 compatible = "sprd,panel_cabc_bl";
297         };
298
299         sprd_pwm_bl {
300                 compatible = "sprd,sprd_pwm_bl";
301                 reg = <0x40260000 0xf>;
302                 brightness_max = <170>;
303                 brightness_min = <12>;
304                 pwm_index = <2>;
305                 gpio_ctrl_pin = <214>;
306                 gpio_active_level = <1>;
307         };
308
309         sprd-marlin {
310                 compatible = "sprd,marlin";
311                 gpios = <&d_gpio_gpio 148 0 /*marlin gpio0 */
312                         &d_gpio_gpio 45 0  /*marlin gpio1 */
313                         &d_gpio_gpio 46 0  /*marlin gpio2 */
314                         &d_gpio_gpio 47 0  /*marlin gpio3 */
315                         &d_gpio_gpio 230 0>;  /*marlin reset*/
316                 cp-rfctl-offset = <0xd8>;  /*coex func. marlin gpio3*/
317                 vdd-download = "vddcamio"; /*vdd 1.6v*/
318                 vdd-pa = "vddwifipa"; /*vdd 3.3v*/
319                 clk-name = "clk_aux0"; /*clk 32k*/
320                 sdhci-name = "sdio_wifi";
321         };
322
323         sec,thermistor {
324                 compatible = "sec-thermistor";
325                 ap_therm {
326                         sec,therm-id = <0>; /* SEC_THERM_AP */
327                         sec,therm-adc-name = "ap_therm";
328                         sec,therm-adc-ch = <0x3>; /* ADCI3 */
329                 };
330                 batt_therm {
331                         sec,therm-id = <1>; /* SEC_THERM_BATTERY */
332                         sec,therm-adc-name = "batt_therm";
333                         sec,therm-adc-ch = <0x1>; /* ADCI1 */
334                 };
335                 xo_therm {
336                         sec,therm-id = <4>; /* SEC_THERM_XO */
337                         sec,therm-adc-name = "xo_therm";
338                         sec,therm-adc-ch = <0x2>; /* ADCI2 */
339                 };
340         };
341 };
342
343 &pinctrl {
344         pwr_domain ="vdd18", /* "vdd18" */ /* VIO_2_0_ms */
345                 "vdd18", /* "vdd28" */ /* VIO_2_1_ms */
346                 "vddsim0",
347                 "vddsim1",
348                 "vdd18", /* "vddsim2" */
349                 "vddsdcore",
350                 "vdd18";
351 };
352
353 &i2c0 {
354         sensor_main@0x3c {
355                 compatible = "sprd,sensor_main";
356                 reg = <0x3c>;
357         };
358
359         sensor_sub@0x21 {
360                 compatible = "sprd,sensor_sub";
361                 reg = <0x21>;
362         };
363 };
364
365 &i2c1 { /* TSP */
366         ist30xx_ts@50 {
367                 compatible = "imagis,ist30xx-ts";
368                 reg = <0x50>;
369                 vdd_ldo_name = "vddsdio";
370                 imagis,irq-gpio = <&d_gpio_gpio 153 0>;
371                 imagis,i2c-pull-up = <1>;
372                 imagis,fw-bin = <1>;
373                 imagis,ic-version = "ist3038c";
374                 imagis,project-name = "Z3_3G";
375                 imagis,tkey = <0>;
376                 imagis,octa-hw = <0>;
377         };
378 };
379
380 &i2c2 {
381         #size-cells = <0>;
382         status = "okay";
383         ims1911@44{
384                 compatible = "ims1911";
385                 reg = <0x44>;
386                 interrupt-parent = <&d_gpio_gpio>;
387                 interrupts = <216 0>;
388                 ims1911,irq-gpio = <&d_gpio_gpio 216 0x00>;
389                 ims1911,ps_setting = <0x42>;
390                 ims1911,led_drive_current = <0x90>;
391                 ims1911,led_drive_pulse = <49>;
392                 ims1911,ps_int_low_threshold = <45>;
393                 ims1911,ps_int_high_threshold = <75>;
394
395                 ims1911-led-supply = <&vdd28>;
396                 ims1911-vdd-supply = <&vddkpled>;
397         };
398
399         cm36672p@60{
400                 compatible = "cm36672p";
401                 reg = <0x60>;
402                 interrupt-parent = <&d_gpio_gpio>;
403                 interrupts = <216 0>;
404                 cm36672p,irq_gpio = <&d_gpio_gpio 216 0x00>;
405                 cm36672p,default_hi_thd = <17>;
406                 cm36672p,default_low_thd = <12>;
407                 cm36672p,cancel_hi_thd = <10>;
408                 cm36672p,cancel_low_thd = <7>;
409                 cm36672p,default_trim = <0>;
410                 cm36672p,ps_it = <0x4>;
411                 cm36672p,led_current = <0x2>;
412
413                 cm36672p,led-supply = <&vdd28>;
414                 cm36672p,vdd-supply = <&vddkpled>;
415         };
416
417
418         k2hh@1D {
419                 compatible = "stm,k2hh";
420                 reg = <0x1D>;
421                 interrupt-parent = <&d_gpio_gpio>;
422                 interrupts = <164 0>;
423                 stm,irq_gpio = <&d_gpio_gpio 164 0x00>;
424                 stm,sda = <&d_gpio_gpio 208 0x00>;
425                 stm,scl = <&d_gpio_gpio 207 0x00>;
426                 stm,reg_vdd-supply = <&vdd18>;
427                 stm,axis_map_x = <1>;
428                 stm,axis_map_y = <0>;
429                 stm,axis_map_z = <2>;
430                 stm,negate_x = <0>;
431                 stm,negate_y = <1>;
432                 stm,negate_z = <1>;
433                 stm,poll_interval = <100>;
434                 stm,min_interval = <2>;
435         };
436
437         sx9500-i2c@28 {
438                 compatible = "sx9500-i2c";
439                 reg = <0x28>;
440                 sx9500-i2c,vdd-supply = <&vddsim1>;
441                 sx9500-i2c,nirq-gpio = <&d_gpio_gpio 167 0x0>;
442         };
443 };
444
445 &usb {
446         tune_value = <0x4407ae33>;
447 };
448
449 &keypad0 {
450         ngpios = <2>;
451         gpios = <&a_eic_gpio 2 0>;
452         sprd,keypad-num-rows = <1>;
453         sprd,keypad-num-columns = <3>;
454         interrupts = <0 36 0x0>;
455         sprd,keypad-rows-choose-hw = <0x10000>;
456         sprd,keypad-cols-choose-hw = <0x700>;
457         sprd,debounce_time = <5000>;
458         linux,keypad-no-autorepeat;
459
460         key_volume_up {
461                 keypad,row = <0>;
462                 keypad,column = <0>;
463                 linux,code = <115>;
464         };
465
466         key_home {
467                 keypad,row = <0>;
468                 keypad,column = <1>;
469                 linux,code = <139>;
470         };
471
472         key_volume_up_1 {
473                 keypad,row = <0>;
474                 keypad,column = <2>;
475                 linux,code = <115>;
476         };
477 };
478
479 &l_sprd_sensor {
480         gpios = <&d_gpio_gpio 186 0           /*main reset*/
481                 &d_gpio_gpio 0 0    /*main power down*/
482                 &d_gpio_gpio 187 0    /*sub reset*/
483                 &d_gpio_gpio 0 0  /*sub power down*/
484                 &d_gpio_gpio 162 0    /*main core vdd*/
485                 &d_gpio_gpio 163 0    /*cam io vdd*/
486                 &d_gpio_gpio 214 0    /*sub core vdd*/
487                 &d_gpio_gpio 0 0>;  /*none*/
488 };
489
490 &l_ion {
491         sprd,ion-heap@1 {
492                 sprd,ion-heap-mem = <0x0 0x0>;
493         };
494
495         sprd,ion-heap@3 {
496                 sprd,ion-heap-mem = <0x90000000 0x2000000>;
497         };
498 };
499
500 &adi {
501         headset_detect {
502                 compatible = "sprd,headset-detect";
503                 gpio_switch = <0>;
504                 gpio_detect = <237>;
505                 gpio_button = <239>;
506                 irq_trigger_level_detect = <0>;
507                 irq_trigger_level_button = <0>;
508                 adc_threshold_3pole_detect = <1700>;
509                 adc_threshold_4pole_detect = <2700>;
510                 irq_threshold_buttont = <1>;
511                 voltage_headmicbias = <3000000>;
512                 nbuttons = <3>;
513                 headset_buttons_media {
514                         adc_min = <0>;
515                         adc_max = <190>;
516                         code = <226>;
517                         type = <0>;
518                 };
519
520                 headset_buttons_up {
521                         adc_min = <191>;
522                         adc_max = <347>;
523                         code = <115>;
524                         type = <0>;
525                 };
526
527                 headset_buttons_down {
528                         adc_min = <348>;
529                         adc_max =<760>;
530                         code = <114>;
531                         type = <0>;
532                 };
533         };
534
535         headset_sprd_sc2723 {
536                 compatible = "sprd,headset_sprd_sc2723";
537                 gpio_switch = <0>;
538                 gpio_detect = <312>;
539                 gpio_button = <307>;
540                 irq_trigger_level_detect = <1>;
541                 irq_trigger_level_button = <1>;
542                 adc_threshold_3pole_detect = <3300>;
543                 adc_threshold_4pole_detect = <10000>;
544                 irq_threshold_buttont = <4>;
545                 voltage_headmicbias = <3000000>;
546                 nbuttons = <3>;
547                 headset_buttons_media {
548                         adc_min = <0>;
549                         adc_max = <600>;
550                         code = <226>;
551                         type = <0>;
552                 };
553
554                 headset_buttons_up {
555                         adc_min = <601>;
556                         adc_max = <1200>;
557                         code = <115>;
558                         type = <0>;
559                 };
560
561                 headset_buttons_down {
562                         adc_min = <1201>;
563                         adc_max =<2280>;
564                         code = <114>;
565                         type = <0>;
566                 };
567         };
568
569         sprd_eic_keys {
570                 compatible = "sprd,sprd-eic-keys";
571                 input-name = "sprd-eic-keys";
572                 key_volumedown {
573                         label = "KEY_VOLUMEDOWN";
574                         linux,code = <114>;
575                         gpios = <&a_eic_gpio 10 0>;
576                         debounce-interval = <2>;
577                         gpio-key,wakeup;
578                 };
579         };
580 };
581
582 &sdio0 {
583         detect_gpio = <71>;
584         SD_Pwr_Name = "vddsdcore";
585         /*_1_8V_signal_Name = "vddsdio";*/
586 };
587
588 &fb0 {
589         sprd,fb_mem = <0x9F61B000 0x384000>;
590         sprd,fb_display_size = <720 1280>;
591 };