aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/lubbock.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/lubbock.c')
-rw-r--r--arch/arm/mach-pxa/lubbock.c121
1 files changed, 57 insertions, 64 deletions
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index e7ae4bb3e361..ca209c443f34 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -42,6 +42,7 @@
42 42
43#include <asm/arch/pxa-regs.h> 43#include <asm/arch/pxa-regs.h>
44#include <asm/arch/pxa2xx-regs.h> 44#include <asm/arch/pxa2xx-regs.h>
45#include <asm/arch/mfp-pxa25x.h>
45#include <asm/arch/lubbock.h> 46#include <asm/arch/lubbock.h>
46#include <asm/arch/udc.h> 47#include <asm/arch/udc.h>
47#include <asm/arch/irda.h> 48#include <asm/arch/irda.h>
@@ -51,6 +52,40 @@
51#include "generic.h" 52#include "generic.h"
52#include "devices.h" 53#include "devices.h"
53 54
55static unsigned long lubbock_pin_config[] __initdata = {
56 GPIO15_nCS_1, /* CS1 - Flash */
57 GPIO79_nCS_3, /* CS3 - SMC ethernet */
58
59 /* SSP data pins */
60 GPIO23_SSP1_SCLK,
61 GPIO25_SSP1_TXD,
62 GPIO26_SSP1_RXD,
63
64 /* BTUART */
65 GPIO42_BTUART_RXD,
66 GPIO43_BTUART_TXD,
67 GPIO44_BTUART_CTS,
68 GPIO45_BTUART_RTS,
69
70 /* PC Card */
71 GPIO48_nPOE,
72 GPIO49_nPWE,
73 GPIO50_nPIOR,
74 GPIO51_nPIOW,
75 GPIO52_nPCE_1,
76 GPIO53_nPCE_2,
77 GPIO54_nPSKTSEL,
78 GPIO55_nPREG,
79 GPIO56_nPWAIT,
80 GPIO57_nIOIS16,
81
82 /* MMC */
83 GPIO6_MMC_CLK,
84 GPIO8_MMC_CS0,
85
86 /* wakeup */
87 GPIO1_GPIO | WAKEUP_ON_EDGE_RISE,
88};
54 89
55#define LUB_MISC_WR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080) 90#define LUB_MISC_WR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080)
56 91
@@ -186,26 +221,6 @@ static struct platform_device sa1111_device = {
186 .resource = sa1111_resources, 221 .resource = sa1111_resources,
187}; 222};
188 223
189static struct resource smc91x_resources[] = {
190 [0] = {
191 .name = "smc91x-regs",
192 .start = 0x0c000c00,
193 .end = 0x0c0fffff,
194 .flags = IORESOURCE_MEM,
195 },
196 [1] = {
197 .start = LUBBOCK_ETH_IRQ,
198 .end = LUBBOCK_ETH_IRQ,
199 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
200 },
201 [2] = {
202 .name = "smc91x-attrib",
203 .start = 0x0e000000,
204 .end = 0x0e0fffff,
205 .flags = IORESOURCE_MEM,
206 },
207};
208
209/* ADS7846 is connected through SSP ... and if your board has J5 populated, 224/* ADS7846 is connected through SSP ... and if your board has J5 populated,
210 * you can select it to replace the ucb1400 by switching the touchscreen cable 225 * you can select it to replace the ucb1400 by switching the touchscreen cable
211 * (to J5) and poking board registers (as done below). Else it's only useful 226 * (to J5) and poking board registers (as done below). Else it's only useful
@@ -261,6 +276,26 @@ static struct spi_board_info spi_board_info[] __initdata = { {
261}, 276},
262}; 277};
263 278
279static struct resource smc91x_resources[] = {
280 [0] = {
281 .name = "smc91x-regs",
282 .start = 0x0c000c00,
283 .end = 0x0c0fffff,
284 .flags = IORESOURCE_MEM,
285 },
286 [1] = {
287 .start = LUBBOCK_ETH_IRQ,
288 .end = LUBBOCK_ETH_IRQ,
289 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
290 },
291 [2] = {
292 .name = "smc91x-attrib",
293 .start = 0x0e000000,
294 .end = 0x0e0fffff,
295 .flags = IORESOURCE_MEM,
296 },
297};
298
264static struct platform_device smc91x_device = { 299static struct platform_device smc91x_device = {
265 .name = "smc91x", 300 .name = "smc91x",
266 .id = -1, 301 .id = -1,
@@ -404,10 +439,6 @@ static int lubbock_mci_init(struct device *dev,
404 irq_handler_t detect_int, 439 irq_handler_t detect_int,
405 void *data) 440 void *data)
406{ 441{
407 /* setup GPIO for PXA25x MMC controller */
408 pxa_gpio_mode(GPIO6_MMCCLK_MD);
409 pxa_gpio_mode(GPIO8_MMCCS0_MD);
410
411 /* detect card insert/eject */ 442 /* detect card insert/eject */
412 mmc_detect_int = detect_int; 443 mmc_detect_int = detect_int;
413 init_timer(&mmc_timer); 444 init_timer(&mmc_timer);
@@ -457,6 +488,8 @@ static void __init lubbock_init(void)
457{ 488{
458 int flashboot = (LUB_CONF_SWITCHES & 1); 489 int flashboot = (LUB_CONF_SWITCHES & 1);
459 490
491 pxa2xx_mfp_config(ARRAY_AND_SIZE(lubbock_pin_config));
492
460 pxa_set_udc_info(&udc_info); 493 pxa_set_udc_info(&udc_info);
461 set_pxa_fb_info(&sharp_lm8v31); 494 set_pxa_fb_info(&sharp_lm8v31);
462 pxa_set_mci_info(&lubbock_mci_platform_data); 495 pxa_set_mci_info(&lubbock_mci_platform_data);
@@ -489,46 +522,6 @@ static void __init lubbock_map_io(void)
489 pxa_map_io(); 522 pxa_map_io();
490 iotable_init(lubbock_io_desc, ARRAY_SIZE(lubbock_io_desc)); 523 iotable_init(lubbock_io_desc, ARRAY_SIZE(lubbock_io_desc));
491 524
492 /* SSP data pins */
493 pxa_gpio_mode(GPIO23_SCLK_MD);
494 pxa_gpio_mode(GPIO25_STXD_MD);
495 pxa_gpio_mode(GPIO26_SRXD_MD);
496
497 /* This enables the BTUART */
498 pxa_gpio_mode(GPIO42_BTRXD_MD);
499 pxa_gpio_mode(GPIO43_BTTXD_MD);
500 pxa_gpio_mode(GPIO44_BTCTS_MD);
501 pxa_gpio_mode(GPIO45_BTRTS_MD);
502
503 GPSR(GPIO48_nPOE) =
504 GPIO_bit(GPIO48_nPOE) |
505 GPIO_bit(GPIO49_nPWE) |
506 GPIO_bit(GPIO50_nPIOR) |
507 GPIO_bit(GPIO51_nPIOW) |
508 GPIO_bit(GPIO52_nPCE_1) |
509 GPIO_bit(GPIO53_nPCE_2);
510
511 pxa_gpio_mode(GPIO48_nPOE_MD);
512 pxa_gpio_mode(GPIO49_nPWE_MD);
513 pxa_gpio_mode(GPIO50_nPIOR_MD);
514 pxa_gpio_mode(GPIO51_nPIOW_MD);
515 pxa_gpio_mode(GPIO52_nPCE_1_MD);
516 pxa_gpio_mode(GPIO53_nPCE_2_MD);
517 pxa_gpio_mode(GPIO54_pSKTSEL_MD);
518 pxa_gpio_mode(GPIO55_nPREG_MD);
519 pxa_gpio_mode(GPIO56_nPWAIT_MD);
520 pxa_gpio_mode(GPIO57_nIOIS16_MD);
521
522 /* This is for the SMC chip select */
523 pxa_gpio_mode(GPIO79_nCS_3_MD);
524
525 /* setup sleep mode values */
526 PWER = 0x00000002;
527 PFER = 0x00000000;
528 PRER = 0x00000002;
529 PGSR0 = 0x00008000;
530 PGSR1 = 0x003F0202;
531 PGSR2 = 0x0001C000;
532 PCFR |= PCFR_OPDE; 525 PCFR |= PCFR_OPDE;
533} 526}
534 527