diff options
-rw-r--r-- | arch/arm/mach-s3c2410/include/mach/gpio.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/mach-jive.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-anubis.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-at2440evb.c | 44 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/Kconfig | 21 |
6 files changed, 82 insertions, 2 deletions
diff --git a/arch/arm/mach-s3c2410/include/mach/gpio.h b/arch/arm/mach-s3c2410/include/mach/gpio.h index 3b52b86498a6..e0349af8a483 100644 --- a/arch/arm/mach-s3c2410/include/mach/gpio.h +++ b/arch/arm/mach-s3c2410/include/mach/gpio.h | |||
@@ -15,4 +15,10 @@ | |||
15 | #define gpio_set_value __gpio_set_value | 15 | #define gpio_set_value __gpio_set_value |
16 | #define gpio_cansleep __gpio_cansleep | 16 | #define gpio_cansleep __gpio_cansleep |
17 | 17 | ||
18 | /* some boards require extra gpio capacity to support external | ||
19 | * devices that need GPIO. | ||
20 | */ | ||
21 | |||
22 | #define ARCH_NR_GPIOS (256 + CONFIG_S3C24XX_GPIO_EXTRA) | ||
23 | |||
18 | #include <asm-generic/gpio.h> | 24 | #include <asm-generic/gpio.h> |
diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c index 25ff1ec9f8ad..5e758cf8bf82 100644 --- a/arch/arm/mach-s3c2412/mach-jive.c +++ b/arch/arm/mach-s3c2412/mach-jive.c | |||
@@ -398,11 +398,12 @@ static struct s3c2410_spigpio_info jive_lcd_spi = { | |||
398 | .bus_num = 1, | 398 | .bus_num = 1, |
399 | .pin_clk = S3C2410_GPG8, | 399 | .pin_clk = S3C2410_GPG8, |
400 | .pin_mosi = S3C2410_GPB8, | 400 | .pin_mosi = S3C2410_GPB8, |
401 | .num_chipselect = 1, | ||
401 | .chip_select = jive_lcd_spi_chipselect, | 402 | .chip_select = jive_lcd_spi_chipselect, |
402 | }; | 403 | }; |
403 | 404 | ||
404 | static struct platform_device jive_device_lcdspi = { | 405 | static struct platform_device jive_device_lcdspi = { |
405 | .name = "s3c24xx-spi-gpio", | 406 | .name = "spi_s3c24xx_gpio", |
406 | .id = 1, | 407 | .id = 1, |
407 | .num_resources = 0, | 408 | .num_resources = 0, |
408 | .dev.platform_data = &jive_lcd_spi, | 409 | .dev.platform_data = &jive_lcd_spi, |
@@ -419,11 +420,12 @@ static struct s3c2410_spigpio_info jive_wm8750_spi = { | |||
419 | .bus_num = 2, | 420 | .bus_num = 2, |
420 | .pin_clk = S3C2410_GPB4, | 421 | .pin_clk = S3C2410_GPB4, |
421 | .pin_mosi = S3C2410_GPB9, | 422 | .pin_mosi = S3C2410_GPB9, |
423 | .num_chipselect = 1, | ||
422 | .chip_select = jive_wm8750_chipselect, | 424 | .chip_select = jive_wm8750_chipselect, |
423 | }; | 425 | }; |
424 | 426 | ||
425 | static struct platform_device jive_device_wm8750 = { | 427 | static struct platform_device jive_device_wm8750 = { |
426 | .name = "s3c24xx-spi-gpio", | 428 | .name = "spi_s3c24xx_gpio", |
427 | .id = 2, | 429 | .id = 2, |
428 | .num_resources = 0, | 430 | .num_resources = 0, |
429 | .dev.platform_data = &jive_wm8750_spi, | 431 | .dev.platform_data = &jive_wm8750_spi, |
diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig index 57b9c57ff2b4..cde5ae9a4340 100644 --- a/arch/arm/mach-s3c2440/Kconfig +++ b/arch/arm/mach-s3c2440/Kconfig | |||
@@ -32,6 +32,7 @@ config MACH_ANUBIS | |||
32 | select S3C24XX_DCLK | 32 | select S3C24XX_DCLK |
33 | select PM_SIMTEC if PM | 33 | select PM_SIMTEC if PM |
34 | select HAVE_PATA_PLATFORM | 34 | select HAVE_PATA_PLATFORM |
35 | select S3C24XX_GPIO_EXTRA64 | ||
35 | help | 36 | help |
36 | Say Y here if you are using the Simtec Electronics ANUBIS | 37 | Say Y here if you are using the Simtec Electronics ANUBIS |
37 | development system | 38 | development system |
@@ -41,6 +42,7 @@ config MACH_OSIRIS | |||
41 | select CPU_S3C2440 | 42 | select CPU_S3C2440 |
42 | select S3C24XX_DCLK | 43 | select S3C24XX_DCLK |
43 | select PM_SIMTEC if PM | 44 | select PM_SIMTEC if PM |
45 | select S3C24XX_GPIO_EXTRA128 | ||
44 | help | 46 | help |
45 | Say Y here if you are using the Simtec IM2440D20 module, also | 47 | Say Y here if you are using the Simtec IM2440D20 module, also |
46 | known as the Osiris. | 48 | known as the Osiris. |
diff --git a/arch/arm/mach-s3c2440/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c index 334379bdfc6e..f151f8939929 100644 --- a/arch/arm/mach-s3c2440/mach-anubis.c +++ b/arch/arm/mach-s3c2440/mach-anubis.c | |||
@@ -366,6 +366,8 @@ static struct sm501_initdata anubis_sm501_initdata = { | |||
366 | .mask = 0, | 366 | .mask = 0, |
367 | }, | 367 | }, |
368 | 368 | ||
369 | .devices = SM501_USE_GPIO, | ||
370 | |||
369 | /* set the SDRAM and bus clocks */ | 371 | /* set the SDRAM and bus clocks */ |
370 | .mclk = 72 * MHZ, | 372 | .mclk = 72 * MHZ, |
371 | .m1xclk = 144 * MHZ, | 373 | .m1xclk = 144 * MHZ, |
@@ -373,10 +375,12 @@ static struct sm501_initdata anubis_sm501_initdata = { | |||
373 | 375 | ||
374 | static struct sm501_platdata_gpio_i2c anubis_sm501_gpio_i2c[] = { | 376 | static struct sm501_platdata_gpio_i2c anubis_sm501_gpio_i2c[] = { |
375 | [0] = { | 377 | [0] = { |
378 | .bus_num = 1, | ||
376 | .pin_scl = 44, | 379 | .pin_scl = 44, |
377 | .pin_sda = 45, | 380 | .pin_sda = 45, |
378 | }, | 381 | }, |
379 | [1] = { | 382 | [1] = { |
383 | .bus_num = 2, | ||
380 | .pin_scl = 40, | 384 | .pin_scl = 40, |
381 | .pin_sda = 41, | 385 | .pin_sda = 41, |
382 | }, | 386 | }, |
@@ -384,6 +388,7 @@ static struct sm501_platdata_gpio_i2c anubis_sm501_gpio_i2c[] = { | |||
384 | 388 | ||
385 | static struct sm501_platdata anubis_sm501_platdata = { | 389 | static struct sm501_platdata anubis_sm501_platdata = { |
386 | .init = &anubis_sm501_initdata, | 390 | .init = &anubis_sm501_initdata, |
391 | .gpio_base = -1, | ||
387 | .gpio_i2c = anubis_sm501_gpio_i2c, | 392 | .gpio_i2c = anubis_sm501_gpio_i2c, |
388 | .gpio_i2c_nr = ARRAY_SIZE(anubis_sm501_gpio_i2c), | 393 | .gpio_i2c_nr = ARRAY_SIZE(anubis_sm501_gpio_i2c), |
389 | }; | 394 | }; |
diff --git a/arch/arm/mach-s3c2440/mach-at2440evb.c b/arch/arm/mach-s3c2440/mach-at2440evb.c index 07b42a0207d1..4539b1d95877 100644 --- a/arch/arm/mach-s3c2440/mach-at2440evb.c +++ b/arch/arm/mach-s3c2440/mach-at2440evb.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/mach/irq.h> | 28 | #include <asm/mach/irq.h> |
29 | 29 | ||
30 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
31 | #include <mach/fb.h> | ||
31 | #include <asm/irq.h> | 32 | #include <asm/irq.h> |
32 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
33 | 34 | ||
@@ -45,6 +46,7 @@ | |||
45 | #include <plat/clock.h> | 46 | #include <plat/clock.h> |
46 | #include <plat/devs.h> | 47 | #include <plat/devs.h> |
47 | #include <plat/cpu.h> | 48 | #include <plat/cpu.h> |
49 | #include <asm/plat-s3c24xx/mci.h> | ||
48 | 50 | ||
49 | static struct map_desc at2440evb_iodesc[] __initdata = { | 51 | static struct map_desc at2440evb_iodesc[] __initdata = { |
50 | /* Nothing here */ | 52 | /* Nothing here */ |
@@ -162,6 +164,43 @@ static struct platform_device at2440evb_device_eth = { | |||
162 | }, | 164 | }, |
163 | }; | 165 | }; |
164 | 166 | ||
167 | static struct s3c24xx_mci_pdata at2440evb_mci_pdata = { | ||
168 | .gpio_detect = S3C2410_GPG10, | ||
169 | }; | ||
170 | |||
171 | /* 7" LCD panel */ | ||
172 | |||
173 | static struct s3c2410fb_display at2440evb_lcd_cfg __initdata = { | ||
174 | |||
175 | .lcdcon5 = S3C2410_LCDCON5_FRM565 | | ||
176 | S3C2410_LCDCON5_INVVLINE | | ||
177 | S3C2410_LCDCON5_INVVFRAME | | ||
178 | S3C2410_LCDCON5_PWREN | | ||
179 | S3C2410_LCDCON5_HWSWP, | ||
180 | |||
181 | .type = S3C2410_LCDCON1_TFT, | ||
182 | |||
183 | .width = 800, | ||
184 | .height = 480, | ||
185 | |||
186 | .pixclock = 33333, /* HCLK 60 MHz, divisor 2 */ | ||
187 | .xres = 800, | ||
188 | .yres = 480, | ||
189 | .bpp = 16, | ||
190 | .left_margin = 88, | ||
191 | .right_margin = 40, | ||
192 | .hsync_len = 128, | ||
193 | .upper_margin = 32, | ||
194 | .lower_margin = 11, | ||
195 | .vsync_len = 2, | ||
196 | }; | ||
197 | |||
198 | static struct s3c2410fb_mach_info at2440evb_fb_info __initdata = { | ||
199 | .displays = &at2440evb_lcd_cfg, | ||
200 | .num_displays = 1, | ||
201 | .default_display = 0, | ||
202 | }; | ||
203 | |||
165 | static struct platform_device *at2440evb_devices[] __initdata = { | 204 | static struct platform_device *at2440evb_devices[] __initdata = { |
166 | &s3c_device_usb, | 205 | &s3c_device_usb, |
167 | &s3c_device_wdt, | 206 | &s3c_device_wdt, |
@@ -169,12 +208,16 @@ static struct platform_device *at2440evb_devices[] __initdata = { | |||
169 | &s3c_device_i2c, | 208 | &s3c_device_i2c, |
170 | &s3c_device_rtc, | 209 | &s3c_device_rtc, |
171 | &s3c_device_nand, | 210 | &s3c_device_nand, |
211 | &s3c_device_sdi, | ||
212 | &s3c_device_lcd, | ||
172 | &at2440evb_device_eth, | 213 | &at2440evb_device_eth, |
173 | }; | 214 | }; |
174 | 215 | ||
175 | static void __init at2440evb_map_io(void) | 216 | static void __init at2440evb_map_io(void) |
176 | { | 217 | { |
177 | s3c_device_nand.dev.platform_data = &at2440evb_nand_info; | 218 | s3c_device_nand.dev.platform_data = &at2440evb_nand_info; |
219 | s3c_device_sdi.name = "s3c2440-sdi"; | ||
220 | s3c_device_sdi.dev.platform_data = &at2440evb_mci_pdata; | ||
178 | 221 | ||
179 | s3c24xx_init_io(at2440evb_iodesc, ARRAY_SIZE(at2440evb_iodesc)); | 222 | s3c24xx_init_io(at2440evb_iodesc, ARRAY_SIZE(at2440evb_iodesc)); |
180 | s3c24xx_init_clocks(16934400); | 223 | s3c24xx_init_clocks(16934400); |
@@ -183,6 +226,7 @@ static void __init at2440evb_map_io(void) | |||
183 | 226 | ||
184 | static void __init at2440evb_init(void) | 227 | static void __init at2440evb_init(void) |
185 | { | 228 | { |
229 | s3c24xx_fb_set_platdata(&at2440evb_fb_info); | ||
186 | platform_add_devices(at2440evb_devices, ARRAY_SIZE(at2440evb_devices)); | 230 | platform_add_devices(at2440evb_devices, ARRAY_SIZE(at2440evb_devices)); |
187 | } | 231 | } |
188 | 232 | ||
diff --git a/arch/arm/plat-s3c24xx/Kconfig b/arch/arm/plat-s3c24xx/Kconfig index 7d3d6eb5205e..0e07de2c9a9b 100644 --- a/arch/arm/plat-s3c24xx/Kconfig +++ b/arch/arm/plat-s3c24xx/Kconfig | |||
@@ -41,6 +41,27 @@ config S3C24XX_PWM | |||
41 | Support for exporting the PWM timer blocks via the pwm device | 41 | Support for exporting the PWM timer blocks via the pwm device |
42 | system. | 42 | system. |
43 | 43 | ||
44 | |||
45 | # gpio configurations | ||
46 | |||
47 | config S3C24XX_GPIO_EXTRA | ||
48 | int | ||
49 | default 128 if S3C24XX_GPIO_EXTRA128 | ||
50 | default 64 if S3C24XX_GPIO_EXTRA64 | ||
51 | default 0 | ||
52 | |||
53 | config S3C24XX_GPIO_EXTRA64 | ||
54 | bool | ||
55 | help | ||
56 | Add an extra 64 gpio numbers to the available GPIO pool. This is | ||
57 | available for boards that need extra gpios for external devices. | ||
58 | |||
59 | config S3C24XX_GPIO_EXTRA128 | ||
60 | bool | ||
61 | help | ||
62 | Add an extra 128 gpio numbers to the available GPIO pool. This is | ||
63 | available for boards that need extra gpios for external devices. | ||
64 | |||
44 | config PM_SIMTEC | 65 | config PM_SIMTEC |
45 | bool | 66 | bool |
46 | help | 67 | help |