2 * Copyright (C) 2012 Spreadtrum Communications Inc.
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.
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.
14 #ifndef __GPIO_SCX35GA_H__
15 #define __GPIO_SCX35GA_H__
17 #ifndef __ASM_ARCH_BOARD_H
18 #error "Don't include this file directly, include <mach/board.h>"
21 #define GPIO_TOUCH_RESET 81
22 #define GPIO_TOUCH_IRQ 82
24 #define GPIO_IF_PMIC_SDA 159
25 #define GPIO_IF_PMIC_SCL 160
26 #define GPIO_IF_PMIC_IRQ 161
27 #define GPIO_FUELGAUGE_SCL 65
28 #define GPIO_FUELGAUGE_SDA 66
29 #define GPIO_FUELGAUGE_ALERT 153
30 #define GPIO_MUIC_SDA 150
31 #define GPIO_MUIC_SCL 151
32 #define GPIO_MUIC_IRQ 152
34 #define GPIO_SENSOR_RESET 186//41
35 #define GPIO_SUB_SENSOR_RESET 238
36 #define GPIO_MAIN_SENSOR_PWN 188//42
37 #define GPIO_SUB_SENSOR_PWN 187//43
38 #define CAM_FLASH_ENF_GPIO 81
39 #define CAM_FLASH_ENT_GPIO 82
40 #define SPRD_FLASH_ON 1
41 #define SPRD_FLASH_OFF 0
42 #define GPIO_TOUCHKEY_LED_EN 116
44 #define SPRD_FLASH_OFST 0x890
45 #define SPRD_FLASH_CTRL_BIT 0x8000
46 #define SPRD_FLASH_LOW_VAL 0x3
47 #define SPRD_FLASH_HIGH_VAL 0xF
48 #define SPRD_FLASH_LOW_CUR 110
49 #define SPRD_FLASH_HIGH_CUR 470
51 #define USB_OTG_CABLE_DETECT 72
53 #define EIC_CHARGER_DETECT (A_EIC_START + 0)
54 #define EIC_POWER_PBINT2 (A_EIC_START + 1)
55 #define EIC_POWER_PBINT (A_EIC_START + 2)
56 #define EIC_AUD_HEAD_BUTTON (A_EIC_START + 3)
57 #define EIC_CHG_CV_STATE (A_EIC_START + 4)
58 #define EIC_AUD_HEAD_INST (A_EIC_START + 5)
59 #define EIC_VCHG_OVI (A_EIC_START + 6)
60 #define EIC_VBAT_OVI (A_EIC_START + 7)
61 #define EIC_AUD_HEAD_INST2 (A_EIC_START + 8)
63 #define EIC_KEY_POWER (EIC_POWER_PBINT)
64 #define HEADSET_BUTTON_GPIO 239
65 #define HEADSET_DETECT_GPIO 237
66 #define HEADSET_SWITCH_GPIO 0
67 #define HEADSET_AMP_GPIO 131
68 #define HEADSET_EXT_MICBIAS_GPIO 123
70 #define HEADSET_IRQ_TRIGGER_LEVEL_DETECT 0
71 #define HEADSET_IRQ_TRIGGER_LEVEL_BUTTON 0
73 #define HEADSET_ADC_MIN_KEY_MEDIA 0
74 #define HEADSET_ADC_MAX_KEY_MEDIA 190
75 #define HEADSET_ADC_MIN_KEY_VOLUMEUP 191
76 #define HEADSET_ADC_MAX_KEY_VOLUMEUP 347
77 #define HEADSET_ADC_MIN_KEY_VOLUMEDOWN 348
78 #define HEADSET_ADC_MAX_KEY_VOLUMEDOWN 760
79 #define HEADSET_ADC_THRESHOLD_3POLE_DETECT 1170
80 #define HEADSET_ADC_THRESHOLD_4POLE_DETECT 2700
81 #define HEADSET_IRQ_THRESHOLD_BUTTON 1
82 #define HEADSET_HEADMICBIAS_VOLTAGE 3000000
85 #define SPI0_BACKLIGHT_EN_GPIO 214
86 #define SPI0_BACKLIGHT_PWM_GPIO 234
88 #define SPI0_CMMB_CS_GPIO 156
89 #define SPI1_WIFI_CS_GPIO 44
93 #define GPIO_CMMB_RESET 144
94 #define GPIO_CMMB_INT 143
95 #define GPIO_CMMB_26M_CLK_EN 197
97 #define GPIO_BT_RESET 233
98 #define GPIO_BT_POWER 231
99 #define GPIO_BT2AP_WAKE 232
100 #define GPIO_AP2BT_WAKE 235
102 #define GPIO_WIFI_SHUTDOWN 230
103 //#define GPIO_WIFI_IRQ 234
104 #define GPIO_WIFI_IRQ 148
105 #define GPIO_PROX_INT 216
106 #define GPIO_GYRO_INT1 163
107 #define GPIO_M_RSTN 161
108 #define GPIO_M_DRDY 164
110 #define GPIO_SDIO_DETECT 75
112 #define SPRD_PIN_SDIO0_OFFSET 0x0184
113 #define SPRD_PIN_SDIO0_SIZE 7
114 #define SPRD_PIN_SDIO0_D3_INDEX 0
115 #define SPRD_PIN_SDIO0_D3_GPIO 100
116 #define SPRD_PIN_SDIO0_SD_FUNC 0
117 #define SPRD_PIN_SDIO0_GPIO_FUNC 3
130 8M, support ZSL, support preview/capture rotation
133 #define SPRD_ION_SIZE (52 * SZ_1M)
134 #define SPRD_ION_OVERLAY_SIZE (7 * SZ_1M)