diff options
Diffstat (limited to 'arch/arm/mach-pxa')
50 files changed, 2503 insertions, 605 deletions
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index dee92182749b..38fbd0a0e402 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -115,6 +115,11 @@ config MACH_CM_X300 | |||
115 | select CPU_PXA310 | 115 | select CPU_PXA310 |
116 | select HAVE_PWM | 116 | select HAVE_PWM |
117 | 117 | ||
118 | config MACH_CAPC7117 | ||
119 | bool "Embedian CAPC-7117 evaluation kit based on the MXM-8x10 CoM" | ||
120 | select CPU_PXA320 | ||
121 | select PXA3xx | ||
122 | |||
118 | config ARCH_GUMSTIX | 123 | config ARCH_GUMSTIX |
119 | bool "Gumstix XScale 255 boards" | 124 | bool "Gumstix XScale 255 boards" |
120 | select PXA25x | 125 | select PXA25x |
@@ -417,6 +422,24 @@ config MACH_TREO680 | |||
417 | Say Y here if you intend to run this kernel on Palm Treo 680 | 422 | Say Y here if you intend to run this kernel on Palm Treo 680 |
418 | smartphone. | 423 | smartphone. |
419 | 424 | ||
425 | config MACH_RAUMFELD_RC | ||
426 | bool "Raumfeld Controller" | ||
427 | select PXA3xx | ||
428 | select CPU_PXA300 | ||
429 | select HAVE_PWM | ||
430 | |||
431 | config MACH_RAUMFELD_CONNECTOR | ||
432 | bool "Raumfeld Connector" | ||
433 | select PXA3xx | ||
434 | select CPU_PXA300 | ||
435 | select PXA_SSP | ||
436 | |||
437 | config MACH_RAUMFELD_SPEAKER | ||
438 | bool "Raumfeld Speaker" | ||
439 | select PXA3xx | ||
440 | select CPU_PXA300 | ||
441 | select PXA_SSP | ||
442 | |||
420 | config PXA_SHARPSL | 443 | config PXA_SHARPSL |
421 | bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models" | 444 | bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models" |
422 | select SHARP_SCOOP | 445 | select SHARP_SCOOP |
@@ -435,6 +458,7 @@ config SHARPSL_PM | |||
435 | config CORGI_SSP_DEPRECATED | 458 | config CORGI_SSP_DEPRECATED |
436 | bool | 459 | bool |
437 | select PXA_SSP | 460 | select PXA_SSP |
461 | select PXA_SSP_LEGACY | ||
438 | help | 462 | help |
439 | This option will include corgi_ssp.c and corgi_lcd.c | 463 | This option will include corgi_ssp.c and corgi_lcd.c |
440 | that corgi_ts.c and other legacy drivers (corgi_bl.c | 464 | that corgi_ts.c and other legacy drivers (corgi_bl.c |
@@ -446,6 +470,7 @@ config MACH_POODLE | |||
446 | select PXA25x | 470 | select PXA25x |
447 | select SHARP_LOCOMO | 471 | select SHARP_LOCOMO |
448 | select PXA_SSP | 472 | select PXA_SSP |
473 | select PXA_HAVE_BOARD_IRQS | ||
449 | 474 | ||
450 | config MACH_CORGI | 475 | config MACH_CORGI |
451 | bool "Enable Sharp SL-C700 (Corgi) Support" | 476 | bool "Enable Sharp SL-C700 (Corgi) Support" |
@@ -492,6 +517,11 @@ config MACH_TOSA | |||
492 | select PXA25x | 517 | select PXA25x |
493 | select PXA_HAVE_BOARD_IRQS | 518 | select PXA_HAVE_BOARD_IRQS |
494 | 519 | ||
520 | config MACH_ICONTROL | ||
521 | bool "TMT iControl/SafeTCam based on the MXM-8x10 CoM" | ||
522 | select CPU_PXA320 | ||
523 | select PXA3xx | ||
524 | |||
495 | config ARCH_PXA_ESERIES | 525 | config ARCH_PXA_ESERIES |
496 | bool "PXA based Toshiba e-series PDAs" | 526 | bool "PXA based Toshiba e-series PDAs" |
497 | select PXA25x | 527 | select PXA25x |
@@ -629,6 +659,11 @@ config PXA_SSP | |||
629 | help | 659 | help |
630 | Enable support for PXA2xx SSP ports | 660 | Enable support for PXA2xx SSP ports |
631 | 661 | ||
662 | config PXA_SSP_LEGACY | ||
663 | bool | ||
664 | help | ||
665 | Support of legacy SSP API | ||
666 | |||
632 | config TOSA_BT | 667 | config TOSA_BT |
633 | tristate "Control the state of built-in bluetooth chip on Sharp SL-6000" | 668 | tristate "Control the state of built-in bluetooth chip on Sharp SL-6000" |
634 | depends on MACH_TOSA | 669 | depends on MACH_TOSA |
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index f64afda7e6f6..86bc87b7f2dd 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile | |||
@@ -48,6 +48,7 @@ obj-$(CONFIG_MACH_ARMCORE) += cm-x2xx-pci.o | |||
48 | endif | 48 | endif |
49 | obj-$(CONFIG_MACH_EM_X270) += em-x270.o | 49 | obj-$(CONFIG_MACH_EM_X270) += em-x270.o |
50 | obj-$(CONFIG_MACH_CM_X300) += cm-x300.o | 50 | obj-$(CONFIG_MACH_CM_X300) += cm-x300.o |
51 | obj-$(CONFIG_MACH_CAPC7117) += capc7117.o mxm8x10.o | ||
51 | obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o | 52 | obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o |
52 | obj-$(CONFIG_GUMSTIX_AM200EPD) += am200epd.o | 53 | obj-$(CONFIG_GUMSTIX_AM200EPD) += am200epd.o |
53 | obj-$(CONFIG_GUMSTIX_AM300EPD) += am300epd.o | 54 | obj-$(CONFIG_GUMSTIX_AM300EPD) += am300epd.o |
@@ -82,6 +83,7 @@ obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o sharpsl_pm.o spitz_pm.o | |||
82 | obj-$(CONFIG_CORGI_SSP_DEPRECATED) += corgi_ssp.o corgi_lcd.o | 83 | obj-$(CONFIG_CORGI_SSP_DEPRECATED) += corgi_ssp.o corgi_lcd.o |
83 | obj-$(CONFIG_MACH_POODLE) += poodle.o | 84 | obj-$(CONFIG_MACH_POODLE) += poodle.o |
84 | obj-$(CONFIG_MACH_TOSA) += tosa.o | 85 | obj-$(CONFIG_MACH_TOSA) += tosa.o |
86 | obj-$(CONFIG_MACH_ICONTROL) += icontrol.o mxm8x10.o | ||
85 | obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o | 87 | obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o |
86 | obj-$(CONFIG_MACH_E330) += e330.o | 88 | obj-$(CONFIG_MACH_E330) += e330.o |
87 | obj-$(CONFIG_MACH_E350) += e350.o | 89 | obj-$(CONFIG_MACH_E350) += e350.o |
@@ -89,6 +91,9 @@ obj-$(CONFIG_MACH_E740) += e740.o | |||
89 | obj-$(CONFIG_MACH_E750) += e750.o | 91 | obj-$(CONFIG_MACH_E750) += e750.o |
90 | obj-$(CONFIG_MACH_E400) += e400.o | 92 | obj-$(CONFIG_MACH_E400) += e400.o |
91 | obj-$(CONFIG_MACH_E800) += e800.o | 93 | obj-$(CONFIG_MACH_E800) += e800.o |
94 | obj-$(CONFIG_MACH_RAUMFELD_RC) += raumfeld.o | ||
95 | obj-$(CONFIG_MACH_RAUMFELD_CONNECTOR) += raumfeld.o | ||
96 | obj-$(CONFIG_MACH_RAUMFELD_SPEAKER) += raumfeld.o | ||
92 | 97 | ||
93 | # Support for blinky lights | 98 | # Support for blinky lights |
94 | led-y := leds.o | 99 | led-y := leds.o |
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index b8cd07ca9380..f3b5ace815e5 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c | |||
@@ -132,6 +132,14 @@ static void __init balloon3_init_irq(void) | |||
132 | "enabled\n", __func__, BALLOON3_AUX_NIRQ); | 132 | "enabled\n", __func__, BALLOON3_AUX_NIRQ); |
133 | } | 133 | } |
134 | 134 | ||
135 | static unsigned long balloon3_ac97_pin_config[] = { | ||
136 | GPIO28_AC97_BITCLK, | ||
137 | GPIO29_AC97_SDATA_IN_0, | ||
138 | GPIO30_AC97_SDATA_OUT, | ||
139 | GPIO31_AC97_SYNC, | ||
140 | GPIO113_AC97_nRESET, | ||
141 | }; | ||
142 | |||
135 | static void balloon3_backlight_power(int on) | 143 | static void balloon3_backlight_power(int on) |
136 | { | 144 | { |
137 | pr_debug("%s: power is %s\n", __func__, on ? "on" : "off"); | 145 | pr_debug("%s: power is %s\n", __func__, on ? "on" : "off"); |
@@ -140,26 +148,7 @@ static void balloon3_backlight_power(int on) | |||
140 | 148 | ||
141 | static unsigned long balloon3_lcd_pin_config[] = { | 149 | static unsigned long balloon3_lcd_pin_config[] = { |
142 | /* LCD - 16bpp Active TFT */ | 150 | /* LCD - 16bpp Active TFT */ |
143 | GPIO58_LCD_LDD_0, | 151 | GPIOxx_LCD_TFT_16BPP, |
144 | GPIO59_LCD_LDD_1, | ||
145 | GPIO60_LCD_LDD_2, | ||
146 | GPIO61_LCD_LDD_3, | ||
147 | GPIO62_LCD_LDD_4, | ||
148 | GPIO63_LCD_LDD_5, | ||
149 | GPIO64_LCD_LDD_6, | ||
150 | GPIO65_LCD_LDD_7, | ||
151 | GPIO66_LCD_LDD_8, | ||
152 | GPIO67_LCD_LDD_9, | ||
153 | GPIO68_LCD_LDD_10, | ||
154 | GPIO69_LCD_LDD_11, | ||
155 | GPIO70_LCD_LDD_12, | ||
156 | GPIO71_LCD_LDD_13, | ||
157 | GPIO72_LCD_LDD_14, | ||
158 | GPIO73_LCD_LDD_15, | ||
159 | GPIO74_LCD_FCLK, | ||
160 | GPIO75_LCD_LCLK, | ||
161 | GPIO76_LCD_PCLK, | ||
162 | GPIO77_LCD_BIAS, | ||
163 | 152 | ||
164 | GPIO99_GPIO, /* Backlight */ | 153 | GPIO99_GPIO, /* Backlight */ |
165 | }; | 154 | }; |
@@ -311,8 +300,10 @@ static void __init balloon3_init(void) | |||
311 | pxa_set_stuart_info(NULL); | 300 | pxa_set_stuart_info(NULL); |
312 | 301 | ||
313 | pxa_set_i2c_info(NULL); | 302 | pxa_set_i2c_info(NULL); |
314 | if (balloon3_has(BALLOON3_FEATURE_AUDIO)) | 303 | if (balloon3_has(BALLOON3_FEATURE_AUDIO)) { |
304 | pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_ac97_pin_config)); | ||
315 | pxa_set_ac97_info(NULL); | 305 | pxa_set_ac97_info(NULL); |
306 | } | ||
316 | 307 | ||
317 | if (balloon3_has(BALLOON3_FEATURE_TOPPOLY)) { | 308 | if (balloon3_has(BALLOON3_FEATURE_TOPPOLY)) { |
318 | pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_lcd_pin_config)); | 309 | pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_lcd_pin_config)); |
diff --git a/arch/arm/mach-pxa/capc7117.c b/arch/arm/mach-pxa/capc7117.c new file mode 100644 index 000000000000..aae544631a8b --- /dev/null +++ b/arch/arm/mach-pxa/capc7117.c | |||
@@ -0,0 +1,158 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-pxa/capc7117.c | ||
3 | * | ||
4 | * Support for the Embedian CAPC-7117 Evaluation Kit | ||
5 | * based on the Embedian MXM-8x10 Computer on Module | ||
6 | * | ||
7 | * Copyright (C) 2009 Embedian Inc. | ||
8 | * Copyright (C) 2009 TMT Services & Supplies (Pty) Ltd. | ||
9 | * | ||
10 | * 2007-09-04: eric miao <eric.y.miao@gmail.com> | ||
11 | * rewrite to align with latest kernel | ||
12 | * | ||
13 | * 2010-01-09: Edwin Peer <epeer@tmtservices.co.za> | ||
14 | * Hennie van der Merwe <hvdmerwe@tmtservices.co.za> | ||
15 | * rework for upstream merge | ||
16 | * | ||
17 | * This program is free software; you can redistribute it and/or modify | ||
18 | * it under the terms of the GNU General Public License version 2 as | ||
19 | * published by the Free Software Foundation. | ||
20 | */ | ||
21 | |||
22 | #include <linux/irq.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | #include <linux/ata_platform.h> | ||
25 | #include <linux/serial_8250.h> | ||
26 | #include <linux/gpio.h> | ||
27 | |||
28 | #include <asm/mach-types.h> | ||
29 | #include <asm/mach/arch.h> | ||
30 | |||
31 | #include <mach/pxa320.h> | ||
32 | #include <mach/mxm8x10.h> | ||
33 | |||
34 | #include "generic.h" | ||
35 | |||
36 | /* IDE (PATA) Support */ | ||
37 | static struct pata_platform_info pata_platform_data = { | ||
38 | .ioport_shift = 1 | ||
39 | }; | ||
40 | |||
41 | static struct resource capc7117_ide_resources[] = { | ||
42 | [0] = { | ||
43 | .start = 0x11000020, | ||
44 | .end = 0x1100003f, | ||
45 | .flags = IORESOURCE_MEM | ||
46 | }, | ||
47 | [1] = { | ||
48 | .start = 0x1100001c, | ||
49 | .end = 0x1100001c, | ||
50 | .flags = IORESOURCE_MEM | ||
51 | }, | ||
52 | [2] = { | ||
53 | .start = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO76)), | ||
54 | .end = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO76)), | ||
55 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_RISING | ||
56 | } | ||
57 | }; | ||
58 | |||
59 | static struct platform_device capc7117_ide_device = { | ||
60 | .name = "pata_platform", | ||
61 | .num_resources = ARRAY_SIZE(capc7117_ide_resources), | ||
62 | .resource = capc7117_ide_resources, | ||
63 | .dev = { | ||
64 | .platform_data = &pata_platform_data, | ||
65 | .coherent_dma_mask = ~0 /* grumble */ | ||
66 | } | ||
67 | }; | ||
68 | |||
69 | static void __init capc7117_ide_init(void) | ||
70 | { | ||
71 | platform_device_register(&capc7117_ide_device); | ||
72 | } | ||
73 | |||
74 | /* TI16C752 UART support */ | ||
75 | #define TI16C752_FLAGS (UPF_BOOT_AUTOCONF | \ | ||
76 | UPF_IOREMAP | \ | ||
77 | UPF_BUGGY_UART | \ | ||
78 | UPF_SKIP_TEST) | ||
79 | #define TI16C752_UARTCLK (22118400) | ||
80 | static struct plat_serial8250_port ti16c752_platform_data[] = { | ||
81 | [0] = { | ||
82 | .mapbase = 0x14000000, | ||
83 | .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO78)), | ||
84 | .irqflags = IRQF_TRIGGER_RISING, | ||
85 | .flags = TI16C752_FLAGS, | ||
86 | .iotype = UPIO_MEM, | ||
87 | .regshift = 1, | ||
88 | .uartclk = TI16C752_UARTCLK | ||
89 | }, | ||
90 | [1] = { | ||
91 | .mapbase = 0x14000040, | ||
92 | .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO79)), | ||
93 | .irqflags = IRQF_TRIGGER_RISING, | ||
94 | .flags = TI16C752_FLAGS, | ||
95 | .iotype = UPIO_MEM, | ||
96 | .regshift = 1, | ||
97 | .uartclk = TI16C752_UARTCLK | ||
98 | }, | ||
99 | [2] = { | ||
100 | .mapbase = 0x14000080, | ||
101 | .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO80)), | ||
102 | .irqflags = IRQF_TRIGGER_RISING, | ||
103 | .flags = TI16C752_FLAGS, | ||
104 | .iotype = UPIO_MEM, | ||
105 | .regshift = 1, | ||
106 | .uartclk = TI16C752_UARTCLK | ||
107 | }, | ||
108 | [3] = { | ||
109 | .mapbase = 0x140000c0, | ||
110 | .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO81)), | ||
111 | .irqflags = IRQF_TRIGGER_RISING, | ||
112 | .flags = TI16C752_FLAGS, | ||
113 | .iotype = UPIO_MEM, | ||
114 | .regshift = 1, | ||
115 | .uartclk = TI16C752_UARTCLK | ||
116 | }, | ||
117 | [4] = { | ||
118 | /* end of array */ | ||
119 | } | ||
120 | }; | ||
121 | |||
122 | static struct platform_device ti16c752_device = { | ||
123 | .name = "serial8250", | ||
124 | .id = PLAT8250_DEV_PLATFORM, | ||
125 | .dev = { | ||
126 | .platform_data = ti16c752_platform_data | ||
127 | } | ||
128 | }; | ||
129 | |||
130 | static void __init capc7117_uarts_init(void) | ||
131 | { | ||
132 | platform_device_register(&ti16c752_device); | ||
133 | } | ||
134 | |||
135 | static void __init capc7117_init(void) | ||
136 | { | ||
137 | /* Init CoM */ | ||
138 | mxm_8x10_barebones_init(); | ||
139 | |||
140 | /* Init evaluation board peripherals */ | ||
141 | mxm_8x10_ac97_init(); | ||
142 | mxm_8x10_usb_host_init(); | ||
143 | mxm_8x10_mmc_init(); | ||
144 | |||
145 | capc7117_uarts_init(); | ||
146 | capc7117_ide_init(); | ||
147 | } | ||
148 | |||
149 | MACHINE_START(CAPC7117, | ||
150 | "Embedian CAPC-7117 evaluation kit based on the MXM-8x10 CoM") | ||
151 | .phys_io = 0x40000000, | ||
152 | .boot_params = 0xa0000100, | ||
153 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | ||
154 | .map_io = pxa_map_io, | ||
155 | .init_irq = pxa3xx_init_irq, | ||
156 | .timer = &pxa_timer, | ||
157 | .init_machine = capc7117_init | ||
158 | MACHINE_END | ||
diff --git a/arch/arm/mach-pxa/cm-x255.c b/arch/arm/mach-pxa/cm-x255.c index 253fd76142d6..f1a7703d771b 100644 --- a/arch/arm/mach-pxa/cm-x255.c +++ b/arch/arm/mach-pxa/cm-x255.c | |||
@@ -50,26 +50,7 @@ static unsigned long cmx255_pin_config[] = { | |||
50 | GPIO47_STUART_TXD, | 50 | GPIO47_STUART_TXD, |
51 | 51 | ||
52 | /* LCD */ | 52 | /* LCD */ |
53 | GPIO58_LCD_LDD_0, | 53 | GPIOxx_LCD_TFT_16BPP, |
54 | GPIO59_LCD_LDD_1, | ||
55 | GPIO60_LCD_LDD_2, | ||
56 | GPIO61_LCD_LDD_3, | ||
57 | GPIO62_LCD_LDD_4, | ||
58 | GPIO63_LCD_LDD_5, | ||
59 | GPIO64_LCD_LDD_6, | ||
60 | GPIO65_LCD_LDD_7, | ||
61 | GPIO66_LCD_LDD_8, | ||
62 | GPIO67_LCD_LDD_9, | ||
63 | GPIO68_LCD_LDD_10, | ||
64 | GPIO69_LCD_LDD_11, | ||
65 | GPIO70_LCD_LDD_12, | ||
66 | GPIO71_LCD_LDD_13, | ||
67 | GPIO72_LCD_LDD_14, | ||
68 | GPIO73_LCD_LDD_15, | ||
69 | GPIO74_LCD_FCLK, | ||
70 | GPIO75_LCD_LCLK, | ||
71 | GPIO76_LCD_PCLK, | ||
72 | GPIO77_LCD_BIAS, | ||
73 | 54 | ||
74 | /* SSP1 */ | 55 | /* SSP1 */ |
75 | GPIO23_SSP1_SCLK, | 56 | GPIO23_SSP1_SCLK, |
diff --git a/arch/arm/mach-pxa/cm-x270.c b/arch/arm/mach-pxa/cm-x270.c index eea78b6c2bc5..a9926bb75922 100644 --- a/arch/arm/mach-pxa/cm-x270.c +++ b/arch/arm/mach-pxa/cm-x270.c | |||
@@ -71,26 +71,7 @@ static unsigned long cmx270_pin_config[] = { | |||
71 | GPIO111_MMC_DAT_3, | 71 | GPIO111_MMC_DAT_3, |
72 | 72 | ||
73 | /* LCD */ | 73 | /* LCD */ |
74 | GPIO58_LCD_LDD_0, | 74 | GPIOxx_LCD_TFT_16BPP, |
75 | GPIO59_LCD_LDD_1, | ||
76 | GPIO60_LCD_LDD_2, | ||
77 | GPIO61_LCD_LDD_3, | ||
78 | GPIO62_LCD_LDD_4, | ||
79 | GPIO63_LCD_LDD_5, | ||
80 | GPIO64_LCD_LDD_6, | ||
81 | GPIO65_LCD_LDD_7, | ||
82 | GPIO66_LCD_LDD_8, | ||
83 | GPIO67_LCD_LDD_9, | ||
84 | GPIO68_LCD_LDD_10, | ||
85 | GPIO69_LCD_LDD_11, | ||
86 | GPIO70_LCD_LDD_12, | ||
87 | GPIO71_LCD_LDD_13, | ||
88 | GPIO72_LCD_LDD_14, | ||
89 | GPIO73_LCD_LDD_15, | ||
90 | GPIO74_LCD_FCLK, | ||
91 | GPIO75_LCD_LCLK, | ||
92 | GPIO76_LCD_PCLK, | ||
93 | GPIO77_LCD_BIAS, | ||
94 | 75 | ||
95 | /* I2C */ | 76 | /* I2C */ |
96 | GPIO117_I2C_SCL, | 77 | GPIO117_I2C_SCL, |
@@ -195,33 +176,57 @@ static struct resource cmx270_2700G_resource[] = { | |||
195 | }, | 176 | }, |
196 | }; | 177 | }; |
197 | 178 | ||
198 | static unsigned long save_lcd_regs[10]; | 179 | static unsigned long cmx270_marathon_on[] = { |
180 | GPIO58_GPIO, | ||
181 | GPIO59_GPIO, | ||
182 | GPIO60_GPIO, | ||
183 | GPIO61_GPIO, | ||
184 | GPIO62_GPIO, | ||
185 | GPIO63_GPIO, | ||
186 | GPIO64_GPIO, | ||
187 | GPIO65_GPIO, | ||
188 | GPIO66_GPIO, | ||
189 | GPIO67_GPIO, | ||
190 | GPIO68_GPIO, | ||
191 | GPIO69_GPIO, | ||
192 | GPIO70_GPIO, | ||
193 | GPIO71_GPIO, | ||
194 | GPIO72_GPIO, | ||
195 | GPIO73_GPIO, | ||
196 | GPIO74_GPIO, | ||
197 | GPIO75_GPIO, | ||
198 | GPIO76_GPIO, | ||
199 | GPIO77_GPIO, | ||
200 | }; | ||
201 | |||
202 | static unsigned long cmx270_marathon_off[] = { | ||
203 | GPIOxx_LCD_TFT_16BPP, | ||
204 | }; | ||
199 | 205 | ||
200 | static int cmx270_marathon_probe(struct fb_info *fb) | 206 | static int cmx270_marathon_probe(struct fb_info *fb) |
201 | { | 207 | { |
202 | /* save PXA-270 pin settings before enabling 2700G */ | 208 | int gpio, err; |
203 | save_lcd_regs[0] = GPDR1; | 209 | |
204 | save_lcd_regs[1] = GPDR2; | 210 | for (gpio = 58; gpio <= 77; gpio++) { |
205 | save_lcd_regs[2] = GAFR1_U; | 211 | err = gpio_request(gpio, "LCD"); |
206 | save_lcd_regs[3] = GAFR2_L; | 212 | if (err) |
207 | save_lcd_regs[4] = GAFR2_U; | 213 | return err; |
208 | 214 | gpio_direction_input(gpio); | |
209 | /* Disable PXA-270 on-chip controller driving pins */ | 215 | } |
210 | GPDR1 &= ~(0xfc000000); | 216 | |
211 | GPDR2 &= ~(0x00c03fff); | 217 | pxa2xx_mfp_config(ARRAY_AND_SIZE(cmx270_marathon_on)); |
212 | GAFR1_U &= ~(0xfff00000); | ||
213 | GAFR2_L &= ~(0x0fffffff); | ||
214 | GAFR2_U &= ~(0x0000f000); | ||
215 | return 0; | 218 | return 0; |
216 | } | 219 | } |
217 | 220 | ||
218 | static int cmx270_marathon_remove(struct fb_info *fb) | 221 | static int cmx270_marathon_remove(struct fb_info *fb) |
219 | { | 222 | { |
220 | GPDR1 = save_lcd_regs[0]; | 223 | int gpio; |
221 | GPDR2 = save_lcd_regs[1]; | 224 | |
222 | GAFR1_U = save_lcd_regs[2]; | 225 | pxa2xx_mfp_config(ARRAY_AND_SIZE(cmx270_marathon_off)); |
223 | GAFR2_L = save_lcd_regs[3]; | 226 | |
224 | GAFR2_U = save_lcd_regs[4]; | 227 | for (gpio = 58; gpio <= 77; gpio++) |
228 | gpio_free(gpio); | ||
229 | |||
225 | return 0; | 230 | return 0; |
226 | } | 231 | } |
227 | 232 | ||
diff --git a/arch/arm/mach-pxa/cm-x2xx-pci.c b/arch/arm/mach-pxa/cm-x2xx-pci.c index 7873fa3d8fa4..161fc2d61207 100644 --- a/arch/arm/mach-pxa/cm-x2xx-pci.c +++ b/arch/arm/mach-pxa/cm-x2xx-pci.c | |||
@@ -59,7 +59,7 @@ void __init cmx2xx_pci_adjust_zones(int node, unsigned long *zone_size, | |||
59 | static void cmx2xx_it8152_irq_demux(unsigned int irq, struct irq_desc *desc) | 59 | static void cmx2xx_it8152_irq_demux(unsigned int irq, struct irq_desc *desc) |
60 | { | 60 | { |
61 | /* clear our parent irq */ | 61 | /* clear our parent irq */ |
62 | GEDR(cmx2xx_it8152_irq_gpio) = GPIO_bit(cmx2xx_it8152_irq_gpio); | 62 | desc->chip->ack(irq); |
63 | 63 | ||
64 | it8152_irq_demux(irq, desc); | 64 | it8152_irq_demux(irq, desc); |
65 | } | 65 | } |
diff --git a/arch/arm/mach-pxa/e740.c b/arch/arm/mach-pxa/e740.c index 94b23a9e3877..d578021d1a10 100644 --- a/arch/arm/mach-pxa/e740.c +++ b/arch/arm/mach-pxa/e740.c | |||
@@ -134,6 +134,12 @@ static unsigned long e740_pin_config[] __initdata = { | |||
134 | /* IrDA */ | 134 | /* IrDA */ |
135 | GPIO38_GPIO | MFP_LPM_DRIVE_HIGH, | 135 | GPIO38_GPIO | MFP_LPM_DRIVE_HIGH, |
136 | 136 | ||
137 | /* AC97 */ | ||
138 | GPIO28_AC97_BITCLK, | ||
139 | GPIO29_AC97_SDATA_IN_0, | ||
140 | GPIO30_AC97_SDATA_OUT, | ||
141 | GPIO31_AC97_SYNC, | ||
142 | |||
137 | /* Audio power control */ | 143 | /* Audio power control */ |
138 | GPIO16_GPIO, /* AC97 codec AVDD2 supply (analogue power) */ | 144 | GPIO16_GPIO, /* AC97 codec AVDD2 supply (analogue power) */ |
139 | GPIO40_GPIO, /* Mic amp power */ | 145 | GPIO40_GPIO, /* Mic amp power */ |
diff --git a/arch/arm/mach-pxa/e750.c b/arch/arm/mach-pxa/e750.c index 5eccbce73a33..af83caa52dd4 100644 --- a/arch/arm/mach-pxa/e750.c +++ b/arch/arm/mach-pxa/e750.c | |||
@@ -132,6 +132,12 @@ static unsigned long e750_pin_config[] __initdata = { | |||
132 | /* IrDA */ | 132 | /* IrDA */ |
133 | GPIO38_GPIO | MFP_LPM_DRIVE_HIGH, | 133 | GPIO38_GPIO | MFP_LPM_DRIVE_HIGH, |
134 | 134 | ||
135 | /* AC97 */ | ||
136 | GPIO28_AC97_BITCLK, | ||
137 | GPIO29_AC97_SDATA_IN_0, | ||
138 | GPIO30_AC97_SDATA_OUT, | ||
139 | GPIO31_AC97_SYNC, | ||
140 | |||
135 | /* Audio power control */ | 141 | /* Audio power control */ |
136 | GPIO4_GPIO, /* Headphone amp power */ | 142 | GPIO4_GPIO, /* Headphone amp power */ |
137 | GPIO7_GPIO, /* Speaker amp power */ | 143 | GPIO7_GPIO, /* Speaker amp power */ |
diff --git a/arch/arm/mach-pxa/e800.c b/arch/arm/mach-pxa/e800.c index aad129bed199..8ea97bf53fe1 100644 --- a/arch/arm/mach-pxa/e800.c +++ b/arch/arm/mach-pxa/e800.c | |||
@@ -35,6 +35,14 @@ | |||
35 | 35 | ||
36 | /* ------------------------ e800 LCD definitions ------------------------- */ | 36 | /* ------------------------ e800 LCD definitions ------------------------- */ |
37 | 37 | ||
38 | static unsigned long e800_pin_config[] __initdata = { | ||
39 | /* AC97 */ | ||
40 | GPIO28_AC97_BITCLK, | ||
41 | GPIO29_AC97_SDATA_IN_0, | ||
42 | GPIO30_AC97_SDATA_OUT, | ||
43 | GPIO31_AC97_SYNC, | ||
44 | }; | ||
45 | |||
38 | static struct w100_gen_regs e800_lcd_regs = { | 46 | static struct w100_gen_regs e800_lcd_regs = { |
39 | .lcd_format = 0x00008003, | 47 | .lcd_format = 0x00008003, |
40 | .lcdd_cntl1 = 0x02a00000, | 48 | .lcdd_cntl1 = 0x02a00000, |
@@ -195,6 +203,7 @@ static struct platform_device *devices[] __initdata = { | |||
195 | 203 | ||
196 | static void __init e800_init(void) | 204 | static void __init e800_init(void) |
197 | { | 205 | { |
206 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e800_pin_config)); | ||
198 | pxa_set_ffuart_info(NULL); | 207 | pxa_set_ffuart_info(NULL); |
199 | pxa_set_btuart_info(NULL); | 208 | pxa_set_btuart_info(NULL); |
200 | pxa_set_stuart_info(NULL); | 209 | pxa_set_stuart_info(NULL); |
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index c8a01bc85fde..aab04f33e49b 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c | |||
@@ -109,26 +109,7 @@ static unsigned long common_pin_config[] = { | |||
109 | GPIO111_MMC_DAT_3, | 109 | GPIO111_MMC_DAT_3, |
110 | 110 | ||
111 | /* LCD */ | 111 | /* LCD */ |
112 | GPIO58_LCD_LDD_0, | 112 | GPIOxx_LCD_TFT_16BPP, |
113 | GPIO59_LCD_LDD_1, | ||
114 | GPIO60_LCD_LDD_2, | ||
115 | GPIO61_LCD_LDD_3, | ||
116 | GPIO62_LCD_LDD_4, | ||
117 | GPIO63_LCD_LDD_5, | ||
118 | GPIO64_LCD_LDD_6, | ||
119 | GPIO65_LCD_LDD_7, | ||
120 | GPIO66_LCD_LDD_8, | ||
121 | GPIO67_LCD_LDD_9, | ||
122 | GPIO68_LCD_LDD_10, | ||
123 | GPIO69_LCD_LDD_11, | ||
124 | GPIO70_LCD_LDD_12, | ||
125 | GPIO71_LCD_LDD_13, | ||
126 | GPIO72_LCD_LDD_14, | ||
127 | GPIO73_LCD_LDD_15, | ||
128 | GPIO74_LCD_FCLK, | ||
129 | GPIO75_LCD_LCLK, | ||
130 | GPIO76_LCD_PCLK, | ||
131 | GPIO77_LCD_BIAS, | ||
132 | 113 | ||
133 | /* QCI */ | 114 | /* QCI */ |
134 | GPIO84_CIF_FV, | 115 | GPIO84_CIF_FV, |
diff --git a/arch/arm/mach-pxa/icontrol.c b/arch/arm/mach-pxa/icontrol.c new file mode 100644 index 000000000000..771137fc1a82 --- /dev/null +++ b/arch/arm/mach-pxa/icontrol.c | |||
@@ -0,0 +1,202 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-pxa/icontrol.c | ||
3 | * | ||
4 | * Support for the iControl and SafeTcam platforms from TMT Services | ||
5 | * using the Embedian MXM-8x10 Computer on Module | ||
6 | * | ||
7 | * Copyright (C) 2009 TMT Services & Supplies (Pty) Ltd. | ||
8 | * | ||
9 | * 2010-01-21 Hennie van der Merve <hvdmerwe@tmtservies.co.za> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | */ | ||
15 | |||
16 | #include <linux/irq.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | #include <linux/gpio.h> | ||
19 | |||
20 | #include <asm/mach-types.h> | ||
21 | #include <asm/mach/arch.h> | ||
22 | |||
23 | #include <mach/pxa320.h> | ||
24 | #include <mach/mxm8x10.h> | ||
25 | |||
26 | #include <linux/spi/spi.h> | ||
27 | #include <mach/pxa2xx_spi.h> | ||
28 | #include <linux/can/platform/mcp251x.h> | ||
29 | |||
30 | #include "generic.h" | ||
31 | |||
32 | #define ICONTROL_MCP251x_nCS1 (15) | ||
33 | #define ICONTROL_MCP251x_nCS2 (16) | ||
34 | #define ICONTROL_MCP251x_nCS3 (17) | ||
35 | #define ICONTROL_MCP251x_nCS4 (24) | ||
36 | |||
37 | #define ICONTROL_MCP251x_nIRQ1 (74) | ||
38 | #define ICONTROL_MCP251x_nIRQ2 (75) | ||
39 | #define ICONTROL_MCP251x_nIRQ3 (76) | ||
40 | #define ICONTROL_MCP251x_nIRQ4 (77) | ||
41 | |||
42 | static struct pxa2xx_spi_chip mcp251x_chip_info1 = { | ||
43 | .tx_threshold = 8, | ||
44 | .rx_threshold = 128, | ||
45 | .dma_burst_size = 8, | ||
46 | .timeout = 235, | ||
47 | .gpio_cs = ICONTROL_MCP251x_nCS1 | ||
48 | }; | ||
49 | |||
50 | static struct pxa2xx_spi_chip mcp251x_chip_info2 = { | ||
51 | .tx_threshold = 8, | ||
52 | .rx_threshold = 128, | ||
53 | .dma_burst_size = 8, | ||
54 | .timeout = 235, | ||
55 | .gpio_cs = ICONTROL_MCP251x_nCS2 | ||
56 | }; | ||
57 | |||
58 | static struct pxa2xx_spi_chip mcp251x_chip_info3 = { | ||
59 | .tx_threshold = 8, | ||
60 | .rx_threshold = 128, | ||
61 | .dma_burst_size = 8, | ||
62 | .timeout = 235, | ||
63 | .gpio_cs = ICONTROL_MCP251x_nCS3 | ||
64 | }; | ||
65 | |||
66 | static struct pxa2xx_spi_chip mcp251x_chip_info4 = { | ||
67 | .tx_threshold = 8, | ||
68 | .rx_threshold = 128, | ||
69 | .dma_burst_size = 8, | ||
70 | .timeout = 235, | ||
71 | .gpio_cs = ICONTROL_MCP251x_nCS4 | ||
72 | }; | ||
73 | |||
74 | static struct mcp251x_platform_data mcp251x_info = { | ||
75 | .oscillator_frequency = 16E6, | ||
76 | .model = CAN_MCP251X_MCP2515, | ||
77 | .board_specific_setup = NULL, | ||
78 | .power_enable = NULL, | ||
79 | .transceiver_enable = NULL | ||
80 | }; | ||
81 | |||
82 | static struct spi_board_info mcp251x_board_info[] = { | ||
83 | { | ||
84 | .modalias = "mcp251x", | ||
85 | .max_speed_hz = 6500000, | ||
86 | .bus_num = 3, | ||
87 | .chip_select = 0, | ||
88 | .platform_data = &mcp251x_info, | ||
89 | .controller_data = &mcp251x_chip_info1, | ||
90 | .irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ1) | ||
91 | }, | ||
92 | { | ||
93 | .modalias = "mcp251x", | ||
94 | .max_speed_hz = 6500000, | ||
95 | .bus_num = 3, | ||
96 | .chip_select = 1, | ||
97 | .platform_data = &mcp251x_info, | ||
98 | .controller_data = &mcp251x_chip_info2, | ||
99 | .irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ2) | ||
100 | }, | ||
101 | { | ||
102 | .modalias = "mcp251x", | ||
103 | .max_speed_hz = 6500000, | ||
104 | .bus_num = 4, | ||
105 | .chip_select = 0, | ||
106 | .platform_data = &mcp251x_info, | ||
107 | .controller_data = &mcp251x_chip_info3, | ||
108 | .irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ3) | ||
109 | }, | ||
110 | { | ||
111 | .modalias = "mcp251x", | ||
112 | .max_speed_hz = 6500000, | ||
113 | .bus_num = 4, | ||
114 | .chip_select = 1, | ||
115 | .platform_data = &mcp251x_info, | ||
116 | .controller_data = &mcp251x_chip_info4, | ||
117 | .irq = gpio_to_irq(ICONTROL_MCP251x_nIRQ4) | ||
118 | } | ||
119 | }; | ||
120 | |||
121 | static struct pxa2xx_spi_master pxa_ssp3_spi_master_info = { | ||
122 | .clock_enable = CKEN_SSP3, | ||
123 | .num_chipselect = 2, | ||
124 | .enable_dma = 1 | ||
125 | }; | ||
126 | |||
127 | static struct pxa2xx_spi_master pxa_ssp4_spi_master_info = { | ||
128 | .clock_enable = CKEN_SSP4, | ||
129 | .num_chipselect = 2, | ||
130 | .enable_dma = 1 | ||
131 | }; | ||
132 | |||
133 | struct platform_device pxa_spi_ssp3 = { | ||
134 | .name = "pxa2xx-spi", | ||
135 | .id = 3, | ||
136 | .dev = { | ||
137 | .platform_data = &pxa_ssp3_spi_master_info, | ||
138 | } | ||
139 | }; | ||
140 | |||
141 | struct platform_device pxa_spi_ssp4 = { | ||
142 | .name = "pxa2xx-spi", | ||
143 | .id = 4, | ||
144 | .dev = { | ||
145 | .platform_data = &pxa_ssp4_spi_master_info, | ||
146 | } | ||
147 | }; | ||
148 | |||
149 | static struct platform_device *icontrol_spi_devices[] __initdata = { | ||
150 | &pxa_spi_ssp3, | ||
151 | &pxa_spi_ssp4, | ||
152 | }; | ||
153 | |||
154 | static mfp_cfg_t mfp_can_cfg[] __initdata = { | ||
155 | /* CAN CS lines */ | ||
156 | GPIO15_GPIO, | ||
157 | GPIO16_GPIO, | ||
158 | GPIO17_GPIO, | ||
159 | GPIO24_GPIO, | ||
160 | |||
161 | /* SPI (SSP3) lines */ | ||
162 | GPIO89_SSP3_SCLK, | ||
163 | GPIO91_SSP3_TXD, | ||
164 | GPIO92_SSP3_RXD, | ||
165 | |||
166 | /* SPI (SSP4) lines */ | ||
167 | GPIO93_SSP4_SCLK, | ||
168 | GPIO95_SSP4_TXD, | ||
169 | GPIO96_SSP4_RXD, | ||
170 | |||
171 | /* CAN nIRQ lines */ | ||
172 | GPIO74_GPIO | MFP_LPM_EDGE_RISE, | ||
173 | GPIO75_GPIO | MFP_LPM_EDGE_RISE, | ||
174 | GPIO76_GPIO | MFP_LPM_EDGE_RISE, | ||
175 | GPIO77_GPIO | MFP_LPM_EDGE_RISE | ||
176 | }; | ||
177 | |||
178 | static void __init icontrol_can_init(void) | ||
179 | { | ||
180 | pxa3xx_mfp_config(ARRAY_AND_SIZE(mfp_can_cfg)); | ||
181 | platform_add_devices(ARRAY_AND_SIZE(icontrol_spi_devices)); | ||
182 | spi_register_board_info(ARRAY_AND_SIZE(mcp251x_board_info)); | ||
183 | } | ||
184 | |||
185 | static void __init icontrol_init(void) | ||
186 | { | ||
187 | mxm_8x10_barebones_init(); | ||
188 | mxm_8x10_usb_host_init(); | ||
189 | mxm_8x10_mmc_init(); | ||
190 | |||
191 | icontrol_can_init(); | ||
192 | } | ||
193 | |||
194 | MACHINE_START(ICONTROL, "iControl/SafeTcam boards using Embedian MXM-8x10 CoM") | ||
195 | .phys_io = 0x40000000, | ||
196 | .boot_params = 0xa0000100, | ||
197 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | ||
198 | .map_io = pxa_map_io, | ||
199 | .init_irq = pxa3xx_init_irq, | ||
200 | .timer = &pxa_timer, | ||
201 | .init_machine = icontrol_init | ||
202 | MACHINE_END | ||
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c index 5c9e11d74f49..bc78c4dc0c66 100644 --- a/arch/arm/mach-pxa/idp.c +++ b/arch/arm/mach-pxa/idp.c | |||
@@ -47,25 +47,7 @@ | |||
47 | 47 | ||
48 | static unsigned long idp_pin_config[] __initdata = { | 48 | static unsigned long idp_pin_config[] __initdata = { |
49 | /* LCD */ | 49 | /* LCD */ |
50 | GPIO58_LCD_LDD_0, | 50 | GPIOxx_LCD_DSTN_16BPP, |
51 | GPIO59_LCD_LDD_1, | ||
52 | GPIO60_LCD_LDD_2, | ||
53 | GPIO61_LCD_LDD_3, | ||
54 | GPIO62_LCD_LDD_4, | ||
55 | GPIO63_LCD_LDD_5, | ||
56 | GPIO64_LCD_LDD_6, | ||
57 | GPIO65_LCD_LDD_7, | ||
58 | GPIO66_LCD_LDD_8, | ||
59 | GPIO67_LCD_LDD_9, | ||
60 | GPIO68_LCD_LDD_10, | ||
61 | GPIO69_LCD_LDD_11, | ||
62 | GPIO70_LCD_LDD_12, | ||
63 | GPIO71_LCD_LDD_13, | ||
64 | GPIO72_LCD_LDD_14, | ||
65 | GPIO73_LCD_LDD_15, | ||
66 | GPIO74_LCD_FCLK, | ||
67 | GPIO75_LCD_LCLK, | ||
68 | GPIO76_LCD_PCLK, | ||
69 | 51 | ||
70 | /* BTUART */ | 52 | /* BTUART */ |
71 | GPIO42_BTUART_RXD, | 53 | GPIO42_BTUART_RXD, |
diff --git a/arch/arm/mach-pxa/imote2.c b/arch/arm/mach-pxa/imote2.c index 5b0862df61ab..b2f878bd460b 100644 --- a/arch/arm/mach-pxa/imote2.c +++ b/arch/arm/mach-pxa/imote2.c | |||
@@ -64,7 +64,6 @@ static unsigned long imote2_pin_config[] __initdata = { | |||
64 | GPIO116_GPIO, /* CC_CCA */ | 64 | GPIO116_GPIO, /* CC_CCA */ |
65 | GPIO0_GPIO, /* CC_FIFOP */ | 65 | GPIO0_GPIO, /* CC_FIFOP */ |
66 | GPIO16_GPIO, /* CCSFD */ | 66 | GPIO16_GPIO, /* CCSFD */ |
67 | GPIO39_GPIO, /* CSn */ | ||
68 | GPIO115_GPIO, /* Power enable */ | 67 | GPIO115_GPIO, /* Power enable */ |
69 | 68 | ||
70 | /* I2C */ | 69 | /* I2C */ |
@@ -72,7 +71,7 @@ static unsigned long imote2_pin_config[] __initdata = { | |||
72 | GPIO118_I2C_SDA, | 71 | GPIO118_I2C_SDA, |
73 | 72 | ||
74 | /* SSP 3 - 802.15.4 radio */ | 73 | /* SSP 3 - 802.15.4 radio */ |
75 | GPIO39_GPIO, /* Chip Select */ | 74 | GPIO39_GPIO, /* Chip Select */ |
76 | GPIO34_SSP3_SCLK, | 75 | GPIO34_SSP3_SCLK, |
77 | GPIO35_SSP3_TXD, | 76 | GPIO35_SSP3_TXD, |
78 | GPIO41_SSP3_RXD, | 77 | GPIO41_SSP3_RXD, |
diff --git a/arch/arm/mach-pxa/include/mach/balloon3.h b/arch/arm/mach-pxa/include/mach/balloon3.h index bfec09b1814b..1a741065045f 100644 --- a/arch/arm/mach-pxa/include/mach/balloon3.h +++ b/arch/arm/mach-pxa/include/mach/balloon3.h | |||
@@ -129,6 +129,16 @@ enum balloon3_features { | |||
129 | #define CPLD_AROUTING_LOONR2INT_BIT 6 | 129 | #define CPLD_AROUTING_LOONR2INT_BIT 6 |
130 | #define CPLD_AROUTING_LOONR2EXT_BIT 7 | 130 | #define CPLD_AROUTING_LOONR2EXT_BIT 7 |
131 | 131 | ||
132 | /* Balloon3 Interrupts */ | ||
133 | #define BALLOON3_IRQ(x) (IRQ_BOARD_START + (x)) | ||
134 | |||
135 | #define BALLOON3_BP_CF_NRDY_IRQ BALLOON3_IRQ(0) | ||
136 | #define BALLOON3_BP_NSTSCHG_IRQ BALLOON3_IRQ(1) | ||
137 | |||
138 | #define BALLOON3_AUX_NIRQ IRQ_GPIO(BALLOON3_GPIO_AUX_NIRQ) | ||
139 | #define BALLOON3_CODEC_IRQ IRQ_GPIO(BALLOON3_GPIO_CODEC_IRQ) | ||
140 | #define BALLOON3_S0_CD_IRQ IRQ_GPIO(BALLOON3_GPIO_S0_CD) | ||
141 | |||
132 | extern int balloon3_has(enum balloon3_features feature); | 142 | extern int balloon3_has(enum balloon3_features feature); |
133 | 143 | ||
134 | #endif | 144 | #endif |
diff --git a/arch/arm/mach-pxa/include/mach/irqs.h b/arch/arm/mach-pxa/include/mach/irqs.h index 3677a9af9c87..ffc8314520f2 100644 --- a/arch/arm/mach-pxa/include/mach/irqs.h +++ b/arch/arm/mach-pxa/include/mach/irqs.h | |||
@@ -135,82 +135,6 @@ | |||
135 | #define IRQ_BOARD_END (IRQ_BOARD_START + 16) | 135 | #define IRQ_BOARD_END (IRQ_BOARD_START + 16) |
136 | #endif | 136 | #endif |
137 | 137 | ||
138 | #define IRQ_SA1111_START (IRQ_BOARD_END) | ||
139 | #define IRQ_GPAIN0 (IRQ_BOARD_END + 0) | ||
140 | #define IRQ_GPAIN1 (IRQ_BOARD_END + 1) | ||
141 | #define IRQ_GPAIN2 (IRQ_BOARD_END + 2) | ||
142 | #define IRQ_GPAIN3 (IRQ_BOARD_END + 3) | ||
143 | #define IRQ_GPBIN0 (IRQ_BOARD_END + 4) | ||
144 | #define IRQ_GPBIN1 (IRQ_BOARD_END + 5) | ||
145 | #define IRQ_GPBIN2 (IRQ_BOARD_END + 6) | ||
146 | #define IRQ_GPBIN3 (IRQ_BOARD_END + 7) | ||
147 | #define IRQ_GPBIN4 (IRQ_BOARD_END + 8) | ||
148 | #define IRQ_GPBIN5 (IRQ_BOARD_END + 9) | ||
149 | #define IRQ_GPCIN0 (IRQ_BOARD_END + 10) | ||
150 | #define IRQ_GPCIN1 (IRQ_BOARD_END + 11) | ||
151 | #define IRQ_GPCIN2 (IRQ_BOARD_END + 12) | ||
152 | #define IRQ_GPCIN3 (IRQ_BOARD_END + 13) | ||
153 | #define IRQ_GPCIN4 (IRQ_BOARD_END + 14) | ||
154 | #define IRQ_GPCIN5 (IRQ_BOARD_END + 15) | ||
155 | #define IRQ_GPCIN6 (IRQ_BOARD_END + 16) | ||
156 | #define IRQ_GPCIN7 (IRQ_BOARD_END + 17) | ||
157 | #define IRQ_MSTXINT (IRQ_BOARD_END + 18) | ||
158 | #define IRQ_MSRXINT (IRQ_BOARD_END + 19) | ||
159 | #define IRQ_MSSTOPERRINT (IRQ_BOARD_END + 20) | ||
160 | #define IRQ_TPTXINT (IRQ_BOARD_END + 21) | ||
161 | #define IRQ_TPRXINT (IRQ_BOARD_END + 22) | ||
162 | #define IRQ_TPSTOPERRINT (IRQ_BOARD_END + 23) | ||
163 | #define SSPXMTINT (IRQ_BOARD_END + 24) | ||
164 | #define SSPRCVINT (IRQ_BOARD_END + 25) | ||
165 | #define SSPROR (IRQ_BOARD_END + 26) | ||
166 | #define AUDXMTDMADONEA (IRQ_BOARD_END + 32) | ||
167 | #define AUDRCVDMADONEA (IRQ_BOARD_END + 33) | ||
168 | #define AUDXMTDMADONEB (IRQ_BOARD_END + 34) | ||
169 | #define AUDRCVDMADONEB (IRQ_BOARD_END + 35) | ||
170 | #define AUDTFSR (IRQ_BOARD_END + 36) | ||
171 | #define AUDRFSR (IRQ_BOARD_END + 37) | ||
172 | #define AUDTUR (IRQ_BOARD_END + 38) | ||
173 | #define AUDROR (IRQ_BOARD_END + 39) | ||
174 | #define AUDDTS (IRQ_BOARD_END + 40) | ||
175 | #define AUDRDD (IRQ_BOARD_END + 41) | ||
176 | #define AUDSTO (IRQ_BOARD_END + 42) | ||
177 | #define IRQ_USBPWR (IRQ_BOARD_END + 43) | ||
178 | #define IRQ_HCIM (IRQ_BOARD_END + 44) | ||
179 | #define IRQ_HCIBUFFACC (IRQ_BOARD_END + 45) | ||
180 | #define IRQ_HCIRMTWKP (IRQ_BOARD_END + 46) | ||
181 | #define IRQ_NHCIMFCIR (IRQ_BOARD_END + 47) | ||
182 | #define IRQ_USB_PORT_RESUME (IRQ_BOARD_END + 48) | ||
183 | #define IRQ_S0_READY_NINT (IRQ_BOARD_END + 49) | ||
184 | #define IRQ_S1_READY_NINT (IRQ_BOARD_END + 50) | ||
185 | #define IRQ_S0_CD_VALID (IRQ_BOARD_END + 51) | ||
186 | #define IRQ_S1_CD_VALID (IRQ_BOARD_END + 52) | ||
187 | #define IRQ_S0_BVD1_STSCHG (IRQ_BOARD_END + 53) | ||
188 | #define IRQ_S1_BVD1_STSCHG (IRQ_BOARD_END + 54) | ||
189 | |||
190 | #define IRQ_LOCOMO_START (IRQ_BOARD_END) | ||
191 | #define IRQ_LOCOMO_KEY (IRQ_BOARD_END + 0) | ||
192 | #define IRQ_LOCOMO_GPIO0 (IRQ_BOARD_END + 1) | ||
193 | #define IRQ_LOCOMO_GPIO1 (IRQ_BOARD_END + 2) | ||
194 | #define IRQ_LOCOMO_GPIO2 (IRQ_BOARD_END + 3) | ||
195 | #define IRQ_LOCOMO_GPIO3 (IRQ_BOARD_END + 4) | ||
196 | #define IRQ_LOCOMO_GPIO4 (IRQ_BOARD_END + 5) | ||
197 | #define IRQ_LOCOMO_GPIO5 (IRQ_BOARD_END + 6) | ||
198 | #define IRQ_LOCOMO_GPIO6 (IRQ_BOARD_END + 7) | ||
199 | #define IRQ_LOCOMO_GPIO7 (IRQ_BOARD_END + 8) | ||
200 | #define IRQ_LOCOMO_GPIO8 (IRQ_BOARD_END + 9) | ||
201 | #define IRQ_LOCOMO_GPIO9 (IRQ_BOARD_END + 10) | ||
202 | #define IRQ_LOCOMO_GPIO10 (IRQ_BOARD_END + 11) | ||
203 | #define IRQ_LOCOMO_GPIO11 (IRQ_BOARD_END + 12) | ||
204 | #define IRQ_LOCOMO_GPIO12 (IRQ_BOARD_END + 13) | ||
205 | #define IRQ_LOCOMO_GPIO13 (IRQ_BOARD_END + 14) | ||
206 | #define IRQ_LOCOMO_GPIO14 (IRQ_BOARD_END + 15) | ||
207 | #define IRQ_LOCOMO_GPIO15 (IRQ_BOARD_END + 16) | ||
208 | #define IRQ_LOCOMO_LT (IRQ_BOARD_END + 17) | ||
209 | #define IRQ_LOCOMO_SPI_RFR (IRQ_BOARD_END + 18) | ||
210 | #define IRQ_LOCOMO_SPI_RFW (IRQ_BOARD_END + 19) | ||
211 | #define IRQ_LOCOMO_SPI_OVRN (IRQ_BOARD_END + 20) | ||
212 | #define IRQ_LOCOMO_SPI_TEND (IRQ_BOARD_END + 21) | ||
213 | |||
214 | /* | 138 | /* |
215 | * Figure out the MAX IRQ number. | 139 | * Figure out the MAX IRQ number. |
216 | * | 140 | * |
@@ -219,89 +143,16 @@ | |||
219 | * Otherwise, we have the standard IRQs only. | 143 | * Otherwise, we have the standard IRQs only. |
220 | */ | 144 | */ |
221 | #ifdef CONFIG_SA1111 | 145 | #ifdef CONFIG_SA1111 |
222 | #define NR_IRQS (IRQ_S1_BVD1_STSCHG + 1) | 146 | #define NR_IRQS (IRQ_BOARD_END + 55) |
223 | #elif defined(CONFIG_SHARP_LOCOMO) | ||
224 | #define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1) | ||
225 | #elif defined(CONFIG_PXA_HAVE_BOARD_IRQS) | 147 | #elif defined(CONFIG_PXA_HAVE_BOARD_IRQS) |
226 | #define NR_IRQS (IRQ_BOARD_END) | 148 | #define NR_IRQS (IRQ_BOARD_END) |
227 | #else | 149 | #else |
228 | #define NR_IRQS (IRQ_BOARD_START) | 150 | #define NR_IRQS (IRQ_BOARD_START) |
229 | #endif | 151 | #endif |
230 | 152 | ||
231 | /* | ||
232 | * Board specific IRQs. Define them here. | ||
233 | * Do not surround them with ifdefs. | ||
234 | */ | ||
235 | #define LUBBOCK_IRQ(x) (IRQ_BOARD_START + (x)) | ||
236 | #define LUBBOCK_SD_IRQ LUBBOCK_IRQ(0) | ||
237 | #define LUBBOCK_SA1111_IRQ LUBBOCK_IRQ(1) | ||
238 | #define LUBBOCK_USB_IRQ LUBBOCK_IRQ(2) /* usb connect */ | ||
239 | #define LUBBOCK_ETH_IRQ LUBBOCK_IRQ(3) | ||
240 | #define LUBBOCK_UCB1400_IRQ LUBBOCK_IRQ(4) | ||
241 | #define LUBBOCK_BB_IRQ LUBBOCK_IRQ(5) | ||
242 | #define LUBBOCK_USB_DISC_IRQ LUBBOCK_IRQ(6) /* usb disconnect */ | ||
243 | #define LUBBOCK_LAST_IRQ LUBBOCK_IRQ(6) | ||
244 | |||
245 | #define LPD270_IRQ(x) (IRQ_BOARD_START + (x)) | ||
246 | #define LPD270_USBC_IRQ LPD270_IRQ(2) | ||
247 | #define LPD270_ETHERNET_IRQ LPD270_IRQ(3) | ||
248 | #define LPD270_AC97_IRQ LPD270_IRQ(4) | ||
249 | |||
250 | #define MAINSTONE_IRQ(x) (IRQ_BOARD_START + (x)) | ||
251 | #define MAINSTONE_MMC_IRQ MAINSTONE_IRQ(0) | ||
252 | #define MAINSTONE_USIM_IRQ MAINSTONE_IRQ(1) | ||
253 | #define MAINSTONE_USBC_IRQ MAINSTONE_IRQ(2) | ||
254 | #define MAINSTONE_ETHERNET_IRQ MAINSTONE_IRQ(3) | ||
255 | #define MAINSTONE_AC97_IRQ MAINSTONE_IRQ(4) | ||
256 | #define MAINSTONE_PEN_IRQ MAINSTONE_IRQ(5) | ||
257 | #define MAINSTONE_MSINS_IRQ MAINSTONE_IRQ(6) | ||
258 | #define MAINSTONE_EXBRD_IRQ MAINSTONE_IRQ(7) | ||
259 | #define MAINSTONE_S0_CD_IRQ MAINSTONE_IRQ(9) | ||
260 | #define MAINSTONE_S0_STSCHG_IRQ MAINSTONE_IRQ(10) | ||
261 | #define MAINSTONE_S0_IRQ MAINSTONE_IRQ(11) | ||
262 | #define MAINSTONE_S1_CD_IRQ MAINSTONE_IRQ(13) | ||
263 | #define MAINSTONE_S1_STSCHG_IRQ MAINSTONE_IRQ(14) | ||
264 | #define MAINSTONE_S1_IRQ MAINSTONE_IRQ(15) | ||
265 | |||
266 | /* Balloon3 Interrupts */ | ||
267 | #define BALLOON3_IRQ(x) (IRQ_BOARD_START + (x)) | ||
268 | |||
269 | #define BALLOON3_BP_CF_NRDY_IRQ BALLOON3_IRQ(0) | ||
270 | #define BALLOON3_BP_NSTSCHG_IRQ BALLOON3_IRQ(1) | ||
271 | |||
272 | #define BALLOON3_AUX_NIRQ IRQ_GPIO(BALLOON3_GPIO_AUX_NIRQ) | ||
273 | #define BALLOON3_CODEC_IRQ IRQ_GPIO(BALLOON3_GPIO_CODEC_IRQ) | ||
274 | #define BALLOON3_S0_CD_IRQ IRQ_GPIO(BALLOON3_GPIO_S0_CD) | ||
275 | |||
276 | /* LoCoMo Interrupts (CONFIG_SHARP_LOCOMO) */ | ||
277 | #define IRQ_LOCOMO_KEY_BASE (IRQ_BOARD_START + 0) | ||
278 | #define IRQ_LOCOMO_GPIO_BASE (IRQ_BOARD_START + 1) | ||
279 | #define IRQ_LOCOMO_LT_BASE (IRQ_BOARD_START + 2) | ||
280 | #define IRQ_LOCOMO_SPI_BASE (IRQ_BOARD_START + 3) | ||
281 | |||
282 | /* phyCORE-PXA270 (PCM027) Interrupts */ | ||
283 | #define PCM027_IRQ(x) (IRQ_BOARD_START + (x)) | ||
284 | #define PCM027_BTDET_IRQ PCM027_IRQ(0) | ||
285 | #define PCM027_FF_RI_IRQ PCM027_IRQ(1) | ||
286 | #define PCM027_MMCDET_IRQ PCM027_IRQ(2) | ||
287 | #define PCM027_PM_5V_IRQ PCM027_IRQ(3) | ||
288 | |||
289 | /* ITE8152 irqs */ | ||
290 | /* add IT8152 IRQs beyond BOARD_END */ | 153 | /* add IT8152 IRQs beyond BOARD_END */ |
291 | #ifdef CONFIG_PCI_HOST_ITE8152 | 154 | #ifdef CONFIG_PCI_HOST_ITE8152 |
292 | #define IT8152_IRQ(x) (IRQ_BOARD_END + (x)) | 155 | #define IT8152_LAST_IRQ (IRQ_BOARD_END + 40) |
293 | |||
294 | /* IRQ-sources in 3 groups - local devices, LPC (serial), and external PCI */ | ||
295 | #define IT8152_LD_IRQ_COUNT 9 | ||
296 | #define IT8152_LP_IRQ_COUNT 16 | ||
297 | #define IT8152_PD_IRQ_COUNT 15 | ||
298 | |||
299 | /* Priorities: */ | ||
300 | #define IT8152_PD_IRQ(i) IT8152_IRQ(i) | ||
301 | #define IT8152_LP_IRQ(i) (IT8152_IRQ(i) + IT8152_PD_IRQ_COUNT) | ||
302 | #define IT8152_LD_IRQ(i) (IT8152_IRQ(i) + IT8152_PD_IRQ_COUNT + IT8152_LP_IRQ_COUNT) | ||
303 | |||
304 | #define IT8152_LAST_IRQ IT8152_LD_IRQ(IT8152_LD_IRQ_COUNT - 1) | ||
305 | 156 | ||
306 | #if NR_IRQS < (IT8152_LAST_IRQ+1) | 157 | #if NR_IRQS < (IT8152_LAST_IRQ+1) |
307 | #undef NR_IRQS | 158 | #undef NR_IRQS |
diff --git a/arch/arm/mach-pxa/include/mach/lpd270.h b/arch/arm/mach-pxa/include/mach/lpd270.h index f89fb715266b..0e6440c81683 100644 --- a/arch/arm/mach-pxa/include/mach/lpd270.h +++ b/arch/arm/mach-pxa/include/mach/lpd270.h | |||
@@ -34,5 +34,9 @@ | |||
34 | #define LPD270_INT_ETHERNET (1 << 3) /* Ethernet controller IRQ */ | 34 | #define LPD270_INT_ETHERNET (1 << 3) /* Ethernet controller IRQ */ |
35 | #define LPD270_INT_USBC (1 << 2) /* USB client cable detection IRQ */ | 35 | #define LPD270_INT_USBC (1 << 2) /* USB client cable detection IRQ */ |
36 | 36 | ||
37 | #define LPD270_IRQ(x) (IRQ_BOARD_START + (x)) | ||
38 | #define LPD270_USBC_IRQ LPD270_IRQ(2) | ||
39 | #define LPD270_ETHERNET_IRQ LPD270_IRQ(3) | ||
40 | #define LPD270_AC97_IRQ LPD270_IRQ(4) | ||
37 | 41 | ||
38 | #endif | 42 | #endif |
diff --git a/arch/arm/mach-pxa/include/mach/lubbock.h b/arch/arm/mach-pxa/include/mach/lubbock.h index 751b74811d0f..a0d4247f08fc 100644 --- a/arch/arm/mach-pxa/include/mach/lubbock.h +++ b/arch/arm/mach-pxa/include/mach/lubbock.h | |||
@@ -34,6 +34,17 @@ | |||
34 | #define LUB_IRQ_SET_CLR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x0d0) | 34 | #define LUB_IRQ_SET_CLR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x0d0) |
35 | #define LUB_GP __LUB_REG(LUBBOCK_FPGA_PHYS + 0x100) | 35 | #define LUB_GP __LUB_REG(LUBBOCK_FPGA_PHYS + 0x100) |
36 | 36 | ||
37 | /* Board specific IRQs */ | ||
38 | #define LUBBOCK_IRQ(x) (IRQ_BOARD_START + (x)) | ||
39 | #define LUBBOCK_SD_IRQ LUBBOCK_IRQ(0) | ||
40 | #define LUBBOCK_SA1111_IRQ LUBBOCK_IRQ(1) | ||
41 | #define LUBBOCK_USB_IRQ LUBBOCK_IRQ(2) /* usb connect */ | ||
42 | #define LUBBOCK_ETH_IRQ LUBBOCK_IRQ(3) | ||
43 | #define LUBBOCK_UCB1400_IRQ LUBBOCK_IRQ(4) | ||
44 | #define LUBBOCK_BB_IRQ LUBBOCK_IRQ(5) | ||
45 | #define LUBBOCK_USB_DISC_IRQ LUBBOCK_IRQ(6) /* usb disconnect */ | ||
46 | #define LUBBOCK_LAST_IRQ LUBBOCK_IRQ(6) | ||
47 | |||
37 | #ifndef __ASSEMBLY__ | 48 | #ifndef __ASSEMBLY__ |
38 | extern void lubbock_set_misc_wr(unsigned int mask, unsigned int set); | 49 | extern void lubbock_set_misc_wr(unsigned int mask, unsigned int set); |
39 | #endif | 50 | #endif |
diff --git a/arch/arm/mach-pxa/include/mach/mainstone.h b/arch/arm/mach-pxa/include/mach/mainstone.h index 3461c4302ff4..86e623abd64d 100644 --- a/arch/arm/mach-pxa/include/mach/mainstone.h +++ b/arch/arm/mach-pxa/include/mach/mainstone.h | |||
@@ -117,4 +117,21 @@ | |||
117 | #define MST_PCMCIA_PWR_VCC_33 0x8 /* voltage VCC = 3.3V */ | 117 | #define MST_PCMCIA_PWR_VCC_33 0x8 /* voltage VCC = 3.3V */ |
118 | #define MST_PCMCIA_PWR_VCC_50 0x4 /* voltage VCC = 5.0V */ | 118 | #define MST_PCMCIA_PWR_VCC_50 0x4 /* voltage VCC = 5.0V */ |
119 | 119 | ||
120 | /* board specific IRQs */ | ||
121 | #define MAINSTONE_IRQ(x) (IRQ_BOARD_START + (x)) | ||
122 | #define MAINSTONE_MMC_IRQ MAINSTONE_IRQ(0) | ||
123 | #define MAINSTONE_USIM_IRQ MAINSTONE_IRQ(1) | ||
124 | #define MAINSTONE_USBC_IRQ MAINSTONE_IRQ(2) | ||
125 | #define MAINSTONE_ETHERNET_IRQ MAINSTONE_IRQ(3) | ||
126 | #define MAINSTONE_AC97_IRQ MAINSTONE_IRQ(4) | ||
127 | #define MAINSTONE_PEN_IRQ MAINSTONE_IRQ(5) | ||
128 | #define MAINSTONE_MSINS_IRQ MAINSTONE_IRQ(6) | ||
129 | #define MAINSTONE_EXBRD_IRQ MAINSTONE_IRQ(7) | ||
130 | #define MAINSTONE_S0_CD_IRQ MAINSTONE_IRQ(9) | ||
131 | #define MAINSTONE_S0_STSCHG_IRQ MAINSTONE_IRQ(10) | ||
132 | #define MAINSTONE_S0_IRQ MAINSTONE_IRQ(11) | ||
133 | #define MAINSTONE_S1_CD_IRQ MAINSTONE_IRQ(13) | ||
134 | #define MAINSTONE_S1_STSCHG_IRQ MAINSTONE_IRQ(14) | ||
135 | #define MAINSTONE_S1_IRQ MAINSTONE_IRQ(15) | ||
136 | |||
120 | #endif | 137 | #endif |
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa25x.h b/arch/arm/mach-pxa/include/mach/mfp-pxa25x.h index 9c787855cf24..cafadc33dfd8 100644 --- a/arch/arm/mach-pxa/include/mach/mfp-pxa25x.h +++ b/arch/arm/mach-pxa/include/mach/mfp-pxa25x.h | |||
@@ -190,4 +190,36 @@ | |||
190 | #define GPIO89_AC97_nRESET MFP_CFG_OUT(GPIO89, AF0, DRIVE_HIGH) | 190 | #define GPIO89_AC97_nRESET MFP_CFG_OUT(GPIO89, AF0, DRIVE_HIGH) |
191 | #endif /* CONFIG_CPU_PXA26x */ | 191 | #endif /* CONFIG_CPU_PXA26x */ |
192 | 192 | ||
193 | /* commonly used pin configurations */ | ||
194 | #define GPIOxx_LCD_16BPP \ | ||
195 | GPIO58_LCD_LDD_0, \ | ||
196 | GPIO59_LCD_LDD_1, \ | ||
197 | GPIO60_LCD_LDD_2, \ | ||
198 | GPIO61_LCD_LDD_3, \ | ||
199 | GPIO62_LCD_LDD_4, \ | ||
200 | GPIO63_LCD_LDD_5, \ | ||
201 | GPIO64_LCD_LDD_6, \ | ||
202 | GPIO65_LCD_LDD_7, \ | ||
203 | GPIO66_LCD_LDD_8, \ | ||
204 | GPIO67_LCD_LDD_9, \ | ||
205 | GPIO68_LCD_LDD_10, \ | ||
206 | GPIO69_LCD_LDD_11, \ | ||
207 | GPIO70_LCD_LDD_12, \ | ||
208 | GPIO71_LCD_LDD_13, \ | ||
209 | GPIO72_LCD_LDD_14, \ | ||
210 | GPIO73_LCD_LDD_15 | ||
211 | |||
212 | #define GPIOxx_LCD_DSTN_16BPP \ | ||
213 | GPIOxx_LCD_16BPP, \ | ||
214 | GPIO74_LCD_FCLK, \ | ||
215 | GPIO75_LCD_LCLK, \ | ||
216 | GPIO76_LCD_PCLK | ||
217 | |||
218 | #define GPIOxx_LCD_TFT_16BPP \ | ||
219 | GPIOxx_LCD_16BPP, \ | ||
220 | GPIO74_LCD_FCLK, \ | ||
221 | GPIO75_LCD_LCLK, \ | ||
222 | GPIO76_LCD_PCLK, \ | ||
223 | GPIO77_LCD_BIAS | ||
224 | |||
193 | #endif /* __ASM_ARCH_MFP_PXA25X_H */ | 225 | #endif /* __ASM_ARCH_MFP_PXA25X_H */ |
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h b/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h index 6543c05f47ed..ec0f0b0b6744 100644 --- a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h +++ b/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h | |||
@@ -434,5 +434,32 @@ | |||
434 | #define GPIO112_nMSINS MFP_CFG_IN(GPIO112, AF2) | 434 | #define GPIO112_nMSINS MFP_CFG_IN(GPIO112, AF2) |
435 | #define GPIO32_MSSCLK MFP_CFG_OUT(GPIO32, AF1, DRIVE_LOW) | 435 | #define GPIO32_MSSCLK MFP_CFG_OUT(GPIO32, AF1, DRIVE_LOW) |
436 | 436 | ||
437 | /* commonly used pin configurations */ | ||
438 | #define GPIOxx_LCD_16BPP \ | ||
439 | GPIO58_LCD_LDD_0, \ | ||
440 | GPIO59_LCD_LDD_1, \ | ||
441 | GPIO60_LCD_LDD_2, \ | ||
442 | GPIO61_LCD_LDD_3, \ | ||
443 | GPIO62_LCD_LDD_4, \ | ||
444 | GPIO63_LCD_LDD_5, \ | ||
445 | GPIO64_LCD_LDD_6, \ | ||
446 | GPIO65_LCD_LDD_7, \ | ||
447 | GPIO66_LCD_LDD_8, \ | ||
448 | GPIO67_LCD_LDD_9, \ | ||
449 | GPIO68_LCD_LDD_10, \ | ||
450 | GPIO69_LCD_LDD_11, \ | ||
451 | GPIO70_LCD_LDD_12, \ | ||
452 | GPIO71_LCD_LDD_13, \ | ||
453 | GPIO72_LCD_LDD_14, \ | ||
454 | GPIO73_LCD_LDD_15 | ||
455 | |||
456 | #define GPIOxx_LCD_TFT_16BPP \ | ||
457 | GPIOxx_LCD_16BPP, \ | ||
458 | GPIO74_LCD_FCLK, \ | ||
459 | GPIO75_LCD_LCLK, \ | ||
460 | GPIO76_LCD_PCLK, \ | ||
461 | GPIO77_LCD_BIAS | ||
462 | |||
463 | |||
437 | extern int keypad_set_wake(unsigned int on); | 464 | extern int keypad_set_wake(unsigned int on); |
438 | #endif /* __ASM_ARCH_MFP_PXA27X_H */ | 465 | #endif /* __ASM_ARCH_MFP_PXA27X_H */ |
diff --git a/arch/arm/mach-pxa/include/mach/mxm8x10.h b/arch/arm/mach-pxa/include/mach/mxm8x10.h new file mode 100644 index 000000000000..ffa15665a418 --- /dev/null +++ b/arch/arm/mach-pxa/include/mach/mxm8x10.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifndef __MACH_MXM_8X10_H | ||
2 | #define __MACH_MXM_8X10_H | ||
3 | |||
4 | #define MXM_8X10_ETH_PHYS 0x13000000 | ||
5 | |||
6 | #if defined(CONFIG_MMC) | ||
7 | |||
8 | #define MXM_8X10_SD_nCD (72) | ||
9 | #define MXM_8X10_SD_WP (84) | ||
10 | |||
11 | extern void mxm_8x10_mmc_init(void); | ||
12 | #else | ||
13 | static inline void mxm_8x10_mmc_init(void) {} | ||
14 | #endif | ||
15 | |||
16 | extern void mxm_8x10_usb_host_init(void); | ||
17 | extern void mxm_8x10_ac97_init(void); | ||
18 | |||
19 | extern void mxm_8x10_barebones_init(void); | ||
20 | |||
21 | #endif /* __MACH_MXM_8X10_H */ | ||
diff --git a/arch/arm/mach-pxa/include/mach/pcm027.h b/arch/arm/mach-pxa/include/mach/pcm027.h index 4dcd2e8baa61..04083263167e 100644 --- a/arch/arm/mach-pxa/include/mach/pcm027.h +++ b/arch/arm/mach-pxa/include/mach/pcm027.h | |||
@@ -23,6 +23,13 @@ | |||
23 | * Definitions of CPU card resources only | 23 | * Definitions of CPU card resources only |
24 | */ | 24 | */ |
25 | 25 | ||
26 | /* phyCORE-PXA270 (PCM027) Interrupts */ | ||
27 | #define PCM027_IRQ(x) (IRQ_BOARD_START + (x)) | ||
28 | #define PCM027_BTDET_IRQ PCM027_IRQ(0) | ||
29 | #define PCM027_FF_RI_IRQ PCM027_IRQ(1) | ||
30 | #define PCM027_MMCDET_IRQ PCM027_IRQ(2) | ||
31 | #define PCM027_PM_5V_IRQ PCM027_IRQ(3) | ||
32 | |||
26 | /* I2C RTC */ | 33 | /* I2C RTC */ |
27 | #define PCM027_RTC_IRQ_GPIO 0 | 34 | #define PCM027_RTC_IRQ_GPIO 0 |
28 | #define PCM027_RTC_IRQ IRQ_GPIO(PCM027_RTC_IRQ_GPIO) | 35 | #define PCM027_RTC_IRQ IRQ_GPIO(PCM027_RTC_IRQ_GPIO) |
diff --git a/arch/arm/mach-pxa/include/mach/ssp.h b/arch/arm/mach-pxa/include/mach/ssp.h index cb5cb766f0f1..be1be5b6db51 100644 --- a/arch/arm/mach-pxa/include/mach/ssp.h +++ b/arch/arm/mach-pxa/include/mach/ssp.h | |||
@@ -46,6 +46,7 @@ struct ssp_device { | |||
46 | int drcmr_tx; | 46 | int drcmr_tx; |
47 | }; | 47 | }; |
48 | 48 | ||
49 | #ifdef CONFIG_PXA_SSP_LEGACY | ||
49 | /* | 50 | /* |
50 | * SSP initialisation flags | 51 | * SSP initialisation flags |
51 | */ | 52 | */ |
@@ -78,6 +79,7 @@ void ssp_restore_state(struct ssp_dev *dev, struct ssp_state *ssp); | |||
78 | int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags); | 79 | int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags); |
79 | int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed); | 80 | int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed); |
80 | void ssp_exit(struct ssp_dev *dev); | 81 | void ssp_exit(struct ssp_dev *dev); |
82 | #endif /* CONFIG_PXA_SSP_LEGACY */ | ||
81 | 83 | ||
82 | /** | 84 | /** |
83 | * ssp_write_reg - Write to a SSP register | 85 | * ssp_write_reg - Write to a SSP register |
diff --git a/arch/arm/mach-pxa/include/mach/uncompress.h b/arch/arm/mach-pxa/include/mach/uncompress.h index 237734b5b1be..5ef91d9d17e4 100644 --- a/arch/arm/mach-pxa/include/mach/uncompress.h +++ b/arch/arm/mach-pxa/include/mach/uncompress.h | |||
@@ -10,20 +10,41 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/serial_reg.h> | 12 | #include <linux/serial_reg.h> |
13 | #include <mach/regs-uart.h> | ||
14 | #include <asm/mach-types.h> | 13 | #include <asm/mach-types.h> |
15 | 14 | ||
16 | #define __REG(x) ((volatile unsigned long *)x) | 15 | #define FFUART_BASE (0x40100000) |
16 | #define BTUART_BASE (0x40200000) | ||
17 | #define STUART_BASE (0x40700000) | ||
17 | 18 | ||
18 | static volatile unsigned long *UART = FFUART; | 19 | static unsigned long uart_base = FFUART_BASE; |
20 | static unsigned int uart_shift = 2; | ||
21 | static unsigned int uart_is_pxa = 1; | ||
22 | |||
23 | static inline unsigned char uart_read(int offset) | ||
24 | { | ||
25 | return *(volatile unsigned char *)(uart_base + (offset << uart_shift)); | ||
26 | } | ||
27 | |||
28 | static inline void uart_write(unsigned char val, int offset) | ||
29 | { | ||
30 | *(volatile unsigned char *)(uart_base + (offset << uart_shift)) = val; | ||
31 | } | ||
32 | |||
33 | static inline int uart_is_enabled(void) | ||
34 | { | ||
35 | /* assume enabled by default for non-PXA uarts */ | ||
36 | return uart_is_pxa ? uart_read(UART_IER) & UART_IER_UUE : 1; | ||
37 | } | ||
19 | 38 | ||
20 | static inline void putc(char c) | 39 | static inline void putc(char c) |
21 | { | 40 | { |
22 | if (!(UART[UART_IER] & IER_UUE)) | 41 | if (!uart_is_enabled()) |
23 | return; | 42 | return; |
24 | while (!(UART[UART_LSR] & LSR_TDRQ)) | 43 | |
44 | while (!(uart_read(UART_LSR) & UART_LSR_THRE)) | ||
25 | barrier(); | 45 | barrier(); |
26 | UART[UART_TX] = c; | 46 | |
47 | uart_write(c, UART_TX); | ||
27 | } | 48 | } |
28 | 49 | ||
29 | /* | 50 | /* |
@@ -38,7 +59,13 @@ static inline void arch_decomp_setup(void) | |||
38 | if (machine_is_littleton() || machine_is_intelmote2() | 59 | if (machine_is_littleton() || machine_is_intelmote2() |
39 | || machine_is_csb726() || machine_is_stargate2() | 60 | || machine_is_csb726() || machine_is_stargate2() |
40 | || machine_is_cm_x300() || machine_is_balloon3()) | 61 | || machine_is_cm_x300() || machine_is_balloon3()) |
41 | UART = STUART; | 62 | uart_base = STUART_BASE; |
63 | |||
64 | if (machine_is_arcom_zeus()) { | ||
65 | uart_base = 0x10000000; /* nCS4 */ | ||
66 | uart_shift = 1; | ||
67 | uart_is_pxa = 0; | ||
68 | } | ||
42 | } | 69 | } |
43 | 70 | ||
44 | /* | 71 | /* |
diff --git a/arch/arm/mach-pxa/include/mach/zeus.h b/arch/arm/mach-pxa/include/mach/zeus.h index c387046d2f28..6e119976003e 100644 --- a/arch/arm/mach-pxa/include/mach/zeus.h +++ b/arch/arm/mach-pxa/include/mach/zeus.h | |||
@@ -58,6 +58,8 @@ | |||
58 | #define ZEUS_EXT1_GPIO(x) (ZEUS_EXT1_GPIO_BASE + (x)) | 58 | #define ZEUS_EXT1_GPIO(x) (ZEUS_EXT1_GPIO_BASE + (x)) |
59 | #define ZEUS_USER_GPIO(x) (ZEUS_USER_GPIO_BASE + (x)) | 59 | #define ZEUS_USER_GPIO(x) (ZEUS_USER_GPIO_BASE + (x)) |
60 | 60 | ||
61 | #define ZEUS_CAN_SHDN_GPIO ZEUS_EXT1_GPIO(2) | ||
62 | |||
61 | /* | 63 | /* |
62 | * CPLD registers: | 64 | * CPLD registers: |
63 | * Only 4 registers, but spreaded over a 32MB address space. | 65 | * Only 4 registers, but spreaded over a 32MB address space. |
@@ -68,7 +70,6 @@ | |||
68 | #define ZEUS_CPLD_VERSION (ZEUS_CPLD + 0x0000) | 70 | #define ZEUS_CPLD_VERSION (ZEUS_CPLD + 0x0000) |
69 | #define ZEUS_CPLD_ISA_IRQ (ZEUS_CPLD + 0x1000) | 71 | #define ZEUS_CPLD_ISA_IRQ (ZEUS_CPLD + 0x1000) |
70 | #define ZEUS_CPLD_CONTROL (ZEUS_CPLD + 0x2000) | 72 | #define ZEUS_CPLD_CONTROL (ZEUS_CPLD + 0x2000) |
71 | #define ZEUS_CPLD_EXTWDOG (ZEUS_CPLD + 0x3000) | ||
72 | 73 | ||
73 | /* CPLD register bits */ | 74 | /* CPLD register bits */ |
74 | #define ZEUS_CPLD_CONTROL_CF_RST 0x01 | 75 | #define ZEUS_CPLD_CONTROL_CF_RST 0x01 |
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c index 1373c22dbb83..d279507fc748 100644 --- a/arch/arm/mach-pxa/lpd270.c +++ b/arch/arm/mach-pxa/lpd270.c | |||
@@ -83,6 +83,10 @@ static unsigned long lpd270_pin_config[] __initdata = { | |||
83 | GPIO89_USBH1_PEN, | 83 | GPIO89_USBH1_PEN, |
84 | 84 | ||
85 | /* AC97 */ | 85 | /* AC97 */ |
86 | GPIO28_AC97_BITCLK, | ||
87 | GPIO29_AC97_SDATA_IN_0, | ||
88 | GPIO30_AC97_SDATA_OUT, | ||
89 | GPIO31_AC97_SYNC, | ||
86 | GPIO45_AC97_SYSCLK, | 90 | GPIO45_AC97_SYSCLK, |
87 | 91 | ||
88 | GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH, | 92 | GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH, |
@@ -121,7 +125,7 @@ static void lpd270_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
121 | 125 | ||
122 | pending = __raw_readw(LPD270_INT_STATUS) & lpd270_irq_enabled; | 126 | pending = __raw_readw(LPD270_INT_STATUS) & lpd270_irq_enabled; |
123 | do { | 127 | do { |
124 | GEDR(0) = GPIO_bit(0); /* clear useless edge notification */ | 128 | desc->chip->ack(irq); /* clear useless edge notification */ |
125 | if (likely(pending)) { | 129 | if (likely(pending)) { |
126 | irq = LPD270_IRQ(0) + __ffs(pending); | 130 | irq = LPD270_IRQ(0) + __ffs(pending); |
127 | generic_handle_irq(irq); | 131 | generic_handle_irq(irq); |
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index 98ee7e590299..63d65a2a0387 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c | |||
@@ -66,26 +66,14 @@ static unsigned long lubbock_pin_config[] __initdata = { | |||
66 | GPIO25_SSP1_TXD, | 66 | GPIO25_SSP1_TXD, |
67 | GPIO26_SSP1_RXD, | 67 | GPIO26_SSP1_RXD, |
68 | 68 | ||
69 | /* AC97 */ | ||
70 | GPIO28_AC97_BITCLK, | ||
71 | GPIO29_AC97_SDATA_IN_0, | ||
72 | GPIO30_AC97_SDATA_OUT, | ||
73 | GPIO31_AC97_SYNC, | ||
74 | |||
69 | /* LCD - 16bpp DSTN */ | 75 | /* LCD - 16bpp DSTN */ |
70 | GPIO58_LCD_LDD_0, | 76 | GPIOxx_LCD_DSTN_16BPP, |
71 | GPIO59_LCD_LDD_1, | ||
72 | GPIO60_LCD_LDD_2, | ||
73 | GPIO61_LCD_LDD_3, | ||
74 | GPIO62_LCD_LDD_4, | ||
75 | GPIO63_LCD_LDD_5, | ||
76 | GPIO64_LCD_LDD_6, | ||
77 | GPIO65_LCD_LDD_7, | ||
78 | GPIO66_LCD_LDD_8, | ||
79 | GPIO67_LCD_LDD_9, | ||
80 | GPIO68_LCD_LDD_10, | ||
81 | GPIO69_LCD_LDD_11, | ||
82 | GPIO70_LCD_LDD_12, | ||
83 | GPIO71_LCD_LDD_13, | ||
84 | GPIO72_LCD_LDD_14, | ||
85 | GPIO73_LCD_LDD_15, | ||
86 | GPIO74_LCD_FCLK, | ||
87 | GPIO75_LCD_LCLK, | ||
88 | GPIO76_LCD_PCLK, | ||
89 | 77 | ||
90 | /* BTUART */ | 78 | /* BTUART */ |
91 | GPIO42_BTUART_RXD, | 79 | GPIO42_BTUART_RXD, |
@@ -158,7 +146,7 @@ static void lubbock_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
158 | { | 146 | { |
159 | unsigned long pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled; | 147 | unsigned long pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled; |
160 | do { | 148 | do { |
161 | GEDR(0) = GPIO_bit(0); /* clear our parent irq */ | 149 | desc->chip->ack(irq); /* clear our parent irq */ |
162 | if (likely(pending)) { | 150 | if (likely(pending)) { |
163 | irq = LUBBOCK_IRQ(0) + __ffs(pending); | 151 | irq = LUBBOCK_IRQ(0) + __ffs(pending); |
164 | generic_handle_irq(irq); | 152 | generic_handle_irq(irq); |
@@ -240,11 +228,18 @@ static struct resource sa1111_resources[] = { | |||
240 | }, | 228 | }, |
241 | }; | 229 | }; |
242 | 230 | ||
231 | static struct sa1111_platform_data sa1111_info = { | ||
232 | .irq_base = IRQ_BOARD_END, | ||
233 | }; | ||
234 | |||
243 | static struct platform_device sa1111_device = { | 235 | static struct platform_device sa1111_device = { |
244 | .name = "sa1111", | 236 | .name = "sa1111", |
245 | .id = -1, | 237 | .id = -1, |
246 | .num_resources = ARRAY_SIZE(sa1111_resources), | 238 | .num_resources = ARRAY_SIZE(sa1111_resources), |
247 | .resource = sa1111_resources, | 239 | .resource = sa1111_resources, |
240 | .dev = { | ||
241 | .platform_data = &sa1111_info, | ||
242 | }, | ||
248 | }; | 243 | }; |
249 | 244 | ||
250 | /* ADS7846 is connected through SSP ... and if your board has J5 populated, | 245 | /* ADS7846 is connected through SSP ... and if your board has J5 populated, |
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index 189f330719a2..e81dd0c8e40d 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c | |||
@@ -88,26 +88,7 @@ static unsigned long magician_pin_config[] __initdata = { | |||
88 | GPIO112_MMC_CMD, | 88 | GPIO112_MMC_CMD, |
89 | 89 | ||
90 | /* LCD */ | 90 | /* LCD */ |
91 | GPIO58_LCD_LDD_0, | 91 | GPIOxx_LCD_TFT_16BPP, |
92 | GPIO59_LCD_LDD_1, | ||
93 | GPIO60_LCD_LDD_2, | ||
94 | GPIO61_LCD_LDD_3, | ||
95 | GPIO62_LCD_LDD_4, | ||
96 | GPIO63_LCD_LDD_5, | ||
97 | GPIO64_LCD_LDD_6, | ||
98 | GPIO65_LCD_LDD_7, | ||
99 | GPIO66_LCD_LDD_8, | ||
100 | GPIO67_LCD_LDD_9, | ||
101 | GPIO68_LCD_LDD_10, | ||
102 | GPIO69_LCD_LDD_11, | ||
103 | GPIO70_LCD_LDD_12, | ||
104 | GPIO71_LCD_LDD_13, | ||
105 | GPIO72_LCD_LDD_14, | ||
106 | GPIO73_LCD_LDD_15, | ||
107 | GPIO74_LCD_FCLK, | ||
108 | GPIO75_LCD_LCLK, | ||
109 | GPIO76_LCD_PCLK, | ||
110 | GPIO77_LCD_BIAS, | ||
111 | 92 | ||
112 | /* QCI */ | 93 | /* QCI */ |
113 | GPIO12_CIF_DD_7, | 94 | GPIO12_CIF_DD_7, |
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index 851ee0fc32e2..5543c64da9ef 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -60,26 +60,7 @@ static unsigned long mainstone_pin_config[] = { | |||
60 | GPIO15_nCS_1, | 60 | GPIO15_nCS_1, |
61 | 61 | ||
62 | /* LCD - 16bpp Active TFT */ | 62 | /* LCD - 16bpp Active TFT */ |
63 | GPIO58_LCD_LDD_0, | 63 | GPIOxx_LCD_TFT_16BPP, |
64 | GPIO59_LCD_LDD_1, | ||
65 | GPIO60_LCD_LDD_2, | ||
66 | GPIO61_LCD_LDD_3, | ||
67 | GPIO62_LCD_LDD_4, | ||
68 | GPIO63_LCD_LDD_5, | ||
69 | GPIO64_LCD_LDD_6, | ||
70 | GPIO65_LCD_LDD_7, | ||
71 | GPIO66_LCD_LDD_8, | ||
72 | GPIO67_LCD_LDD_9, | ||
73 | GPIO68_LCD_LDD_10, | ||
74 | GPIO69_LCD_LDD_11, | ||
75 | GPIO70_LCD_LDD_12, | ||
76 | GPIO71_LCD_LDD_13, | ||
77 | GPIO72_LCD_LDD_14, | ||
78 | GPIO73_LCD_LDD_15, | ||
79 | GPIO74_LCD_FCLK, | ||
80 | GPIO75_LCD_LCLK, | ||
81 | GPIO76_LCD_PCLK, | ||
82 | GPIO77_LCD_BIAS, | ||
83 | GPIO16_PWM0_OUT, /* Backlight */ | 64 | GPIO16_PWM0_OUT, /* Backlight */ |
84 | 65 | ||
85 | /* MMC */ | 66 | /* MMC */ |
@@ -107,6 +88,10 @@ static unsigned long mainstone_pin_config[] = { | |||
107 | GPIO57_nIOIS16, | 88 | GPIO57_nIOIS16, |
108 | 89 | ||
109 | /* AC97 */ | 90 | /* AC97 */ |
91 | GPIO28_AC97_BITCLK, | ||
92 | GPIO29_AC97_SDATA_IN_0, | ||
93 | GPIO30_AC97_SDATA_OUT, | ||
94 | GPIO31_AC97_SYNC, | ||
110 | GPIO45_AC97_SYSCLK, | 95 | GPIO45_AC97_SYSCLK, |
111 | 96 | ||
112 | /* Keypad */ | 97 | /* Keypad */ |
@@ -162,7 +147,7 @@ static void mainstone_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
162 | { | 147 | { |
163 | unsigned long pending = MST_INTSETCLR & mainstone_irq_enabled; | 148 | unsigned long pending = MST_INTSETCLR & mainstone_irq_enabled; |
164 | do { | 149 | do { |
165 | GEDR(0) = GPIO_bit(0); /* clear useless edge notification */ | 150 | desc->chip->ack(irq); /* clear useless edge notification */ |
166 | if (likely(pending)) { | 151 | if (likely(pending)) { |
167 | irq = MAINSTONE_IRQ(0) + __ffs(pending); | 152 | irq = MAINSTONE_IRQ(0) + __ffs(pending); |
168 | generic_handle_irq(irq); | 153 | generic_handle_irq(irq); |
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index 2466a44d8fda..843fcca76e26 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c | |||
@@ -86,25 +86,7 @@ static unsigned long mioa701_pin_config[] = { | |||
86 | MIO_CFG_OUT(GPIO22_USB_ENABLE, AF0, DRIVE_LOW), | 86 | MIO_CFG_OUT(GPIO22_USB_ENABLE, AF0, DRIVE_LOW), |
87 | 87 | ||
88 | /* LCD */ | 88 | /* LCD */ |
89 | GPIO58_LCD_LDD_0, | 89 | GPIOxx_LCD_TFT_16BPP, |
90 | GPIO59_LCD_LDD_1, | ||
91 | GPIO60_LCD_LDD_2, | ||
92 | GPIO61_LCD_LDD_3, | ||
93 | GPIO62_LCD_LDD_4, | ||
94 | GPIO63_LCD_LDD_5, | ||
95 | GPIO64_LCD_LDD_6, | ||
96 | GPIO65_LCD_LDD_7, | ||
97 | GPIO66_LCD_LDD_8, | ||
98 | GPIO67_LCD_LDD_9, | ||
99 | GPIO68_LCD_LDD_10, | ||
100 | GPIO69_LCD_LDD_11, | ||
101 | GPIO70_LCD_LDD_12, | ||
102 | GPIO71_LCD_LDD_13, | ||
103 | GPIO72_LCD_LDD_14, | ||
104 | GPIO73_LCD_LDD_15, | ||
105 | GPIO74_LCD_FCLK, | ||
106 | GPIO75_LCD_LCLK, | ||
107 | GPIO76_LCD_PCLK, | ||
108 | 90 | ||
109 | /* QCI */ | 91 | /* QCI */ |
110 | GPIO12_CIF_DD_7, | 92 | GPIO12_CIF_DD_7, |
@@ -155,6 +137,10 @@ static unsigned long mioa701_pin_config[] = { | |||
155 | GPIO41_FFUART_RTS, | 137 | GPIO41_FFUART_RTS, |
156 | 138 | ||
157 | /* Sound */ | 139 | /* Sound */ |
140 | GPIO28_AC97_BITCLK, | ||
141 | GPIO29_AC97_SDATA_IN_0, | ||
142 | GPIO30_AC97_SDATA_OUT, | ||
143 | GPIO31_AC97_SYNC, | ||
158 | GPIO89_AC97_SYSCLK, | 144 | GPIO89_AC97_SYSCLK, |
159 | MIO_CFG_IN(GPIO12_HPJACK_INSERT, AF0), | 145 | MIO_CFG_IN(GPIO12_HPJACK_INSERT, AF0), |
160 | 146 | ||
diff --git a/arch/arm/mach-pxa/mxm8x10.c b/arch/arm/mach-pxa/mxm8x10.c new file mode 100644 index 000000000000..8c9c6f0d56bb --- /dev/null +++ b/arch/arm/mach-pxa/mxm8x10.c | |||
@@ -0,0 +1,474 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-pxa/mxm8x10.c | ||
3 | * | ||
4 | * Support for the Embedian MXM-8x10 Computer on Module | ||
5 | * | ||
6 | * Copyright (C) 2006 Marvell International Ltd. | ||
7 | * Copyright (C) 2009 Embedian Inc. | ||
8 | * Copyright (C) 2009 TMT Services & Supplies (Pty) Ltd. | ||
9 | * | ||
10 | * 2007-09-04: eric miao <eric.y.miao@gmail.com> | ||
11 | * rewrite to align with latest kernel | ||
12 | * | ||
13 | * 2010-01-09: Edwin Peer <epeer@tmtservices.co.za> | ||
14 | * Hennie van der Merwe <hvdmerwe@tmtservices.co.za> | ||
15 | * rework for upstream merge | ||
16 | * | ||
17 | * This program is free software; you can redistribute it and/or modify | ||
18 | * it under the terms of the GNU General Public License version 2 as | ||
19 | * published by the Free Software Foundation. | ||
20 | */ | ||
21 | |||
22 | #include <linux/serial_8250.h> | ||
23 | #include <linux/dm9000.h> | ||
24 | #include <linux/gpio.h> | ||
25 | |||
26 | #include <plat/i2c.h> | ||
27 | #include <plat/pxa3xx_nand.h> | ||
28 | |||
29 | #include <mach/pxafb.h> | ||
30 | #include <mach/mmc.h> | ||
31 | #include <mach/ohci.h> | ||
32 | #include <mach/pxa320.h> | ||
33 | |||
34 | #include <mach/mxm8x10.h> | ||
35 | |||
36 | #include "devices.h" | ||
37 | #include "generic.h" | ||
38 | |||
39 | /* GPIO pin definition | ||
40 | |||
41 | External device stuff - Leave unconfigured for now... | ||
42 | --------------------- | ||
43 | GPIO0 - DREQ (External DMA Request) | ||
44 | GPIO3 - nGCS2 (External Chip Select) Where is nGCS0; nGCS1; nGCS4; nGCS5 ? | ||
45 | GPIO4 - nGCS3 | ||
46 | GPIO15 - EXT_GPIO1 | ||
47 | GPIO16 - EXT_GPIO2 | ||
48 | GPIO17 - EXT_GPIO3 | ||
49 | GPIO24 - EXT_GPIO4 | ||
50 | GPIO25 - EXT_GPIO5 | ||
51 | GPIO26 - EXT_GPIO6 | ||
52 | GPIO27 - EXT_GPIO7 | ||
53 | GPIO28 - EXT_GPIO8 | ||
54 | GPIO29 - EXT_GPIO9 | ||
55 | GPIO30 - EXT_GPIO10 | ||
56 | GPIO31 - EXT_GPIO11 | ||
57 | GPIO57 - EXT_GPIO12 | ||
58 | GPIO74 - EXT_IRQ1 | ||
59 | GPIO75 - EXT_IRQ2 | ||
60 | GPIO76 - EXT_IRQ3 | ||
61 | GPIO77 - EXT_IRQ4 | ||
62 | GPIO78 - EXT_IRQ5 | ||
63 | GPIO79 - EXT_IRQ6 | ||
64 | GPIO80 - EXT_IRQ7 | ||
65 | GPIO81 - EXT_IRQ8 | ||
66 | GPIO87 - VCCIO_PWREN (External Device PWREN) | ||
67 | |||
68 | Dallas 1-Wire - Leave unconfigured for now... | ||
69 | ------------- | ||
70 | GPIO0_2 - DS - 1Wire | ||
71 | |||
72 | Ethernet | ||
73 | -------- | ||
74 | GPIO1 - DM9000 PWR | ||
75 | GPIO9 - DM9K_nIRQ | ||
76 | GPIO36 - DM9K_RESET | ||
77 | |||
78 | Keypad - Leave unconfigured by for now... | ||
79 | ------ | ||
80 | GPIO1_2 - KP_DKIN0 | ||
81 | GPIO5_2 - KP_MKOUT7 | ||
82 | GPIO82 - KP_DKIN1 | ||
83 | GPIO85 - KP_DKIN2 | ||
84 | GPIO86 - KP_DKIN3 | ||
85 | GPIO113 - KP_MKIN0 | ||
86 | GPIO114 - KP_MKIN1 | ||
87 | GPIO115 - KP_MKIN2 | ||
88 | GPIO116 - KP_MKIN3 | ||
89 | GPIO117 - KP_MKIN4 | ||
90 | GPIO118 - KP_MKIN5 | ||
91 | GPIO119 - KP_MKIN6 | ||
92 | GPIO120 - KP_MKIN7 | ||
93 | GPIO121 - KP_MKOUT0 | ||
94 | GPIO122 - KP_MKOUT1 | ||
95 | GPIO122 - KP_MKOUT2 | ||
96 | GPIO123 - KP_MKOUT3 | ||
97 | GPIO124 - KP_MKOUT4 | ||
98 | GPIO125 - KP_MKOUT5 | ||
99 | GPIO127 - KP_MKOUT6 | ||
100 | |||
101 | Data Bus - Leave unconfigured for now... | ||
102 | -------- | ||
103 | GPIO2 - nWait (Data Bus) | ||
104 | |||
105 | USB Device | ||
106 | ---------- | ||
107 | GPIO4_2 - USBD_PULLUP | ||
108 | GPIO10 - UTM_CLK (USB Device UTM Clk) | ||
109 | GPIO49 - USB 2.0 Device UTM_DATA0 | ||
110 | GPIO50 - USB 2.0 Device UTM_DATA1 | ||
111 | GPIO51 - USB 2.0 Device UTM_DATA2 | ||
112 | GPIO52 - USB 2.0 Device UTM_DATA3 | ||
113 | GPIO53 - USB 2.0 Device UTM_DATA4 | ||
114 | GPIO54 - USB 2.0 Device UTM_DATA5 | ||
115 | GPIO55 - USB 2.0 Device UTM_DATA6 | ||
116 | GPIO56 - USB 2.0 Device UTM_DATA7 | ||
117 | GPIO58 - UTM_RXVALID (USB 2.0 Device) | ||
118 | GPIO59 - UTM_RXACTIVE (USB 2.0 Device) | ||
119 | GPIO60 - UTM_RXERROR | ||
120 | GPIO61 - UTM_OPMODE0 | ||
121 | GPIO62 - UTM_OPMODE1 | ||
122 | GPIO71 - USBD_INT (USB Device?) | ||
123 | GPIO73 - UTM_TXREADY (USB 2.0 Device) | ||
124 | GPIO83 - UTM_TXVALID (USB 2.0 Device) | ||
125 | GPIO98 - UTM_RESET (USB 2.0 device) | ||
126 | GPIO99 - UTM_XCVR_SELECT | ||
127 | GPIO100 - UTM_TERM_SELECT | ||
128 | GPIO101 - UTM_SUSPENDM_X | ||
129 | GPIO102 - UTM_LINESTATE0 | ||
130 | GPIO103 - UTM_LINESTATE1 | ||
131 | |||
132 | Card-Bus Interface - Leave unconfigured for now... | ||
133 | ------------------ | ||
134 | GPIO5 - nPIOR (I/O space output enable) | ||
135 | GPIO6 - nPIOW (I/O space write enable) | ||
136 | GPIO7 - nIOS16 (Input from I/O space telling size of data bus) | ||
137 | GPIO8 - nPWAIT (Input for inserting wait states) | ||
138 | |||
139 | LCD | ||
140 | --- | ||
141 | GPIO6_2 - LDD0 | ||
142 | GPIO7_2 - LDD1 | ||
143 | GPIO8_2 - LDD2 | ||
144 | GPIO9_2 - LDD3 | ||
145 | GPIO11_2 - LDD5 | ||
146 | GPIO12_2 - LDD6 | ||
147 | GPIO13_2 - LDD7 | ||
148 | GPIO14_2 - VSYNC | ||
149 | GPIO15_2 - HSYNC | ||
150 | GPIO16_2 - VCLK | ||
151 | GPIO17_2 - HCLK | ||
152 | GPIO18_2 - VDEN | ||
153 | GPIO63 - LDD8 (CPU LCD) | ||
154 | GPIO64 - LDD9 (CPU LCD) | ||
155 | GPIO65 - LDD10 (CPU LCD) | ||
156 | GPIO66 - LDD11 (CPU LCD) | ||
157 | GPIO67 - LDD12 (CPU LCD) | ||
158 | GPIO68 - LDD13 (CPU LCD) | ||
159 | GPIO69 - LDD14 (CPU LCD) | ||
160 | GPIO70 - LDD15 (CPU LCD) | ||
161 | GPIO88 - VCCLCD_PWREN (LCD Panel PWREN) | ||
162 | GPIO97 - BACKLIGHT_EN | ||
163 | GPIO104 - LCD_PWREN | ||
164 | |||
165 | PWM - Leave unconfigured for now... | ||
166 | --- | ||
167 | GPIO11 - PWM0 | ||
168 | GPIO12 - PWM1 | ||
169 | GPIO13 - PWM2 | ||
170 | GPIO14 - PWM3 | ||
171 | |||
172 | SD-CARD | ||
173 | ------- | ||
174 | GPIO18 - SDDATA0 | ||
175 | GPIO19 - SDDATA1 | ||
176 | GPIO20 - SDDATA2 | ||
177 | GPIO21 - SDDATA3 | ||
178 | GPIO22 - SDCLK | ||
179 | GPIO23 - SDCMD | ||
180 | GPIO72 - SD_WP | ||
181 | GPIO84 - SD_nIRQ_CD (SD-Card) | ||
182 | |||
183 | I2C | ||
184 | --- | ||
185 | GPIO32 - I2CSCL | ||
186 | GPIO33 - I2CSDA | ||
187 | |||
188 | AC97 | ||
189 | ---- | ||
190 | GPIO35 - AC97_SDATA_IN | ||
191 | GPIO37 - AC97_SDATA_OUT | ||
192 | GPIO38 - AC97_SYNC | ||
193 | GPIO39 - AC97_BITCLK | ||
194 | GPIO40 - AC97_nRESET | ||
195 | |||
196 | UART1 | ||
197 | ----- | ||
198 | GPIO41 - UART_RXD1 | ||
199 | GPIO42 - UART_TXD1 | ||
200 | GPIO43 - UART_CTS1 | ||
201 | GPIO44 - UART_DCD1 | ||
202 | GPIO45 - UART_DSR1 | ||
203 | GPIO46 - UART_nRI1 | ||
204 | GPIO47 - UART_DTR1 | ||
205 | GPIO48 - UART_RTS1 | ||
206 | |||
207 | UART2 | ||
208 | ----- | ||
209 | GPIO109 - RTS2 | ||
210 | GPIO110 - RXD2 | ||
211 | GPIO111 - TXD2 | ||
212 | GPIO112 - nCTS2 | ||
213 | |||
214 | UART3 | ||
215 | ----- | ||
216 | GPIO105 - nCTS3 | ||
217 | GPIO106 - nRTS3 | ||
218 | GPIO107 - TXD3 | ||
219 | GPIO108 - RXD3 | ||
220 | |||
221 | SSP3 - Leave unconfigured for now... | ||
222 | ---- | ||
223 | GPIO89 - SSP3_CLK | ||
224 | GPIO90 - SSP3_SFRM | ||
225 | GPIO91 - SSP3_TXD | ||
226 | GPIO92 - SSP3_RXD | ||
227 | |||
228 | SSP4 | ||
229 | GPIO93 - SSP4_CLK | ||
230 | GPIO94 - SSP4_SFRM | ||
231 | GPIO95 - SSP4_TXD | ||
232 | GPIO96 - SSP4_RXD | ||
233 | */ | ||
234 | |||
235 | static mfp_cfg_t mfp_cfg[] __initdata = { | ||
236 | /* USB */ | ||
237 | GPIO10_UTM_CLK, | ||
238 | GPIO49_U2D_PHYDATA_0, | ||
239 | GPIO50_U2D_PHYDATA_1, | ||
240 | GPIO51_U2D_PHYDATA_2, | ||
241 | GPIO52_U2D_PHYDATA_3, | ||
242 | GPIO53_U2D_PHYDATA_4, | ||
243 | GPIO54_U2D_PHYDATA_5, | ||
244 | GPIO55_U2D_PHYDATA_6, | ||
245 | GPIO56_U2D_PHYDATA_7, | ||
246 | GPIO58_UTM_RXVALID, | ||
247 | GPIO59_UTM_RXACTIVE, | ||
248 | GPIO60_U2D_RXERROR, | ||
249 | GPIO61_U2D_OPMODE0, | ||
250 | GPIO62_U2D_OPMODE1, | ||
251 | GPIO71_GPIO, /* USBD_INT */ | ||
252 | GPIO73_UTM_TXREADY, | ||
253 | GPIO83_U2D_TXVALID, | ||
254 | GPIO98_U2D_RESET, | ||
255 | GPIO99_U2D_XCVR_SEL, | ||
256 | GPIO100_U2D_TERM_SEL, | ||
257 | GPIO101_U2D_SUSPEND, | ||
258 | GPIO102_UTM_LINESTATE_0, | ||
259 | GPIO103_UTM_LINESTATE_1, | ||
260 | GPIO4_2_GPIO | MFP_PULL_HIGH, /* UTM_PULLUP */ | ||
261 | |||
262 | /* DM9000 */ | ||
263 | GPIO1_GPIO, | ||
264 | GPIO9_GPIO, | ||
265 | GPIO36_GPIO, | ||
266 | |||
267 | /* AC97 */ | ||
268 | GPIO35_AC97_SDATA_IN_0, | ||
269 | GPIO37_AC97_SDATA_OUT, | ||
270 | GPIO38_AC97_SYNC, | ||
271 | GPIO39_AC97_BITCLK, | ||
272 | GPIO40_AC97_nACRESET, | ||
273 | |||
274 | /* UARTS */ | ||
275 | GPIO41_UART1_RXD, | ||
276 | GPIO42_UART1_TXD, | ||
277 | GPIO43_UART1_CTS, | ||
278 | GPIO44_UART1_DCD, | ||
279 | GPIO45_UART1_DSR, | ||
280 | GPIO46_UART1_RI, | ||
281 | GPIO47_UART1_DTR, | ||
282 | GPIO48_UART1_RTS, | ||
283 | |||
284 | GPIO109_UART2_RTS, | ||
285 | GPIO110_UART2_RXD, | ||
286 | GPIO111_UART2_TXD, | ||
287 | GPIO112_UART2_CTS, | ||
288 | |||
289 | GPIO105_UART3_CTS, | ||
290 | GPIO106_UART3_RTS, | ||
291 | GPIO107_UART3_TXD, | ||
292 | GPIO108_UART3_RXD, | ||
293 | |||
294 | GPIO78_GPIO, | ||
295 | GPIO79_GPIO, | ||
296 | GPIO80_GPIO, | ||
297 | GPIO81_GPIO, | ||
298 | |||
299 | /* I2C */ | ||
300 | GPIO32_I2C_SCL, | ||
301 | GPIO33_I2C_SDA, | ||
302 | |||
303 | /* MMC */ | ||
304 | GPIO18_MMC1_DAT0, | ||
305 | GPIO19_MMC1_DAT1, | ||
306 | GPIO20_MMC1_DAT2, | ||
307 | GPIO21_MMC1_DAT3, | ||
308 | GPIO22_MMC1_CLK, | ||
309 | GPIO23_MMC1_CMD, | ||
310 | GPIO72_GPIO | MFP_PULL_HIGH, /* Card Detect */ | ||
311 | GPIO84_GPIO | MFP_PULL_LOW, /* Write Protect */ | ||
312 | |||
313 | /* IRQ */ | ||
314 | GPIO74_GPIO | MFP_LPM_EDGE_RISE, /* EXT_IRQ1 */ | ||
315 | GPIO75_GPIO | MFP_LPM_EDGE_RISE, /* EXT_IRQ2 */ | ||
316 | GPIO76_GPIO | MFP_LPM_EDGE_RISE, /* EXT_IRQ3 */ | ||
317 | GPIO77_GPIO | MFP_LPM_EDGE_RISE, /* EXT_IRQ4 */ | ||
318 | GPIO78_GPIO | MFP_LPM_EDGE_RISE, /* EXT_IRQ5 */ | ||
319 | GPIO79_GPIO | MFP_LPM_EDGE_RISE, /* EXT_IRQ6 */ | ||
320 | GPIO80_GPIO | MFP_LPM_EDGE_RISE, /* EXT_IRQ7 */ | ||
321 | GPIO81_GPIO | MFP_LPM_EDGE_RISE /* EXT_IRQ8 */ | ||
322 | }; | ||
323 | |||
324 | /* MMC/MCI Support */ | ||
325 | #if defined(CONFIG_MMC) | ||
326 | static struct pxamci_platform_data mxm_8x10_mci_platform_data = { | ||
327 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | ||
328 | .detect_delay = 1, | ||
329 | .gpio_card_detect = MXM_8X10_SD_nCD, | ||
330 | .gpio_card_ro = MXM_8X10_SD_WP, | ||
331 | .gpio_power = -1 | ||
332 | }; | ||
333 | |||
334 | void __init mxm_8x10_mmc_init(void) | ||
335 | { | ||
336 | pxa_set_mci_info(&mxm_8x10_mci_platform_data); | ||
337 | } | ||
338 | #endif | ||
339 | |||
340 | /* USB Open Host Controler Interface */ | ||
341 | static struct pxaohci_platform_data mxm_8x10_ohci_platform_data = { | ||
342 | .port_mode = PMM_NPS_MODE, | ||
343 | .flags = ENABLE_PORT_ALL | ||
344 | }; | ||
345 | |||
346 | void __init mxm_8x10_usb_host_init(void) | ||
347 | { | ||
348 | pxa_set_ohci_info(&mxm_8x10_ohci_platform_data); | ||
349 | } | ||
350 | |||
351 | /* AC97 Sound Support */ | ||
352 | static struct platform_device mxm_8x10_ac97_device = { | ||
353 | .name = "pxa2xx-ac97" | ||
354 | }; | ||
355 | |||
356 | void __init mxm_8x10_ac97_init(void) | ||
357 | { | ||
358 | platform_device_register(&mxm_8x10_ac97_device); | ||
359 | } | ||
360 | |||
361 | /* NAND flash Support */ | ||
362 | #if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE) | ||
363 | #define NAND_BLOCK_SIZE SZ_128K | ||
364 | #define NB(x) (NAND_BLOCK_SIZE * (x)) | ||
365 | static struct mtd_partition mxm_8x10_nand_partitions[] = { | ||
366 | [0] = { | ||
367 | .name = "boot", | ||
368 | .size = NB(0x002), | ||
369 | .offset = NB(0x000), | ||
370 | .mask_flags = MTD_WRITEABLE | ||
371 | }, | ||
372 | [1] = { | ||
373 | .name = "kernel", | ||
374 | .size = NB(0x010), | ||
375 | .offset = NB(0x002), | ||
376 | .mask_flags = MTD_WRITEABLE | ||
377 | }, | ||
378 | [2] = { | ||
379 | .name = "root", | ||
380 | .size = NB(0x36c), | ||
381 | .offset = NB(0x012) | ||
382 | }, | ||
383 | [3] = { | ||
384 | .name = "bbt", | ||
385 | .size = NB(0x082), | ||
386 | .offset = NB(0x37e), | ||
387 | .mask_flags = MTD_WRITEABLE | ||
388 | } | ||
389 | }; | ||
390 | |||
391 | static struct pxa3xx_nand_platform_data mxm_8x10_nand_info = { | ||
392 | .enable_arbiter = 1, | ||
393 | .keep_config = 1, | ||
394 | .parts = mxm_8x10_nand_partitions, | ||
395 | .nr_parts = ARRAY_SIZE(mxm_8x10_nand_partitions) | ||
396 | }; | ||
397 | |||
398 | static void __init mxm_8x10_nand_init(void) | ||
399 | { | ||
400 | pxa3xx_set_nand_info(&mxm_8x10_nand_info); | ||
401 | } | ||
402 | #else | ||
403 | static inline void mxm_8x10_nand_init(void) {} | ||
404 | #endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */ | ||
405 | |||
406 | /* Ethernet support: Davicom DM9000 */ | ||
407 | static struct resource dm9k_resources[] = { | ||
408 | [0] = { | ||
409 | .start = MXM_8X10_ETH_PHYS + 0x300, | ||
410 | .end = MXM_8X10_ETH_PHYS + 0x300, | ||
411 | .flags = IORESOURCE_MEM | ||
412 | }, | ||
413 | [1] = { | ||
414 | .start = MXM_8X10_ETH_PHYS + 0x308, | ||
415 | .end = MXM_8X10_ETH_PHYS + 0x308, | ||
416 | .flags = IORESOURCE_MEM | ||
417 | }, | ||
418 | [2] = { | ||
419 | .start = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO9)), | ||
420 | .end = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO9)), | ||
421 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | ||
422 | } | ||
423 | }; | ||
424 | |||
425 | static struct dm9000_plat_data dm9k_plat_data = { | ||
426 | .flags = DM9000_PLATF_16BITONLY | ||
427 | }; | ||
428 | |||
429 | static struct platform_device dm9k_device = { | ||
430 | .name = "dm9000", | ||
431 | .id = 0, | ||
432 | .num_resources = ARRAY_SIZE(dm9k_resources), | ||
433 | .resource = dm9k_resources, | ||
434 | .dev = { | ||
435 | .platform_data = &dm9k_plat_data | ||
436 | } | ||
437 | }; | ||
438 | |||
439 | static void __init mxm_8x10_ethernet_init(void) | ||
440 | { | ||
441 | platform_device_register(&dm9k_device); | ||
442 | } | ||
443 | |||
444 | /* PXA UARTs */ | ||
445 | static void __init mxm_8x10_uarts_init(void) | ||
446 | { | ||
447 | pxa_set_ffuart_info(NULL); | ||
448 | pxa_set_btuart_info(NULL); | ||
449 | pxa_set_stuart_info(NULL); | ||
450 | } | ||
451 | |||
452 | /* I2C and Real Time Clock */ | ||
453 | static struct i2c_board_info __initdata mxm_8x10_i2c_devices[] = { | ||
454 | { | ||
455 | I2C_BOARD_INFO("ds1337", 0x68) | ||
456 | } | ||
457 | }; | ||
458 | |||
459 | static void __init mxm_8x10_i2c_init(void) | ||
460 | { | ||
461 | i2c_register_board_info(0, mxm_8x10_i2c_devices, | ||
462 | ARRAY_SIZE(mxm_8x10_i2c_devices)); | ||
463 | pxa_set_i2c_info(NULL); | ||
464 | } | ||
465 | |||
466 | void __init mxm_8x10_barebones_init(void) | ||
467 | { | ||
468 | pxa3xx_mfp_config(ARRAY_AND_SIZE(mfp_cfg)); | ||
469 | |||
470 | mxm_8x10_uarts_init(); | ||
471 | mxm_8x10_nand_init(); | ||
472 | mxm_8x10_i2c_init(); | ||
473 | mxm_8x10_ethernet_init(); | ||
474 | } | ||
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c index e100af78b166..f70c75b38769 100644 --- a/arch/arm/mach-pxa/palmld.c +++ b/arch/arm/mach-pxa/palmld.c | |||
@@ -83,26 +83,7 @@ static unsigned long palmld_pin_config[] __initdata = { | |||
83 | GPIO105_KP_MKOUT_2, | 83 | GPIO105_KP_MKOUT_2, |
84 | 84 | ||
85 | /* LCD */ | 85 | /* LCD */ |
86 | GPIO58_LCD_LDD_0, | 86 | GPIOxx_LCD_TFT_16BPP, |
87 | GPIO59_LCD_LDD_1, | ||
88 | GPIO60_LCD_LDD_2, | ||
89 | GPIO61_LCD_LDD_3, | ||
90 | GPIO62_LCD_LDD_4, | ||
91 | GPIO63_LCD_LDD_5, | ||
92 | GPIO64_LCD_LDD_6, | ||
93 | GPIO65_LCD_LDD_7, | ||
94 | GPIO66_LCD_LDD_8, | ||
95 | GPIO67_LCD_LDD_9, | ||
96 | GPIO68_LCD_LDD_10, | ||
97 | GPIO69_LCD_LDD_11, | ||
98 | GPIO70_LCD_LDD_12, | ||
99 | GPIO71_LCD_LDD_13, | ||
100 | GPIO72_LCD_LDD_14, | ||
101 | GPIO73_LCD_LDD_15, | ||
102 | GPIO74_LCD_FCLK, | ||
103 | GPIO75_LCD_LCLK, | ||
104 | GPIO76_LCD_PCLK, | ||
105 | GPIO77_LCD_BIAS, | ||
106 | 87 | ||
107 | /* PWM */ | 88 | /* PWM */ |
108 | GPIO16_PWM0_OUT, | 89 | GPIO16_PWM0_OUT, |
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c index 8fe3ec27568f..d902a813aae3 100644 --- a/arch/arm/mach-pxa/palmt5.c +++ b/arch/arm/mach-pxa/palmt5.c | |||
@@ -87,26 +87,7 @@ static unsigned long palmt5_pin_config[] __initdata = { | |||
87 | GPIO105_KP_MKOUT_2, | 87 | GPIO105_KP_MKOUT_2, |
88 | 88 | ||
89 | /* LCD */ | 89 | /* LCD */ |
90 | GPIO58_LCD_LDD_0, | 90 | GPIOxx_LCD_TFT_16BPP, |
91 | GPIO59_LCD_LDD_1, | ||
92 | GPIO60_LCD_LDD_2, | ||
93 | GPIO61_LCD_LDD_3, | ||
94 | GPIO62_LCD_LDD_4, | ||
95 | GPIO63_LCD_LDD_5, | ||
96 | GPIO64_LCD_LDD_6, | ||
97 | GPIO65_LCD_LDD_7, | ||
98 | GPIO66_LCD_LDD_8, | ||
99 | GPIO67_LCD_LDD_9, | ||
100 | GPIO68_LCD_LDD_10, | ||
101 | GPIO69_LCD_LDD_11, | ||
102 | GPIO70_LCD_LDD_12, | ||
103 | GPIO71_LCD_LDD_13, | ||
104 | GPIO72_LCD_LDD_14, | ||
105 | GPIO73_LCD_LDD_15, | ||
106 | GPIO74_LCD_FCLK, | ||
107 | GPIO75_LCD_LCLK, | ||
108 | GPIO76_LCD_PCLK, | ||
109 | GPIO77_LCD_BIAS, | ||
110 | 91 | ||
111 | /* PWM */ | 92 | /* PWM */ |
112 | GPIO16_PWM0_OUT, | 93 | GPIO16_PWM0_OUT, |
diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c index b992f07ece21..717d7a638675 100644 --- a/arch/arm/mach-pxa/palmtc.c +++ b/arch/arm/mach-pxa/palmtc.c | |||
@@ -84,26 +84,7 @@ static unsigned long palmtc_pin_config[] __initdata = { | |||
84 | GPIO36_GPIO, /* pullup */ | 84 | GPIO36_GPIO, /* pullup */ |
85 | 85 | ||
86 | /* LCD */ | 86 | /* LCD */ |
87 | GPIO58_LCD_LDD_0, | 87 | GPIOxx_LCD_TFT_16BPP, |
88 | GPIO59_LCD_LDD_1, | ||
89 | GPIO60_LCD_LDD_2, | ||
90 | GPIO61_LCD_LDD_3, | ||
91 | GPIO62_LCD_LDD_4, | ||
92 | GPIO63_LCD_LDD_5, | ||
93 | GPIO64_LCD_LDD_6, | ||
94 | GPIO65_LCD_LDD_7, | ||
95 | GPIO66_LCD_LDD_8, | ||
96 | GPIO67_LCD_LDD_9, | ||
97 | GPIO68_LCD_LDD_10, | ||
98 | GPIO69_LCD_LDD_11, | ||
99 | GPIO70_LCD_LDD_12, | ||
100 | GPIO71_LCD_LDD_13, | ||
101 | GPIO72_LCD_LDD_14, | ||
102 | GPIO73_LCD_LDD_15, | ||
103 | GPIO74_LCD_FCLK, | ||
104 | GPIO75_LCD_LCLK, | ||
105 | GPIO76_LCD_PCLK, | ||
106 | GPIO77_LCD_BIAS, | ||
107 | 88 | ||
108 | /* MATRIX KEYPAD */ | 89 | /* MATRIX KEYPAD */ |
109 | GPIO0_GPIO | WAKEUP_ON_EDGE_BOTH, /* in 0 */ | 90 | GPIO0_GPIO | WAKEUP_ON_EDGE_BOTH, /* in 0 */ |
diff --git a/arch/arm/mach-pxa/palmte2.c b/arch/arm/mach-pxa/palmte2.c index dc728d6ab94e..3d284ff1a64e 100644 --- a/arch/arm/mach-pxa/palmte2.c +++ b/arch/arm/mach-pxa/palmte2.c | |||
@@ -73,26 +73,7 @@ static unsigned long palmte2_pin_config[] __initdata = { | |||
73 | GPIO47_FICP_TXD, | 73 | GPIO47_FICP_TXD, |
74 | 74 | ||
75 | /* LCD */ | 75 | /* LCD */ |
76 | GPIO58_LCD_LDD_0, | 76 | GPIOxx_LCD_TFT_16BPP, |
77 | GPIO59_LCD_LDD_1, | ||
78 | GPIO60_LCD_LDD_2, | ||
79 | GPIO61_LCD_LDD_3, | ||
80 | GPIO62_LCD_LDD_4, | ||
81 | GPIO63_LCD_LDD_5, | ||
82 | GPIO64_LCD_LDD_6, | ||
83 | GPIO65_LCD_LDD_7, | ||
84 | GPIO66_LCD_LDD_8, | ||
85 | GPIO67_LCD_LDD_9, | ||
86 | GPIO68_LCD_LDD_10, | ||
87 | GPIO69_LCD_LDD_11, | ||
88 | GPIO70_LCD_LDD_12, | ||
89 | GPIO71_LCD_LDD_13, | ||
90 | GPIO72_LCD_LDD_14, | ||
91 | GPIO73_LCD_LDD_15, | ||
92 | GPIO74_LCD_FCLK, | ||
93 | GPIO75_LCD_LCLK, | ||
94 | GPIO76_LCD_PCLK, | ||
95 | GPIO77_LCD_BIAS, | ||
96 | 77 | ||
97 | /* GPIO KEYS */ | 78 | /* GPIO KEYS */ |
98 | GPIO5_GPIO, /* notes */ | 79 | GPIO5_GPIO, /* notes */ |
diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c index b433bb496711..d8b4469607a1 100644 --- a/arch/arm/mach-pxa/palmtreo.c +++ b/arch/arm/mach-pxa/palmtreo.c | |||
@@ -99,25 +99,7 @@ static unsigned long treo_pin_config[] __initdata = { | |||
99 | GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH, /* Hotsync button */ | 99 | GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH, /* Hotsync button */ |
100 | 100 | ||
101 | /* LCD */ | 101 | /* LCD */ |
102 | GPIO58_LCD_LDD_0, | 102 | GPIOxx_LCD_TFT_16BPP, |
103 | GPIO59_LCD_LDD_1, | ||
104 | GPIO60_LCD_LDD_2, | ||
105 | GPIO61_LCD_LDD_3, | ||
106 | GPIO62_LCD_LDD_4, | ||
107 | GPIO63_LCD_LDD_5, | ||
108 | GPIO64_LCD_LDD_6, | ||
109 | GPIO65_LCD_LDD_7, | ||
110 | GPIO66_LCD_LDD_8, | ||
111 | GPIO67_LCD_LDD_9, | ||
112 | GPIO68_LCD_LDD_10, | ||
113 | GPIO69_LCD_LDD_11, | ||
114 | GPIO70_LCD_LDD_12, | ||
115 | GPIO71_LCD_LDD_13, | ||
116 | GPIO72_LCD_LDD_14, | ||
117 | GPIO73_LCD_LDD_15, | ||
118 | GPIO74_LCD_FCLK, | ||
119 | GPIO75_LCD_LCLK, | ||
120 | GPIO76_LCD_PCLK, | ||
121 | 103 | ||
122 | /* Quick Capture Interface */ | 104 | /* Quick Capture Interface */ |
123 | GPIO84_CIF_FV, | 105 | GPIO84_CIF_FV, |
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c index b37a025c0b7b..007b58c11f8d 100644 --- a/arch/arm/mach-pxa/palmtx.c +++ b/arch/arm/mach-pxa/palmtx.c | |||
@@ -110,26 +110,7 @@ static unsigned long palmtx_pin_config[] __initdata = { | |||
110 | GPIO105_KP_MKOUT_2, | 110 | GPIO105_KP_MKOUT_2, |
111 | 111 | ||
112 | /* LCD */ | 112 | /* LCD */ |
113 | GPIO58_LCD_LDD_0, | 113 | GPIOxx_LCD_TFT_16BPP, |
114 | GPIO59_LCD_LDD_1, | ||
115 | GPIO60_LCD_LDD_2, | ||
116 | GPIO61_LCD_LDD_3, | ||
117 | GPIO62_LCD_LDD_4, | ||
118 | GPIO63_LCD_LDD_5, | ||
119 | GPIO64_LCD_LDD_6, | ||
120 | GPIO65_LCD_LDD_7, | ||
121 | GPIO66_LCD_LDD_8, | ||
122 | GPIO67_LCD_LDD_9, | ||
123 | GPIO68_LCD_LDD_10, | ||
124 | GPIO69_LCD_LDD_11, | ||
125 | GPIO70_LCD_LDD_12, | ||
126 | GPIO71_LCD_LDD_13, | ||
127 | GPIO72_LCD_LDD_14, | ||
128 | GPIO73_LCD_LDD_15, | ||
129 | GPIO74_LCD_FCLK, | ||
130 | GPIO75_LCD_LCLK, | ||
131 | GPIO76_LCD_PCLK, | ||
132 | GPIO77_LCD_BIAS, | ||
133 | 114 | ||
134 | /* FFUART */ | 115 | /* FFUART */ |
135 | GPIO34_FFUART_RXD, | 116 | GPIO34_FFUART_RXD, |
diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c index 1c5d68a94511..3a7925ca3944 100644 --- a/arch/arm/mach-pxa/palmz72.c +++ b/arch/arm/mach-pxa/palmz72.c | |||
@@ -95,26 +95,8 @@ static unsigned long palmz72_pin_config[] __initdata = { | |||
95 | GPIO105_KP_MKOUT_2, | 95 | GPIO105_KP_MKOUT_2, |
96 | 96 | ||
97 | /* LCD */ | 97 | /* LCD */ |
98 | GPIO58_LCD_LDD_0, | 98 | GPIOxx_LCD_TFT_16BPP, |
99 | GPIO59_LCD_LDD_1, | 99 | |
100 | GPIO60_LCD_LDD_2, | ||
101 | GPIO61_LCD_LDD_3, | ||
102 | GPIO62_LCD_LDD_4, | ||
103 | GPIO63_LCD_LDD_5, | ||
104 | GPIO64_LCD_LDD_6, | ||
105 | GPIO65_LCD_LDD_7, | ||
106 | GPIO66_LCD_LDD_8, | ||
107 | GPIO67_LCD_LDD_9, | ||
108 | GPIO68_LCD_LDD_10, | ||
109 | GPIO69_LCD_LDD_11, | ||
110 | GPIO70_LCD_LDD_12, | ||
111 | GPIO71_LCD_LDD_13, | ||
112 | GPIO72_LCD_LDD_14, | ||
113 | GPIO73_LCD_LDD_15, | ||
114 | GPIO74_LCD_FCLK, | ||
115 | GPIO75_LCD_LCLK, | ||
116 | GPIO76_LCD_PCLK, | ||
117 | GPIO77_LCD_BIAS, | ||
118 | GPIO20_GPIO, /* bl power */ | 100 | GPIO20_GPIO, /* bl power */ |
119 | GPIO21_GPIO, /* LCD border switch */ | 101 | GPIO21_GPIO, /* LCD border switch */ |
120 | GPIO22_GPIO, /* LCD border color */ | 102 | GPIO22_GPIO, /* LCD border color */ |
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index d5255ae74fe3..9d0ecea1760c 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c | |||
@@ -58,6 +58,12 @@ static unsigned long pcm990_pin_config[] __initdata = { | |||
58 | /* I2C */ | 58 | /* I2C */ |
59 | GPIO117_I2C_SCL, | 59 | GPIO117_I2C_SCL, |
60 | GPIO118_I2C_SDA, | 60 | GPIO118_I2C_SDA, |
61 | |||
62 | /* AC97 */ | ||
63 | GPIO28_AC97_BITCLK, | ||
64 | GPIO29_AC97_SDATA_IN_0, | ||
65 | GPIO30_AC97_SDATA_OUT, | ||
66 | GPIO31_AC97_SYNC, | ||
61 | }; | 67 | }; |
62 | 68 | ||
63 | /* | 69 | /* |
@@ -259,8 +265,7 @@ static void pcm990_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
259 | unsigned long pending = (~PCM990_INTSETCLR) & pcm990_irq_enabled; | 265 | unsigned long pending = (~PCM990_INTSETCLR) & pcm990_irq_enabled; |
260 | 266 | ||
261 | do { | 267 | do { |
262 | GEDR(PCM990_CTRL_INT_IRQ_GPIO) = | 268 | desc->chip->ack(irq); /* clear our parent IRQ */ |
263 | GPIO_bit(PCM990_CTRL_INT_IRQ_GPIO); | ||
264 | if (likely(pending)) { | 269 | if (likely(pending)) { |
265 | irq = PCM027_IRQ(0) + __ffs(pending); | 270 | irq = PCM027_IRQ(0) + __ffs(pending); |
266 | generic_handle_irq(irq); | 271 | generic_handle_irq(irq); |
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index c2b938a4d5c9..d58a52415d75 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -91,26 +91,7 @@ static unsigned long poodle_pin_config[] __initdata = { | |||
91 | GPIO35_FFUART_CTS, | 91 | GPIO35_FFUART_CTS, |
92 | 92 | ||
93 | /* LCD */ | 93 | /* LCD */ |
94 | GPIO58_LCD_LDD_0, | 94 | GPIOxx_LCD_TFT_16BPP, |
95 | GPIO59_LCD_LDD_1, | ||
96 | GPIO60_LCD_LDD_2, | ||
97 | GPIO61_LCD_LDD_3, | ||
98 | GPIO62_LCD_LDD_4, | ||
99 | GPIO63_LCD_LDD_5, | ||
100 | GPIO64_LCD_LDD_6, | ||
101 | GPIO65_LCD_LDD_7, | ||
102 | GPIO66_LCD_LDD_8, | ||
103 | GPIO67_LCD_LDD_9, | ||
104 | GPIO68_LCD_LDD_10, | ||
105 | GPIO69_LCD_LDD_11, | ||
106 | GPIO70_LCD_LDD_12, | ||
107 | GPIO71_LCD_LDD_13, | ||
108 | GPIO72_LCD_LDD_14, | ||
109 | GPIO73_LCD_LDD_15, | ||
110 | GPIO74_LCD_FCLK, | ||
111 | GPIO75_LCD_LCLK, | ||
112 | GPIO76_LCD_PCLK, | ||
113 | GPIO77_LCD_BIAS, | ||
114 | 95 | ||
115 | /* PC Card */ | 96 | /* PC Card */ |
116 | GPIO48_nPOE, | 97 | GPIO48_nPOE, |
@@ -193,11 +174,18 @@ static struct resource locomo_resources[] = { | |||
193 | }, | 174 | }, |
194 | }; | 175 | }; |
195 | 176 | ||
177 | static struct locomo_platform_data locomo_info = { | ||
178 | .irq_base = IRQ_BOARD_START, | ||
179 | }; | ||
180 | |||
196 | struct platform_device poodle_locomo_device = { | 181 | struct platform_device poodle_locomo_device = { |
197 | .name = "locomo", | 182 | .name = "locomo", |
198 | .id = 0, | 183 | .id = 0, |
199 | .num_resources = ARRAY_SIZE(locomo_resources), | 184 | .num_resources = ARRAY_SIZE(locomo_resources), |
200 | .resource = locomo_resources, | 185 | .resource = locomo_resources, |
186 | .dev = { | ||
187 | .platform_data = &locomo_info, | ||
188 | }, | ||
201 | }; | 189 | }; |
202 | 190 | ||
203 | EXPORT_SYMBOL(poodle_locomo_device); | 191 | EXPORT_SYMBOL(poodle_locomo_device); |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index d783123e2d48..0af36177ff08 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -40,6 +40,25 @@ void pxa27x_clear_otgph(void) | |||
40 | } | 40 | } |
41 | EXPORT_SYMBOL(pxa27x_clear_otgph); | 41 | EXPORT_SYMBOL(pxa27x_clear_otgph); |
42 | 42 | ||
43 | static unsigned long ac97_reset_config[] = { | ||
44 | GPIO95_AC97_nRESET, | ||
45 | GPIO95_GPIO, | ||
46 | GPIO113_AC97_nRESET, | ||
47 | GPIO113_GPIO, | ||
48 | }; | ||
49 | |||
50 | void pxa27x_assert_ac97reset(int reset_gpio, int on) | ||
51 | { | ||
52 | if (reset_gpio == 113) | ||
53 | pxa2xx_mfp_config(on ? &ac97_reset_config[0] : | ||
54 | &ac97_reset_config[1], 1); | ||
55 | |||
56 | if (reset_gpio == 95) | ||
57 | pxa2xx_mfp_config(on ? &ac97_reset_config[2] : | ||
58 | &ac97_reset_config[3], 1); | ||
59 | } | ||
60 | EXPORT_SYMBOL_GPL(pxa27x_assert_ac97reset); | ||
61 | |||
43 | /* Crystal clock: 13MHz */ | 62 | /* Crystal clock: 13MHz */ |
44 | #define BASE_CLK 13000000 | 63 | #define BASE_CLK 13000000 |
45 | 64 | ||
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c new file mode 100644 index 000000000000..3184bdc14526 --- /dev/null +++ b/arch/arm/mach-pxa/raumfeld.c | |||
@@ -0,0 +1,1108 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-pxa/raumfeld.c | ||
3 | * | ||
4 | * Support for the following Raumfeld devices: | ||
5 | * | ||
6 | * * Controller | ||
7 | * * Connector | ||
8 | * * Speaker S/M | ||
9 | * | ||
10 | * See http://www.raumfeld.com for details. | ||
11 | * | ||
12 | * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de> | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License version 2 as | ||
16 | * published by the Free Software Foundation. | ||
17 | */ | ||
18 | |||
19 | #include <linux/init.h> | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/sysdev.h> | ||
22 | #include <linux/platform_device.h> | ||
23 | #include <linux/interrupt.h> | ||
24 | #include <linux/gpio.h> | ||
25 | #include <linux/smsc911x.h> | ||
26 | #include <linux/input.h> | ||
27 | #include <linux/rotary_encoder.h> | ||
28 | #include <linux/gpio_keys.h> | ||
29 | #include <linux/input/eeti_ts.h> | ||
30 | #include <linux/leds.h> | ||
31 | #include <linux/w1-gpio.h> | ||
32 | #include <linux/sched.h> | ||
33 | #include <linux/pwm_backlight.h> | ||
34 | #include <linux/i2c.h> | ||
35 | #include <linux/spi/spi.h> | ||
36 | #include <linux/spi/spi_gpio.h> | ||
37 | #include <linux/lis3lv02d.h> | ||
38 | #include <linux/pda_power.h> | ||
39 | #include <linux/power_supply.h> | ||
40 | #include <linux/pda_power.h> | ||
41 | #include <linux/power_supply.h> | ||
42 | #include <linux/regulator/max8660.h> | ||
43 | #include <linux/regulator/machine.h> | ||
44 | #include <linux/regulator/fixed.h> | ||
45 | #include <linux/regulator/consumer.h> | ||
46 | #include <linux/delay.h> | ||
47 | |||
48 | #include <asm/mach-types.h> | ||
49 | #include <asm/mach/arch.h> | ||
50 | |||
51 | #include <mach/hardware.h> | ||
52 | #include <mach/pxa3xx-regs.h> | ||
53 | #include <mach/mfp-pxa3xx.h> | ||
54 | #include <mach/mfp-pxa300.h> | ||
55 | #include <mach/ohci.h> | ||
56 | #include <mach/pxafb.h> | ||
57 | #include <mach/mmc.h> | ||
58 | #include <plat/i2c.h> | ||
59 | #include <plat/pxa3xx_nand.h> | ||
60 | |||
61 | #include "generic.h" | ||
62 | #include "devices.h" | ||
63 | #include "clock.h" | ||
64 | |||
65 | /* common GPIO definitions */ | ||
66 | |||
67 | /* inputs */ | ||
68 | #define GPIO_ON_OFF (14) | ||
69 | #define GPIO_VOLENC_A (19) | ||
70 | #define GPIO_VOLENC_B (20) | ||
71 | #define GPIO_CHARGE_DONE (23) | ||
72 | #define GPIO_CHARGE_IND (27) | ||
73 | #define GPIO_TOUCH_IRQ (32) | ||
74 | #define GPIO_ETH_IRQ (40) | ||
75 | #define GPIO_SPI_MISO (98) | ||
76 | #define GPIO_ACCEL_IRQ (104) | ||
77 | #define GPIO_RESCUE_BOOT (115) | ||
78 | #define GPIO_DOCK_DETECT (116) | ||
79 | #define GPIO_KEY1 (117) | ||
80 | #define GPIO_KEY2 (118) | ||
81 | #define GPIO_KEY3 (119) | ||
82 | #define GPIO_CHARGE_USB_OK (112) | ||
83 | #define GPIO_CHARGE_DC_OK (101) | ||
84 | #define GPIO_CHARGE_USB_SUSP (102) | ||
85 | |||
86 | /* outputs */ | ||
87 | #define GPIO_SHUTDOWN_SUPPLY (16) | ||
88 | #define GPIO_SHUTDOWN_BATT (18) | ||
89 | #define GPIO_CHRG_PEN2 (31) | ||
90 | #define GPIO_TFT_VA_EN (33) | ||
91 | #define GPIO_SPDIF_CS (34) | ||
92 | #define GPIO_LED2 (35) | ||
93 | #define GPIO_LED1 (36) | ||
94 | #define GPIO_SPDIF_RESET (38) | ||
95 | #define GPIO_SPI_CLK (95) | ||
96 | #define GPIO_MCLK_DAC_CS (96) | ||
97 | #define GPIO_SPI_MOSI (97) | ||
98 | #define GPIO_W1_PULLUP_ENABLE (105) | ||
99 | #define GPIO_DISPLAY_ENABLE (106) | ||
100 | #define GPIO_MCLK_RESET (111) | ||
101 | #define GPIO_W2W_RESET (113) | ||
102 | #define GPIO_W2W_PDN (114) | ||
103 | #define GPIO_CODEC_RESET (120) | ||
104 | #define GPIO_AUDIO_VA_ENABLE (124) | ||
105 | #define GPIO_ACCEL_CS (125) | ||
106 | #define GPIO_ONE_WIRE (126) | ||
107 | |||
108 | /* | ||
109 | * GPIO configurations | ||
110 | */ | ||
111 | static mfp_cfg_t raumfeld_controller_pin_config[] __initdata = { | ||
112 | /* UART1 */ | ||
113 | GPIO77_UART1_RXD, | ||
114 | GPIO78_UART1_TXD, | ||
115 | GPIO79_UART1_CTS, | ||
116 | GPIO81_UART1_DSR, | ||
117 | GPIO83_UART1_DTR, | ||
118 | GPIO84_UART1_RTS, | ||
119 | |||
120 | /* UART3 */ | ||
121 | GPIO110_UART3_RXD, | ||
122 | |||
123 | /* USB Host */ | ||
124 | GPIO0_2_USBH_PEN, | ||
125 | GPIO1_2_USBH_PWR, | ||
126 | |||
127 | /* I2C */ | ||
128 | GPIO21_I2C_SCL | MFP_LPM_FLOAT | MFP_PULL_FLOAT, | ||
129 | GPIO22_I2C_SDA | MFP_LPM_FLOAT | MFP_PULL_FLOAT, | ||
130 | |||
131 | /* SPI */ | ||
132 | GPIO34_GPIO, /* SPDIF_CS */ | ||
133 | GPIO96_GPIO, /* MCLK_CS */ | ||
134 | GPIO125_GPIO, /* ACCEL_CS */ | ||
135 | |||
136 | /* MMC */ | ||
137 | GPIO3_MMC1_DAT0, | ||
138 | GPIO4_MMC1_DAT1, | ||
139 | GPIO5_MMC1_DAT2, | ||
140 | GPIO6_MMC1_DAT3, | ||
141 | GPIO7_MMC1_CLK, | ||
142 | GPIO8_MMC1_CMD, | ||
143 | |||
144 | /* One-wire */ | ||
145 | GPIO126_GPIO | MFP_LPM_FLOAT, | ||
146 | GPIO105_GPIO | MFP_PULL_LOW | MFP_LPM_PULL_LOW, | ||
147 | |||
148 | /* CHRG_USB_OK */ | ||
149 | GPIO101_GPIO | MFP_PULL_HIGH, | ||
150 | /* CHRG_USB_OK */ | ||
151 | GPIO112_GPIO | MFP_PULL_HIGH, | ||
152 | /* CHRG_USB_SUSP */ | ||
153 | GPIO102_GPIO, | ||
154 | /* DISPLAY_ENABLE */ | ||
155 | GPIO106_GPIO, | ||
156 | /* DOCK_DETECT */ | ||
157 | GPIO116_GPIO | MFP_LPM_FLOAT | MFP_PULL_FLOAT, | ||
158 | |||
159 | /* LCD */ | ||
160 | GPIO54_LCD_LDD_0, | ||
161 | GPIO55_LCD_LDD_1, | ||
162 | GPIO56_LCD_LDD_2, | ||
163 | GPIO57_LCD_LDD_3, | ||
164 | GPIO58_LCD_LDD_4, | ||
165 | GPIO59_LCD_LDD_5, | ||
166 | GPIO60_LCD_LDD_6, | ||
167 | GPIO61_LCD_LDD_7, | ||
168 | GPIO62_LCD_LDD_8, | ||
169 | GPIO63_LCD_LDD_9, | ||
170 | GPIO64_LCD_LDD_10, | ||
171 | GPIO65_LCD_LDD_11, | ||
172 | GPIO66_LCD_LDD_12, | ||
173 | GPIO67_LCD_LDD_13, | ||
174 | GPIO68_LCD_LDD_14, | ||
175 | GPIO69_LCD_LDD_15, | ||
176 | GPIO70_LCD_LDD_16, | ||
177 | GPIO71_LCD_LDD_17, | ||
178 | GPIO72_LCD_FCLK, | ||
179 | GPIO73_LCD_LCLK, | ||
180 | GPIO74_LCD_PCLK, | ||
181 | GPIO75_LCD_BIAS, | ||
182 | }; | ||
183 | |||
184 | static mfp_cfg_t raumfeld_connector_pin_config[] __initdata = { | ||
185 | /* UART1 */ | ||
186 | GPIO77_UART1_RXD, | ||
187 | GPIO78_UART1_TXD, | ||
188 | GPIO79_UART1_CTS, | ||
189 | GPIO81_UART1_DSR, | ||
190 | GPIO83_UART1_DTR, | ||
191 | GPIO84_UART1_RTS, | ||
192 | |||
193 | /* UART3 */ | ||
194 | GPIO110_UART3_RXD, | ||
195 | |||
196 | /* USB Host */ | ||
197 | GPIO0_2_USBH_PEN, | ||
198 | GPIO1_2_USBH_PWR, | ||
199 | |||
200 | /* I2C */ | ||
201 | GPIO21_I2C_SCL | MFP_LPM_FLOAT | MFP_PULL_FLOAT, | ||
202 | GPIO22_I2C_SDA | MFP_LPM_FLOAT | MFP_PULL_FLOAT, | ||
203 | |||
204 | /* SPI */ | ||
205 | GPIO34_GPIO, /* SPDIF_CS */ | ||
206 | GPIO96_GPIO, /* MCLK_CS */ | ||
207 | GPIO125_GPIO, /* ACCEL_CS */ | ||
208 | |||
209 | /* MMC */ | ||
210 | GPIO3_MMC1_DAT0, | ||
211 | GPIO4_MMC1_DAT1, | ||
212 | GPIO5_MMC1_DAT2, | ||
213 | GPIO6_MMC1_DAT3, | ||
214 | GPIO7_MMC1_CLK, | ||
215 | GPIO8_MMC1_CMD, | ||
216 | |||
217 | /* Ethernet */ | ||
218 | GPIO1_nCS2, /* CS */ | ||
219 | GPIO40_GPIO | MFP_PULL_HIGH, /* IRQ */ | ||
220 | |||
221 | /* SSP for I2S */ | ||
222 | GPIO85_SSP1_SCLK, | ||
223 | GPIO89_SSP1_EXTCLK, | ||
224 | GPIO86_SSP1_FRM, | ||
225 | GPIO87_SSP1_TXD, | ||
226 | GPIO88_SSP1_RXD, | ||
227 | GPIO90_SSP1_SYSCLK, | ||
228 | |||
229 | /* SSP2 for S/PDIF */ | ||
230 | GPIO25_SSP2_SCLK, | ||
231 | GPIO26_SSP2_FRM, | ||
232 | GPIO27_SSP2_TXD, | ||
233 | GPIO29_SSP2_EXTCLK, | ||
234 | |||
235 | /* LEDs */ | ||
236 | GPIO35_GPIO | MFP_LPM_PULL_LOW, | ||
237 | GPIO36_GPIO | MFP_LPM_DRIVE_HIGH, | ||
238 | }; | ||
239 | |||
240 | static mfp_cfg_t raumfeld_speaker_pin_config[] __initdata = { | ||
241 | /* UART1 */ | ||
242 | GPIO77_UART1_RXD, | ||
243 | GPIO78_UART1_TXD, | ||
244 | GPIO79_UART1_CTS, | ||
245 | GPIO81_UART1_DSR, | ||
246 | GPIO83_UART1_DTR, | ||
247 | GPIO84_UART1_RTS, | ||
248 | |||
249 | /* UART3 */ | ||
250 | GPIO110_UART3_RXD, | ||
251 | |||
252 | /* USB Host */ | ||
253 | GPIO0_2_USBH_PEN, | ||
254 | GPIO1_2_USBH_PWR, | ||
255 | |||
256 | /* I2C */ | ||
257 | GPIO21_I2C_SCL | MFP_LPM_FLOAT | MFP_PULL_FLOAT, | ||
258 | GPIO22_I2C_SDA | MFP_LPM_FLOAT | MFP_PULL_FLOAT, | ||
259 | |||
260 | /* SPI */ | ||
261 | GPIO34_GPIO, /* SPDIF_CS */ | ||
262 | GPIO96_GPIO, /* MCLK_CS */ | ||
263 | GPIO125_GPIO, /* ACCEL_CS */ | ||
264 | |||
265 | /* MMC */ | ||
266 | GPIO3_MMC1_DAT0, | ||
267 | GPIO4_MMC1_DAT1, | ||
268 | GPIO5_MMC1_DAT2, | ||
269 | GPIO6_MMC1_DAT3, | ||
270 | GPIO7_MMC1_CLK, | ||
271 | GPIO8_MMC1_CMD, | ||
272 | |||
273 | /* Ethernet */ | ||
274 | GPIO1_nCS2, /* CS */ | ||
275 | GPIO40_GPIO | MFP_PULL_HIGH, /* IRQ */ | ||
276 | |||
277 | /* SSP for I2S */ | ||
278 | GPIO85_SSP1_SCLK, | ||
279 | GPIO89_SSP1_EXTCLK, | ||
280 | GPIO86_SSP1_FRM, | ||
281 | GPIO87_SSP1_TXD, | ||
282 | GPIO88_SSP1_RXD, | ||
283 | GPIO90_SSP1_SYSCLK, | ||
284 | |||
285 | /* LEDs */ | ||
286 | GPIO35_GPIO | MFP_LPM_PULL_LOW, | ||
287 | GPIO36_GPIO | MFP_LPM_DRIVE_HIGH, | ||
288 | }; | ||
289 | |||
290 | /* | ||
291 | * SMSC LAN9220 Ethernet | ||
292 | */ | ||
293 | |||
294 | static struct resource smc91x_resources[] = { | ||
295 | { | ||
296 | .start = PXA3xx_CS2_PHYS, | ||
297 | .end = PXA3xx_CS2_PHYS + 0xfffff, | ||
298 | .flags = IORESOURCE_MEM, | ||
299 | }, | ||
300 | { | ||
301 | .start = gpio_to_irq(GPIO_ETH_IRQ), | ||
302 | .end = gpio_to_irq(GPIO_ETH_IRQ), | ||
303 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING, | ||
304 | } | ||
305 | }; | ||
306 | |||
307 | static struct smsc911x_platform_config raumfeld_smsc911x_config = { | ||
308 | .phy_interface = PHY_INTERFACE_MODE_MII, | ||
309 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
310 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, | ||
311 | .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS, | ||
312 | }; | ||
313 | |||
314 | static struct platform_device smc91x_device = { | ||
315 | .name = "smsc911x", | ||
316 | .id = -1, | ||
317 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
318 | .resource = smc91x_resources, | ||
319 | .dev = { | ||
320 | .platform_data = &raumfeld_smsc911x_config, | ||
321 | } | ||
322 | }; | ||
323 | |||
324 | /** | ||
325 | * NAND | ||
326 | */ | ||
327 | |||
328 | static struct mtd_partition raumfeld_nand_partitions[] = { | ||
329 | { | ||
330 | .name = "Bootloader", | ||
331 | .offset = 0, | ||
332 | .size = 0xa0000, | ||
333 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
334 | }, | ||
335 | { | ||
336 | .name = "BootloaderEnvironment", | ||
337 | .offset = 0xa0000, | ||
338 | .size = 0x20000, | ||
339 | }, | ||
340 | { | ||
341 | .name = "BootloaderSplashScreen", | ||
342 | .offset = 0xc0000, | ||
343 | .size = 0x60000, | ||
344 | }, | ||
345 | { | ||
346 | .name = "UBI", | ||
347 | .offset = 0x120000, | ||
348 | .size = MTDPART_SIZ_FULL, | ||
349 | }, | ||
350 | }; | ||
351 | |||
352 | static struct pxa3xx_nand_platform_data raumfeld_nand_info = { | ||
353 | .enable_arbiter = 1, | ||
354 | .keep_config = 1, | ||
355 | .parts = raumfeld_nand_partitions, | ||
356 | .nr_parts = ARRAY_SIZE(raumfeld_nand_partitions), | ||
357 | }; | ||
358 | |||
359 | /** | ||
360 | * USB (OHCI) support | ||
361 | */ | ||
362 | |||
363 | static struct pxaohci_platform_data raumfeld_ohci_info = { | ||
364 | .port_mode = PMM_GLOBAL_MODE, | ||
365 | .flags = ENABLE_PORT1, | ||
366 | }; | ||
367 | |||
368 | /** | ||
369 | * Rotary encoder input device | ||
370 | */ | ||
371 | |||
372 | static struct rotary_encoder_platform_data raumfeld_rotary_encoder_info = { | ||
373 | .steps = 24, | ||
374 | .axis = REL_X, | ||
375 | .relative_axis = 1, | ||
376 | .gpio_a = GPIO_VOLENC_A, | ||
377 | .gpio_b = GPIO_VOLENC_B, | ||
378 | .inverted_a = 1, | ||
379 | .inverted_b = 0, | ||
380 | }; | ||
381 | |||
382 | static struct platform_device rotary_encoder_device = { | ||
383 | .name = "rotary-encoder", | ||
384 | .id = 0, | ||
385 | .dev = { | ||
386 | .platform_data = &raumfeld_rotary_encoder_info, | ||
387 | } | ||
388 | }; | ||
389 | |||
390 | /** | ||
391 | * GPIO buttons | ||
392 | */ | ||
393 | |||
394 | static struct gpio_keys_button gpio_keys_button[] = { | ||
395 | { | ||
396 | .code = KEY_F1, | ||
397 | .type = EV_KEY, | ||
398 | .gpio = GPIO_KEY1, | ||
399 | .active_low = 1, | ||
400 | .wakeup = 0, | ||
401 | .debounce_interval = 5, /* ms */ | ||
402 | .desc = "Button 1", | ||
403 | }, | ||
404 | { | ||
405 | .code = KEY_F2, | ||
406 | .type = EV_KEY, | ||
407 | .gpio = GPIO_KEY2, | ||
408 | .active_low = 1, | ||
409 | .wakeup = 0, | ||
410 | .debounce_interval = 5, /* ms */ | ||
411 | .desc = "Button 2", | ||
412 | }, | ||
413 | { | ||
414 | .code = KEY_F3, | ||
415 | .type = EV_KEY, | ||
416 | .gpio = GPIO_KEY3, | ||
417 | .active_low = 1, | ||
418 | .wakeup = 0, | ||
419 | .debounce_interval = 5, /* ms */ | ||
420 | .desc = "Button 3", | ||
421 | }, | ||
422 | { | ||
423 | .code = KEY_F4, | ||
424 | .type = EV_KEY, | ||
425 | .gpio = GPIO_RESCUE_BOOT, | ||
426 | .active_low = 0, | ||
427 | .wakeup = 0, | ||
428 | .debounce_interval = 5, /* ms */ | ||
429 | .desc = "rescue boot button", | ||
430 | }, | ||
431 | { | ||
432 | .code = KEY_F5, | ||
433 | .type = EV_KEY, | ||
434 | .gpio = GPIO_DOCK_DETECT, | ||
435 | .active_low = 1, | ||
436 | .wakeup = 0, | ||
437 | .debounce_interval = 5, /* ms */ | ||
438 | .desc = "dock detect", | ||
439 | }, | ||
440 | { | ||
441 | .code = KEY_F6, | ||
442 | .type = EV_KEY, | ||
443 | .gpio = GPIO_ON_OFF, | ||
444 | .active_low = 0, | ||
445 | .wakeup = 0, | ||
446 | .debounce_interval = 5, /* ms */ | ||
447 | .desc = "on/off button", | ||
448 | }, | ||
449 | }; | ||
450 | |||
451 | static struct gpio_keys_platform_data gpio_keys_platform_data = { | ||
452 | .buttons = gpio_keys_button, | ||
453 | .nbuttons = ARRAY_SIZE(gpio_keys_button), | ||
454 | .rep = 0, | ||
455 | }; | ||
456 | |||
457 | static struct platform_device raumfeld_gpio_keys_device = { | ||
458 | .name = "gpio-keys", | ||
459 | .id = -1, | ||
460 | .dev = { | ||
461 | .platform_data = &gpio_keys_platform_data, | ||
462 | } | ||
463 | }; | ||
464 | |||
465 | /** | ||
466 | * GPIO LEDs | ||
467 | */ | ||
468 | |||
469 | static struct gpio_led raumfeld_leds[] = { | ||
470 | { | ||
471 | .name = "raumfeld:1", | ||
472 | .gpio = GPIO_LED1, | ||
473 | .active_low = 1, | ||
474 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
475 | }, | ||
476 | { | ||
477 | .name = "raumfeld:2", | ||
478 | .gpio = GPIO_LED2, | ||
479 | .active_low = 0, | ||
480 | .default_state = LEDS_GPIO_DEFSTATE_OFF, | ||
481 | } | ||
482 | }; | ||
483 | |||
484 | static struct gpio_led_platform_data raumfeld_led_platform_data = { | ||
485 | .leds = raumfeld_leds, | ||
486 | .num_leds = ARRAY_SIZE(raumfeld_leds), | ||
487 | }; | ||
488 | |||
489 | static struct platform_device raumfeld_led_device = { | ||
490 | .name = "leds-gpio", | ||
491 | .id = -1, | ||
492 | .dev = { | ||
493 | .platform_data = &raumfeld_led_platform_data, | ||
494 | }, | ||
495 | }; | ||
496 | |||
497 | /** | ||
498 | * One-wire (W1 bus) support | ||
499 | */ | ||
500 | |||
501 | static void w1_enable_external_pullup(int enable) | ||
502 | { | ||
503 | gpio_set_value(GPIO_W1_PULLUP_ENABLE, enable); | ||
504 | msleep(100); | ||
505 | } | ||
506 | |||
507 | static struct w1_gpio_platform_data w1_gpio_platform_data = { | ||
508 | .pin = GPIO_ONE_WIRE, | ||
509 | .is_open_drain = 0, | ||
510 | .enable_external_pullup = w1_enable_external_pullup, | ||
511 | }; | ||
512 | |||
513 | struct platform_device raumfeld_w1_gpio_device = { | ||
514 | .name = "w1-gpio", | ||
515 | .dev = { | ||
516 | .platform_data = &w1_gpio_platform_data | ||
517 | } | ||
518 | }; | ||
519 | |||
520 | static void __init raumfeld_w1_init(void) | ||
521 | { | ||
522 | int ret = gpio_request(GPIO_W1_PULLUP_ENABLE, | ||
523 | "W1 external pullup enable"); | ||
524 | |||
525 | if (ret < 0) | ||
526 | pr_warning("Unable to request GPIO_W1_PULLUP_ENABLE\n"); | ||
527 | else | ||
528 | gpio_direction_output(GPIO_W1_PULLUP_ENABLE, 0); | ||
529 | |||
530 | platform_device_register(&raumfeld_w1_gpio_device); | ||
531 | } | ||
532 | |||
533 | /** | ||
534 | * Framebuffer device | ||
535 | */ | ||
536 | |||
537 | /* PWM controlled backlight */ | ||
538 | static struct platform_pwm_backlight_data raumfeld_pwm_backlight_data = { | ||
539 | .pwm_id = 0, | ||
540 | .max_brightness = 100, | ||
541 | .dft_brightness = 100, | ||
542 | /* 10000 ns = 10 ms ^= 100 kHz */ | ||
543 | .pwm_period_ns = 10000, | ||
544 | }; | ||
545 | |||
546 | static struct platform_device raumfeld_pwm_backlight_device = { | ||
547 | .name = "pwm-backlight", | ||
548 | .dev = { | ||
549 | .parent = &pxa27x_device_pwm0.dev, | ||
550 | .platform_data = &raumfeld_pwm_backlight_data, | ||
551 | } | ||
552 | }; | ||
553 | |||
554 | /* LT3593 controlled backlight */ | ||
555 | static struct gpio_led raumfeld_lt3593_led = { | ||
556 | .name = "backlight", | ||
557 | .gpio = mfp_to_gpio(MFP_PIN_GPIO17), | ||
558 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
559 | }; | ||
560 | |||
561 | static struct gpio_led_platform_data raumfeld_lt3593_platform_data = { | ||
562 | .leds = &raumfeld_lt3593_led, | ||
563 | .num_leds = 1, | ||
564 | }; | ||
565 | |||
566 | static struct platform_device raumfeld_lt3593_device = { | ||
567 | .name = "leds-lt3593", | ||
568 | .id = -1, | ||
569 | .dev = { | ||
570 | .platform_data = &raumfeld_lt3593_platform_data, | ||
571 | }, | ||
572 | }; | ||
573 | |||
574 | static struct pxafb_mode_info sharp_lq043t3dx02_mode = { | ||
575 | .pixclock = 111000, | ||
576 | .xres = 480, | ||
577 | .yres = 272, | ||
578 | .bpp = 16, | ||
579 | .hsync_len = 4, | ||
580 | .left_margin = 2, | ||
581 | .right_margin = 1, | ||
582 | .vsync_len = 1, | ||
583 | .upper_margin = 3, | ||
584 | .lower_margin = 1, | ||
585 | .sync = 0, | ||
586 | }; | ||
587 | |||
588 | static struct pxafb_mach_info raumfeld_sharp_lcd_info = { | ||
589 | .modes = &sharp_lq043t3dx02_mode, | ||
590 | .num_modes = 1, | ||
591 | .video_mem_size = 0x400000, | ||
592 | .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, | ||
593 | }; | ||
594 | |||
595 | static void __init raumfeld_lcd_init(void) | ||
596 | { | ||
597 | int ret; | ||
598 | |||
599 | set_pxa_fb_info(&raumfeld_sharp_lcd_info); | ||
600 | |||
601 | /* Earlier devices had the backlight regulator controlled | ||
602 | * via PWM, later versions use another controller for that */ | ||
603 | if ((system_rev & 0xff) < 2) { | ||
604 | mfp_cfg_t raumfeld_pwm_pin_config = GPIO17_PWM0_OUT; | ||
605 | pxa3xx_mfp_config(&raumfeld_pwm_pin_config, 1); | ||
606 | platform_device_register(&raumfeld_pwm_backlight_device); | ||
607 | } else | ||
608 | platform_device_register(&raumfeld_lt3593_device); | ||
609 | |||
610 | ret = gpio_request(GPIO_TFT_VA_EN, "display VA enable"); | ||
611 | if (ret < 0) | ||
612 | pr_warning("Unable to request GPIO_TFT_VA_EN\n"); | ||
613 | else | ||
614 | gpio_direction_output(GPIO_TFT_VA_EN, 1); | ||
615 | |||
616 | ret = gpio_request(GPIO_DISPLAY_ENABLE, "display enable"); | ||
617 | if (ret < 0) | ||
618 | pr_warning("Unable to request GPIO_DISPLAY_ENABLE\n"); | ||
619 | else | ||
620 | gpio_direction_output(GPIO_DISPLAY_ENABLE, 1); | ||
621 | } | ||
622 | |||
623 | /** | ||
624 | * SPI devices | ||
625 | */ | ||
626 | |||
627 | struct spi_gpio_platform_data raumfeld_spi_platform_data = { | ||
628 | .sck = GPIO_SPI_CLK, | ||
629 | .mosi = GPIO_SPI_MOSI, | ||
630 | .miso = GPIO_SPI_MISO, | ||
631 | .num_chipselect = 3, | ||
632 | }; | ||
633 | |||
634 | static struct platform_device raumfeld_spi_device = { | ||
635 | .name = "spi_gpio", | ||
636 | .id = 0, | ||
637 | .dev = { | ||
638 | .platform_data = &raumfeld_spi_platform_data, | ||
639 | } | ||
640 | }; | ||
641 | |||
642 | static struct lis3lv02d_platform_data lis3_pdata = { | ||
643 | .click_flags = LIS3_CLICK_SINGLE_X | | ||
644 | LIS3_CLICK_SINGLE_Y | | ||
645 | LIS3_CLICK_SINGLE_Z, | ||
646 | .irq_cfg = LIS3_IRQ1_CLICK | LIS3_IRQ2_CLICK, | ||
647 | .wakeup_flags = LIS3_WAKEUP_X_LO | LIS3_WAKEUP_X_HI | | ||
648 | LIS3_WAKEUP_Y_LO | LIS3_WAKEUP_Y_HI | | ||
649 | LIS3_WAKEUP_Z_LO | LIS3_WAKEUP_Z_HI, | ||
650 | .wakeup_thresh = 10, | ||
651 | .click_thresh_x = 10, | ||
652 | .click_thresh_y = 10, | ||
653 | .click_thresh_z = 10, | ||
654 | }; | ||
655 | |||
656 | #define SPI_AK4104 \ | ||
657 | { \ | ||
658 | .modalias = "ak4104", \ | ||
659 | .max_speed_hz = 10000, \ | ||
660 | .bus_num = 0, \ | ||
661 | .chip_select = 0, \ | ||
662 | .controller_data = (void *) GPIO_SPDIF_CS, \ | ||
663 | } | ||
664 | |||
665 | #define SPI_LIS3 \ | ||
666 | { \ | ||
667 | .modalias = "lis3lv02d_spi", \ | ||
668 | .max_speed_hz = 1000000, \ | ||
669 | .bus_num = 0, \ | ||
670 | .chip_select = 1, \ | ||
671 | .controller_data = (void *) GPIO_ACCEL_CS, \ | ||
672 | .platform_data = &lis3_pdata, \ | ||
673 | .irq = gpio_to_irq(GPIO_ACCEL_IRQ), \ | ||
674 | } | ||
675 | |||
676 | #define SPI_DAC7512 \ | ||
677 | { \ | ||
678 | .modalias = "dac7512", \ | ||
679 | .max_speed_hz = 1000000, \ | ||
680 | .bus_num = 0, \ | ||
681 | .chip_select = 2, \ | ||
682 | .controller_data = (void *) GPIO_MCLK_DAC_CS, \ | ||
683 | } | ||
684 | |||
685 | static struct spi_board_info connector_spi_devices[] __initdata = { | ||
686 | SPI_AK4104, | ||
687 | SPI_DAC7512, | ||
688 | }; | ||
689 | |||
690 | static struct spi_board_info speaker_spi_devices[] __initdata = { | ||
691 | SPI_DAC7512, | ||
692 | }; | ||
693 | |||
694 | static struct spi_board_info controller_spi_devices[] __initdata = { | ||
695 | SPI_LIS3, | ||
696 | }; | ||
697 | |||
698 | /** | ||
699 | * MMC for Marvell Libertas 8688 via SDIO | ||
700 | */ | ||
701 | |||
702 | static int raumfeld_mci_init(struct device *dev, irq_handler_t isr, void *data) | ||
703 | { | ||
704 | gpio_set_value(GPIO_W2W_RESET, 1); | ||
705 | gpio_set_value(GPIO_W2W_PDN, 1); | ||
706 | |||
707 | return 0; | ||
708 | } | ||
709 | |||
710 | static void raumfeld_mci_exit(struct device *dev, void *data) | ||
711 | { | ||
712 | gpio_set_value(GPIO_W2W_RESET, 0); | ||
713 | gpio_set_value(GPIO_W2W_PDN, 0); | ||
714 | } | ||
715 | |||
716 | static struct pxamci_platform_data raumfeld_mci_platform_data = { | ||
717 | .init = raumfeld_mci_init, | ||
718 | .exit = raumfeld_mci_exit, | ||
719 | .detect_delay = 20, | ||
720 | .gpio_card_detect = -1, | ||
721 | .gpio_card_ro = -1, | ||
722 | .gpio_power = -1, | ||
723 | }; | ||
724 | |||
725 | /* | ||
726 | * External power / charge logic | ||
727 | */ | ||
728 | |||
729 | static int power_supply_init(struct device *dev) | ||
730 | { | ||
731 | return 0; | ||
732 | } | ||
733 | |||
734 | static void power_supply_exit(struct device *dev) | ||
735 | { | ||
736 | } | ||
737 | |||
738 | static int raumfeld_is_ac_online(void) | ||
739 | { | ||
740 | return !gpio_get_value(GPIO_CHARGE_DC_OK); | ||
741 | } | ||
742 | |||
743 | static int raumfeld_is_usb_online(void) | ||
744 | { | ||
745 | return 0; | ||
746 | } | ||
747 | |||
748 | static char *raumfeld_power_supplicants[] = { "ds2760-battery.0" }; | ||
749 | |||
750 | static struct pda_power_pdata power_supply_info = { | ||
751 | .init = power_supply_init, | ||
752 | .is_ac_online = raumfeld_is_ac_online, | ||
753 | .is_usb_online = raumfeld_is_usb_online, | ||
754 | .exit = power_supply_exit, | ||
755 | .supplied_to = raumfeld_power_supplicants, | ||
756 | .num_supplicants = ARRAY_SIZE(raumfeld_power_supplicants) | ||
757 | }; | ||
758 | |||
759 | static struct resource power_supply_resources[] = { | ||
760 | { | ||
761 | .name = "ac", | ||
762 | .flags = IORESOURCE_IRQ | | ||
763 | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE, | ||
764 | .start = GPIO_CHARGE_DC_OK, | ||
765 | .end = GPIO_CHARGE_DC_OK, | ||
766 | }, | ||
767 | }; | ||
768 | |||
769 | static irqreturn_t charge_done_irq(int irq, void *dev_id) | ||
770 | { | ||
771 | struct power_supply *psy; | ||
772 | |||
773 | psy = power_supply_get_by_name("ds2760-battery.0"); | ||
774 | |||
775 | if (psy) | ||
776 | power_supply_set_battery_charged(psy); | ||
777 | |||
778 | return IRQ_HANDLED; | ||
779 | } | ||
780 | |||
781 | static struct platform_device raumfeld_power_supply = { | ||
782 | .name = "pda-power", | ||
783 | .id = -1, | ||
784 | .dev = { | ||
785 | .platform_data = &power_supply_info, | ||
786 | }, | ||
787 | .resource = power_supply_resources, | ||
788 | .num_resources = ARRAY_SIZE(power_supply_resources), | ||
789 | }; | ||
790 | |||
791 | static void __init raumfeld_power_init(void) | ||
792 | { | ||
793 | int ret; | ||
794 | |||
795 | /* Set PEN2 high to enable maximum charge current */ | ||
796 | ret = gpio_request(GPIO_CHRG_PEN2, "CHRG_PEN2"); | ||
797 | if (ret < 0) | ||
798 | pr_warning("Unable to request GPIO_CHRG_PEN2\n"); | ||
799 | else | ||
800 | gpio_direction_output(GPIO_CHRG_PEN2, 1); | ||
801 | |||
802 | ret = gpio_request(GPIO_CHARGE_DC_OK, "CABLE_DC_OK"); | ||
803 | if (ret < 0) | ||
804 | pr_warning("Unable to request GPIO_CHARGE_DC_OK\n"); | ||
805 | |||
806 | ret = gpio_request(GPIO_CHARGE_USB_SUSP, "CHARGE_USB_SUSP"); | ||
807 | if (ret < 0) | ||
808 | pr_warning("Unable to request GPIO_CHARGE_USB_SUSP\n"); | ||
809 | else | ||
810 | gpio_direction_output(GPIO_CHARGE_USB_SUSP, 0); | ||
811 | |||
812 | power_supply_resources[0].start = gpio_to_irq(GPIO_CHARGE_DC_OK); | ||
813 | power_supply_resources[0].end = gpio_to_irq(GPIO_CHARGE_DC_OK); | ||
814 | |||
815 | ret = request_irq(gpio_to_irq(GPIO_CHARGE_DONE), | ||
816 | &charge_done_irq, IORESOURCE_IRQ_LOWEDGE, | ||
817 | "charge_done", NULL); | ||
818 | |||
819 | if (ret < 0) | ||
820 | printk(KERN_ERR "%s: unable to register irq %d\n", __func__, | ||
821 | GPIO_CHARGE_DONE); | ||
822 | else | ||
823 | platform_device_register(&raumfeld_power_supply); | ||
824 | } | ||
825 | |||
826 | /* Fixed regulator for AUDIO_VA, 0-0048 maps to the cs4270 codec device */ | ||
827 | |||
828 | static struct regulator_consumer_supply audio_va_consumer_supply = | ||
829 | REGULATOR_SUPPLY("va", "0-0048"); | ||
830 | |||
831 | struct regulator_init_data audio_va_initdata = { | ||
832 | .consumer_supplies = &audio_va_consumer_supply, | ||
833 | .num_consumer_supplies = 1, | ||
834 | .constraints = { | ||
835 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
836 | }, | ||
837 | }; | ||
838 | |||
839 | static struct fixed_voltage_config audio_va_config = { | ||
840 | .supply_name = "audio_va", | ||
841 | .microvolts = 5000000, | ||
842 | .gpio = GPIO_AUDIO_VA_ENABLE, | ||
843 | .enable_high = 1, | ||
844 | .enabled_at_boot = 0, | ||
845 | .init_data = &audio_va_initdata, | ||
846 | }; | ||
847 | |||
848 | static struct platform_device audio_va_device = { | ||
849 | .name = "reg-fixed-voltage", | ||
850 | .id = 0, | ||
851 | .dev = { | ||
852 | .platform_data = &audio_va_config, | ||
853 | }, | ||
854 | }; | ||
855 | |||
856 | /* Dummy supplies for Codec's VD/VLC */ | ||
857 | |||
858 | static struct regulator_consumer_supply audio_dummy_supplies[] = { | ||
859 | REGULATOR_SUPPLY("vd", "0-0048"), | ||
860 | REGULATOR_SUPPLY("vlc", "0-0048"), | ||
861 | }; | ||
862 | |||
863 | struct regulator_init_data audio_dummy_initdata = { | ||
864 | .consumer_supplies = audio_dummy_supplies, | ||
865 | .num_consumer_supplies = ARRAY_SIZE(audio_dummy_supplies), | ||
866 | .constraints = { | ||
867 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
868 | }, | ||
869 | }; | ||
870 | |||
871 | static struct fixed_voltage_config audio_dummy_config = { | ||
872 | .supply_name = "audio_vd", | ||
873 | .microvolts = 3300000, | ||
874 | .gpio = -1, | ||
875 | .init_data = &audio_dummy_initdata, | ||
876 | }; | ||
877 | |||
878 | static struct platform_device audio_supply_dummy_device = { | ||
879 | .name = "reg-fixed-voltage", | ||
880 | .id = 1, | ||
881 | .dev = { | ||
882 | .platform_data = &audio_dummy_config, | ||
883 | }, | ||
884 | }; | ||
885 | |||
886 | static struct platform_device *audio_regulator_devices[] = { | ||
887 | &audio_va_device, | ||
888 | &audio_supply_dummy_device, | ||
889 | }; | ||
890 | |||
891 | /** | ||
892 | * Regulator support via MAX8660 | ||
893 | */ | ||
894 | |||
895 | static struct regulator_consumer_supply vcc_mmc_supply = | ||
896 | REGULATOR_SUPPLY("vmmc", "pxa2xx-mci.0"); | ||
897 | |||
898 | static struct regulator_init_data vcc_mmc_init_data = { | ||
899 | .constraints = { | ||
900 | .min_uV = 3300000, | ||
901 | .max_uV = 3300000, | ||
902 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | ||
903 | .valid_ops_mask = REGULATOR_CHANGE_STATUS | | ||
904 | REGULATOR_CHANGE_VOLTAGE | | ||
905 | REGULATOR_CHANGE_MODE, | ||
906 | }, | ||
907 | .consumer_supplies = &vcc_mmc_supply, | ||
908 | .num_consumer_supplies = 1, | ||
909 | }; | ||
910 | |||
911 | struct max8660_subdev_data max8660_v6_subdev_data = { | ||
912 | .id = MAX8660_V6, | ||
913 | .name = "vmmc", | ||
914 | .platform_data = &vcc_mmc_init_data, | ||
915 | }; | ||
916 | |||
917 | static struct max8660_platform_data max8660_pdata = { | ||
918 | .subdevs = &max8660_v6_subdev_data, | ||
919 | .num_subdevs = 1, | ||
920 | }; | ||
921 | |||
922 | /** | ||
923 | * I2C devices | ||
924 | */ | ||
925 | |||
926 | static struct i2c_board_info raumfeld_pwri2c_board_info = { | ||
927 | .type = "max8660", | ||
928 | .addr = 0x34, | ||
929 | .platform_data = &max8660_pdata, | ||
930 | }; | ||
931 | |||
932 | static struct i2c_board_info raumfeld_connector_i2c_board_info __initdata = { | ||
933 | .type = "cs4270", | ||
934 | .addr = 0x48, | ||
935 | }; | ||
936 | |||
937 | static struct eeti_ts_platform_data eeti_ts_pdata = { | ||
938 | .irq_active_high = 1, | ||
939 | }; | ||
940 | |||
941 | static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = { | ||
942 | .type = "eeti_ts", | ||
943 | .addr = 0x0a, | ||
944 | .irq = gpio_to_irq(GPIO_TOUCH_IRQ), | ||
945 | .platform_data = &eeti_ts_pdata, | ||
946 | }; | ||
947 | |||
948 | static struct platform_device *raumfeld_common_devices[] = { | ||
949 | &raumfeld_gpio_keys_device, | ||
950 | &raumfeld_led_device, | ||
951 | &raumfeld_spi_device, | ||
952 | }; | ||
953 | |||
954 | static void __init raumfeld_audio_init(void) | ||
955 | { | ||
956 | int ret; | ||
957 | |||
958 | ret = gpio_request(GPIO_CODEC_RESET, "cs4270 reset"); | ||
959 | if (ret < 0) | ||
960 | pr_warning("unable to request GPIO_CODEC_RESET\n"); | ||
961 | else | ||
962 | gpio_direction_output(GPIO_CODEC_RESET, 1); | ||
963 | |||
964 | ret = gpio_request(GPIO_SPDIF_RESET, "ak4104 s/pdif reset"); | ||
965 | if (ret < 0) | ||
966 | pr_warning("unable to request GPIO_SPDIF_RESET\n"); | ||
967 | else | ||
968 | gpio_direction_output(GPIO_SPDIF_RESET, 1); | ||
969 | |||
970 | ret = gpio_request(GPIO_MCLK_RESET, "MCLK reset"); | ||
971 | if (ret < 0) | ||
972 | pr_warning("unable to request GPIO_MCLK_RESET\n"); | ||
973 | else | ||
974 | gpio_direction_output(GPIO_MCLK_RESET, 1); | ||
975 | |||
976 | platform_add_devices(ARRAY_AND_SIZE(audio_regulator_devices)); | ||
977 | } | ||
978 | |||
979 | static void __init raumfeld_common_init(void) | ||
980 | { | ||
981 | int ret; | ||
982 | |||
983 | /* The on/off button polarity has changed after revision 1 */ | ||
984 | if ((system_rev & 0xff) > 1) { | ||
985 | int i; | ||
986 | |||
987 | for (i = 0; i < ARRAY_SIZE(gpio_keys_button); i++) | ||
988 | if (!strcmp(gpio_keys_button[i].desc, "on/off button")) | ||
989 | gpio_keys_button[i].active_low = 1; | ||
990 | } | ||
991 | |||
992 | enable_irq_wake(IRQ_WAKEUP0); | ||
993 | |||
994 | pxa3xx_set_nand_info(&raumfeld_nand_info); | ||
995 | pxa3xx_set_i2c_power_info(NULL); | ||
996 | pxa_set_ohci_info(&raumfeld_ohci_info); | ||
997 | pxa_set_mci_info(&raumfeld_mci_platform_data); | ||
998 | pxa_set_i2c_info(NULL); | ||
999 | pxa_set_ffuart_info(NULL); | ||
1000 | |||
1001 | ret = gpio_request(GPIO_W2W_RESET, "Wi2Wi reset"); | ||
1002 | if (ret < 0) | ||
1003 | pr_warning("Unable to request GPIO_W2W_RESET\n"); | ||
1004 | else | ||
1005 | gpio_direction_output(GPIO_W2W_RESET, 0); | ||
1006 | |||
1007 | ret = gpio_request(GPIO_W2W_PDN, "Wi2Wi powerup"); | ||
1008 | if (ret < 0) | ||
1009 | pr_warning("Unable to request GPIO_W2W_PDN\n"); | ||
1010 | else | ||
1011 | gpio_direction_output(GPIO_W2W_PDN, 0); | ||
1012 | |||
1013 | /* this can be used to switch off the device */ | ||
1014 | ret = gpio_request(GPIO_SHUTDOWN_SUPPLY, | ||
1015 | "supply shutdown"); | ||
1016 | if (ret < 0) | ||
1017 | pr_warning("Unable to request GPIO_SHUTDOWN_SUPPLY\n"); | ||
1018 | else | ||
1019 | gpio_direction_output(GPIO_SHUTDOWN_SUPPLY, 0); | ||
1020 | |||
1021 | platform_add_devices(ARRAY_AND_SIZE(raumfeld_common_devices)); | ||
1022 | i2c_register_board_info(1, &raumfeld_pwri2c_board_info, 1); | ||
1023 | } | ||
1024 | |||
1025 | static void __init raumfeld_controller_init(void) | ||
1026 | { | ||
1027 | int ret; | ||
1028 | |||
1029 | pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_controller_pin_config)); | ||
1030 | platform_device_register(&rotary_encoder_device); | ||
1031 | spi_register_board_info(ARRAY_AND_SIZE(controller_spi_devices)); | ||
1032 | i2c_register_board_info(0, &raumfeld_controller_i2c_board_info, 1); | ||
1033 | |||
1034 | ret = gpio_request(GPIO_SHUTDOWN_BATT, "battery shutdown"); | ||
1035 | if (ret < 0) | ||
1036 | pr_warning("Unable to request GPIO_SHUTDOWN_BATT\n"); | ||
1037 | else | ||
1038 | gpio_direction_output(GPIO_SHUTDOWN_BATT, 0); | ||
1039 | |||
1040 | raumfeld_common_init(); | ||
1041 | raumfeld_power_init(); | ||
1042 | raumfeld_lcd_init(); | ||
1043 | raumfeld_w1_init(); | ||
1044 | } | ||
1045 | |||
1046 | static void __init raumfeld_connector_init(void) | ||
1047 | { | ||
1048 | pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_connector_pin_config)); | ||
1049 | spi_register_board_info(ARRAY_AND_SIZE(connector_spi_devices)); | ||
1050 | i2c_register_board_info(0, &raumfeld_connector_i2c_board_info, 1); | ||
1051 | |||
1052 | platform_device_register(&smc91x_device); | ||
1053 | |||
1054 | raumfeld_audio_init(); | ||
1055 | raumfeld_common_init(); | ||
1056 | } | ||
1057 | |||
1058 | static void __init raumfeld_speaker_init(void) | ||
1059 | { | ||
1060 | pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_speaker_pin_config)); | ||
1061 | spi_register_board_info(ARRAY_AND_SIZE(speaker_spi_devices)); | ||
1062 | i2c_register_board_info(0, &raumfeld_connector_i2c_board_info, 1); | ||
1063 | |||
1064 | platform_device_register(&smc91x_device); | ||
1065 | platform_device_register(&rotary_encoder_device); | ||
1066 | |||
1067 | raumfeld_audio_init(); | ||
1068 | raumfeld_common_init(); | ||
1069 | } | ||
1070 | |||
1071 | /* physical memory regions */ | ||
1072 | #define RAUMFELD_SDRAM_BASE 0xa0000000 /* SDRAM region */ | ||
1073 | |||
1074 | #ifdef CONFIG_MACH_RAUMFELD_RC | ||
1075 | MACHINE_START(RAUMFELD_RC, "Raumfeld Controller") | ||
1076 | .phys_io = 0x40000000, | ||
1077 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | ||
1078 | .boot_params = RAUMFELD_SDRAM_BASE + 0x100, | ||
1079 | .init_machine = raumfeld_controller_init, | ||
1080 | .map_io = pxa_map_io, | ||
1081 | .init_irq = pxa3xx_init_irq, | ||
1082 | .timer = &pxa_timer, | ||
1083 | MACHINE_END | ||
1084 | #endif | ||
1085 | |||
1086 | #ifdef CONFIG_MACH_RAUMFELD_CONNECTOR | ||
1087 | MACHINE_START(RAUMFELD_CONNECTOR, "Raumfeld Connector") | ||
1088 | .phys_io = 0x40000000, | ||
1089 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | ||
1090 | .boot_params = RAUMFELD_SDRAM_BASE + 0x100, | ||
1091 | .init_machine = raumfeld_connector_init, | ||
1092 | .map_io = pxa_map_io, | ||
1093 | .init_irq = pxa3xx_init_irq, | ||
1094 | .timer = &pxa_timer, | ||
1095 | MACHINE_END | ||
1096 | #endif | ||
1097 | |||
1098 | #ifdef CONFIG_MACH_RAUMFELD_SPEAKER | ||
1099 | MACHINE_START(RAUMFELD_SPEAKER, "Raumfeld Speaker") | ||
1100 | .phys_io = 0x40000000, | ||
1101 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | ||
1102 | .boot_params = RAUMFELD_SDRAM_BASE + 0x100, | ||
1103 | .init_machine = raumfeld_speaker_init, | ||
1104 | .map_io = pxa_map_io, | ||
1105 | .init_irq = pxa3xx_init_irq, | ||
1106 | .timer = &pxa_timer, | ||
1107 | MACHINE_END | ||
1108 | #endif | ||
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 28352c0b8c34..19b5109d9808 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -56,25 +56,7 @@ static unsigned long spitz_pin_config[] __initdata = { | |||
56 | GPIO80_nCS_4, /* SCOOP #1 */ | 56 | GPIO80_nCS_4, /* SCOOP #1 */ |
57 | 57 | ||
58 | /* LCD - 16bpp Active TFT */ | 58 | /* LCD - 16bpp Active TFT */ |
59 | GPIO58_LCD_LDD_0, | 59 | GPIOxx_LCD_TFT_16BPP, |
60 | GPIO59_LCD_LDD_1, | ||
61 | GPIO60_LCD_LDD_2, | ||
62 | GPIO61_LCD_LDD_3, | ||
63 | GPIO62_LCD_LDD_4, | ||
64 | GPIO63_LCD_LDD_5, | ||
65 | GPIO64_LCD_LDD_6, | ||
66 | GPIO65_LCD_LDD_7, | ||
67 | GPIO66_LCD_LDD_8, | ||
68 | GPIO67_LCD_LDD_9, | ||
69 | GPIO68_LCD_LDD_10, | ||
70 | GPIO69_LCD_LDD_11, | ||
71 | GPIO70_LCD_LDD_12, | ||
72 | GPIO71_LCD_LDD_13, | ||
73 | GPIO72_LCD_LDD_14, | ||
74 | GPIO73_LCD_LDD_15, | ||
75 | GPIO74_LCD_FCLK, | ||
76 | GPIO75_LCD_LCLK, | ||
77 | GPIO76_LCD_PCLK, | ||
78 | 60 | ||
79 | /* PC Card */ | 61 | /* PC Card */ |
80 | GPIO48_nPOE, | 62 | GPIO48_nPOE, |
diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c index 9ebe658590fa..a81d6dbf662d 100644 --- a/arch/arm/mach-pxa/ssp.c +++ b/arch/arm/mach-pxa/ssp.c | |||
@@ -35,6 +35,8 @@ | |||
35 | #include <mach/ssp.h> | 35 | #include <mach/ssp.h> |
36 | #include <mach/regs-ssp.h> | 36 | #include <mach/regs-ssp.h> |
37 | 37 | ||
38 | #ifdef CONFIG_PXA_SSP_LEGACY | ||
39 | |||
38 | #define TIMEOUT 100000 | 40 | #define TIMEOUT 100000 |
39 | 41 | ||
40 | static irqreturn_t ssp_interrupt(int irq, void *dev_id) | 42 | static irqreturn_t ssp_interrupt(int irq, void *dev_id) |
@@ -303,6 +305,7 @@ void ssp_exit(struct ssp_dev *dev) | |||
303 | clk_disable(ssp->clk); | 305 | clk_disable(ssp->clk); |
304 | ssp_free(ssp); | 306 | ssp_free(ssp); |
305 | } | 307 | } |
308 | #endif /* CONFIG_PXA_SSP_LEGACY */ | ||
306 | 309 | ||
307 | static DEFINE_MUTEX(ssp_lock); | 310 | static DEFINE_MUTEX(ssp_lock); |
308 | static LIST_HEAD(ssp_list); | 311 | static LIST_HEAD(ssp_list); |
@@ -488,6 +491,7 @@ static void __exit pxa_ssp_exit(void) | |||
488 | arch_initcall(pxa_ssp_init); | 491 | arch_initcall(pxa_ssp_init); |
489 | module_exit(pxa_ssp_exit); | 492 | module_exit(pxa_ssp_exit); |
490 | 493 | ||
494 | #ifdef CONFIG_PXA_SSP_LEGACY | ||
491 | EXPORT_SYMBOL(ssp_write_word); | 495 | EXPORT_SYMBOL(ssp_write_word); |
492 | EXPORT_SYMBOL(ssp_read_word); | 496 | EXPORT_SYMBOL(ssp_read_word); |
493 | EXPORT_SYMBOL(ssp_flush); | 497 | EXPORT_SYMBOL(ssp_flush); |
@@ -498,6 +502,7 @@ EXPORT_SYMBOL(ssp_restore_state); | |||
498 | EXPORT_SYMBOL(ssp_init); | 502 | EXPORT_SYMBOL(ssp_init); |
499 | EXPORT_SYMBOL(ssp_exit); | 503 | EXPORT_SYMBOL(ssp_exit); |
500 | EXPORT_SYMBOL(ssp_config); | 504 | EXPORT_SYMBOL(ssp_config); |
505 | #endif | ||
501 | 506 | ||
502 | MODULE_DESCRIPTION("PXA SSP driver"); | 507 | MODULE_DESCRIPTION("PXA SSP driver"); |
503 | MODULE_AUTHOR("Liam Girdwood"); | 508 | MODULE_AUTHOR("Liam Girdwood"); |
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index 750c448db672..293e40aeaf29 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c | |||
@@ -76,14 +76,12 @@ pxa_ost0_interrupt(int irq, void *dev_id) | |||
76 | static int | 76 | static int |
77 | pxa_osmr0_set_next_event(unsigned long delta, struct clock_event_device *dev) | 77 | pxa_osmr0_set_next_event(unsigned long delta, struct clock_event_device *dev) |
78 | { | 78 | { |
79 | unsigned long flags, next, oscr; | 79 | unsigned long next, oscr; |
80 | 80 | ||
81 | raw_local_irq_save(flags); | ||
82 | OIER |= OIER_E0; | 81 | OIER |= OIER_E0; |
83 | next = OSCR + delta; | 82 | next = OSCR + delta; |
84 | OSMR0 = next; | 83 | OSMR0 = next; |
85 | oscr = OSCR; | 84 | oscr = OSCR; |
86 | raw_local_irq_restore(flags); | ||
87 | 85 | ||
88 | return (signed)(next - oscr) <= MIN_OSCR_DELTA ? -ETIME : 0; | 86 | return (signed)(next - oscr) <= MIN_OSCR_DELTA ? -ETIME : 0; |
89 | } | 87 | } |
@@ -91,23 +89,17 @@ pxa_osmr0_set_next_event(unsigned long delta, struct clock_event_device *dev) | |||
91 | static void | 89 | static void |
92 | pxa_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *dev) | 90 | pxa_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *dev) |
93 | { | 91 | { |
94 | unsigned long irqflags; | ||
95 | |||
96 | switch (mode) { | 92 | switch (mode) { |
97 | case CLOCK_EVT_MODE_ONESHOT: | 93 | case CLOCK_EVT_MODE_ONESHOT: |
98 | raw_local_irq_save(irqflags); | ||
99 | OIER &= ~OIER_E0; | 94 | OIER &= ~OIER_E0; |
100 | OSSR = OSSR_M0; | 95 | OSSR = OSSR_M0; |
101 | raw_local_irq_restore(irqflags); | ||
102 | break; | 96 | break; |
103 | 97 | ||
104 | case CLOCK_EVT_MODE_UNUSED: | 98 | case CLOCK_EVT_MODE_UNUSED: |
105 | case CLOCK_EVT_MODE_SHUTDOWN: | 99 | case CLOCK_EVT_MODE_SHUTDOWN: |
106 | /* initializing, released, or preparing for suspend */ | 100 | /* initializing, released, or preparing for suspend */ |
107 | raw_local_irq_save(irqflags); | ||
108 | OIER &= ~OIER_E0; | 101 | OIER &= ~OIER_E0; |
109 | OSSR = OSSR_M0; | 102 | OSSR = OSSR_M0; |
110 | raw_local_irq_restore(irqflags); | ||
111 | break; | 103 | break; |
112 | 104 | ||
113 | case CLOCK_EVT_MODE_RESUME: | 105 | case CLOCK_EVT_MODE_RESUME: |
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index c854c168a451..ad552791c4ce 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/gpio.h> | 32 | #include <linux/gpio.h> |
33 | #include <linux/pda_power.h> | 33 | #include <linux/pda_power.h> |
34 | #include <linux/spi/spi.h> | 34 | #include <linux/spi/spi.h> |
35 | #include <linux/input/matrix_keypad.h> | ||
35 | 36 | ||
36 | #include <asm/setup.h> | 37 | #include <asm/setup.h> |
37 | #include <asm/mach-types.h> | 38 | #include <asm/mach-types.h> |
@@ -131,24 +132,24 @@ static unsigned long tosa_pin_config[] = { | |||
131 | GPIO45_BTUART_RTS, | 132 | GPIO45_BTUART_RTS, |
132 | 133 | ||
133 | /* Keybd */ | 134 | /* Keybd */ |
134 | GPIO58_GPIO | MFP_LPM_DRIVE_LOW, | 135 | GPIO58_GPIO | MFP_LPM_DRIVE_LOW, /* Column 0 */ |
135 | GPIO59_GPIO | MFP_LPM_DRIVE_LOW, | 136 | GPIO59_GPIO | MFP_LPM_DRIVE_LOW, /* Column 1 */ |
136 | GPIO60_GPIO | MFP_LPM_DRIVE_LOW, | 137 | GPIO60_GPIO | MFP_LPM_DRIVE_LOW, /* Column 2 */ |
137 | GPIO61_GPIO | MFP_LPM_DRIVE_LOW, | 138 | GPIO61_GPIO | MFP_LPM_DRIVE_LOW, /* Column 3 */ |
138 | GPIO62_GPIO | MFP_LPM_DRIVE_LOW, | 139 | GPIO62_GPIO | MFP_LPM_DRIVE_LOW, /* Column 4 */ |
139 | GPIO63_GPIO | MFP_LPM_DRIVE_LOW, | 140 | GPIO63_GPIO | MFP_LPM_DRIVE_LOW, /* Column 5 */ |
140 | GPIO64_GPIO | MFP_LPM_DRIVE_LOW, | 141 | GPIO64_GPIO | MFP_LPM_DRIVE_LOW, /* Column 6 */ |
141 | GPIO65_GPIO | MFP_LPM_DRIVE_LOW, | 142 | GPIO65_GPIO | MFP_LPM_DRIVE_LOW, /* Column 7 */ |
142 | GPIO66_GPIO | MFP_LPM_DRIVE_LOW, | 143 | GPIO66_GPIO | MFP_LPM_DRIVE_LOW, /* Column 8 */ |
143 | GPIO67_GPIO | MFP_LPM_DRIVE_LOW, | 144 | GPIO67_GPIO | MFP_LPM_DRIVE_LOW, /* Column 9 */ |
144 | GPIO68_GPIO | MFP_LPM_DRIVE_LOW, | 145 | GPIO68_GPIO | MFP_LPM_DRIVE_LOW, /* Column 10 */ |
145 | GPIO69_GPIO | MFP_LPM_DRIVE_LOW, | 146 | GPIO69_GPIO | MFP_LPM_DRIVE_LOW, /* Row 0 */ |
146 | GPIO70_GPIO | MFP_LPM_DRIVE_LOW, | 147 | GPIO70_GPIO | MFP_LPM_DRIVE_LOW, /* Row 1 */ |
147 | GPIO71_GPIO | MFP_LPM_DRIVE_LOW, | 148 | GPIO71_GPIO | MFP_LPM_DRIVE_LOW, /* Row 2 */ |
148 | GPIO72_GPIO | MFP_LPM_DRIVE_LOW, | 149 | GPIO72_GPIO | MFP_LPM_DRIVE_LOW, /* Row 3 */ |
149 | GPIO73_GPIO | MFP_LPM_DRIVE_LOW, | 150 | GPIO73_GPIO | MFP_LPM_DRIVE_LOW, /* Row 4 */ |
150 | GPIO74_GPIO | MFP_LPM_DRIVE_LOW, | 151 | GPIO74_GPIO | MFP_LPM_DRIVE_LOW, /* Row 5 */ |
151 | GPIO75_GPIO | MFP_LPM_DRIVE_LOW, | 152 | GPIO75_GPIO | MFP_LPM_DRIVE_LOW, /* Row 6 */ |
152 | 153 | ||
153 | /* SPI */ | 154 | /* SPI */ |
154 | GPIO81_SSP2_CLK_OUT, | 155 | GPIO81_SSP2_CLK_OUT, |
@@ -411,9 +412,87 @@ static struct platform_device tosa_power_device = { | |||
411 | /* | 412 | /* |
412 | * Tosa Keyboard | 413 | * Tosa Keyboard |
413 | */ | 414 | */ |
415 | static const uint32_t tosakbd_keymap[] = { | ||
416 | KEY(0, 2, KEY_W), | ||
417 | KEY(0, 6, KEY_K), | ||
418 | KEY(0, 7, KEY_BACKSPACE), | ||
419 | KEY(0, 8, KEY_P), | ||
420 | KEY(1, 1, KEY_Q), | ||
421 | KEY(1, 2, KEY_E), | ||
422 | KEY(1, 3, KEY_T), | ||
423 | KEY(1, 4, KEY_Y), | ||
424 | KEY(1, 6, KEY_O), | ||
425 | KEY(1, 7, KEY_I), | ||
426 | KEY(1, 8, KEY_COMMA), | ||
427 | KEY(2, 1, KEY_A), | ||
428 | KEY(2, 2, KEY_D), | ||
429 | KEY(2, 3, KEY_G), | ||
430 | KEY(2, 4, KEY_U), | ||
431 | KEY(2, 6, KEY_L), | ||
432 | KEY(2, 7, KEY_ENTER), | ||
433 | KEY(2, 8, KEY_DOT), | ||
434 | KEY(3, 1, KEY_Z), | ||
435 | KEY(3, 2, KEY_C), | ||
436 | KEY(3, 3, KEY_V), | ||
437 | KEY(3, 4, KEY_J), | ||
438 | KEY(3, 5, TOSA_KEY_ADDRESSBOOK), | ||
439 | KEY(3, 6, TOSA_KEY_CANCEL), | ||
440 | KEY(3, 7, TOSA_KEY_CENTER), | ||
441 | KEY(3, 8, TOSA_KEY_OK), | ||
442 | KEY(3, 9, KEY_LEFTSHIFT), | ||
443 | KEY(4, 1, KEY_S), | ||
444 | KEY(4, 2, KEY_R), | ||
445 | KEY(4, 3, KEY_B), | ||
446 | KEY(4, 4, KEY_N), | ||
447 | KEY(4, 5, TOSA_KEY_CALENDAR), | ||
448 | KEY(4, 6, TOSA_KEY_HOMEPAGE), | ||
449 | KEY(4, 7, KEY_LEFTCTRL), | ||
450 | KEY(4, 8, TOSA_KEY_LIGHT), | ||
451 | KEY(4, 10, KEY_RIGHTSHIFT), | ||
452 | KEY(5, 1, KEY_TAB), | ||
453 | KEY(5, 2, KEY_SLASH), | ||
454 | KEY(5, 3, KEY_H), | ||
455 | KEY(5, 4, KEY_M), | ||
456 | KEY(5, 5, TOSA_KEY_MENU), | ||
457 | KEY(5, 7, KEY_UP), | ||
458 | KEY(5, 11, TOSA_KEY_FN), | ||
459 | KEY(6, 1, KEY_X), | ||
460 | KEY(6, 2, KEY_F), | ||
461 | KEY(6, 3, KEY_SPACE), | ||
462 | KEY(6, 4, KEY_APOSTROPHE), | ||
463 | KEY(6, 5, TOSA_KEY_MAIL), | ||
464 | KEY(6, 6, KEY_LEFT), | ||
465 | KEY(6, 7, KEY_DOWN), | ||
466 | KEY(6, 8, KEY_RIGHT), | ||
467 | }; | ||
468 | |||
469 | static struct matrix_keymap_data tosakbd_keymap_data = { | ||
470 | .keymap = tosakbd_keymap, | ||
471 | .keymap_size = ARRAY_SIZE(tosakbd_keymap), | ||
472 | }; | ||
473 | |||
474 | static const int tosakbd_col_gpios[] = | ||
475 | { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68 }; | ||
476 | static const int tosakbd_row_gpios[] = | ||
477 | { 69, 70, 71, 72, 73, 74, 75 }; | ||
478 | |||
479 | static struct matrix_keypad_platform_data tosakbd_pdata = { | ||
480 | .keymap_data = &tosakbd_keymap_data, | ||
481 | .row_gpios = tosakbd_row_gpios, | ||
482 | .col_gpios = tosakbd_col_gpios, | ||
483 | .num_row_gpios = ARRAY_SIZE(tosakbd_row_gpios), | ||
484 | .num_col_gpios = ARRAY_SIZE(tosakbd_col_gpios), | ||
485 | .col_scan_delay_us = 10, | ||
486 | .debounce_ms = 10, | ||
487 | .wakeup = 1, | ||
488 | }; | ||
489 | |||
414 | static struct platform_device tosakbd_device = { | 490 | static struct platform_device tosakbd_device = { |
415 | .name = "tosa-keyboard", | 491 | .name = "matrix-keypad", |
416 | .id = -1, | 492 | .id = -1, |
493 | .dev = { | ||
494 | .platform_data = &tosakbd_pdata, | ||
495 | }, | ||
417 | }; | 496 | }; |
418 | 497 | ||
419 | static struct gpio_keys_button tosa_gpio_keys[] = { | 498 | static struct gpio_keys_button tosa_gpio_keys[] = { |
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c index 0aa858ebc573..797f2544d0ce 100644 --- a/arch/arm/mach-pxa/trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4.c | |||
@@ -72,27 +72,14 @@ static unsigned long trizeps4_pin_config[] __initdata = { | |||
72 | GPIO79_nCS_3, /* Logic CS */ | 72 | GPIO79_nCS_3, /* Logic CS */ |
73 | GPIO0_GPIO | WAKEUP_ON_EDGE_RISE, /* Logic irq */ | 73 | GPIO0_GPIO | WAKEUP_ON_EDGE_RISE, /* Logic irq */ |
74 | 74 | ||
75 | /* AC97 */ | ||
76 | GPIO28_AC97_BITCLK, | ||
77 | GPIO29_AC97_SDATA_IN_0, | ||
78 | GPIO30_AC97_SDATA_OUT, | ||
79 | GPIO31_AC97_SYNC, | ||
80 | |||
75 | /* LCD - 16bpp Active TFT */ | 81 | /* LCD - 16bpp Active TFT */ |
76 | GPIO58_LCD_LDD_0, | 82 | GPIOxx_LCD_TFT_16BPP, |
77 | GPIO59_LCD_LDD_1, | ||
78 | GPIO60_LCD_LDD_2, | ||
79 | GPIO61_LCD_LDD_3, | ||
80 | GPIO62_LCD_LDD_4, | ||
81 | GPIO63_LCD_LDD_5, | ||
82 | GPIO64_LCD_LDD_6, | ||
83 | GPIO65_LCD_LDD_7, | ||
84 | GPIO66_LCD_LDD_8, | ||
85 | GPIO67_LCD_LDD_9, | ||
86 | GPIO68_LCD_LDD_10, | ||
87 | GPIO69_LCD_LDD_11, | ||
88 | GPIO70_LCD_LDD_12, | ||
89 | GPIO71_LCD_LDD_13, | ||
90 | GPIO72_LCD_LDD_14, | ||
91 | GPIO73_LCD_LDD_15, | ||
92 | GPIO74_LCD_FCLK, | ||
93 | GPIO75_LCD_LCLK, | ||
94 | GPIO76_LCD_PCLK, | ||
95 | GPIO77_LCD_BIAS, | ||
96 | 83 | ||
97 | /* UART */ | 84 | /* UART */ |
98 | GPIO9_FFUART_CTS, | 85 | GPIO9_FFUART_CTS, |
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index 89f258c9e126..1dd13346f977 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c | |||
@@ -281,7 +281,7 @@ static void viper_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
281 | do { | 281 | do { |
282 | /* we're in a chained irq handler, | 282 | /* we're in a chained irq handler, |
283 | * so ack the interrupt by hand */ | 283 | * so ack the interrupt by hand */ |
284 | GEDR(VIPER_CPLD_GPIO) = GPIO_bit(VIPER_CPLD_GPIO); | 284 | desc->chip->ack(irq); |
285 | 285 | ||
286 | if (likely(pending)) { | 286 | if (likely(pending)) { |
287 | irq = viper_bit_to_irq(__ffs(pending)); | 287 | irq = viper_bit_to_irq(__ffs(pending)); |
@@ -711,6 +711,12 @@ static mfp_cfg_t viper_pin_config[] __initdata = { | |||
711 | GPIO80_nCS_4, | 711 | GPIO80_nCS_4, |
712 | GPIO33_nCS_5, | 712 | GPIO33_nCS_5, |
713 | 713 | ||
714 | /* AC97 */ | ||
715 | GPIO28_AC97_BITCLK, | ||
716 | GPIO29_AC97_SDATA_IN_0, | ||
717 | GPIO30_AC97_SDATA_OUT, | ||
718 | GPIO31_AC97_SYNC, | ||
719 | |||
714 | /* FP Backlight */ | 720 | /* FP Backlight */ |
715 | GPIO9_GPIO, /* VIPER_BCKLIGHT_EN_GPIO */ | 721 | GPIO9_GPIO, /* VIPER_BCKLIGHT_EN_GPIO */ |
716 | GPIO10_GPIO, /* VIPER_LCD_EN_GPIO */ | 722 | GPIO10_GPIO, /* VIPER_LCD_EN_GPIO */ |
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 75f2a37f945d..39896d883584 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
27 | #include <linux/i2c/pca953x.h> | 27 | #include <linux/i2c/pca953x.h> |
28 | #include <linux/apm-emulation.h> | 28 | #include <linux/apm-emulation.h> |
29 | #include <linux/can/platform/mcp251x.h> | ||
29 | 30 | ||
30 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
31 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
@@ -387,11 +388,47 @@ static struct pxa2xx_spi_master pxa2xx_spi_ssp3_master_info = { | |||
387 | .enable_dma = 1, | 388 | .enable_dma = 1, |
388 | }; | 389 | }; |
389 | 390 | ||
390 | static struct platform_device pxa2xx_spi_ssp3_device = { | 391 | /* CAN bus on SPI */ |
391 | .name = "pxa2xx-spi", | 392 | static int zeus_mcp2515_setup(struct spi_device *sdev) |
392 | .id = 3, | 393 | { |
393 | .dev = { | 394 | int err; |
394 | .platform_data = &pxa2xx_spi_ssp3_master_info, | 395 | |
396 | err = gpio_request(ZEUS_CAN_SHDN_GPIO, "CAN shutdown"); | ||
397 | if (err) | ||
398 | return err; | ||
399 | |||
400 | err = gpio_direction_output(ZEUS_CAN_SHDN_GPIO, 1); | ||
401 | if (err) { | ||
402 | gpio_free(ZEUS_CAN_SHDN_GPIO); | ||
403 | return err; | ||
404 | } | ||
405 | |||
406 | return 0; | ||
407 | } | ||
408 | |||
409 | static int zeus_mcp2515_transceiver_enable(int enable) | ||
410 | { | ||
411 | gpio_set_value(ZEUS_CAN_SHDN_GPIO, !enable); | ||
412 | return 0; | ||
413 | } | ||
414 | |||
415 | static struct mcp251x_platform_data zeus_mcp2515_pdata = { | ||
416 | .oscillator_frequency = 16*1000*1000, | ||
417 | .model = CAN_MCP251X_MCP2515, | ||
418 | .board_specific_setup = zeus_mcp2515_setup, | ||
419 | .transceiver_enable = zeus_mcp2515_transceiver_enable, | ||
420 | .power_enable = zeus_mcp2515_transceiver_enable, | ||
421 | }; | ||
422 | |||
423 | static struct spi_board_info zeus_spi_board_info[] = { | ||
424 | [0] = { | ||
425 | .modalias = "mcp251x", | ||
426 | .platform_data = &zeus_mcp2515_pdata, | ||
427 | .irq = gpio_to_irq(ZEUS_CAN_GPIO), | ||
428 | .max_speed_hz = 1*1000*1000, | ||
429 | .bus_num = 3, | ||
430 | .mode = SPI_MODE_0, | ||
431 | .chip_select = 0, | ||
395 | }, | 432 | }, |
396 | }; | 433 | }; |
397 | 434 | ||
@@ -457,15 +494,28 @@ static struct platform_device zeus_pcmcia_device = { | |||
457 | }, | 494 | }, |
458 | }; | 495 | }; |
459 | 496 | ||
497 | static struct resource zeus_max6369_resource = { | ||
498 | .start = ZEUS_CPLD_EXTWDOG_PHYS, | ||
499 | .end = ZEUS_CPLD_EXTWDOG_PHYS, | ||
500 | .flags = IORESOURCE_MEM, | ||
501 | }; | ||
502 | |||
503 | struct platform_device zeus_max6369_device = { | ||
504 | .name = "max6369_wdt", | ||
505 | .id = -1, | ||
506 | .resource = &zeus_max6369_resource, | ||
507 | .num_resources = 1, | ||
508 | }; | ||
509 | |||
460 | static struct platform_device *zeus_devices[] __initdata = { | 510 | static struct platform_device *zeus_devices[] __initdata = { |
461 | &zeus_serial_device, | 511 | &zeus_serial_device, |
462 | &zeus_mtd_devices[0], | 512 | &zeus_mtd_devices[0], |
463 | &zeus_dm9k0_device, | 513 | &zeus_dm9k0_device, |
464 | &zeus_dm9k1_device, | 514 | &zeus_dm9k1_device, |
465 | &zeus_sram_device, | 515 | &zeus_sram_device, |
466 | &pxa2xx_spi_ssp3_device, | ||
467 | &zeus_leds_device, | 516 | &zeus_leds_device, |
468 | &zeus_pcmcia_device, | 517 | &zeus_pcmcia_device, |
518 | &zeus_max6369_device, | ||
469 | }; | 519 | }; |
470 | 520 | ||
471 | /* AC'97 */ | 521 | /* AC'97 */ |
@@ -509,7 +559,9 @@ static void zeus_ohci_exit(struct device *dev) | |||
509 | 559 | ||
510 | static struct pxaohci_platform_data zeus_ohci_platform_data = { | 560 | static struct pxaohci_platform_data zeus_ohci_platform_data = { |
511 | .port_mode = PMM_NPS_MODE, | 561 | .port_mode = PMM_NPS_MODE, |
512 | .flags = ENABLE_PORT_ALL | POWER_CONTROL_LOW | POWER_SENSE_LOW, | 562 | /* Clear Power Control Polarity Low and set Power Sense |
563 | * Polarity Low. Supply power to USB ports. */ | ||
564 | .flags = ENABLE_PORT_ALL | POWER_SENSE_LOW, | ||
513 | .init = zeus_ohci_init, | 565 | .init = zeus_ohci_init, |
514 | .exit = zeus_ohci_exit, | 566 | .exit = zeus_ohci_exit, |
515 | }; | 567 | }; |
@@ -621,11 +673,15 @@ static struct pxa2xx_udc_mach_info zeus_udc_info = { | |||
621 | .udc_command = zeus_udc_command, | 673 | .udc_command = zeus_udc_command, |
622 | }; | 674 | }; |
623 | 675 | ||
676 | #ifdef CONFIG_PM | ||
624 | static void zeus_power_off(void) | 677 | static void zeus_power_off(void) |
625 | { | 678 | { |
626 | local_irq_disable(); | 679 | local_irq_disable(); |
627 | pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP); | 680 | pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP); |
628 | } | 681 | } |
682 | #else | ||
683 | #define zeus_power_off NULL | ||
684 | #endif | ||
629 | 685 | ||
630 | #ifdef CONFIG_APM_EMULATION | 686 | #ifdef CONFIG_APM_EMULATION |
631 | static void zeus_get_power_status(struct apm_power_info *info) | 687 | static void zeus_get_power_status(struct apm_power_info *info) |
@@ -706,6 +762,12 @@ static struct i2c_board_info __initdata zeus_i2c_devices[] = { | |||
706 | }; | 762 | }; |
707 | 763 | ||
708 | static mfp_cfg_t zeus_pin_config[] __initdata = { | 764 | static mfp_cfg_t zeus_pin_config[] __initdata = { |
765 | /* AC97 */ | ||
766 | GPIO28_AC97_BITCLK, | ||
767 | GPIO29_AC97_SDATA_IN_0, | ||
768 | GPIO30_AC97_SDATA_OUT, | ||
769 | GPIO31_AC97_SYNC, | ||
770 | |||
709 | GPIO15_nCS_1, | 771 | GPIO15_nCS_1, |
710 | GPIO78_nCS_2, | 772 | GPIO78_nCS_2, |
711 | GPIO80_nCS_4, | 773 | GPIO80_nCS_4, |
@@ -731,6 +793,11 @@ static mfp_cfg_t zeus_pin_config[] __initdata = { | |||
731 | GPIO104_CIF_DD_2, | 793 | GPIO104_CIF_DD_2, |
732 | GPIO105_CIF_DD_1, | 794 | GPIO105_CIF_DD_1, |
733 | 795 | ||
796 | GPIO81_SSP3_TXD, | ||
797 | GPIO82_SSP3_RXD, | ||
798 | GPIO83_SSP3_SFRM, | ||
799 | GPIO84_SSP3_SCLK, | ||
800 | |||
734 | GPIO48_nPOE, | 801 | GPIO48_nPOE, |
735 | GPIO49_nPWE, | 802 | GPIO49_nPWE, |
736 | GPIO50_nPIOR, | 803 | GPIO50_nPIOR, |
@@ -785,6 +852,8 @@ static void __init zeus_init(void) | |||
785 | pxa_set_ac97_info(&zeus_ac97_info); | 852 | pxa_set_ac97_info(&zeus_ac97_info); |
786 | pxa_set_i2c_info(NULL); | 853 | pxa_set_i2c_info(NULL); |
787 | i2c_register_board_info(0, ARRAY_AND_SIZE(zeus_i2c_devices)); | 854 | i2c_register_board_info(0, ARRAY_AND_SIZE(zeus_i2c_devices)); |
855 | pxa2xx_set_spi_info(3, &pxa2xx_spi_ssp3_master_info); | ||
856 | spi_register_board_info(zeus_spi_board_info, ARRAY_SIZE(zeus_spi_board_info)); | ||
788 | } | 857 | } |
789 | 858 | ||
790 | static struct map_desc zeus_io_desc[] __initdata = { | 859 | static struct map_desc zeus_io_desc[] __initdata = { |
@@ -807,12 +876,6 @@ static struct map_desc zeus_io_desc[] __initdata = { | |||
807 | .type = MT_DEVICE, | 876 | .type = MT_DEVICE, |
808 | }, | 877 | }, |
809 | { | 878 | { |
810 | .virtual = ZEUS_CPLD_EXTWDOG, | ||
811 | .pfn = __phys_to_pfn(ZEUS_CPLD_EXTWDOG_PHYS), | ||
812 | .length = 0x1000, | ||
813 | .type = MT_DEVICE, | ||
814 | }, | ||
815 | { | ||
816 | .virtual = ZEUS_PC104IO, | 879 | .virtual = ZEUS_PC104IO, |
817 | .pfn = __phys_to_pfn(ZEUS_PC104IO_PHYS), | 880 | .pfn = __phys_to_pfn(ZEUS_PC104IO_PHYS), |
818 | .length = 0x00800000, | 881 | .length = 0x00800000, |
@@ -837,7 +900,7 @@ static void __init zeus_map_io(void) | |||
837 | PCFR = PCFR_OPDE | PCFR_DC_EN | PCFR_FS | PCFR_FP; | 900 | PCFR = PCFR_OPDE | PCFR_DC_EN | PCFR_FS | PCFR_FP; |
838 | } | 901 | } |
839 | 902 | ||
840 | MACHINE_START(ARCOM_ZEUS, "Arcom ZEUS") | 903 | MACHINE_START(ARCOM_ZEUS, "Arcom/Eurotech ZEUS") |
841 | /* Maintainer: Marc Zyngier <maz@misterjones.org> */ | 904 | /* Maintainer: Marc Zyngier <maz@misterjones.org> */ |
842 | .phys_io = 0x40000000, | 905 | .phys_io = 0x40000000, |
843 | .io_pg_offst = ((io_p2v(0x40000000) >> 18) & 0xfffc), | 906 | .io_pg_offst = ((io_p2v(0x40000000) >> 18) & 0xfffc), |