diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
commit | fcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch) | |
tree | a57612d1888735a2ec7972891b68c1ac5ec8faea /arch/arm/mach-tegra/board-kai.h | |
parent | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff) |
Diffstat (limited to 'arch/arm/mach-tegra/board-kai.h')
-rw-r--r-- | arch/arm/mach-tegra/board-kai.h | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-kai.h b/arch/arm/mach-tegra/board-kai.h new file mode 100644 index 00000000000..1f7c16ebf59 --- /dev/null +++ b/arch/arm/mach-tegra/board-kai.h | |||
@@ -0,0 +1,120 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-tegra/board-kai.h | ||
3 | * | ||
4 | * Copyright (c) 2012, 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 version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
13 | * more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License along | ||
16 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | #ifndef _MACH_TEGRA_BOARD_KAI_H | ||
21 | #define _MACH_TEGRA_BOARD_KAI_H | ||
22 | |||
23 | #include <mach/gpio.h> | ||
24 | #include <mach/irqs.h> | ||
25 | #include <linux/mfd/max77663-core.h> | ||
26 | #include "gpio-names.h" | ||
27 | |||
28 | /* Processor Board ID */ | ||
29 | #define BOARD_E1565 0xF41 | ||
30 | |||
31 | /* Board Fab version */ | ||
32 | #define BOARD_FAB_A00 0x0 | ||
33 | #define BOARD_FAB_A01 0x1 | ||
34 | #define BOARD_FAB_A02 0x2 | ||
35 | #define BOARD_FAB_A03 0x3 | ||
36 | #define BOARD_FAB_A04 0x4 | ||
37 | #define BOARD_FAB_A05 0x5 | ||
38 | |||
39 | /* External peripheral act as gpio */ | ||
40 | /* MAX77663 GPIO */ | ||
41 | #define MAX77663_GPIO_BASE TEGRA_NR_GPIOS | ||
42 | #define MAX77663_GPIO_END (MAX77663_GPIO_BASE + MAX77663_GPIO_NR) | ||
43 | |||
44 | /* CAMERA RELATED GPIOs on KAI */ | ||
45 | #define CAM2_RST_GPIO TEGRA_GPIO_PBB4 | ||
46 | #define CAM2_POWER_DWN_GPIO TEGRA_GPIO_PBB6 | ||
47 | /* Audio-related GPIOs */ | ||
48 | #define TEGRA_GPIO_CDC_IRQ TEGRA_GPIO_PW3 | ||
49 | #define TEGRA_GPIO_SPKR_EN -1 | ||
50 | #define TEGRA_GPIO_HP_DET TEGRA_GPIO_PW2 | ||
51 | #define TEGRA_GPIO_INT_MIC_EN TEGRA_GPIO_PK3 | ||
52 | #define TEGRA_GPIO_EXT_MIC_EN TEGRA_GPIO_PK4 | ||
53 | /* Tegra Modem related GPIOs */ | ||
54 | #define TEGRA_GPIO_W_DISABLE TEGRA_GPIO_PDD7 | ||
55 | #define TEGRA_GPIO_MODEM_RSVD1 TEGRA_GPIO_PV0 | ||
56 | #define TEGRA_GPIO_MODEM_RSVD2 TEGRA_GPIO_PH7 | ||
57 | |||
58 | /* Stat LED GPIO */ | ||
59 | #define TEGRA_GPIO_STAT_LED (MAX77663_GPIO_BASE + MAX77663_GPIO7) | ||
60 | |||
61 | |||
62 | /*****************Interrupt tables ******************/ | ||
63 | /* External peripheral act as interrupt controller */ | ||
64 | /* MAX77663 IRQs */ | ||
65 | #define MAX77663_IRQ_BASE TEGRA_NR_IRQS | ||
66 | #define MAX77663_IRQ_END (MAX77663_IRQ_BASE + MAX77663_IRQ_NR) | ||
67 | #define MAX77663_IRQ_ACOK_RISING MAX77663_IRQ_ONOFF_ACOK_RISING | ||
68 | |||
69 | /* UART port which is used by bluetooth*/ | ||
70 | #define BLUETOOTH_UART_DEV_NAME "/dev/ttyHS2" | ||
71 | |||
72 | int kai_charge_init(void); | ||
73 | int kai_regulator_init(void); | ||
74 | int kai_suspend_init(void); | ||
75 | int kai_sdhci_init(void); | ||
76 | int kai_pinmux_init(void); | ||
77 | int kai_panel_init(void); | ||
78 | int kai_sensors_init(void); | ||
79 | int kai_keys_init(void); | ||
80 | int kai_pins_state_init(void); | ||
81 | int kai_emc_init(void); | ||
82 | int kai_edp_init(void); | ||
83 | void __init kai_tsensor_init(void); | ||
84 | int __init touch_init_raydium(int irq_gpio, int reset_gpio, int platform); | ||
85 | int __init touch_init_synaptics_kai(void); | ||
86 | |||
87 | #define TOUCH_GPIO_IRQ_RAYDIUM_SPI TEGRA_GPIO_PZ3 | ||
88 | #define TOUCH_GPIO_RST_RAYDIUM_SPI TEGRA_GPIO_PN5 | ||
89 | |||
90 | #define SYNAPTICS_ATTN_GPIO TEGRA_GPIO_PZ3 | ||
91 | #define SYNAPTICS_RESET_GPIO TEGRA_GPIO_PN5 | ||
92 | |||
93 | #define KAI_TS_ID1 TEGRA_GPIO_PI7 | ||
94 | #define KAI_TS_ID2 TEGRA_GPIO_PC7 | ||
95 | #define KAI_TS_ID1_PG TEGRA_PINGROUP_GMI_WAIT | ||
96 | #define KAI_TS_ID2_PG TEGRA_PINGROUP_GMI_WP_N | ||
97 | |||
98 | #define MPU_TYPE_MPU3050 1 | ||
99 | #define MPU_TYPE_MPU6050 2 | ||
100 | #define MPU_GYRO_TYPE MPU_TYPE_MPU6050 | ||
101 | #define MPU_GYRO_IRQ_GPIO TEGRA_GPIO_PX1 | ||
102 | #define MPU_GYRO_ADDR 0x68 | ||
103 | #define MPU_GYRO_BUS_NUM 0 | ||
104 | #define MPU_GYRO_ORIENTATION { 0, -1, 0, -1, 0, 0, 0, 0, -1 } | ||
105 | #if (MPU_GYRO_TYPE == MPU_TYPE_MPU3050) | ||
106 | #define MPU_ACCEL_NAME "kxtf9" | ||
107 | #define MPU_ACCEL_IRQ_GPIO TEGRA_GPIO_PL1 | ||
108 | #define MPU_ACCEL_ADDR 0x0F | ||
109 | #define MPU_ACCEL_BUS_NUM 0 | ||
110 | #define MPU_ACCEL_ORIENTATION { 0, -1, 0, -1, 0, 0, 0, 0, -1 } | ||
111 | #endif | ||
112 | #define MPU_COMPASS_NAME "ak8975" | ||
113 | #define MPU_COMPASS_IRQ_GPIO 0 | ||
114 | #define MPU_COMPASS_ADDR 0x0C | ||
115 | #define MPU_COMPASS_BUS_NUM 2 | ||
116 | #define MPU_COMPASS_ORIENTATION { 1, 0, 0, 0, 1, 0, 0, 0, 1 } | ||
117 | |||
118 | #define TDIODE_OFFSET (10000) /* in millicelsius */ | ||
119 | |||
120 | #endif | ||