tizen 2.4 release
[profile/mobile/platform/kernel/linux-3.10-sc7730.git] / include / soc / sprd / __board-sp7731gea_hdr.h
1 /*
2  * Copyright (C) 2012 Spreadtrum Communications Inc.
3  *
4  * This software is licensed under the terms of the GNU General Public
5  * License version 2, as published by the Free Software Foundation, and
6  * may be copied, distributed, and modified under those terms.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  */
13
14 #ifndef __GPIO_SCX35GA_H__
15 #define __GPIO_SCX35GA_H__
16
17 #ifndef __ASM_ARCH_BOARD_H
18 #error  "Don't include this file directly, include <mach/board.h>"
19 #endif
20
21 #define GPIO_TOUCH_RESET         81
22 #define GPIO_TOUCH_IRQ           82
23
24 #define GPIO_SENSOR_RESET        186//41
25 #define GPIO_MAIN_SENSOR_PWN     187//42
26 #define GPIO_SUB_SENSOR_PWN      188//43
27
28 #define SPRD_FLASH_OFST          0x890
29 #define SPRD_FLASH_CTRL_BIT      0x8000
30 #define SPRD_FLASH_LOW_VAL       0x3
31 #define SPRD_FLASH_HIGH_VAL      0xF
32 #define SPRD_FLASH_LOW_CUR       110
33 #define SPRD_FLASH_HIGH_CUR      470
34
35 #define USB_OTG_CABLE_DETECT     72
36
37 #define EIC_CHARGER_DETECT              (A_EIC_START + 0)
38 #define EIC_POWER_PBINT2        (A_EIC_START + 1)
39 #define EIC_POWER_PBINT         (A_EIC_START + 2)
40 #define EIC_AUD_HEAD_BUTTON     (A_EIC_START + 3)
41 #define EIC_CHG_CV_STATE       (A_EIC_START + 4)
42 #define EIC_AUD_HEAD_INST2      (A_EIC_START + 5)
43 #define EIC_VCHG_OVI            (A_EIC_START + 6)
44 #define EIC_VBAT_OVI            (A_EIC_START + 7)
45
46 #define EIC_KEY_POWER           (EIC_POWER_PBINT)
47 #define HEADSET_BUTTON_GPIO             (EIC_AUD_HEAD_BUTTON)
48 #define HEADSET_DETECT_GPIO             (EIC_AUD_HEAD_INST2)
49 #define HEADSET_SWITCH_GPIO     0
50
51 #define HEADSET_IRQ_TRIGGER_LEVEL_DETECT 1
52 #define HEADSET_IRQ_TRIGGER_LEVEL_BUTTON 1
53
54 #define HEADSET_ADC_MIN_KEY_MEDIA 0
55 #define HEADSET_ADC_MAX_KEY_MEDIA 170
56 #define HEADSET_ADC_MIN_KEY_VOLUMEUP 171
57 #define HEADSET_ADC_MAX_KEY_VOLUMEUP 430
58 #define HEADSET_ADC_MIN_KEY_VOLUMEDOWN 431
59 #define HEADSET_ADC_MAX_KEY_VOLUMEDOWN 760
60 #define HEADSET_ADC_THRESHOLD_3POLE_DETECT 100
61 #define HEADSET_ADC_THRESHOLD_4POLE_DETECT 3100
62 #define HEADSET_IRQ_THRESHOLD_BUTTON 1
63 #define HEADSET_HEADMICBIAS_VOLTAGE 3000000
64
65 #define SPI0_CMMB_CS_GPIO        156
66 #define SPI1_WIFI_CS_GPIO        44
67
68 #define GPIO_BK                  136
69
70 #define GPIO_CMMB_RESET         144
71 #define GPIO_CMMB_INT           143
72 #define GPIO_CMMB_26M_CLK_EN    197
73
74 #define GPIO_BT_RESET       233
75 #define GPIO_BT_POWER       231
76 #define GPIO_BT2AP_WAKE     232
77 #define GPIO_AP2BT_WAKE     235
78
79 #define GPIO_WIFI_SHUTDOWN      230
80 #define GPIO_WIFI_IRQ           234
81
82 #define GPIO_PROX_INT 216
83 #define GPIO_GYRO_INT1 163
84 #define GPIO_M_RSTN     161
85 #define GPIO_M_DRDY 164
86
87 #define GPIO_SDIO_DETECT      75
88
89 #define SPRD_PIN_SDIO0_OFFSET     0x0184
90 #define SPRD_PIN_SDIO0_SIZE       7
91 #define SPRD_PIN_SDIO0_D3_INDEX 0
92 #define SPRD_PIN_SDIO0_D3_GPIO 100
93 #define SPRD_PIN_SDIO0_SD_FUNC 0
94 #define SPRD_PIN_SDIO0_GPIO_FUNC 3
95
96 /* ION config info
97 LCD:
98    960x540
99
100 Video Playing:
101    1080p 8 ref-frame
102
103 Video Recording:
104    720p
105
106 Camera:
107    8M,  support ZSL, support preview/capture rotation
108 */
109
110 #define SPRD_ION_MM_SIZE            (52 * SZ_1M)
111 #define SPRD_ION_OVERLAY_SIZE    (4 * SZ_1M)
112
113 #endif