aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/arch-pxa
diff options
context:
space:
mode:
authorPhilipp Zabel <philipp.zabel@gmail.com>2008-04-09 14:22:57 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-04-19 06:29:07 -0400
commit70e357f8426c54e1500ac4fdb6b1172df16d8b93 (patch)
tree37b8d927ed21561a5f103bba83188e7bf60a17c9 /include/asm-arm/arch-pxa
parenta1635b8fe59de2c5223cda5ca8397b875c901904 (diff)
[ARM] 4948/1: magician: use htc-egpio to drive the GPIO/IRQ expander CPLD
needed for power management (audio, BT, charging, GSM, LCD, SD), GSM, flash and SD operation and audio routing. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/arch-pxa')
-rw-r--r--include/asm-arm/arch-pxa/irqs.h3
-rw-r--r--include/asm-arm/arch-pxa/magician.h53
2 files changed, 55 insertions, 1 deletions
diff --git a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h
index c562b972a4a6..50c77eacbd5e 100644
--- a/include/asm-arm/arch-pxa/irqs.h
+++ b/include/asm-arm/arch-pxa/irqs.h
@@ -181,7 +181,8 @@
181#elif defined(CONFIG_ARCH_LUBBOCK) || \ 181#elif defined(CONFIG_ARCH_LUBBOCK) || \
182 defined(CONFIG_MACH_LOGICPD_PXA270) || \ 182 defined(CONFIG_MACH_LOGICPD_PXA270) || \
183 defined(CONFIG_MACH_MAINSTONE) || \ 183 defined(CONFIG_MACH_MAINSTONE) || \
184 defined(CONFIG_MACH_PCM027) 184 defined(CONFIG_MACH_PCM027) || \
185 defined(CONFIG_MACH_MAGICIAN)
185#define NR_IRQS (IRQ_BOARD_END) 186#define NR_IRQS (IRQ_BOARD_END)
186#else 187#else
187#define NR_IRQS (IRQ_BOARD_START) 188#define NR_IRQS (IRQ_BOARD_START)
diff --git a/include/asm-arm/arch-pxa/magician.h b/include/asm-arm/arch-pxa/magician.h
index 13762e80bf54..216921db9d63 100644
--- a/include/asm-arm/arch-pxa/magician.h
+++ b/include/asm-arm/arch-pxa/magician.h
@@ -12,6 +12,7 @@
12#ifndef _MAGICIAN_H_ 12#ifndef _MAGICIAN_H_
13#define _MAGICIAN_H_ 13#define _MAGICIAN_H_
14 14
15#include <asm/arch/irqs.h>
15#include <asm/arch/pxa2xx-gpio.h> 16#include <asm/arch/pxa2xx-gpio.h>
16 17
17/* 18/*
@@ -108,4 +109,56 @@
108#define GPIO119_MAGICIAN_UNKNOWN_MD (119 | GPIO_OUT) 109#define GPIO119_MAGICIAN_UNKNOWN_MD (119 | GPIO_OUT)
109#define GPIO120_MAGICIAN_UNKNOWN_MD (120 | GPIO_OUT) 110#define GPIO120_MAGICIAN_UNKNOWN_MD (120 | GPIO_OUT)
110 111
112/*
113 * CPLD IRQs
114 */
115
116#define IRQ_MAGICIAN_SD (IRQ_BOARD_START + 0)
117#define IRQ_MAGICIAN_EP (IRQ_BOARD_START + 1)
118#define IRQ_MAGICIAN_BT (IRQ_BOARD_START + 2)
119#define IRQ_MAGICIAN_AC (IRQ_BOARD_START + 3)
120
121/*
122 * CPLD EGPIOs
123 */
124
125#define MAGICIAN_EGPIO_BASE 0x80 /* GPIO_BOARD_START */
126#define MAGICIAN_EGPIO(reg,bit) \
127 (MAGICIAN_EGPIO_BASE + 8*reg + bit)
128
129/* output */
130
131#define EGPIO_MAGICIAN_TOPPOLY_POWER MAGICIAN_EGPIO(0, 2)
132#define EGPIO_MAGICIAN_LED_POWER MAGICIAN_EGPIO(0, 5)
133#define EGPIO_MAGICIAN_GSM_RESET MAGICIAN_EGPIO(0, 6)
134#define EGPIO_MAGICIAN_LCD_POWER MAGICIAN_EGPIO(0, 7)
135#define EGPIO_MAGICIAN_SPK_POWER MAGICIAN_EGPIO(1, 0)
136#define EGPIO_MAGICIAN_EP_POWER MAGICIAN_EGPIO(1, 1)
137#define EGPIO_MAGICIAN_IN_SEL0 MAGICIAN_EGPIO(1, 2)
138#define EGPIO_MAGICIAN_IN_SEL1 MAGICIAN_EGPIO(1, 3)
139#define EGPIO_MAGICIAN_MIC_POWER MAGICIAN_EGPIO(1, 4)
140#define EGPIO_MAGICIAN_CODEC_RESET MAGICIAN_EGPIO(1, 5)
141#define EGPIO_MAGICIAN_CODEC_POWER MAGICIAN_EGPIO(1, 6)
142#define EGPIO_MAGICIAN_BL_POWER MAGICIAN_EGPIO(1, 7)
143#define EGPIO_MAGICIAN_SD_POWER MAGICIAN_EGPIO(2, 0)
144#define EGPIO_MAGICIAN_CARKIT_MIC MAGICIAN_EGPIO(2, 1)
145#define EGPIO_MAGICIAN_UNKNOWN_WAVEDEV_DLL MAGICIAN_EGPIO(2, 2)
146#define EGPIO_MAGICIAN_FLASH_VPP MAGICIAN_EGPIO(2, 3)
147#define EGPIO_MAGICIAN_BL_POWER2 MAGICIAN_EGPIO(2, 4)
148#define EGPIO_MAGICIAN_CHARGE_EN MAGICIAN_EGPIO(2, 5)
149#define EGPIO_MAGICIAN_GSM_POWER MAGICIAN_EGPIO(2, 7)
150
151/* input */
152
153#define EGPIO_MAGICIAN_CABLE_STATE_AC MAGICIAN_EGPIO(4, 0)
154#define EGPIO_MAGICIAN_CABLE_STATE_USB MAGICIAN_EGPIO(4, 1)
155
156#define EGPIO_MAGICIAN_BOARD_ID0 MAGICIAN_EGPIO(5, 0)
157#define EGPIO_MAGICIAN_BOARD_ID1 MAGICIAN_EGPIO(5, 1)
158#define EGPIO_MAGICIAN_BOARD_ID2 MAGICIAN_EGPIO(5, 2)
159#define EGPIO_MAGICIAN_LCD_SELECT MAGICIAN_EGPIO(5, 3)
160#define EGPIO_MAGICIAN_nSD_READONLY MAGICIAN_EGPIO(5, 4)
161
162#define EGPIO_MAGICIAN_EP_INSERT MAGICIAN_EGPIO(6, 1)
163
111#endif /* _MAGICIAN_H_ */ 164#endif /* _MAGICIAN_H_ */