summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-apalis_t30.h
blob: ad9d68c591d27ae49e2c51fd0778a858fa00248c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/*
 * arch/arm/mach-tegra/board-apalis_t30.h
 *
 * Copyright (c) 2013 Toradex, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#ifndef _MACH_TEGRA_BOARD_APALIS_T30_H
#define _MACH_TEGRA_BOARD_APALIS_T30_H

#include <linux/mfd/tps6591x.h>

#include <mach/gpio.h>
#include <mach/irqs.h>

/* Run framebuffer in VGA mode */
//#define TEGRA_FB_VGA

/* GPIO */

#define APALIS_GPIO1	TEGRA_GPIO_PS2
#define APALIS_GPIO2	TEGRA_GPIO_PS3
#define APALIS_GPIO3	TEGRA_GPIO_PS4
#define APALIS_GPIO4	TEGRA_GPIO_PS5
#define APALIS_GPIO5	TEGRA_GPIO_PS6
#define APALIS_GPIO6	TEGRA_GPIO_PQ0
#define APALIS_GPIO7	TEGRA_GPIO_PS7
#define APALIS_GPIO8	TEGRA_GPIO_PQ1

#define BKL1_ON		TEGRA_GPIO_PV2
#define BKL1_PWM_EN_N	TEGRA_GPIO_PA1

#define CAN1_INT	TEGRA_GPIO_PW2
#define CAN2_INT	TEGRA_GPIO_PW3

#define FAN_EN		APALIS_GPIO8

#define GPIO1		TEGRA_GPIO_PS2
#define GPIO2		TEGRA_GPIO_PS3
#define GPIO3		TEGRA_GPIO_PS4
#define GPIO4		TEGRA_GPIO_PS5
#define GPIO5		TEGRA_GPIO_PS6
#define GPIO6		TEGRA_GPIO_PQ0
#define GPIO7		TEGRA_GPIO_PS7
#define GPIO8		TEGRA_GPIO_PQ1

#define HDMI1_HPD	TEGRA_GPIO_PN7

#define I2C1_SCL	TEGRA_GPIO_PC4
#define I2C1_SDA	TEGRA_GPIO_PC5

#define I2C2_SCL	TEGRA_GPIO_PV4
#define I2C2_SDA	TEGRA_GPIO_PV5

#define I2C3_SCL	TEGRA_GPIO_PBB1
#define I2C3_SDA	TEGRA_GPIO_PBB2

#define LAN_SMB_ALERT_N	TEGRA_GPIO_PZ5

#define LVDS_MODE	TEGRA_GPIO_PBB0
#define LVDS_6B_8B_N	TEGRA_GPIO_PBB3
#define LVDS_OE		TEGRA_GPIO_PBB4
#define LVDS_PDWN_N	TEGRA_GPIO_PBB5
#define LVDS_R_F_N	TEGRA_GPIO_PBB6
#define LVDS_MAP	TEGRA_GPIO_PBB7
#define LVDS_RS		TEGRA_GPIO_PCC1
#define LVDS_DDR_N	TEGRA_GPIO_PCC2

#define MMC1_CD_N	TEGRA_GPIO_PV3

#define PEX_PERST_N	APALIS_GPIO7

#define PWR_I2C_SCL	TEGRA_GPIO_PZ6
#define PWR_I2C_SDA	TEGRA_GPIO_PZ7

#define RESET_MOCI_N	TEGRA_GPIO_PI4

#define SATA1_ACT_N	TEGRA_GPIO_PDD0

#define SD1_CD_N	TEGRA_GPIO_PCC5

#define THERMD_ALERT_N	TEGRA_GPIO_PD2

#define TOUCH_PEN_INT	TEGRA_GPIO_PV0
#define TOUCH_WIPER	APALIS_GPIO6

#define TS1		TEGRA_GPIO_PI1
#define TS2		TEGRA_GPIO_PQ7
#define TS3		TEGRA_GPIO_PQ5
#define TS4		TEGRA_GPIO_PQ6
#define TS5		TEGRA_GPIO_PS0
#define TS6		TEGRA_GPIO_PS1

#define USBH_EN		TEGRA_GPIO_PDD1
#define USBH_OC_N	TEGRA_GPIO_PDD2
#define USBO1_EN	TEGRA_GPIO_PT5
#define USBO1_OC_N	TEGRA_GPIO_PT6

#define WAKE1_MICO	TEGRA_GPIO_PV1

/* STMPE811 IRQs */
#define STMPE811_IRQ_BASE	TEGRA_NR_IRQS
#define STMPE811_IRQ_END	(STMPE811_IRQ_BASE + 22)

#define TDIODE_OFFSET	(10000)	/* in millicelsius */

/* External peripheral act as gpio */
/* TPS6591x GPIOs */
#define TPS6591X_GPIO_BASE	TEGRA_NR_GPIOS
#define TPS6591X_GPIO_0		(TPS6591X_GPIO_BASE + TPS6591X_GPIO_GP0)
#define TPS6591X_GPIO_1		(TPS6591X_GPIO_BASE + TPS6591X_GPIO_GP1)
#define TPS6591X_GPIO_2		(TPS6591X_GPIO_BASE + TPS6591X_GPIO_GP2)
#define TPS6591X_GPIO_3		(TPS6591X_GPIO_BASE + TPS6591X_GPIO_GP3)
#define TPS6591X_GPIO_4		(TPS6591X_GPIO_BASE + TPS6591X_GPIO_GP4)
#define TPS6591X_GPIO_5		(TPS6591X_GPIO_BASE + TPS6591X_GPIO_GP5)
#define TPS6591X_GPIO_6		(TPS6591X_GPIO_BASE + TPS6591X_GPIO_GP6)
#define TPS6591X_GPIO_7		(TPS6591X_GPIO_BASE + TPS6591X_GPIO_GP7)
#define TPS6591X_GPIO_8		(TPS6591X_GPIO_BASE + TPS6591X_GPIO_GP8)
#define TPS6591X_GPIO_END	(TPS6591X_GPIO_BASE + TPS6591X_GPIO_NR)

/*****************Interrupt tables ******************/
/* External peripheral act as interrupt controller */
/* TPS6591x IRQs */
#define TPS6591X_IRQ_BASE	STMPE811_IRQ_END
#define TPS6591X_IRQ_END	(TPS6591X_IRQ_BASE + 18)

int apalis_t30_regulator_init(void);
int apalis_t30_suspend_init(void);
int apalis_t30_pinmux_init(void);
int apalis_t30_panel_init(void);
int apalis_t30_sensors_init(void);
int apalis_t30_gpio_switch_regulator_init(void);
int apalis_t30_pins_state_init(void);
int apalis_t30_emc_init(void);
int apalis_t30_power_off_init(void);
int apalis_t30_edp_init(void);

#endif