aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2010-05-21 18:29:37 -0400
committerEric Miao <eric.y.miao@gmail.com>2010-06-18 03:07:34 -0400
commit7cca84abf49afe28f3e81531f79b2cb4dd6cba1b (patch)
tree653af7c9e6372b718074a9e4650b9899849cf2c1
parent8f146191b82889c4d47261ec801bddfab453381a (diff)
[ARM] pxa/colibri270: Add TSC support
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
-rw-r--r--arch/arm/mach-pxa/colibri-pxa270.c42
-rw-r--r--arch/arm/mach-pxa/include/mach/colibri.h1
2 files changed, 43 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/colibri-pxa270.c b/arch/arm/mach-pxa/colibri-pxa270.c
index 22105d63942c..99d511cf0a82 100644
--- a/arch/arm/mach-pxa/colibri-pxa270.c
+++ b/arch/arm/mach-pxa/colibri-pxa270.c
@@ -22,6 +22,7 @@
22#include <linux/mtd/partitions.h> 22#include <linux/mtd/partitions.h>
23#include <linux/mtd/physmap.h> 23#include <linux/mtd/physmap.h>
24#include <linux/gpio.h> 24#include <linux/gpio.h>
25#include <linux/ucb1400.h>
25#include <asm/mach-types.h> 26#include <asm/mach-types.h>
26#include <mach/hardware.h> 27#include <mach/hardware.h>
27#include <asm/irq.h> 28#include <asm/irq.h>
@@ -31,6 +32,7 @@
31#include <asm/mach/irq.h> 32#include <asm/mach/irq.h>
32#include <asm/mach/flash.h> 33#include <asm/mach/flash.h>
33 34
35#include <mach/audio.h>
34#include <mach/pxa27x.h> 36#include <mach/pxa27x.h>
35#include <mach/colibri.h> 37#include <mach/colibri.h>
36#include <mach/mmc.h> 38#include <mach/mmc.h>
@@ -66,6 +68,15 @@ static mfp_cfg_t colibri_pxa270_pin_config[] __initdata = {
66 GPIO89_USBH1_PEN, 68 GPIO89_USBH1_PEN,
67 GPIO119_USBH2_PWR, 69 GPIO119_USBH2_PWR,
68 GPIO120_USBH2_PEN, 70 GPIO120_USBH2_PEN,
71
72 /* AC97 */
73 GPIO28_AC97_BITCLK,
74 GPIO29_AC97_SDATA_IN_0,
75 GPIO30_AC97_SDATA_OUT,
76 GPIO31_AC97_SYNC,
77 GPIO95_AC97_nRESET,
78 GPIO98_AC97_SYSCLK,
79 GPIO113_GPIO, /* Touchscreen IRQ */
69}; 80};
70 81
71/****************************************************************************** 82/******************************************************************************
@@ -205,6 +216,36 @@ static void __init colibri_pxa270_uhc_init(void)
205static inline void colibri_pxa270_uhc_init(void) {} 216static inline void colibri_pxa270_uhc_init(void) {}
206#endif 217#endif
207 218
219/******************************************************************************
220 * Audio and Touchscreen
221 ******************************************************************************/
222#if defined(CONFIG_TOUCHSCREEN_UCB1400) || \
223 defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE)
224static pxa2xx_audio_ops_t colibri_pxa270_ac97_pdata = {
225 .reset_gpio = 95,
226};
227
228static struct ucb1400_pdata colibri_pxa270_ucb1400_pdata = {
229 .irq = gpio_to_irq(GPIO113_COLIBRI_PXA270_TS_IRQ),
230};
231
232static struct platform_device colibri_pxa270_ucb1400_device = {
233 .name = "ucb1400_core",
234 .id = -1,
235 .dev = {
236 .platform_data = &colibri_pxa270_ucb1400_pdata,
237 },
238};
239
240static void __init colibri_pxa270_tsc_init(void)
241{
242 pxa_set_ac97_info(&colibri_pxa270_ac97_pdata);
243 platform_device_register(&colibri_pxa270_ucb1400_device);
244}
245#else
246static inline void colibri_pxa270_tsc_init(void) {}
247#endif
248
208static void __init colibri_pxa270_init(void) 249static void __init colibri_pxa270_init(void)
209{ 250{
210 pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_pin_config)); 251 pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_pin_config));
@@ -216,6 +257,7 @@ static void __init colibri_pxa270_init(void)
216 colibri_pxa270_eth_init(); 257 colibri_pxa270_eth_init();
217 colibri_pxa270_mmc_init(); 258 colibri_pxa270_mmc_init();
218 colibri_pxa270_uhc_init(); 259 colibri_pxa270_uhc_init();
260 colibri_pxa270_tsc_init();
219} 261}
220 262
221MACHINE_START(COLIBRI, "Toradex Colibri PXA270") 263MACHINE_START(COLIBRI, "Toradex Colibri PXA270")
diff --git a/arch/arm/mach-pxa/include/mach/colibri.h b/arch/arm/mach-pxa/include/mach/colibri.h
index c5492366349a..8579b1006791 100644
--- a/arch/arm/mach-pxa/include/mach/colibri.h
+++ b/arch/arm/mach-pxa/include/mach/colibri.h
@@ -36,6 +36,7 @@ static inline void colibri_pxa3xx_init_nand(void) {}
36/* GPIO definitions for Colibri PXA270 */ 36/* GPIO definitions for Colibri PXA270 */
37#define GPIO114_COLIBRI_PXA270_ETH_IRQ 114 37#define GPIO114_COLIBRI_PXA270_ETH_IRQ 114
38#define GPIO0_COLIBRI_PXA270_SD_DETECT 0 38#define GPIO0_COLIBRI_PXA270_SD_DETECT 0
39#define GPIO113_COLIBRI_PXA270_TS_IRQ 113
39 40
40#endif /* _COLIBRI_H_ */ 41#endif /* _COLIBRI_H_ */
41 42