diff options
Diffstat (limited to 'arch/arm/mach-mx3')
-rw-r--r-- | arch/arm/mach-mx3/Kconfig | 10 | ||||
-rw-r--r-- | arch/arm/mach-mx3/clock-imx31.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-mx3/devices.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-mx3/devices.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mach-armadillo5x0.c | 166 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mach-mx31_3ds.c | 116 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mach-mx31moboard.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mach-pcm037.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mx31lite-db.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mx31moboard-devboard.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mx31moboard-marxbot.c | 1 |
11 files changed, 300 insertions, 26 deletions
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig index 3872af1cf2c3..170f68e46dd5 100644 --- a/arch/arm/mach-mx3/Kconfig +++ b/arch/arm/mach-mx3/Kconfig | |||
@@ -62,6 +62,15 @@ config MACH_MX31_3DS | |||
62 | Include support for MX31PDK (3DS) platform. This includes specific | 62 | Include support for MX31PDK (3DS) platform. This includes specific |
63 | configurations for the board and its peripherals. | 63 | configurations for the board and its peripherals. |
64 | 64 | ||
65 | config MACH_MX31_3DS_MXC_NAND_USE_BBT | ||
66 | bool "Make the MXC NAND driver use the in flash Bad Block Table" | ||
67 | depends on MACH_MX31_3DS | ||
68 | depends on MTD_NAND_MXC | ||
69 | help | ||
70 | Enable this if you want that the MXC NAND driver uses the in flash | ||
71 | Bad Block Table to know what blocks are bad instead of scanning the | ||
72 | entire flash looking for bad block markers. | ||
73 | |||
65 | config MACH_MX31MOBOARD | 74 | config MACH_MX31MOBOARD |
66 | bool "Support mx31moboard platforms (EPFL Mobots group)" | 75 | bool "Support mx31moboard platforms (EPFL Mobots group)" |
67 | select ARCH_MX31 | 76 | select ARCH_MX31 |
@@ -95,6 +104,7 @@ config MACH_PCM043 | |||
95 | config MACH_ARMADILLO5X0 | 104 | config MACH_ARMADILLO5X0 |
96 | bool "Support Atmark Armadillo-500 Development Base Board" | 105 | bool "Support Atmark Armadillo-500 Development Base Board" |
97 | select ARCH_MX31 | 106 | select ARCH_MX31 |
107 | select MXC_ULPI if USB_ULPI | ||
98 | help | 108 | help |
99 | Include support for Atmark Armadillo-500 platform. This includes | 109 | Include support for Atmark Armadillo-500 platform. This includes |
100 | specific configurations for the board and its peripherals. | 110 | specific configurations for the board and its peripherals. |
diff --git a/arch/arm/mach-mx3/clock-imx31.c b/arch/arm/mach-mx3/clock-imx31.c index 80dba9966b5e..9a9eb6de6127 100644 --- a/arch/arm/mach-mx3/clock-imx31.c +++ b/arch/arm/mach-mx3/clock-imx31.c | |||
@@ -468,6 +468,7 @@ static struct clk ahb_clk = { | |||
468 | } | 468 | } |
469 | 469 | ||
470 | DEFINE_CLOCK(perclk_clk, 0, NULL, 0, NULL, NULL, &ipg_clk); | 470 | DEFINE_CLOCK(perclk_clk, 0, NULL, 0, NULL, NULL, &ipg_clk); |
471 | DEFINE_CLOCK(ckil_clk, 0, NULL, 0, clk_ckil_get_rate, NULL, NULL); | ||
471 | 472 | ||
472 | DEFINE_CLOCK(sdhc1_clk, 0, MXC_CCM_CGR0, 0, NULL, NULL, &perclk_clk); | 473 | DEFINE_CLOCK(sdhc1_clk, 0, MXC_CCM_CGR0, 0, NULL, NULL, &perclk_clk); |
473 | DEFINE_CLOCK(sdhc2_clk, 1, MXC_CCM_CGR0, 2, NULL, NULL, &perclk_clk); | 474 | DEFINE_CLOCK(sdhc2_clk, 1, MXC_CCM_CGR0, 2, NULL, NULL, &perclk_clk); |
@@ -490,7 +491,7 @@ DEFINE_CLOCK(mpeg4_clk, 0, MXC_CCM_CGR1, 0, NULL, NULL, &ahb_clk); | |||
490 | DEFINE_CLOCK(mstick1_clk, 0, MXC_CCM_CGR1, 2, mstick1_get_rate, NULL, &usb_pll_clk); | 491 | DEFINE_CLOCK(mstick1_clk, 0, MXC_CCM_CGR1, 2, mstick1_get_rate, NULL, &usb_pll_clk); |
491 | DEFINE_CLOCK(mstick2_clk, 1, MXC_CCM_CGR1, 4, mstick2_get_rate, NULL, &usb_pll_clk); | 492 | DEFINE_CLOCK(mstick2_clk, 1, MXC_CCM_CGR1, 4, mstick2_get_rate, NULL, &usb_pll_clk); |
492 | DEFINE_CLOCK1(csi_clk, 0, MXC_CCM_CGR1, 6, csi, NULL, &serial_pll_clk); | 493 | DEFINE_CLOCK1(csi_clk, 0, MXC_CCM_CGR1, 6, csi, NULL, &serial_pll_clk); |
493 | DEFINE_CLOCK(rtc_clk, 0, MXC_CCM_CGR1, 8, NULL, NULL, &ipg_clk); | 494 | DEFINE_CLOCK(rtc_clk, 0, MXC_CCM_CGR1, 8, NULL, NULL, &ckil_clk); |
494 | DEFINE_CLOCK(wdog_clk, 0, MXC_CCM_CGR1, 10, NULL, NULL, &ipg_clk); | 495 | DEFINE_CLOCK(wdog_clk, 0, MXC_CCM_CGR1, 10, NULL, NULL, &ipg_clk); |
495 | DEFINE_CLOCK(pwm_clk, 0, MXC_CCM_CGR1, 12, NULL, NULL, &perclk_clk); | 496 | DEFINE_CLOCK(pwm_clk, 0, MXC_CCM_CGR1, 12, NULL, NULL, &perclk_clk); |
496 | DEFINE_CLOCK(usb_clk2, 0, MXC_CCM_CGR1, 18, usb_get_rate, NULL, &ahb_clk); | 497 | DEFINE_CLOCK(usb_clk2, 0, MXC_CCM_CGR1, 18, usb_get_rate, NULL, &ahb_clk); |
@@ -514,7 +515,6 @@ DEFINE_CLOCK(usb_clk1, 0, NULL, 0, usb_get_rate, NULL, &usb_pll_clk) | |||
514 | DEFINE_CLOCK(nfc_clk, 0, NULL, 0, nfc_get_rate, NULL, &ahb_clk); | 515 | DEFINE_CLOCK(nfc_clk, 0, NULL, 0, nfc_get_rate, NULL, &ahb_clk); |
515 | DEFINE_CLOCK(scc_clk, 0, NULL, 0, NULL, NULL, &ipg_clk); | 516 | DEFINE_CLOCK(scc_clk, 0, NULL, 0, NULL, NULL, &ipg_clk); |
516 | DEFINE_CLOCK(ipg_clk, 0, NULL, 0, ipg_get_rate, NULL, &ahb_clk); | 517 | DEFINE_CLOCK(ipg_clk, 0, NULL, 0, ipg_get_rate, NULL, &ahb_clk); |
517 | DEFINE_CLOCK(ckil_clk, 0, NULL, 0, clk_ckil_get_rate, NULL, NULL); | ||
518 | 518 | ||
519 | #define _REGISTER_CLOCK(d, n, c) \ | 519 | #define _REGISTER_CLOCK(d, n, c) \ |
520 | { \ | 520 | { \ |
@@ -572,7 +572,6 @@ static struct clk_lookup lookups[] = { | |||
572 | _REGISTER_CLOCK(NULL, "iim", iim_clk) | 572 | _REGISTER_CLOCK(NULL, "iim", iim_clk) |
573 | _REGISTER_CLOCK(NULL, "mpeg4", mpeg4_clk) | 573 | _REGISTER_CLOCK(NULL, "mpeg4", mpeg4_clk) |
574 | _REGISTER_CLOCK(NULL, "mbx", mbx_clk) | 574 | _REGISTER_CLOCK(NULL, "mbx", mbx_clk) |
575 | _REGISTER_CLOCK("mxc_rtc", NULL, ckil_clk) | ||
576 | }; | 575 | }; |
577 | 576 | ||
578 | int __init mx31_clocks_init(unsigned long fref) | 577 | int __init mx31_clocks_init(unsigned long fref) |
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index 6adb586515ea..f8911154a9fa 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c | |||
@@ -575,11 +575,26 @@ struct platform_device imx_ssi_device1 = { | |||
575 | .resource = imx_ssi_resources1, | 575 | .resource = imx_ssi_resources1, |
576 | }; | 576 | }; |
577 | 577 | ||
578 | static int mx3_devices_init(void) | 578 | static struct resource imx_wdt_resources[] = { |
579 | { | ||
580 | .flags = IORESOURCE_MEM, | ||
581 | }, | ||
582 | }; | ||
583 | |||
584 | struct platform_device imx_wdt_device0 = { | ||
585 | .name = "imx-wdt", | ||
586 | .id = 0, | ||
587 | .num_resources = ARRAY_SIZE(imx_wdt_resources), | ||
588 | .resource = imx_wdt_resources, | ||
589 | }; | ||
590 | |||
591 | static int __init mx3_devices_init(void) | ||
579 | { | 592 | { |
580 | if (cpu_is_mx31()) { | 593 | if (cpu_is_mx31()) { |
581 | mxc_nand_resources[0].start = MX31_NFC_BASE_ADDR; | 594 | mxc_nand_resources[0].start = MX31_NFC_BASE_ADDR; |
582 | mxc_nand_resources[0].end = MX31_NFC_BASE_ADDR + 0xfff; | 595 | mxc_nand_resources[0].end = MX31_NFC_BASE_ADDR + 0xfff; |
596 | imx_wdt_resources[0].start = MX31_WDOG_BASE_ADDR; | ||
597 | imx_wdt_resources[0].end = MX31_WDOG_BASE_ADDR + 0x3fff; | ||
583 | mxc_register_device(&mxc_rnga_device, NULL); | 598 | mxc_register_device(&mxc_rnga_device, NULL); |
584 | } | 599 | } |
585 | if (cpu_is_mx35()) { | 600 | if (cpu_is_mx35()) { |
@@ -597,6 +612,8 @@ static int mx3_devices_init(void) | |||
597 | imx_ssi_resources0[1].end = MX35_INT_SSI1; | 612 | imx_ssi_resources0[1].end = MX35_INT_SSI1; |
598 | imx_ssi_resources1[1].start = MX35_INT_SSI2; | 613 | imx_ssi_resources1[1].start = MX35_INT_SSI2; |
599 | imx_ssi_resources1[1].end = MX35_INT_SSI2; | 614 | imx_ssi_resources1[1].end = MX35_INT_SSI2; |
615 | imx_wdt_resources[0].start = MX35_WDOG_BASE_ADDR; | ||
616 | imx_wdt_resources[0].end = MX35_WDOG_BASE_ADDR + 0x3fff; | ||
600 | } | 617 | } |
601 | 618 | ||
602 | return 0; | 619 | return 0; |
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h index 42cf175eac6b..4f77eb501274 100644 --- a/arch/arm/mach-mx3/devices.h +++ b/arch/arm/mach-mx3/devices.h | |||
@@ -25,4 +25,5 @@ extern struct platform_device mxc_spi_device1; | |||
25 | extern struct platform_device mxc_spi_device2; | 25 | extern struct platform_device mxc_spi_device2; |
26 | extern struct platform_device imx_ssi_device0; | 26 | extern struct platform_device imx_ssi_device0; |
27 | extern struct platform_device imx_ssi_device1; | 27 | extern struct platform_device imx_ssi_device1; |
28 | 28 | extern struct platform_device imx_ssi_device1; | |
29 | extern struct platform_device imx_wdt_device0; | ||
diff --git a/arch/arm/mach-mx3/mach-armadillo5x0.c b/arch/arm/mach-mx3/mach-armadillo5x0.c index 3d72b0b89705..5f72ec91af2d 100644 --- a/arch/arm/mach-mx3/mach-armadillo5x0.c +++ b/arch/arm/mach-mx3/mach-armadillo5x0.c | |||
@@ -36,6 +36,9 @@ | |||
36 | #include <linux/input.h> | 36 | #include <linux/input.h> |
37 | #include <linux/gpio_keys.h> | 37 | #include <linux/gpio_keys.h> |
38 | #include <linux/i2c.h> | 38 | #include <linux/i2c.h> |
39 | #include <linux/usb/otg.h> | ||
40 | #include <linux/usb/ulpi.h> | ||
41 | #include <linux/delay.h> | ||
39 | 42 | ||
40 | #include <mach/hardware.h> | 43 | #include <mach/hardware.h> |
41 | #include <asm/mach-types.h> | 44 | #include <asm/mach-types.h> |
@@ -52,6 +55,8 @@ | |||
52 | #include <mach/ipu.h> | 55 | #include <mach/ipu.h> |
53 | #include <mach/mx3fb.h> | 56 | #include <mach/mx3fb.h> |
54 | #include <mach/mxc_nand.h> | 57 | #include <mach/mxc_nand.h> |
58 | #include <mach/mxc_ehci.h> | ||
59 | #include <mach/ulpi.h> | ||
55 | 60 | ||
56 | #include "devices.h" | 61 | #include "devices.h" |
57 | #include "crm_regs.h" | 62 | #include "crm_regs.h" |
@@ -103,8 +108,158 @@ static int armadillo5x0_pins[] = { | |||
103 | /* I2C2 */ | 108 | /* I2C2 */ |
104 | MX31_PIN_CSPI2_MOSI__SCL, | 109 | MX31_PIN_CSPI2_MOSI__SCL, |
105 | MX31_PIN_CSPI2_MISO__SDA, | 110 | MX31_PIN_CSPI2_MISO__SDA, |
111 | /* OTG */ | ||
112 | MX31_PIN_USBOTG_DATA0__USBOTG_DATA0, | ||
113 | MX31_PIN_USBOTG_DATA1__USBOTG_DATA1, | ||
114 | MX31_PIN_USBOTG_DATA2__USBOTG_DATA2, | ||
115 | MX31_PIN_USBOTG_DATA3__USBOTG_DATA3, | ||
116 | MX31_PIN_USBOTG_DATA4__USBOTG_DATA4, | ||
117 | MX31_PIN_USBOTG_DATA5__USBOTG_DATA5, | ||
118 | MX31_PIN_USBOTG_DATA6__USBOTG_DATA6, | ||
119 | MX31_PIN_USBOTG_DATA7__USBOTG_DATA7, | ||
120 | MX31_PIN_USBOTG_CLK__USBOTG_CLK, | ||
121 | MX31_PIN_USBOTG_DIR__USBOTG_DIR, | ||
122 | MX31_PIN_USBOTG_NXT__USBOTG_NXT, | ||
123 | MX31_PIN_USBOTG_STP__USBOTG_STP, | ||
124 | /* USB host 2 */ | ||
125 | IOMUX_MODE(MX31_PIN_USBH2_CLK, IOMUX_CONFIG_FUNC), | ||
126 | IOMUX_MODE(MX31_PIN_USBH2_DIR, IOMUX_CONFIG_FUNC), | ||
127 | IOMUX_MODE(MX31_PIN_USBH2_NXT, IOMUX_CONFIG_FUNC), | ||
128 | IOMUX_MODE(MX31_PIN_USBH2_STP, IOMUX_CONFIG_FUNC), | ||
129 | IOMUX_MODE(MX31_PIN_USBH2_DATA0, IOMUX_CONFIG_FUNC), | ||
130 | IOMUX_MODE(MX31_PIN_USBH2_DATA1, IOMUX_CONFIG_FUNC), | ||
131 | IOMUX_MODE(MX31_PIN_STXD3, IOMUX_CONFIG_FUNC), | ||
132 | IOMUX_MODE(MX31_PIN_SRXD3, IOMUX_CONFIG_FUNC), | ||
133 | IOMUX_MODE(MX31_PIN_SCK3, IOMUX_CONFIG_FUNC), | ||
134 | IOMUX_MODE(MX31_PIN_SFS3, IOMUX_CONFIG_FUNC), | ||
135 | IOMUX_MODE(MX31_PIN_STXD6, IOMUX_CONFIG_FUNC), | ||
136 | IOMUX_MODE(MX31_PIN_SRXD6, IOMUX_CONFIG_FUNC), | ||
106 | }; | 137 | }; |
107 | 138 | ||
139 | /* USB */ | ||
140 | #if defined(CONFIG_USB_ULPI) | ||
141 | |||
142 | #define OTG_RESET IOMUX_TO_GPIO(MX31_PIN_STXD4) | ||
143 | #define USBH2_RESET IOMUX_TO_GPIO(MX31_PIN_SCK6) | ||
144 | #define USBH2_CS IOMUX_TO_GPIO(MX31_PIN_GPIO1_3) | ||
145 | |||
146 | #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ | ||
147 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) | ||
148 | |||
149 | static int usbotg_init(struct platform_device *pdev) | ||
150 | { | ||
151 | int err; | ||
152 | |||
153 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA0, USB_PAD_CFG); | ||
154 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA1, USB_PAD_CFG); | ||
155 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA2, USB_PAD_CFG); | ||
156 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA3, USB_PAD_CFG); | ||
157 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA4, USB_PAD_CFG); | ||
158 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA5, USB_PAD_CFG); | ||
159 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA6, USB_PAD_CFG); | ||
160 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA7, USB_PAD_CFG); | ||
161 | mxc_iomux_set_pad(MX31_PIN_USBOTG_CLK, USB_PAD_CFG); | ||
162 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DIR, USB_PAD_CFG); | ||
163 | mxc_iomux_set_pad(MX31_PIN_USBOTG_NXT, USB_PAD_CFG); | ||
164 | mxc_iomux_set_pad(MX31_PIN_USBOTG_STP, USB_PAD_CFG); | ||
165 | |||
166 | /* Chip already enabled by hardware */ | ||
167 | /* OTG phy reset*/ | ||
168 | err = gpio_request(OTG_RESET, "USB-OTG-RESET"); | ||
169 | if (err) { | ||
170 | pr_err("Failed to request the usb otg reset gpio\n"); | ||
171 | return err; | ||
172 | } | ||
173 | |||
174 | err = gpio_direction_output(OTG_RESET, 1/*HIGH*/); | ||
175 | if (err) { | ||
176 | pr_err("Failed to reset the usb otg phy\n"); | ||
177 | goto otg_free_reset; | ||
178 | } | ||
179 | |||
180 | gpio_set_value(OTG_RESET, 0/*LOW*/); | ||
181 | mdelay(5); | ||
182 | gpio_set_value(OTG_RESET, 1/*HIGH*/); | ||
183 | |||
184 | return 0; | ||
185 | |||
186 | otg_free_reset: | ||
187 | gpio_free(OTG_RESET); | ||
188 | return err; | ||
189 | } | ||
190 | |||
191 | static int usbh2_init(struct platform_device *pdev) | ||
192 | { | ||
193 | int err; | ||
194 | |||
195 | mxc_iomux_set_pad(MX31_PIN_USBH2_CLK, USB_PAD_CFG); | ||
196 | mxc_iomux_set_pad(MX31_PIN_USBH2_DIR, USB_PAD_CFG); | ||
197 | mxc_iomux_set_pad(MX31_PIN_USBH2_NXT, USB_PAD_CFG); | ||
198 | mxc_iomux_set_pad(MX31_PIN_USBH2_STP, USB_PAD_CFG); | ||
199 | mxc_iomux_set_pad(MX31_PIN_USBH2_DATA0, USB_PAD_CFG); | ||
200 | mxc_iomux_set_pad(MX31_PIN_USBH2_DATA1, USB_PAD_CFG); | ||
201 | mxc_iomux_set_pad(MX31_PIN_SRXD6, USB_PAD_CFG); | ||
202 | mxc_iomux_set_pad(MX31_PIN_STXD6, USB_PAD_CFG); | ||
203 | mxc_iomux_set_pad(MX31_PIN_SFS3, USB_PAD_CFG); | ||
204 | mxc_iomux_set_pad(MX31_PIN_SCK3, USB_PAD_CFG); | ||
205 | mxc_iomux_set_pad(MX31_PIN_SRXD3, USB_PAD_CFG); | ||
206 | mxc_iomux_set_pad(MX31_PIN_STXD3, USB_PAD_CFG); | ||
207 | |||
208 | mxc_iomux_set_gpr(MUX_PGP_UH2, true); | ||
209 | |||
210 | |||
211 | /* Enable the chip */ | ||
212 | err = gpio_request(USBH2_CS, "USB-H2-CS"); | ||
213 | if (err) { | ||
214 | pr_err("Failed to request the usb host 2 CS gpio\n"); | ||
215 | return err; | ||
216 | } | ||
217 | |||
218 | err = gpio_direction_output(USBH2_CS, 0/*Enabled*/); | ||
219 | if (err) { | ||
220 | pr_err("Failed to drive the usb host 2 CS gpio\n"); | ||
221 | goto h2_free_cs; | ||
222 | } | ||
223 | |||
224 | /* H2 phy reset*/ | ||
225 | err = gpio_request(USBH2_RESET, "USB-H2-RESET"); | ||
226 | if (err) { | ||
227 | pr_err("Failed to request the usb host 2 reset gpio\n"); | ||
228 | goto h2_free_cs; | ||
229 | } | ||
230 | |||
231 | err = gpio_direction_output(USBH2_RESET, 1/*HIGH*/); | ||
232 | if (err) { | ||
233 | pr_err("Failed to reset the usb host 2 phy\n"); | ||
234 | goto h2_free_reset; | ||
235 | } | ||
236 | |||
237 | gpio_set_value(USBH2_RESET, 0/*LOW*/); | ||
238 | mdelay(5); | ||
239 | gpio_set_value(USBH2_RESET, 1/*HIGH*/); | ||
240 | |||
241 | return 0; | ||
242 | |||
243 | h2_free_reset: | ||
244 | gpio_free(USBH2_RESET); | ||
245 | h2_free_cs: | ||
246 | gpio_free(USBH2_CS); | ||
247 | return err; | ||
248 | } | ||
249 | |||
250 | static struct mxc_usbh_platform_data usbotg_pdata = { | ||
251 | .init = usbotg_init, | ||
252 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, | ||
253 | .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI, | ||
254 | }; | ||
255 | |||
256 | static struct mxc_usbh_platform_data usbh2_pdata = { | ||
257 | .init = usbh2_init, | ||
258 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, | ||
259 | .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI, | ||
260 | }; | ||
261 | #endif /* CONFIG_USB_ULPI */ | ||
262 | |||
108 | /* RTC over I2C*/ | 263 | /* RTC over I2C*/ |
109 | #define ARMADILLO5X0_RTC_GPIO IOMUX_TO_GPIO(MX31_PIN_SRXD4) | 264 | #define ARMADILLO5X0_RTC_GPIO IOMUX_TO_GPIO(MX31_PIN_SRXD4) |
110 | 265 | ||
@@ -393,6 +548,17 @@ static void __init armadillo5x0_init(void) | |||
393 | if (armadillo5x0_i2c_rtc.irq == 0) | 548 | if (armadillo5x0_i2c_rtc.irq == 0) |
394 | pr_warning("armadillo5x0_init: failed to get RTC IRQ\n"); | 549 | pr_warning("armadillo5x0_init: failed to get RTC IRQ\n"); |
395 | i2c_register_board_info(1, &armadillo5x0_i2c_rtc, 1); | 550 | i2c_register_board_info(1, &armadillo5x0_i2c_rtc, 1); |
551 | |||
552 | /* USB */ | ||
553 | #if defined(CONFIG_USB_ULPI) | ||
554 | usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
555 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | ||
556 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
557 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | ||
558 | |||
559 | mxc_register_device(&mxc_otg_host, &usbotg_pdata); | ||
560 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); | ||
561 | #endif | ||
396 | } | 562 | } |
397 | 563 | ||
398 | static void __init armadillo5x0_timer_init(void) | 564 | static void __init armadillo5x0_timer_init(void) |
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c index b88c18ad7698..f54af1e29ca4 100644 --- a/arch/arm/mach-mx3/mach-mx31_3ds.c +++ b/arch/arm/mach-mx3/mach-mx31_3ds.c | |||
@@ -23,6 +23,9 @@ | |||
23 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
24 | #include <linux/smsc911x.h> | 24 | #include <linux/smsc911x.h> |
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/mfd/mc13783.h> | ||
27 | #include <linux/spi/spi.h> | ||
28 | #include <linux/regulator/machine.h> | ||
26 | 29 | ||
27 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
28 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
@@ -31,26 +34,96 @@ | |||
31 | #include <asm/memory.h> | 34 | #include <asm/memory.h> |
32 | #include <asm/mach/map.h> | 35 | #include <asm/mach/map.h> |
33 | #include <mach/common.h> | 36 | #include <mach/common.h> |
34 | #include <mach/board-mx31pdk.h> | 37 | #include <mach/board-mx31_3ds.h> |
35 | #include <mach/imx-uart.h> | 38 | #include <mach/imx-uart.h> |
36 | #include <mach/iomux-mx3.h> | 39 | #include <mach/iomux-mx3.h> |
40 | #include <mach/mxc_nand.h> | ||
41 | #include <mach/spi.h> | ||
37 | #include "devices.h" | 42 | #include "devices.h" |
38 | 43 | ||
39 | /*! | 44 | /*! |
40 | * @file mx31pdk.c | 45 | * @file mx31_3ds.c |
41 | * | 46 | * |
42 | * @brief This file contains the board-specific initialization routines. | 47 | * @brief This file contains the board-specific initialization routines. |
43 | * | 48 | * |
44 | * @ingroup System | 49 | * @ingroup System |
45 | */ | 50 | */ |
46 | 51 | ||
47 | static int mx31pdk_pins[] = { | 52 | static int mx31_3ds_pins[] = { |
48 | /* UART1 */ | 53 | /* UART1 */ |
49 | MX31_PIN_CTS1__CTS1, | 54 | MX31_PIN_CTS1__CTS1, |
50 | MX31_PIN_RTS1__RTS1, | 55 | MX31_PIN_RTS1__RTS1, |
51 | MX31_PIN_TXD1__TXD1, | 56 | MX31_PIN_TXD1__TXD1, |
52 | MX31_PIN_RXD1__RXD1, | 57 | MX31_PIN_RXD1__RXD1, |
53 | IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO), | 58 | IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO), |
59 | /* SPI 1 */ | ||
60 | MX31_PIN_CSPI2_SCLK__SCLK, | ||
61 | MX31_PIN_CSPI2_MOSI__MOSI, | ||
62 | MX31_PIN_CSPI2_MISO__MISO, | ||
63 | MX31_PIN_CSPI2_SPI_RDY__SPI_RDY, | ||
64 | MX31_PIN_CSPI2_SS0__SS0, | ||
65 | MX31_PIN_CSPI2_SS2__SS2, /*CS for MC13783 */ | ||
66 | /* MC13783 IRQ */ | ||
67 | IOMUX_MODE(MX31_PIN_GPIO1_3, IOMUX_CONFIG_GPIO), | ||
68 | }; | ||
69 | |||
70 | /* Regulators */ | ||
71 | static struct regulator_init_data pwgtx_init = { | ||
72 | .constraints = { | ||
73 | .boot_on = 1, | ||
74 | .always_on = 1, | ||
75 | }, | ||
76 | }; | ||
77 | |||
78 | static struct mc13783_regulator_init_data mx31_3ds_regulators[] = { | ||
79 | { | ||
80 | .id = MC13783_REGU_PWGT1SPI, /* Power Gate for ARM core. */ | ||
81 | .init_data = &pwgtx_init, | ||
82 | }, { | ||
83 | .id = MC13783_REGU_PWGT2SPI, /* Power Gate for L2 Cache. */ | ||
84 | .init_data = &pwgtx_init, | ||
85 | }, | ||
86 | }; | ||
87 | |||
88 | /* MC13783 */ | ||
89 | static struct mc13783_platform_data mc13783_pdata __initdata = { | ||
90 | .regulators = mx31_3ds_regulators, | ||
91 | .num_regulators = ARRAY_SIZE(mx31_3ds_regulators), | ||
92 | .flags = MC13783_USE_REGULATOR, | ||
93 | }; | ||
94 | |||
95 | /* SPI */ | ||
96 | static int spi1_internal_chipselect[] = { | ||
97 | MXC_SPI_CS(0), | ||
98 | MXC_SPI_CS(2), | ||
99 | }; | ||
100 | |||
101 | static struct spi_imx_master spi1_pdata = { | ||
102 | .chipselect = spi1_internal_chipselect, | ||
103 | .num_chipselect = ARRAY_SIZE(spi1_internal_chipselect), | ||
104 | }; | ||
105 | |||
106 | static struct spi_board_info mx31_3ds_spi_devs[] __initdata = { | ||
107 | { | ||
108 | .modalias = "mc13783", | ||
109 | .max_speed_hz = 1000000, | ||
110 | .bus_num = 1, | ||
111 | .chip_select = 1, /* SS2 */ | ||
112 | .platform_data = &mc13783_pdata, | ||
113 | .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3), | ||
114 | .mode = SPI_CS_HIGH, | ||
115 | }, | ||
116 | }; | ||
117 | |||
118 | /* | ||
119 | * NAND Flash | ||
120 | */ | ||
121 | static struct mxc_nand_platform_data imx31_3ds_nand_flash_pdata = { | ||
122 | .width = 1, | ||
123 | .hw_ecc = 1, | ||
124 | #ifdef MACH_MX31_3DS_MXC_NAND_USE_BBT | ||
125 | .flash_bbt = 1, | ||
126 | #endif | ||
54 | }; | 127 | }; |
55 | 128 | ||
56 | static struct imxuart_platform_data uart_pdata = { | 129 | static struct imxuart_platform_data uart_pdata = { |
@@ -95,7 +168,7 @@ static struct platform_device smsc911x_device = { | |||
95 | * LEDs, switches, interrupts for Ethernet. | 168 | * LEDs, switches, interrupts for Ethernet. |
96 | */ | 169 | */ |
97 | 170 | ||
98 | static void mx31pdk_expio_irq_handler(uint32_t irq, struct irq_desc *desc) | 171 | static void mx31_3ds_expio_irq_handler(uint32_t irq, struct irq_desc *desc) |
99 | { | 172 | { |
100 | uint32_t imr_val; | 173 | uint32_t imr_val; |
101 | uint32_t int_valid; | 174 | uint32_t int_valid; |
@@ -163,7 +236,7 @@ static struct irq_chip expio_irq_chip = { | |||
163 | .unmask = expio_unmask_irq, | 236 | .unmask = expio_unmask_irq, |
164 | }; | 237 | }; |
165 | 238 | ||
166 | static int __init mx31pdk_init_expio(void) | 239 | static int __init mx31_3ds_init_expio(void) |
167 | { | 240 | { |
168 | int i; | 241 | int i; |
169 | int ret; | 242 | int ret; |
@@ -176,7 +249,7 @@ static int __init mx31pdk_init_expio(void) | |||
176 | return -ENODEV; | 249 | return -ENODEV; |
177 | } | 250 | } |
178 | 251 | ||
179 | pr_info("i.MX31PDK Debug board detected, rev = 0x%04X\n", | 252 | pr_info("i.MX31 3DS Debug board detected, rev = 0x%04X\n", |
180 | __raw_readw(CPLD_CODE_VER_REG)); | 253 | __raw_readw(CPLD_CODE_VER_REG)); |
181 | 254 | ||
182 | /* | 255 | /* |
@@ -201,7 +274,7 @@ static int __init mx31pdk_init_expio(void) | |||
201 | set_irq_flags(i, IRQF_VALID); | 274 | set_irq_flags(i, IRQF_VALID); |
202 | } | 275 | } |
203 | set_irq_type(EXPIO_PARENT_INT, IRQ_TYPE_LEVEL_LOW); | 276 | set_irq_type(EXPIO_PARENT_INT, IRQ_TYPE_LEVEL_LOW); |
204 | set_irq_chained_handler(EXPIO_PARENT_INT, mx31pdk_expio_irq_handler); | 277 | set_irq_chained_handler(EXPIO_PARENT_INT, mx31_3ds_expio_irq_handler); |
205 | 278 | ||
206 | return 0; | 279 | return 0; |
207 | } | 280 | } |
@@ -209,7 +282,7 @@ static int __init mx31pdk_init_expio(void) | |||
209 | /* | 282 | /* |
210 | * This structure defines the MX31 memory map. | 283 | * This structure defines the MX31 memory map. |
211 | */ | 284 | */ |
212 | static struct map_desc mx31pdk_io_desc[] __initdata = { | 285 | static struct map_desc mx31_3ds_io_desc[] __initdata = { |
213 | { | 286 | { |
214 | .virtual = MX31_CS5_BASE_ADDR_VIRT, | 287 | .virtual = MX31_CS5_BASE_ADDR_VIRT, |
215 | .pfn = __phys_to_pfn(MX31_CS5_BASE_ADDR), | 288 | .pfn = __phys_to_pfn(MX31_CS5_BASE_ADDR), |
@@ -221,10 +294,10 @@ static struct map_desc mx31pdk_io_desc[] __initdata = { | |||
221 | /* | 294 | /* |
222 | * Set up static virtual mappings. | 295 | * Set up static virtual mappings. |
223 | */ | 296 | */ |
224 | static void __init mx31pdk_map_io(void) | 297 | static void __init mx31_3ds_map_io(void) |
225 | { | 298 | { |
226 | mx31_map_io(); | 299 | mx31_map_io(); |
227 | iotable_init(mx31pdk_io_desc, ARRAY_SIZE(mx31pdk_io_desc)); | 300 | iotable_init(mx31_3ds_io_desc, ARRAY_SIZE(mx31_3ds_io_desc)); |
228 | } | 301 | } |
229 | 302 | ||
230 | /*! | 303 | /*! |
@@ -232,35 +305,40 @@ static void __init mx31pdk_map_io(void) | |||
232 | */ | 305 | */ |
233 | static void __init mxc_board_init(void) | 306 | static void __init mxc_board_init(void) |
234 | { | 307 | { |
235 | mxc_iomux_setup_multiple_pins(mx31pdk_pins, ARRAY_SIZE(mx31pdk_pins), | 308 | mxc_iomux_setup_multiple_pins(mx31_3ds_pins, ARRAY_SIZE(mx31_3ds_pins), |
236 | "mx31pdk"); | 309 | "mx31_3ds"); |
237 | 310 | ||
238 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 311 | mxc_register_device(&mxc_uart_device0, &uart_pdata); |
312 | mxc_register_device(&mxc_nand_device, &imx31_3ds_nand_flash_pdata); | ||
313 | |||
314 | mxc_register_device(&mxc_spi_device1, &spi1_pdata); | ||
315 | spi_register_board_info(mx31_3ds_spi_devs, | ||
316 | ARRAY_SIZE(mx31_3ds_spi_devs)); | ||
239 | 317 | ||
240 | if (!mx31pdk_init_expio()) | 318 | if (!mx31_3ds_init_expio()) |
241 | platform_device_register(&smsc911x_device); | 319 | platform_device_register(&smsc911x_device); |
242 | } | 320 | } |
243 | 321 | ||
244 | static void __init mx31pdk_timer_init(void) | 322 | static void __init mx31_3ds_timer_init(void) |
245 | { | 323 | { |
246 | mx31_clocks_init(26000000); | 324 | mx31_clocks_init(26000000); |
247 | } | 325 | } |
248 | 326 | ||
249 | static struct sys_timer mx31pdk_timer = { | 327 | static struct sys_timer mx31_3ds_timer = { |
250 | .init = mx31pdk_timer_init, | 328 | .init = mx31_3ds_timer_init, |
251 | }; | 329 | }; |
252 | 330 | ||
253 | /* | 331 | /* |
254 | * The following uses standard kernel macros defined in arch.h in order to | 332 | * The following uses standard kernel macros defined in arch.h in order to |
255 | * initialize __mach_desc_MX31PDK data structure. | 333 | * initialize __mach_desc_MX31_3DS data structure. |
256 | */ | 334 | */ |
257 | MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") | 335 | MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") |
258 | /* Maintainer: Freescale Semiconductor, Inc. */ | 336 | /* Maintainer: Freescale Semiconductor, Inc. */ |
259 | .phys_io = MX31_AIPS1_BASE_ADDR, | 337 | .phys_io = MX31_AIPS1_BASE_ADDR, |
260 | .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc, | 338 | .io_pg_offst = (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc, |
261 | .boot_params = MX3x_PHYS_OFFSET + 0x100, | 339 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
262 | .map_io = mx31pdk_map_io, | 340 | .map_io = mx31_3ds_map_io, |
263 | .init_irq = mx31_init_irq, | 341 | .init_irq = mx31_init_irq, |
264 | .init_machine = mxc_board_init, | 342 | .init_machine = mxc_board_init, |
265 | .timer = &mx31pdk_timer, | 343 | .timer = &mx31_3ds_timer, |
266 | MACHINE_END | 344 | MACHINE_END |
diff --git a/arch/arm/mach-mx3/mach-mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c index a7dc5191bf5e..fccb9207b78d 100644 --- a/arch/arm/mach-mx3/mach-mx31moboard.c +++ b/arch/arm/mach-mx3/mach-mx31moboard.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/dma-mapping.h> | 20 | #include <linux/dma-mapping.h> |
21 | #include <linux/fsl_devices.h> | 21 | #include <linux/fsl_devices.h> |
22 | #include <linux/gfp.h> | ||
22 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
diff --git a/arch/arm/mach-mx3/mach-pcm037.c b/arch/arm/mach-mx3/mach-pcm037.c index 11f531559169..2df1ec55a97e 100644 --- a/arch/arm/mach-mx3/mach-pcm037.c +++ b/arch/arm/mach-mx3/mach-pcm037.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #include <linux/can/platform/sja1000.h> | 35 | #include <linux/can/platform/sja1000.h> |
36 | #include <linux/usb/otg.h> | 36 | #include <linux/usb/otg.h> |
37 | #include <linux/usb/ulpi.h> | 37 | #include <linux/usb/ulpi.h> |
38 | #include <linux/fsl_devices.h> | 38 | #include <linux/gfp.h> |
39 | 39 | ||
40 | #include <media/soc_camera.h> | 40 | #include <media/soc_camera.h> |
41 | 41 | ||
diff --git a/arch/arm/mach-mx3/mx31lite-db.c b/arch/arm/mach-mx3/mx31lite-db.c index ccd874225c3b..093c595ca581 100644 --- a/arch/arm/mach-mx3/mx31lite-db.c +++ b/arch/arm/mach-mx3/mx31lite-db.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/gpio.h> | 30 | #include <linux/gpio.h> |
31 | #include <linux/platform_device.h> | ||
32 | #include <linux/leds.h> | 31 | #include <linux/leds.h> |
33 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
34 | 33 | ||
@@ -206,5 +205,6 @@ void __init mx31lite_db_init(void) | |||
206 | mxc_register_device(&mxcsdhc_device0, &mmc_pdata); | 205 | mxc_register_device(&mxcsdhc_device0, &mmc_pdata); |
207 | mxc_register_device(&mxc_spi_device0, &spi0_pdata); | 206 | mxc_register_device(&mxc_spi_device0, &spi0_pdata); |
208 | platform_device_register(&litekit_led_device); | 207 | platform_device_register(&litekit_led_device); |
208 | mxc_register_device(&imx_wdt_device0, NULL); | ||
209 | } | 209 | } |
210 | 210 | ||
diff --git a/arch/arm/mach-mx3/mx31moboard-devboard.c b/arch/arm/mach-mx3/mx31moboard-devboard.c index 9fbad2eb3a49..11b906ce7eae 100644 --- a/arch/arm/mach-mx3/mx31moboard-devboard.c +++ b/arch/arm/mach-mx3/mx31moboard-devboard.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/types.h> | 24 | #include <linux/types.h> |
24 | 25 | ||
25 | #include <linux/usb/otg.h> | 26 | #include <linux/usb/otg.h> |
diff --git a/arch/arm/mach-mx3/mx31moboard-marxbot.c b/arch/arm/mach-mx3/mx31moboard-marxbot.c index 3958515d75bf..ffb105e14d88 100644 --- a/arch/arm/mach-mx3/mx31moboard-marxbot.c +++ b/arch/arm/mach-mx3/mx31moboard-marxbot.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/i2c.h> | 23 | #include <linux/i2c.h> |
24 | #include <linux/spi/spi.h> | 24 | #include <linux/spi/spi.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
26 | #include <linux/types.h> | 27 | #include <linux/types.h> |
27 | 28 | ||