diff options
-rw-r--r-- | arch/arm/mach-pxa/zylonite_pxa300.c | 42 | ||||
-rw-r--r-- | include/asm-arm/arch-pxa/irqs.h | 2 |
2 files changed, 44 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/zylonite_pxa300.c b/arch/arm/mach-pxa/zylonite_pxa300.c index 6f7ae972b8db..75bf61f1f1c3 100644 --- a/arch/arm/mach-pxa/zylonite_pxa300.c +++ b/arch/arm/mach-pxa/zylonite_pxa300.c | |||
@@ -16,9 +16,12 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/i2c.h> | ||
20 | #include <linux/i2c/pca953x.h> | ||
19 | 21 | ||
20 | #include <asm/gpio.h> | 22 | #include <asm/gpio.h> |
21 | #include <asm/arch/mfp-pxa300.h> | 23 | #include <asm/arch/mfp-pxa300.h> |
24 | #include <asm/arch/i2c.h> | ||
22 | #include <asm/arch/zylonite.h> | 25 | #include <asm/arch/zylonite.h> |
23 | 26 | ||
24 | #include "generic.h" | 27 | #include "generic.h" |
@@ -109,6 +112,10 @@ static mfp_cfg_t common_mfp_cfg[] __initdata = { | |||
109 | GPIO12_MMC2_DAT3, | 112 | GPIO12_MMC2_DAT3, |
110 | GPIO13_MMC2_CLK, | 113 | GPIO13_MMC2_CLK, |
111 | GPIO14_MMC2_CMD, | 114 | GPIO14_MMC2_CMD, |
115 | |||
116 | /* Standard I2C */ | ||
117 | GPIO21_I2C_SCL, | ||
118 | GPIO22_I2C_SDA, | ||
112 | }; | 119 | }; |
113 | 120 | ||
114 | static mfp_cfg_t pxa300_mfp_cfg[] __initdata = { | 121 | static mfp_cfg_t pxa300_mfp_cfg[] __initdata = { |
@@ -192,6 +199,39 @@ static void __init zylonite_detect_lcd_panel(void) | |||
192 | pxa3xx_mfp_write(lcd_detect_pins[i], mfpr_save[i]); | 199 | pxa3xx_mfp_write(lcd_detect_pins[i], mfpr_save[i]); |
193 | } | 200 | } |
194 | 201 | ||
202 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | ||
203 | static struct pca953x_platform_data gpio_exp[] = { | ||
204 | [0] = { | ||
205 | .gpio_base = 128, | ||
206 | }, | ||
207 | [1] = { | ||
208 | .gpio_base = 144, | ||
209 | }, | ||
210 | }; | ||
211 | |||
212 | struct i2c_board_info zylonite_i2c_board_info[] = { | ||
213 | { | ||
214 | .type = "pca9539", | ||
215 | .addr = 0x74, | ||
216 | .platform_data = &gpio_exp[0], | ||
217 | .irq = IRQ_GPIO(18), | ||
218 | }, { | ||
219 | .type = "pca9539", | ||
220 | .addr = 0x75, | ||
221 | .platform_data = &gpio_exp[1], | ||
222 | .irq = IRQ_GPIO(19), | ||
223 | }, | ||
224 | }; | ||
225 | |||
226 | static void __init zylonite_init_i2c(void) | ||
227 | { | ||
228 | pxa_set_i2c_info(NULL); | ||
229 | i2c_register_board_info(0, ARRAY_AND_SIZE(zylonite_i2c_board_info)); | ||
230 | } | ||
231 | #else | ||
232 | static inline void zylonite_init_i2c(void) {} | ||
233 | #endif | ||
234 | |||
195 | void __init zylonite_pxa300_init(void) | 235 | void __init zylonite_pxa300_init(void) |
196 | { | 236 | { |
197 | if (cpu_is_pxa300() || cpu_is_pxa310()) { | 237 | if (cpu_is_pxa300() || cpu_is_pxa310()) { |
@@ -207,6 +247,8 @@ void __init zylonite_pxa300_init(void) | |||
207 | 247 | ||
208 | /* WM9713 IRQ */ | 248 | /* WM9713 IRQ */ |
209 | wm9713_irq = mfp_to_gpio(MFP_PIN_GPIO26); | 249 | wm9713_irq = mfp_to_gpio(MFP_PIN_GPIO26); |
250 | |||
251 | zylonite_init_i2c(); | ||
210 | } | 252 | } |
211 | 253 | ||
212 | if (cpu_is_pxa300()) { | 254 | if (cpu_is_pxa300()) { |
diff --git a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h index b6c8fe377683..d85736048461 100644 --- a/include/asm-arm/arch-pxa/irqs.h +++ b/include/asm-arm/arch-pxa/irqs.h | |||
@@ -184,6 +184,8 @@ | |||
184 | defined(CONFIG_MACH_PCM027) || \ | 184 | defined(CONFIG_MACH_PCM027) || \ |
185 | defined(CONFIG_MACH_MAGICIAN) | 185 | defined(CONFIG_MACH_MAGICIAN) |
186 | #define NR_IRQS (IRQ_BOARD_END) | 186 | #define NR_IRQS (IRQ_BOARD_END) |
187 | #elif defined(CONFIG_MACH_ZYLONITE) | ||
188 | #define NR_IRQS (IRQ_BOARD_START + 32) | ||
187 | #else | 189 | #else |
188 | #define NR_IRQS (IRQ_BOARD_START) | 190 | #define NR_IRQS (IRQ_BOARD_START) |
189 | #endif | 191 | #endif |