diff options
author | Haojian Zhuang <haojian.zhuang@gmail.com> | 2010-09-08 09:42:40 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-10-09 05:07:24 -0400 |
commit | 20266df55db7dcb70b3f527a55f4eb5a4d7092e2 (patch) | |
tree | aa35e6328534b2928abad71b803d7318b1cd839d /arch/arm/mach-pxa | |
parent | ba1aa3248e484e5cc39a74ae418232bd5c877a90 (diff) |
ARM: pxa: append tavorevb3 support
Bringup tavorevb3 development platform. UART and PMIC are enabled.
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/Kconfig | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/mfp-pxa930.h | 7 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa930.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/tavorevb3.c | 136 |
5 files changed, 149 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index e2453dba517..dd235ecc9d6 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -41,6 +41,10 @@ config MACH_TAVOREVB | |||
41 | select PXA3xx | 41 | select PXA3xx |
42 | select CPU_PXA930 | 42 | select CPU_PXA930 |
43 | 43 | ||
44 | config MACH_TAVOREVB3 | ||
45 | bool "PXA95x Development Platform (aka TavorEVB III)" | ||
46 | select CPU_PXA950 | ||
47 | |||
44 | config MACH_SAAR | 48 | config MACH_SAAR |
45 | bool "PXA930 Handheld Platform (aka SAAR)" | 49 | bool "PXA930 Handheld Platform (aka SAAR)" |
46 | select PXA3xx | 50 | select PXA3xx |
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index a1db59b124f..e2f89c2c6f4 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile | |||
@@ -32,6 +32,7 @@ obj-$(CONFIG_MACH_ZYLONITE300) += zylonite.o zylonite_pxa300.o | |||
32 | obj-$(CONFIG_MACH_ZYLONITE320) += zylonite.o zylonite_pxa320.o | 32 | obj-$(CONFIG_MACH_ZYLONITE320) += zylonite.o zylonite_pxa320.o |
33 | obj-$(CONFIG_MACH_LITTLETON) += littleton.o | 33 | obj-$(CONFIG_MACH_LITTLETON) += littleton.o |
34 | obj-$(CONFIG_MACH_TAVOREVB) += tavorevb.o | 34 | obj-$(CONFIG_MACH_TAVOREVB) += tavorevb.o |
35 | obj-$(CONFIG_MACH_TAVOREVB3) += tavorevb3.o | ||
35 | obj-$(CONFIG_MACH_SAAR) += saar.o | 36 | obj-$(CONFIG_MACH_SAAR) += saar.o |
36 | 37 | ||
37 | # 3rd Party Dev Platforms | 38 | # 3rd Party Dev Platforms |
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa930.h b/arch/arm/mach-pxa/include/mach/mfp-pxa930.h index 0d119d3b922..04f7c97044f 100644 --- a/arch/arm/mach-pxa/include/mach/mfp-pxa930.h +++ b/arch/arm/mach-pxa/include/mach/mfp-pxa930.h | |||
@@ -69,6 +69,7 @@ | |||
69 | #define nBE0_GPIO_60 MFP_CFG(nBE0, AF0) | 69 | #define nBE0_GPIO_60 MFP_CFG(nBE0, AF0) |
70 | #define nBE1_GPIO_61 MFP_CFG(nBE1, AF0) | 70 | #define nBE1_GPIO_61 MFP_CFG(nBE1, AF0) |
71 | #define RDY_GPIO_62 MFP_CFG(RDY, AF0) | 71 | #define RDY_GPIO_62 MFP_CFG(RDY, AF0) |
72 | #define PMIC_INT_GPIO83 MFP_CFG_LPM(PMIC_INT, AF0, PULL_HIGH) | ||
72 | 73 | ||
73 | /* Chip Select */ | 74 | /* Chip Select */ |
74 | #define DF_nCS0_nCS2 MFP_CFG_LPM(DF_nCS0, AF3, PULL_HIGH) | 75 | #define DF_nCS0_nCS2 MFP_CFG_LPM(DF_nCS0, AF3, PULL_HIGH) |
@@ -92,6 +93,9 @@ | |||
92 | #define GPIO63_CI2C_SCL MFP_CFG_LPM(GPIO63, AF4, PULL_HIGH) | 93 | #define GPIO63_CI2C_SCL MFP_CFG_LPM(GPIO63, AF4, PULL_HIGH) |
93 | #define GPIO64_CI2C_SDA MFP_CFG_LPM(GPIO64, AF4, PULL_HIGH) | 94 | #define GPIO64_CI2C_SDA MFP_CFG_LPM(GPIO64, AF4, PULL_HIGH) |
94 | 95 | ||
96 | #define GPIO73_CI2C_SCL MFP_CFG_LPM(GPIO73, AF1, PULL_HIGH) | ||
97 | #define GPIO74_CI2C_SDA MFP_CFG_LPM(GPIO74, AF1, PULL_HIGH) | ||
98 | |||
95 | #define GPIO77_CI2C_SCL MFP_CFG_LPM(GPIO77, AF2, PULL_HIGH) | 99 | #define GPIO77_CI2C_SCL MFP_CFG_LPM(GPIO77, AF2, PULL_HIGH) |
96 | #define GPIO78_CI2C_SDA MFP_CFG_LPM(GPIO78, AF2, PULL_HIGH) | 100 | #define GPIO78_CI2C_SDA MFP_CFG_LPM(GPIO78, AF2, PULL_HIGH) |
97 | 101 | ||
@@ -345,6 +349,9 @@ | |||
345 | #define GPIO69_UART1_CTS MFP_CFG(GPIO69, AF2) | 349 | #define GPIO69_UART1_CTS MFP_CFG(GPIO69, AF2) |
346 | #define GPIO70_UART1_RTS MFP_CFG(GPIO70, AF2) | 350 | #define GPIO70_UART1_RTS MFP_CFG(GPIO70, AF2) |
347 | 351 | ||
352 | #define GPIO53_UART1_TXD MFP_CFG(GPIO53, AF2) | ||
353 | #define GPIO54_UART1_RXD MFP_CFG(GPIO54, AF2) | ||
354 | |||
348 | /* UART2 - BTUART */ | 355 | /* UART2 - BTUART */ |
349 | #define GPIO91_UART2_RXD MFP_CFG(GPIO91, AF1) | 356 | #define GPIO91_UART2_RXD MFP_CFG(GPIO91, AF1) |
350 | #define GPIO92_UART2_TXD MFP_CFG(GPIO92, AF1) | 357 | #define GPIO92_UART2_TXD MFP_CFG(GPIO92, AF1) |
diff --git a/arch/arm/mach-pxa/pxa930.c b/arch/arm/mach-pxa/pxa930.c index 06429200828..7d29dd3af79 100644 --- a/arch/arm/mach-pxa/pxa930.c +++ b/arch/arm/mach-pxa/pxa930.c | |||
@@ -192,7 +192,7 @@ static struct mfp_addr_map pxa935_mfp_addr_map[] __initdata = { | |||
192 | 192 | ||
193 | static int __init pxa930_init(void) | 193 | static int __init pxa930_init(void) |
194 | { | 194 | { |
195 | if (cpu_is_pxa930() || cpu_is_pxa935()) { | 195 | if (cpu_is_pxa930() || cpu_is_pxa935() || cpu_is_pxa950()) { |
196 | mfp_init_base(io_p2v(MFPR_BASE)); | 196 | mfp_init_base(io_p2v(MFPR_BASE)); |
197 | mfp_init_addr(pxa930_mfp_addr_map); | 197 | mfp_init_addr(pxa930_mfp_addr_map); |
198 | } | 198 | } |
diff --git a/arch/arm/mach-pxa/tavorevb3.c b/arch/arm/mach-pxa/tavorevb3.c new file mode 100644 index 00000000000..5eeba64515e --- /dev/null +++ b/arch/arm/mach-pxa/tavorevb3.c | |||
@@ -0,0 +1,136 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-pxa/tavorevb3.c | ||
3 | * | ||
4 | * Support for the Marvell EVB3 Development Platform. | ||
5 | * | ||
6 | * Copyright: (C) Copyright 2008-2010 Marvell International Ltd. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * publishhed by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/i2c.h> | ||
18 | #include <linux/gpio.h> | ||
19 | #include <linux/mfd/88pm860x.h> | ||
20 | |||
21 | #include <asm/mach-types.h> | ||
22 | #include <asm/mach/arch.h> | ||
23 | |||
24 | #include <mach/pxa930.h> | ||
25 | |||
26 | #include <plat/i2c.h> | ||
27 | |||
28 | #include "devices.h" | ||
29 | #include "generic.h" | ||
30 | |||
31 | #define TAVOREVB3_NR_IRQS (IRQ_BOARD_START + 24) | ||
32 | |||
33 | static mfp_cfg_t evb3_mfp_cfg[] __initdata = { | ||
34 | /* UART */ | ||
35 | GPIO53_UART1_TXD, | ||
36 | GPIO54_UART1_RXD, | ||
37 | |||
38 | /* PMIC */ | ||
39 | PMIC_INT_GPIO83, | ||
40 | }; | ||
41 | |||
42 | #if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE) | ||
43 | static struct pm860x_touch_pdata evb3_touch = { | ||
44 | .gpadc_prebias = 1, | ||
45 | .slot_cycle = 1, | ||
46 | .tsi_prebias = 6, | ||
47 | .pen_prebias = 16, | ||
48 | .pen_prechg = 2, | ||
49 | .res_x = 300, | ||
50 | }; | ||
51 | |||
52 | static struct pm860x_backlight_pdata evb3_backlight[] = { | ||
53 | { | ||
54 | .id = PM8606_ID_BACKLIGHT, | ||
55 | .iset = PM8606_WLED_CURRENT(24), | ||
56 | .flags = PM8606_BACKLIGHT1, | ||
57 | }, | ||
58 | {}, | ||
59 | }; | ||
60 | |||
61 | static struct pm860x_led_pdata evb3_led[] = { | ||
62 | { | ||
63 | .id = PM8606_ID_LED, | ||
64 | .iset = PM8606_LED_CURRENT(12), | ||
65 | .flags = PM8606_LED1_RED, | ||
66 | }, { | ||
67 | .id = PM8606_ID_LED, | ||
68 | .iset = PM8606_LED_CURRENT(12), | ||
69 | .flags = PM8606_LED1_GREEN, | ||
70 | }, { | ||
71 | .id = PM8606_ID_LED, | ||
72 | .iset = PM8606_LED_CURRENT(12), | ||
73 | .flags = PM8606_LED1_BLUE, | ||
74 | }, { | ||
75 | .id = PM8606_ID_LED, | ||
76 | .iset = PM8606_LED_CURRENT(12), | ||
77 | .flags = PM8606_LED2_RED, | ||
78 | }, { | ||
79 | .id = PM8606_ID_LED, | ||
80 | .iset = PM8606_LED_CURRENT(12), | ||
81 | .flags = PM8606_LED2_GREEN, | ||
82 | }, { | ||
83 | .id = PM8606_ID_LED, | ||
84 | .iset = PM8606_LED_CURRENT(12), | ||
85 | .flags = PM8606_LED2_BLUE, | ||
86 | }, | ||
87 | }; | ||
88 | |||
89 | static struct pm860x_platform_data evb3_pm8607_info = { | ||
90 | .touch = &evb3_touch, | ||
91 | .backlight = &evb3_backlight[0], | ||
92 | .led = &evb3_led[0], | ||
93 | .companion_addr = 0x10, | ||
94 | .irq_mode = 0, | ||
95 | .irq_base = IRQ_BOARD_START, | ||
96 | |||
97 | .i2c_port = GI2C_PORT, | ||
98 | }; | ||
99 | |||
100 | static struct i2c_board_info evb3_i2c_info[] = { | ||
101 | { | ||
102 | .type = "88PM860x", | ||
103 | .addr = 0x34, | ||
104 | .platform_data = &evb3_pm8607_info, | ||
105 | .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO83)), | ||
106 | }, | ||
107 | }; | ||
108 | |||
109 | static void __init evb3_init_i2c(void) | ||
110 | { | ||
111 | pxa_set_i2c_info(NULL); | ||
112 | i2c_register_board_info(0, ARRAY_AND_SIZE(evb3_i2c_info)); | ||
113 | } | ||
114 | #else | ||
115 | static inline void evb3_init_i2c(void) {} | ||
116 | #endif | ||
117 | |||
118 | static void __init evb3_init(void) | ||
119 | { | ||
120 | /* initialize MFP configurations */ | ||
121 | pxa3xx_mfp_config(ARRAY_AND_SIZE(evb3_mfp_cfg)); | ||
122 | |||
123 | pxa_set_ffuart_info(NULL); | ||
124 | |||
125 | evb3_init_i2c(); | ||
126 | } | ||
127 | |||
128 | MACHINE_START(TAVOREVB3, "PXA950 Evaluation Board (aka TavorEVB3)") | ||
129 | .phys_io = 0x40000000, | ||
130 | .boot_params = 0xa0000100, | ||
131 | .map_io = pxa_map_io, | ||
132 | .nr_irqs = TAVOREVB3_NR_IRQS, | ||
133 | .init_irq = pxa3xx_init_irq, | ||
134 | .timer = &pxa_timer, | ||
135 | .init_machine = evb3_init, | ||
136 | MACHINE_END | ||