diff options
author | Bibek Basu <bibek.basu@stericsson.com> | 2011-02-15 04:46:59 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2011-03-14 09:05:16 -0400 |
commit | 4bc3a698c3db6592490cd685e395e27216ed2454 (patch) | |
tree | f479d6989b9423be918617096c40391fea16bf8b /arch/arm/mach-ux500 | |
parent | fe05203b0c4ba0454ba34a858002b12ae4a72faa (diff) |
mach-ux500: add hrefv60 GPIO pins
This will centralize all GPIO pin muxing for the different boards
in the MOP500 family to a single file. It also kills off the
deprecated support for the ED (Early Drop) ASIC, this should
never be spotted in the open and ST-Ericsson have internally
deprecated this hardware.
Signed-off-by: Bibek Basu <bibek.basu@stericsson.com>
[Rebasing and kill old ASIC support]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-pins.c | 225 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-sdi.c | 65 |
2 files changed, 200 insertions, 90 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c index edd3a6bc3d23..fd4cf1ca5efd 100644 --- a/arch/arm/mach-ux500/board-mop500-pins.c +++ b/arch/arm/mach-ux500/board-mop500-pins.c | |||
@@ -8,19 +8,13 @@ | |||
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/gpio.h> | 9 | #include <linux/gpio.h> |
10 | 10 | ||
11 | #include <asm/mach-types.h> | ||
11 | #include <plat/pincfg.h> | 12 | #include <plat/pincfg.h> |
12 | |||
13 | #include <mach/hardware.h> | 13 | #include <mach/hardware.h> |
14 | 14 | ||
15 | #include "pins-db8500.h" | 15 | #include "pins-db8500.h" |
16 | 16 | ||
17 | static pin_cfg_t mop500_pins[] = { | 17 | static pin_cfg_t mop500_pins_common[] = { |
18 | /* SSP0 */ | ||
19 | GPIO143_SSP0_CLK, | ||
20 | GPIO144_SSP0_FRM, | ||
21 | GPIO145_SSP0_RXD, | ||
22 | GPIO146_SSP0_TXD, | ||
23 | |||
24 | /* I2C */ | 18 | /* I2C */ |
25 | GPIO147_I2C0_SCL, | 19 | GPIO147_I2C0_SCL, |
26 | GPIO148_I2C0_SDA, | 20 | GPIO148_I2C0_SDA, |
@@ -31,6 +25,72 @@ static pin_cfg_t mop500_pins[] = { | |||
31 | GPIO229_I2C3_SDA, | 25 | GPIO229_I2C3_SDA, |
32 | GPIO230_I2C3_SCL, | 26 | GPIO230_I2C3_SCL, |
33 | 27 | ||
28 | /* MSP0 */ | ||
29 | GPIO12_MSP0_TXD, | ||
30 | GPIO13_MSP0_TFS, | ||
31 | GPIO14_MSP0_TCK, | ||
32 | GPIO15_MSP0_RXD, | ||
33 | |||
34 | /* MSP2: HDMI */ | ||
35 | GPIO193_MSP2_TXD, | ||
36 | GPIO194_MSP2_TCK, | ||
37 | GPIO195_MSP2_TFS, | ||
38 | GPIO196_MSP2_RXD | PIN_OUTPUT_LOW, | ||
39 | |||
40 | /* Touch screen INTERFACE */ | ||
41 | GPIO84_GPIO | PIN_INPUT_PULLUP, /* TOUCH_INT1 */ | ||
42 | |||
43 | /* STMPE1601/tc35893 keypad IRQ */ | ||
44 | GPIO218_GPIO | PIN_INPUT_PULLUP, | ||
45 | |||
46 | /* MMC0 (MicroSD card) */ | ||
47 | GPIO18_MC0_CMDDIR | PIN_OUTPUT_HIGH, | ||
48 | GPIO19_MC0_DAT0DIR | PIN_OUTPUT_HIGH, | ||
49 | GPIO20_MC0_DAT2DIR | PIN_OUTPUT_HIGH, | ||
50 | |||
51 | GPIO22_MC0_FBCLK | PIN_INPUT_NOPULL, | ||
52 | GPIO23_MC0_CLK | PIN_OUTPUT_LOW, | ||
53 | GPIO24_MC0_CMD | PIN_INPUT_PULLUP, | ||
54 | GPIO25_MC0_DAT0 | PIN_INPUT_PULLUP, | ||
55 | GPIO26_MC0_DAT1 | PIN_INPUT_PULLUP, | ||
56 | GPIO27_MC0_DAT2 | PIN_INPUT_PULLUP, | ||
57 | GPIO28_MC0_DAT3 | PIN_INPUT_PULLUP, | ||
58 | |||
59 | /* SDI1 (SDIO) */ | ||
60 | GPIO208_MC1_CLK | PIN_OUTPUT_LOW, | ||
61 | GPIO209_MC1_FBCLK | PIN_INPUT_NOPULL, | ||
62 | GPIO210_MC1_CMD | PIN_INPUT_PULLUP, | ||
63 | GPIO211_MC1_DAT0 | PIN_INPUT_PULLUP, | ||
64 | GPIO212_MC1_DAT1 | PIN_INPUT_PULLUP, | ||
65 | GPIO213_MC1_DAT2 | PIN_INPUT_PULLUP, | ||
66 | GPIO214_MC1_DAT3 | PIN_INPUT_PULLUP, | ||
67 | |||
68 | /* MMC2 (On-board DATA INTERFACE eMMC) */ | ||
69 | GPIO128_MC2_CLK | PIN_OUTPUT_LOW, | ||
70 | GPIO129_MC2_CMD | PIN_INPUT_PULLUP, | ||
71 | GPIO130_MC2_FBCLK | PIN_INPUT_NOPULL, | ||
72 | GPIO131_MC2_DAT0 | PIN_INPUT_PULLUP, | ||
73 | GPIO132_MC2_DAT1 | PIN_INPUT_PULLUP, | ||
74 | GPIO133_MC2_DAT2 | PIN_INPUT_PULLUP, | ||
75 | GPIO134_MC2_DAT3 | PIN_INPUT_PULLUP, | ||
76 | GPIO135_MC2_DAT4 | PIN_INPUT_PULLUP, | ||
77 | GPIO136_MC2_DAT5 | PIN_INPUT_PULLUP, | ||
78 | GPIO137_MC2_DAT6 | PIN_INPUT_PULLUP, | ||
79 | GPIO138_MC2_DAT7 | PIN_INPUT_PULLUP, | ||
80 | |||
81 | /* MMC4 (On-board STORAGE INTERFACE eMMC) */ | ||
82 | GPIO197_MC4_DAT3 | PIN_INPUT_PULLUP, | ||
83 | GPIO198_MC4_DAT2 | PIN_INPUT_PULLUP, | ||
84 | GPIO199_MC4_DAT1 | PIN_INPUT_PULLUP, | ||
85 | GPIO200_MC4_DAT0 | PIN_INPUT_PULLUP, | ||
86 | GPIO201_MC4_CMD | PIN_INPUT_PULLUP, | ||
87 | GPIO202_MC4_FBCLK | PIN_INPUT_NOPULL, | ||
88 | GPIO203_MC4_CLK | PIN_OUTPUT_LOW, | ||
89 | GPIO204_MC4_DAT7 | PIN_INPUT_PULLUP, | ||
90 | GPIO205_MC4_DAT6 | PIN_INPUT_PULLUP, | ||
91 | GPIO206_MC4_DAT5 | PIN_INPUT_PULLUP, | ||
92 | GPIO207_MC4_DAT4 | PIN_INPUT_PULLUP, | ||
93 | |||
34 | /* SKE keypad */ | 94 | /* SKE keypad */ |
35 | GPIO153_KP_I7, | 95 | GPIO153_KP_I7, |
36 | GPIO154_KP_I6, | 96 | GPIO154_KP_I6, |
@@ -49,32 +109,133 @@ static pin_cfg_t mop500_pins[] = { | |||
49 | GPIO167_KP_O1, | 109 | GPIO167_KP_O1, |
50 | GPIO168_KP_O0, | 110 | GPIO168_KP_O0, |
51 | 111 | ||
52 | /* GPIO_EXP_INT */ | 112 | /* UART */ |
53 | GPIO217_GPIO, | 113 | GPIO0_U0_CTSn | PIN_INPUT_PULLUP, |
54 | 114 | GPIO1_U0_RTSn | PIN_OUTPUT_HIGH, | |
55 | /* STMPE1601 IRQ */ | 115 | GPIO2_U0_RXD | PIN_INPUT_PULLUP, |
56 | GPIO218_GPIO | PIN_INPUT_PULLUP, | 116 | GPIO3_U0_TXD | PIN_OUTPUT_HIGH, |
57 | 117 | ||
58 | /* touch screen */ | 118 | GPIO29_U2_RXD | PIN_INPUT_PULLUP, |
59 | GPIO84_GPIO | PIN_INPUT_PULLUP, | 119 | GPIO30_U2_TXD | PIN_OUTPUT_HIGH, |
60 | 120 | GPIO31_U2_CTSn | PIN_INPUT_PULLUP, | |
61 | /* USB OTG */ | 121 | GPIO32_U2_RTSn | PIN_OUTPUT_HIGH, |
62 | GPIO256_USB_NXT | PIN_PULL_DOWN, | 122 | |
63 | GPIO257_USB_STP | PIN_PULL_UP, | 123 | /* Display & HDMI HW sync */ |
64 | GPIO258_USB_XCLK | PIN_PULL_DOWN, | 124 | GPIO68_LCD_VSI0 | PIN_INPUT_PULLUP, |
65 | GPIO259_USB_DIR | PIN_PULL_DOWN, | 125 | GPIO69_LCD_VSI1 | PIN_INPUT_PULLUP, |
66 | GPIO260_USB_DAT7 | PIN_PULL_DOWN, | 126 | }; |
67 | GPIO261_USB_DAT6 | PIN_PULL_DOWN, | 127 | |
68 | GPIO262_USB_DAT5 | PIN_PULL_DOWN, | 128 | static pin_cfg_t mop500_pins_default[] = { |
69 | GPIO263_USB_DAT4 | PIN_PULL_DOWN, | 129 | /* SSP0 */ |
70 | GPIO264_USB_DAT3 | PIN_PULL_DOWN, | 130 | GPIO143_SSP0_CLK, |
71 | GPIO265_USB_DAT2 | PIN_PULL_DOWN, | 131 | GPIO144_SSP0_FRM, |
72 | GPIO266_USB_DAT1 | PIN_PULL_DOWN, | 132 | GPIO145_SSP0_RXD | PIN_PULL_DOWN, |
73 | GPIO267_USB_DAT0 | PIN_PULL_DOWN, | 133 | GPIO146_SSP0_TXD, |
134 | |||
135 | |||
136 | GPIO217_GPIO | PIN_INPUT_PULLUP, /* TC35892 IRQ */ | ||
137 | |||
138 | /* SDI0 (MicroSD card) */ | ||
139 | GPIO21_MC0_DAT31DIR | PIN_OUTPUT_HIGH, | ||
140 | |||
141 | /* UART */ | ||
142 | GPIO4_U1_RXD | PIN_INPUT_PULLUP, | ||
143 | GPIO5_U1_TXD | PIN_OUTPUT_HIGH, | ||
144 | GPIO6_U1_CTSn | PIN_INPUT_PULLUP, | ||
145 | GPIO7_U1_RTSn | PIN_OUTPUT_HIGH, | ||
146 | }; | ||
147 | |||
148 | static pin_cfg_t mop500_pins_hrefv60[] = { | ||
149 | /* WLAN */ | ||
150 | GPIO4_GPIO | PIN_INPUT_PULLUP,/* WLAN_IRQ */ | ||
151 | GPIO85_GPIO | PIN_OUTPUT_LOW,/* WLAN_ENA */ | ||
152 | |||
153 | /* XENON Flashgun INTERFACE */ | ||
154 | GPIO6_IP_GPIO0 | PIN_INPUT_PULLUP,/* XENON_FLASH_ID */ | ||
155 | GPIO7_IP_GPIO1 | PIN_INPUT_PULLUP,/* XENON_READY */ | ||
156 | GPIO170_GPIO | PIN_OUTPUT_LOW, /* XENON_CHARGE */ | ||
157 | |||
158 | /* Assistant LED INTERFACE */ | ||
159 | GPIO21_GPIO | PIN_OUTPUT_LOW, /* XENON_EN1 */ | ||
160 | GPIO64_IP_GPIO4 | PIN_OUTPUT_LOW, /* XENON_EN2 */ | ||
161 | |||
162 | /* Magnetometer */ | ||
163 | GPIO31_GPIO | PIN_INPUT_PULLUP, /* magnetometer_INT */ | ||
164 | GPIO32_GPIO | PIN_INPUT_PULLDOWN, /* Magnetometer DRDY */ | ||
165 | |||
166 | /* Display Interface */ | ||
167 | GPIO65_GPIO | PIN_OUTPUT_LOW, /* DISP1 RST */ | ||
168 | GPIO66_GPIO | PIN_OUTPUT_LOW, /* DISP2 RST */ | ||
169 | |||
170 | /* Touch screen INTERFACE */ | ||
171 | GPIO143_GPIO | PIN_OUTPUT_LOW,/*TOUCH_RST1 */ | ||
172 | |||
173 | /* Touch screen INTERFACE 2 */ | ||
174 | GPIO67_GPIO | PIN_INPUT_PULLUP, /* TOUCH_INT2 */ | ||
175 | GPIO146_GPIO | PIN_OUTPUT_LOW,/*TOUCH_RST2 */ | ||
176 | |||
177 | /* ETM_PTM_TRACE INTERFACE */ | ||
178 | GPIO70_GPIO | PIN_OUTPUT_LOW,/* ETM_PTM_DATA23 */ | ||
179 | GPIO71_GPIO | PIN_OUTPUT_LOW,/* ETM_PTM_DATA22 */ | ||
180 | GPIO72_GPIO | PIN_OUTPUT_LOW,/* ETM_PTM_DATA21 */ | ||
181 | GPIO73_GPIO | PIN_OUTPUT_LOW,/* ETM_PTM_DATA20 */ | ||
182 | GPIO74_GPIO | PIN_OUTPUT_LOW,/* ETM_PTM_DATA19 */ | ||
183 | |||
184 | /* NAHJ INTERFACE */ | ||
185 | GPIO76_GPIO | PIN_OUTPUT_LOW,/* NAHJ_CTRL */ | ||
186 | GPIO216_GPIO | PIN_OUTPUT_HIGH,/* NAHJ_CTRL_INV */ | ||
187 | |||
188 | /* NFC INTERFACE */ | ||
189 | GPIO77_GPIO | PIN_OUTPUT_LOW, /* NFC_ENA */ | ||
190 | GPIO144_GPIO | PIN_INPUT_PULLDOWN, /* NFC_IRQ */ | ||
191 | GPIO142_GPIO | PIN_OUTPUT_LOW, /* NFC_RESET */ | ||
192 | |||
193 | /* Keyboard MATRIX INTERFACE */ | ||
194 | GPIO90_MC5_CMD | PIN_OUTPUT_LOW, /* KP_O_1 */ | ||
195 | GPIO87_MC5_DAT1 | PIN_OUTPUT_LOW, /* KP_O_2 */ | ||
196 | GPIO86_MC5_DAT0 | PIN_OUTPUT_LOW, /* KP_O_3 */ | ||
197 | GPIO96_KP_O6 | PIN_OUTPUT_LOW, /* KP_O_6 */ | ||
198 | GPIO94_KP_O7 | PIN_OUTPUT_LOW, /* KP_O_7 */ | ||
199 | GPIO93_MC5_DAT4 | PIN_INPUT_PULLUP, /* KP_I_0 */ | ||
200 | GPIO89_MC5_DAT3 | PIN_INPUT_PULLUP, /* KP_I_2 */ | ||
201 | GPIO88_MC5_DAT2 | PIN_INPUT_PULLUP, /* KP_I_3 */ | ||
202 | GPIO91_GPIO | PIN_INPUT_PULLUP, /* FORCE_SENSING_INT */ | ||
203 | GPIO92_GPIO | PIN_OUTPUT_LOW, /* FORCE_SENSING_RST */ | ||
204 | GPIO97_GPIO | PIN_OUTPUT_LOW, /* FORCE_SENSING_WU */ | ||
205 | |||
206 | /* DiPro Sensor Interface */ | ||
207 | GPIO139_GPIO | PIN_INPUT_PULLUP, /* DIPRO_INT */ | ||
208 | |||
209 | /* HAL SWITCH INTERFACE */ | ||
210 | GPIO145_GPIO | PIN_INPUT_PULLDOWN,/* HAL_SW */ | ||
211 | |||
212 | /* Audio Amplifier Interface */ | ||
213 | GPIO149_GPIO | PIN_OUTPUT_LOW, /* VAUDIO_HF_EN */ | ||
214 | |||
215 | /* GBF INTERFACE */ | ||
216 | GPIO171_GPIO | PIN_OUTPUT_LOW, /* GBF_ENA_RESET */ | ||
217 | |||
218 | /* MSP : HDTV INTERFACE */ | ||
219 | GPIO192_GPIO | PIN_INPUT_PULLDOWN, | ||
220 | |||
221 | /* ACCELEROMETER_INTERFACE */ | ||
222 | GPIO82_GPIO | PIN_INPUT_PULLUP, /* ACC_INT1 */ | ||
223 | GPIO83_GPIO | PIN_INPUT_PULLUP, /* ACC_INT2 */ | ||
224 | |||
225 | /* Proximity Sensor */ | ||
226 | GPIO217_GPIO | PIN_INPUT_PULLUP, | ||
227 | |||
228 | |||
74 | }; | 229 | }; |
75 | 230 | ||
76 | void __init mop500_pins_init(void) | 231 | void __init mop500_pins_init(void) |
77 | { | 232 | { |
78 | nmk_config_pins(mop500_pins, | 233 | nmk_config_pins(mop500_pins_common, |
79 | ARRAY_SIZE(mop500_pins)); | 234 | ARRAY_SIZE(mop500_pins_common)); |
235 | if (machine_is_hrefv60()) | ||
236 | nmk_config_pins(mop500_pins_hrefv60, | ||
237 | ARRAY_SIZE(mop500_pins_hrefv60)); | ||
238 | else | ||
239 | nmk_config_pins(mop500_pins_default, | ||
240 | ARRAY_SIZE(mop500_pins_default)); | ||
80 | } | 241 | } |
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c index d1ae6a09979d..68c8375e45c6 100644 --- a/arch/arm/mach-ux500/board-mop500-sdi.c +++ b/arch/arm/mach-ux500/board-mop500-sdi.c | |||
@@ -12,59 +12,14 @@ | |||
12 | #include <linux/mmc/host.h> | 12 | #include <linux/mmc/host.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | 14 | ||
15 | #include <plat/pincfg.h> | ||
16 | #include <plat/ste_dma40.h> | 15 | #include <plat/ste_dma40.h> |
17 | #include <mach/devices.h> | 16 | #include <mach/devices.h> |
18 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
19 | 18 | ||
20 | #include "devices-db8500.h" | 19 | #include "devices-db8500.h" |
21 | #include "pins-db8500.h" | ||
22 | #include "board-mop500.h" | 20 | #include "board-mop500.h" |
23 | #include "ste-dma40-db8500.h" | 21 | #include "ste-dma40-db8500.h" |
24 | 22 | ||
25 | static pin_cfg_t mop500_sdi_pins[] = { | ||
26 | /* SDI0 (MicroSD slot) */ | ||
27 | GPIO18_MC0_CMDDIR, | ||
28 | GPIO19_MC0_DAT0DIR, | ||
29 | GPIO20_MC0_DAT2DIR, | ||
30 | GPIO21_MC0_DAT31DIR, | ||
31 | GPIO22_MC0_FBCLK, | ||
32 | GPIO23_MC0_CLK, | ||
33 | GPIO24_MC0_CMD, | ||
34 | GPIO25_MC0_DAT0, | ||
35 | GPIO26_MC0_DAT1, | ||
36 | GPIO27_MC0_DAT2, | ||
37 | GPIO28_MC0_DAT3, | ||
38 | |||
39 | /* SDI4 (on-board eMMC) */ | ||
40 | GPIO197_MC4_DAT3, | ||
41 | GPIO198_MC4_DAT2, | ||
42 | GPIO199_MC4_DAT1, | ||
43 | GPIO200_MC4_DAT0, | ||
44 | GPIO201_MC4_CMD, | ||
45 | GPIO202_MC4_FBCLK, | ||
46 | GPIO203_MC4_CLK, | ||
47 | GPIO204_MC4_DAT7, | ||
48 | GPIO205_MC4_DAT6, | ||
49 | GPIO206_MC4_DAT5, | ||
50 | GPIO207_MC4_DAT4, | ||
51 | }; | ||
52 | |||
53 | static pin_cfg_t mop500_sdi2_pins[] = { | ||
54 | /* SDI2 (POP eMMC) */ | ||
55 | GPIO128_MC2_CLK, | ||
56 | GPIO129_MC2_CMD, | ||
57 | GPIO130_MC2_FBCLK, | ||
58 | GPIO131_MC2_DAT0, | ||
59 | GPIO132_MC2_DAT1, | ||
60 | GPIO133_MC2_DAT2, | ||
61 | GPIO134_MC2_DAT3, | ||
62 | GPIO135_MC2_DAT4, | ||
63 | GPIO136_MC2_DAT5, | ||
64 | GPIO137_MC2_DAT6, | ||
65 | GPIO138_MC2_DAT7, | ||
66 | }; | ||
67 | |||
68 | /* | 23 | /* |
69 | * SDI 0 (MicroSD slot) | 24 | * SDI 0 (MicroSD slot) |
70 | */ | 25 | */ |
@@ -216,22 +171,16 @@ static struct mmci_platform_data mop500_sdi4_data = { | |||
216 | 171 | ||
217 | void __init mop500_sdi_init(void) | 172 | void __init mop500_sdi_init(void) |
218 | { | 173 | { |
219 | nmk_config_pins(mop500_sdi_pins, ARRAY_SIZE(mop500_sdi_pins)); | 174 | /* PoP:ed eMMC on top of DB8500 v1.0 has problems with high speed */ |
175 | if (!cpu_is_u8500v10()) | ||
176 | mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED; | ||
177 | db8500_add_sdi2(&mop500_sdi2_data); | ||
178 | |||
179 | /* On-board eMMC */ | ||
180 | db8500_add_sdi4(&mop500_sdi4_data); | ||
220 | 181 | ||
221 | /* | 182 | /* |
222 | * sdi0 will finally be added when the TC35892 initializes and calls | 183 | * sdi0 will finally be added when the TC35892 initializes and calls |
223 | * mop500_sdi_tc35892_init() above. | 184 | * mop500_sdi_tc35892_init() above. |
224 | */ | 185 | */ |
225 | |||
226 | /* PoP:ed eMMC */ | ||
227 | if (!cpu_is_u8500ed()) { | ||
228 | nmk_config_pins(mop500_sdi2_pins, ARRAY_SIZE(mop500_sdi2_pins)); | ||
229 | /* POP eMMC on v1.0 has problems with high speed */ | ||
230 | if (!cpu_is_u8500v10()) | ||
231 | mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED; | ||
232 | db8500_add_sdi2(&mop500_sdi2_data); | ||
233 | } | ||
234 | |||
235 | /* On-board eMMC */ | ||
236 | db8500_add_sdi4(&mop500_sdi4_data); | ||
237 | } | 186 | } |