diff options
Diffstat (limited to 'arch/arm/mach-tegra/board-enterprise.h')
-rw-r--r-- | arch/arm/mach-tegra/board-enterprise.h | 161 |
1 files changed, 161 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-enterprise.h b/arch/arm/mach-tegra/board-enterprise.h new file mode 100644 index 00000000000..f47672091bf --- /dev/null +++ b/arch/arm/mach-tegra/board-enterprise.h | |||
@@ -0,0 +1,161 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-tegra/board-enterprise.h | ||
3 | * | ||
4 | * Copyright (c) 2011, NVIDIA Corporation. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
14 | * more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _MACH_TEGRA_BOARD_ENTERPRISE_H | ||
22 | #define _MACH_TEGRA_BOARD_ENTERPRISE_H | ||
23 | |||
24 | #include <mach/gpio.h> | ||
25 | #include <mach/irqs.h> | ||
26 | #include <linux/mfd/tps80031.h> | ||
27 | |||
28 | /* Processor Board ID */ | ||
29 | #define BOARD_E1205 0x0C05 | ||
30 | #define BOARD_E1197 0x0B61 | ||
31 | #define SKU_BATTERY_SUPPORT 0x1 | ||
32 | |||
33 | /* Board Fab version */ | ||
34 | #define BOARD_FAB_A00 0x0 | ||
35 | #define BOARD_FAB_A01 0x1 | ||
36 | #define BOARD_FAB_A02 0x2 | ||
37 | #define BOARD_FAB_A03 0x3 | ||
38 | #define BOARD_FAB_A04 0x4 | ||
39 | |||
40 | /* vdd_cpu voltage follower */ | ||
41 | #define BOARD_SKU_VF_BIT 0x0400 | ||
42 | |||
43 | int enterprise_charge_init(void); | ||
44 | int enterprise_sdhci_init(void); | ||
45 | int enterprise_pinmux_init(void); | ||
46 | int enterprise_panel_init(void); | ||
47 | int enterprise_sensors_init(void); | ||
48 | int touch_init(void); | ||
49 | int enterprise_kbc_init(void); | ||
50 | int enterprise_emc_init(void); | ||
51 | int enterprise_regulator_init(void); | ||
52 | int enterprise_modem_init(void); | ||
53 | int enterprise_suspend_init(void); | ||
54 | int enterprise_edp_init(void); | ||
55 | void enterprise_bpc_mgmt_init(void); | ||
56 | |||
57 | /* Invensense MPU Definitions */ | ||
58 | #define MPU_TYPE_MPU3050 1 | ||
59 | #define MPU_TYPE_MPU6050 2 | ||
60 | #define MPU_GYRO_TYPE MPU_TYPE_MPU3050 | ||
61 | #define MPU_GYRO_IRQ_GPIO TEGRA_GPIO_PH4 | ||
62 | #define MPU_GYRO_ADDR 0x68 | ||
63 | #define MPU_GYRO_BUS_NUM 0 | ||
64 | #define MPU_GYRO_ORIENTATION { -1, 0, 0, 0, -1, 0, 0, 0, 1 } | ||
65 | #define MPU_ACCEL_NAME "kxtf9" | ||
66 | #define MPU_ACCEL_IRQ_GPIO 0 /* DISABLE ACCELIRQ: TEGRA_GPIO_PJ2 */ | ||
67 | #define MPU_ACCEL_ADDR 0x0F | ||
68 | #define MPU_ACCEL_BUS_NUM 0 | ||
69 | #define MPU_ACCEL_ORIENTATION { 0, 1, 0, -1, 0, 0, 0, 0, 1 } | ||
70 | #define MPU_COMPASS_NAME "ak8975" | ||
71 | #define MPU_COMPASS_IRQ_GPIO 0 | ||
72 | #define MPU_COMPASS_ADDR 0x0C | ||
73 | #define MPU_COMPASS_BUS_NUM 0 | ||
74 | #define MPU_COMPASS_ORIENTATION { 0, 1, 0, -1, 0, 0, 0, 0, 1 } | ||
75 | |||
76 | /* PCA954x I2C bus expander bus addresses */ | ||
77 | #define PCA954x_I2C_BUS_BASE 6 | ||
78 | #define PCA954x_I2C_BUS0 (PCA954x_I2C_BUS_BASE + 0) | ||
79 | #define PCA954x_I2C_BUS1 (PCA954x_I2C_BUS_BASE + 1) | ||
80 | #define PCA954x_I2C_BUS2 (PCA954x_I2C_BUS_BASE + 2) | ||
81 | #define PCA954x_I2C_BUS3 (PCA954x_I2C_BUS_BASE + 3) | ||
82 | |||
83 | /*****************External GPIO tables ******************/ | ||
84 | /* External peripheral gpio base. */ | ||
85 | #define ENT_TPS80031_GPIO_BASE TEGRA_NR_GPIOS | ||
86 | #define ENT_TPS80031_GPIO_REGEN1 (ENT_TPS80031_GPIO_BASE + TPS80031_GPIO_REGEN1) | ||
87 | #define ENT_TPS80031_GPIO_REGEN2 (ENT_TPS80031_GPIO_BASE + TPS80031_GPIO_REGEN2) | ||
88 | #define ENT_TPS80031_GPIO_SYSEN (ENT_TPS80031_GPIO_BASE + TPS80031_GPIO_SYSEN) | ||
89 | #define ENT_TPS80031_GPIO_END (ENT_TPS80031_GPIO_BASE + TPS80031_GPIO_NR) | ||
90 | |||
91 | /*****************External Interrupt tables ******************/ | ||
92 | /* External peripheral irq base */ | ||
93 | #define ENT_TPS80031_IRQ_BASE TEGRA_NR_IRQS | ||
94 | #define ENT_TPS80031_IRQ_END (ENT_TPS80031_IRQ_BASE + TPS80031_INT_NR) | ||
95 | |||
96 | /*****************Camera GPIOs ******************/ | ||
97 | #define CAM_CSI_MUX_SEL_GPIO TEGRA_GPIO_PM3 | ||
98 | #define CAM_CSI_MUX_SEL_REAR 1 | ||
99 | #define CAM_CSI_MUX_SEL_FRONT 0 | ||
100 | |||
101 | #define CAM1_RST_L_GPIO TEGRA_GPIO_PM5 /*REAR RIGHT*/ | ||
102 | #define CAM2_RST_L_GPIO TEGRA_GPIO_PF4 /*REAR LEFT*/ | ||
103 | #define CAM3_RST_L_GPIO TEGRA_GPIO_PM2 /*FRONT*/ | ||
104 | #define CAM3_RST_L_TRUE 0 | ||
105 | #define CAM3_RST_L_FALSE 1 | ||
106 | #define CAM3_PWDN_GPIO TEGRA_GPIO_PN4 /*FRONT*/ | ||
107 | #define CAM3_PWDN_TRUE 1 | ||
108 | #define CAM3_PWDN_FALSE 0 | ||
109 | #define CAM_FLASH_EN_GPIO TEGRA_GPIO_PBB3 | ||
110 | #define CAM_FLASH_MAX_TORCH_AMP 7 | ||
111 | #define CAM_FLASH_MAX_FLASH_AMP 7 | ||
112 | #define CAM_I2C_MUX_RST_EXP TEGRA_GPIO_PF3 /*I2C Mux Reset*/ | ||
113 | |||
114 | /* Audio-related GPIOs */ | ||
115 | #define TEGRA_GPIO_HP_DET TEGRA_GPIO_PW3 | ||
116 | |||
117 | /* Baseband GPIO addresses */ | ||
118 | |||
119 | #define GPIO_BB_RESET TEGRA_GPIO_PE1 | ||
120 | #define GPIO_BB_PWRON TEGRA_GPIO_PE0 | ||
121 | #define GPIO_BB_APACK TEGRA_GPIO_PE3 | ||
122 | #define GPIO_BB_APACK2 TEGRA_GPIO_PE2 | ||
123 | #define GPIO_BB_CPACK TEGRA_GPIO_PU5 | ||
124 | #define GPIO_BB_CPACK2 TEGRA_GPIO_PV0 | ||
125 | #define GPIO_BB_RSVD1 TEGRA_GPIO_PV1 | ||
126 | #define GPIO_BB_RSVD2 TEGRA_GPIO_PU4 | ||
127 | |||
128 | #define BB_GPIO_MDM_PWRON_AP2BB TEGRA_GPIO_PE0 /* LCD_D0 */ | ||
129 | #define BB_GPIO_RESET_AP2BB TEGRA_GPIO_PE1 /* LCD_D1 */ | ||
130 | #define BB_GPIO_LCD_PWR1 TEGRA_GPIO_PC1 | ||
131 | #define BB_GPIO_LCD_PWR2 TEGRA_GPIO_PC6 | ||
132 | #define BB_GPIO_HS1_AP2BB TEGRA_GPIO_PE3 /* LCD_D3 */ | ||
133 | #define BB_GPIO_HS1_BB2AP TEGRA_GPIO_PU5 | ||
134 | |||
135 | #define XMM_GPIO_BB_ON BB_GPIO_MDM_PWRON_AP2BB | ||
136 | #define XMM_GPIO_BB_RST BB_GPIO_RESET_AP2BB | ||
137 | #define XMM_GPIO_IPC_HSIC_ACTIVE BB_GPIO_LCD_PWR1 | ||
138 | #define XMM_GPIO_IPC_HSIC_SUS_REQ BB_GPIO_LCD_PWR2 | ||
139 | #define XMM_GPIO_IPC_BB_WAKE BB_GPIO_HS1_AP2BB | ||
140 | #define XMM_GPIO_IPC_AP_WAKE BB_GPIO_HS1_BB2AP | ||
141 | |||
142 | #define TDIODE_OFFSET (9000) /* in millicelsius */ | ||
143 | |||
144 | /* Battery Peak Current Management */ | ||
145 | #define TEGRA_BPC_TRIGGER TEGRA_GPIO_PR3 | ||
146 | #define TEGRA_BPC_TIMEOUT 100 /* ms */ | ||
147 | #define TEGRA_BPC_CPU_PWR_LIMIT 0 /* in mW, (0 disables) */ | ||
148 | |||
149 | #define TEGRA_CUR_MON_THRESHOLD -2000 | ||
150 | #define TEGRA_CUR_MON_RESISTOR 20 | ||
151 | #define TEGRA_CUR_MON_MIN_CORES 2 | ||
152 | |||
153 | /* Baseband IDs */ | ||
154 | |||
155 | enum tegra_bb_type { | ||
156 | TEGRA_BB_PH450 = 1, | ||
157 | TEGRA_BB_XMM6260, | ||
158 | TEGRA_BB_M7400, | ||
159 | }; | ||
160 | |||
161 | #endif /*_MACH_TEGRA_BOARD_ENTERPRISE_H */ | ||