diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-08-12 11:21:39 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2012-09-11 04:26:55 -0400 |
commit | 442279da12c6e3eada16d604b866226b77876c30 (patch) | |
tree | fb8692ebc0523cdaf4573a542f2e12aba3327f1d /arch/arm/mach-imx | |
parent | 721a44145aa789b9d2ee7927afa28c2d60ffa036 (diff) |
ARM: imx53: support device tree boot only
With device tree kernel provides the equal support as those imx53 board
files, it's time to remove the board files and get imx53 support device
tree only.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/Kconfig | 79 | ||||
-rw-r--r-- | arch/arm/mach-imx/Makefile | 6 | ||||
-rw-r--r-- | arch/arm/mach-imx/Makefile.boot | 8 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx53.c (renamed from arch/arm/mach-imx/imx53-dt.c) | 0 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx53_ard.c | 272 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx53_evk.c | 179 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx53_loco.c | 321 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx53_smd.c | 168 |
8 files changed, 17 insertions, 1016 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 1afdc67a5f22..374fcc256d43 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -102,15 +102,6 @@ config SOC_IMX51 | |||
102 | select ARCH_MX5 | 102 | select ARCH_MX5 |
103 | select ARCH_MX51 | 103 | select ARCH_MX51 |
104 | 104 | ||
105 | config SOC_IMX53 | ||
106 | bool | ||
107 | select SOC_IMX5 | ||
108 | select ARCH_MX5 | ||
109 | select ARCH_MX53 | ||
110 | select HAVE_CAN_FLEXCAN if CAN | ||
111 | select PINCTRL | ||
112 | select PINCTRL_IMX53 | ||
113 | |||
114 | if ARCH_IMX_V4_V5 | 105 | if ARCH_IMX_V4_V5 |
115 | 106 | ||
116 | comment "MX1 platforms:" | 107 | comment "MX1 platforms:" |
@@ -738,69 +729,19 @@ config MACH_EUKREA_MBIMXSD51_BASEBOARD | |||
738 | 729 | ||
739 | endchoice | 730 | endchoice |
740 | 731 | ||
741 | comment "i.MX53 machines:" | 732 | comment "Device tree only" |
742 | |||
743 | config MACH_IMX53_DT | ||
744 | bool "Support i.MX53 platforms from device tree" | ||
745 | select SOC_IMX53 | ||
746 | select MACH_MX53_ARD | ||
747 | select MACH_MX53_EVK | ||
748 | select MACH_MX53_LOCO | ||
749 | select MACH_MX53_SMD | ||
750 | help | ||
751 | Include support for Freescale i.MX53 based platforms | ||
752 | using the device tree for discovery | ||
753 | |||
754 | config MACH_MX53_EVK | ||
755 | bool "Support MX53 EVK platforms" | ||
756 | select SOC_IMX53 | ||
757 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
758 | select IMX_HAVE_PLATFORM_IMX_UART | ||
759 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
760 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | ||
761 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
762 | select LEDS_GPIO_REGISTER | ||
763 | help | ||
764 | Include support for MX53 EVK platform. This includes specific | ||
765 | configurations for the board and its peripherals. | ||
766 | |||
767 | config MACH_MX53_SMD | ||
768 | bool "Support MX53 SMD platforms" | ||
769 | select SOC_IMX53 | ||
770 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
771 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
772 | select IMX_HAVE_PLATFORM_IMX_UART | ||
773 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | ||
774 | help | ||
775 | Include support for MX53 SMD platform. This includes specific | ||
776 | configurations for the board and its peripherals. | ||
777 | 733 | ||
778 | config MACH_MX53_LOCO | 734 | config SOC_IMX53 |
779 | bool "Support MX53 LOCO platforms" | 735 | bool "i.MX53 support" |
780 | select SOC_IMX53 | 736 | select SOC_IMX5 |
781 | select IMX_HAVE_PLATFORM_IMX2_WDT | 737 | select ARCH_MX5 |
782 | select IMX_HAVE_PLATFORM_IMX_I2C | 738 | select ARCH_MX53 |
783 | select IMX_HAVE_PLATFORM_IMX_UART | 739 | select HAVE_CAN_FLEXCAN if CAN |
784 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 740 | select PINCTRL |
785 | select IMX_HAVE_PLATFORM_GPIO_KEYS | 741 | select PINCTRL_IMX53 |
786 | select LEDS_GPIO_REGISTER | ||
787 | help | ||
788 | Include support for MX53 LOCO platform. This includes specific | ||
789 | configurations for the board and its peripherals. | ||
790 | 742 | ||
791 | config MACH_MX53_ARD | ||
792 | bool "Support MX53 ARD platforms" | ||
793 | select SOC_IMX53 | ||
794 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
795 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
796 | select IMX_HAVE_PLATFORM_IMX_UART | ||
797 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | ||
798 | select IMX_HAVE_PLATFORM_GPIO_KEYS | ||
799 | help | 743 | help |
800 | Include support for MX53 ARD platform. This includes specific | 744 | This enables support for Freescale i.MX53 processor. |
801 | configurations for the board and its peripherals. | ||
802 | |||
803 | comment "i.MX6 family:" | ||
804 | 745 | ||
805 | config SOC_IMX6Q | 746 | config SOC_IMX6Q |
806 | bool "i.MX6 Quad support" | 747 | bool "i.MX6 Quad support" |
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 88b756c4082b..58dc7c67d606 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
@@ -83,13 +83,9 @@ endif | |||
83 | # i.MX5 based machines | 83 | # i.MX5 based machines |
84 | obj-$(CONFIG_MACH_MX51_BABBAGE) += mach-mx51_babbage.o | 84 | obj-$(CONFIG_MACH_MX51_BABBAGE) += mach-mx51_babbage.o |
85 | obj-$(CONFIG_MACH_MX51_3DS) += mach-mx51_3ds.o | 85 | obj-$(CONFIG_MACH_MX51_3DS) += mach-mx51_3ds.o |
86 | obj-$(CONFIG_MACH_MX53_EVK) += mach-mx53_evk.o | ||
87 | obj-$(CONFIG_MACH_MX53_SMD) += mach-mx53_smd.o | ||
88 | obj-$(CONFIG_MACH_MX53_LOCO) += mach-mx53_loco.o | ||
89 | obj-$(CONFIG_MACH_MX53_ARD) += mach-mx53_ard.o | ||
90 | obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += mach-cpuimx51sd.o | 86 | obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += mach-cpuimx51sd.o |
91 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd51-baseboard.o | 87 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd51-baseboard.o |
92 | obj-$(CONFIG_MACH_MX50_RDP) += mach-mx50_rdp.o | 88 | obj-$(CONFIG_MACH_MX50_RDP) += mach-mx50_rdp.o |
93 | 89 | ||
94 | obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o | 90 | obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o |
95 | obj-$(CONFIG_MACH_IMX53_DT) += imx53-dt.o | 91 | obj-$(CONFIG_SOC_IMX53) += mach-imx53.o |
diff --git a/arch/arm/mach-imx/Makefile.boot b/arch/arm/mach-imx/Makefile.boot index 05541cf4a878..c60967629e27 100644 --- a/arch/arm/mach-imx/Makefile.boot +++ b/arch/arm/mach-imx/Makefile.boot | |||
@@ -39,8 +39,12 @@ params_phys-$(CONFIG_SOC_IMX6Q) := 0x10000100 | |||
39 | initrd_phys-$(CONFIG_SOC_IMX6Q) := 0x10800000 | 39 | initrd_phys-$(CONFIG_SOC_IMX6Q) := 0x10800000 |
40 | 40 | ||
41 | dtb-$(CONFIG_MACH_IMX51_DT) += imx51-babbage.dtb | 41 | dtb-$(CONFIG_MACH_IMX51_DT) += imx51-babbage.dtb |
42 | dtb-$(CONFIG_MACH_IMX53_DT) += imx53-ard.dtb imx53-evk.dtb \ | 42 | |
43 | imx53-qsb.dtb imx53-smd.dtb | 43 | dtb-$(CONFIG_SOC_IMX53) += imx53-ard.dtb \ |
44 | imx53-evk.dtb \ | ||
45 | imx53-qsb.dtb \ | ||
46 | imx53-smd.dtb \ | ||
47 | |||
44 | dtb-$(CONFIG_SOC_IMX6Q) += imx6q-arm2.dtb \ | 48 | dtb-$(CONFIG_SOC_IMX6Q) += imx6q-arm2.dtb \ |
45 | imx6q-sabrelite.dtb \ | 49 | imx6q-sabrelite.dtb \ |
46 | imx6q-sabresd.dtb \ | 50 | imx6q-sabresd.dtb \ |
diff --git a/arch/arm/mach-imx/imx53-dt.c b/arch/arm/mach-imx/mach-imx53.c index 29711e95579f..29711e95579f 100644 --- a/arch/arm/mach-imx/imx53-dt.c +++ b/arch/arm/mach-imx/mach-imx53.c | |||
diff --git a/arch/arm/mach-imx/mach-mx53_ard.c b/arch/arm/mach-imx/mach-mx53_ard.c deleted file mode 100644 index 6c28e65f424d..000000000000 --- a/arch/arm/mach-imx/mach-mx53_ard.c +++ /dev/null | |||
@@ -1,272 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | |||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | |||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | |||
21 | #include <linux/init.h> | ||
22 | #include <linux/clk.h> | ||
23 | #include <linux/delay.h> | ||
24 | #include <linux/gpio.h> | ||
25 | #include <linux/smsc911x.h> | ||
26 | #include <linux/regulator/machine.h> | ||
27 | #include <linux/regulator/fixed.h> | ||
28 | |||
29 | #include <mach/common.h> | ||
30 | #include <mach/hardware.h> | ||
31 | #include <mach/iomux-mx53.h> | ||
32 | |||
33 | #include <asm/mach-types.h> | ||
34 | #include <asm/mach/arch.h> | ||
35 | #include <asm/mach/time.h> | ||
36 | |||
37 | #include "devices-imx53.h" | ||
38 | |||
39 | #define ARD_ETHERNET_INT_B IMX_GPIO_NR(2, 31) | ||
40 | #define ARD_SD1_CD IMX_GPIO_NR(1, 1) | ||
41 | #define ARD_SD1_WP IMX_GPIO_NR(1, 9) | ||
42 | #define ARD_I2CPORTEXP_B IMX_GPIO_NR(2, 3) | ||
43 | #define ARD_VOLUMEDOWN IMX_GPIO_NR(4, 0) | ||
44 | #define ARD_HOME IMX_GPIO_NR(5, 10) | ||
45 | #define ARD_BACK IMX_GPIO_NR(5, 11) | ||
46 | #define ARD_PROG IMX_GPIO_NR(5, 12) | ||
47 | #define ARD_VOLUMEUP IMX_GPIO_NR(5, 13) | ||
48 | |||
49 | static iomux_v3_cfg_t mx53_ard_pads[] = { | ||
50 | /* UART1 */ | ||
51 | MX53_PAD_PATA_DIOW__UART1_TXD_MUX, | ||
52 | MX53_PAD_PATA_DMACK__UART1_RXD_MUX, | ||
53 | /* WEIM for CS1 */ | ||
54 | MX53_PAD_EIM_EB3__GPIO2_31, /* ETHERNET_INT_B */ | ||
55 | MX53_PAD_EIM_D16__EMI_WEIM_D_16, | ||
56 | MX53_PAD_EIM_D17__EMI_WEIM_D_17, | ||
57 | MX53_PAD_EIM_D18__EMI_WEIM_D_18, | ||
58 | MX53_PAD_EIM_D19__EMI_WEIM_D_19, | ||
59 | MX53_PAD_EIM_D20__EMI_WEIM_D_20, | ||
60 | MX53_PAD_EIM_D21__EMI_WEIM_D_21, | ||
61 | MX53_PAD_EIM_D22__EMI_WEIM_D_22, | ||
62 | MX53_PAD_EIM_D23__EMI_WEIM_D_23, | ||
63 | MX53_PAD_EIM_D24__EMI_WEIM_D_24, | ||
64 | MX53_PAD_EIM_D25__EMI_WEIM_D_25, | ||
65 | MX53_PAD_EIM_D26__EMI_WEIM_D_26, | ||
66 | MX53_PAD_EIM_D27__EMI_WEIM_D_27, | ||
67 | MX53_PAD_EIM_D28__EMI_WEIM_D_28, | ||
68 | MX53_PAD_EIM_D29__EMI_WEIM_D_29, | ||
69 | MX53_PAD_EIM_D30__EMI_WEIM_D_30, | ||
70 | MX53_PAD_EIM_D31__EMI_WEIM_D_31, | ||
71 | MX53_PAD_EIM_DA0__EMI_NAND_WEIM_DA_0, | ||
72 | MX53_PAD_EIM_DA1__EMI_NAND_WEIM_DA_1, | ||
73 | MX53_PAD_EIM_DA2__EMI_NAND_WEIM_DA_2, | ||
74 | MX53_PAD_EIM_DA3__EMI_NAND_WEIM_DA_3, | ||
75 | MX53_PAD_EIM_DA4__EMI_NAND_WEIM_DA_4, | ||
76 | MX53_PAD_EIM_DA5__EMI_NAND_WEIM_DA_5, | ||
77 | MX53_PAD_EIM_DA6__EMI_NAND_WEIM_DA_6, | ||
78 | MX53_PAD_EIM_OE__EMI_WEIM_OE, | ||
79 | MX53_PAD_EIM_RW__EMI_WEIM_RW, | ||
80 | MX53_PAD_EIM_CS1__EMI_WEIM_CS_1, | ||
81 | /* SDHC1 */ | ||
82 | MX53_PAD_SD1_CMD__ESDHC1_CMD, | ||
83 | MX53_PAD_SD1_CLK__ESDHC1_CLK, | ||
84 | MX53_PAD_SD1_DATA0__ESDHC1_DAT0, | ||
85 | MX53_PAD_SD1_DATA1__ESDHC1_DAT1, | ||
86 | MX53_PAD_SD1_DATA2__ESDHC1_DAT2, | ||
87 | MX53_PAD_SD1_DATA3__ESDHC1_DAT3, | ||
88 | MX53_PAD_PATA_DATA8__ESDHC1_DAT4, | ||
89 | MX53_PAD_PATA_DATA9__ESDHC1_DAT5, | ||
90 | MX53_PAD_PATA_DATA10__ESDHC1_DAT6, | ||
91 | MX53_PAD_PATA_DATA11__ESDHC1_DAT7, | ||
92 | MX53_PAD_GPIO_1__GPIO1_1, | ||
93 | MX53_PAD_GPIO_9__GPIO1_9, | ||
94 | /* I2C2 */ | ||
95 | MX53_PAD_EIM_EB2__I2C2_SCL, | ||
96 | MX53_PAD_KEY_ROW3__I2C2_SDA, | ||
97 | /* I2C3 */ | ||
98 | MX53_PAD_GPIO_3__I2C3_SCL, | ||
99 | MX53_PAD_GPIO_16__I2C3_SDA, | ||
100 | /* GPIO */ | ||
101 | MX53_PAD_DISP0_DAT16__GPIO5_10, /* home */ | ||
102 | MX53_PAD_DISP0_DAT17__GPIO5_11, /* back */ | ||
103 | MX53_PAD_DISP0_DAT18__GPIO5_12, /* prog */ | ||
104 | MX53_PAD_DISP0_DAT19__GPIO5_13, /* vol up */ | ||
105 | MX53_PAD_GPIO_10__GPIO4_0, /* vol down */ | ||
106 | }; | ||
107 | |||
108 | #define GPIO_BUTTON(gpio_num, ev_code, act_low, descr, wake) \ | ||
109 | { \ | ||
110 | .gpio = gpio_num, \ | ||
111 | .type = EV_KEY, \ | ||
112 | .code = ev_code, \ | ||
113 | .active_low = act_low, \ | ||
114 | .desc = "btn " descr, \ | ||
115 | .wakeup = wake, \ | ||
116 | } | ||
117 | |||
118 | static struct gpio_keys_button ard_buttons[] = { | ||
119 | GPIO_BUTTON(ARD_HOME, KEY_HOME, 1, "home", 0), | ||
120 | GPIO_BUTTON(ARD_BACK, KEY_BACK, 1, "back", 0), | ||
121 | GPIO_BUTTON(ARD_PROG, KEY_PROGRAM, 1, "program", 0), | ||
122 | GPIO_BUTTON(ARD_VOLUMEUP, KEY_VOLUMEUP, 1, "volume-up", 0), | ||
123 | GPIO_BUTTON(ARD_VOLUMEDOWN, KEY_VOLUMEDOWN, 1, "volume-down", 0), | ||
124 | }; | ||
125 | |||
126 | static const struct gpio_keys_platform_data ard_button_data __initconst = { | ||
127 | .buttons = ard_buttons, | ||
128 | .nbuttons = ARRAY_SIZE(ard_buttons), | ||
129 | }; | ||
130 | |||
131 | static struct resource ard_smsc911x_resources[] = { | ||
132 | { | ||
133 | .start = MX53_CS1_64MB_BASE_ADDR, | ||
134 | .end = MX53_CS1_64MB_BASE_ADDR + SZ_32M - 1, | ||
135 | .flags = IORESOURCE_MEM, | ||
136 | }, | ||
137 | { | ||
138 | /* irq number is run-time assigned */ | ||
139 | .flags = IORESOURCE_IRQ, | ||
140 | }, | ||
141 | }; | ||
142 | |||
143 | struct smsc911x_platform_config ard_smsc911x_config = { | ||
144 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
145 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, | ||
146 | .flags = SMSC911X_USE_32BIT, | ||
147 | }; | ||
148 | |||
149 | static struct platform_device ard_smsc_lan9220_device = { | ||
150 | .name = "smsc911x", | ||
151 | .id = -1, | ||
152 | .num_resources = ARRAY_SIZE(ard_smsc911x_resources), | ||
153 | .resource = ard_smsc911x_resources, | ||
154 | .dev = { | ||
155 | .platform_data = &ard_smsc911x_config, | ||
156 | }, | ||
157 | }; | ||
158 | |||
159 | static const struct esdhc_platform_data mx53_ard_sd1_data __initconst = { | ||
160 | .cd_gpio = ARD_SD1_CD, | ||
161 | .wp_gpio = ARD_SD1_WP, | ||
162 | }; | ||
163 | |||
164 | static struct imxi2c_platform_data mx53_ard_i2c2_data = { | ||
165 | .bitrate = 50000, | ||
166 | }; | ||
167 | |||
168 | static struct imxi2c_platform_data mx53_ard_i2c3_data = { | ||
169 | .bitrate = 400000, | ||
170 | }; | ||
171 | |||
172 | static void __init mx53_ard_io_init(void) | ||
173 | { | ||
174 | gpio_request(ARD_ETHERNET_INT_B, "eth-int-b"); | ||
175 | gpio_direction_input(ARD_ETHERNET_INT_B); | ||
176 | |||
177 | gpio_request(ARD_I2CPORTEXP_B, "i2cptexp-rst"); | ||
178 | gpio_direction_output(ARD_I2CPORTEXP_B, 1); | ||
179 | } | ||
180 | |||
181 | /* Config CS1 settings for ethernet controller */ | ||
182 | static int weim_cs_config(void) | ||
183 | { | ||
184 | u32 reg; | ||
185 | void __iomem *weim_base, *iomuxc_base; | ||
186 | |||
187 | weim_base = ioremap(MX53_WEIM_BASE_ADDR, SZ_4K); | ||
188 | if (!weim_base) | ||
189 | return -ENOMEM; | ||
190 | |||
191 | iomuxc_base = ioremap(MX53_IOMUXC_BASE_ADDR, SZ_4K); | ||
192 | if (!iomuxc_base) { | ||
193 | iounmap(weim_base); | ||
194 | return -ENOMEM; | ||
195 | } | ||
196 | |||
197 | /* CS1 timings for LAN9220 */ | ||
198 | writel(0x20001, (weim_base + 0x18)); | ||
199 | writel(0x0, (weim_base + 0x1C)); | ||
200 | writel(0x16000202, (weim_base + 0x20)); | ||
201 | writel(0x00000002, (weim_base + 0x24)); | ||
202 | writel(0x16002082, (weim_base + 0x28)); | ||
203 | writel(0x00000000, (weim_base + 0x2C)); | ||
204 | writel(0x00000000, (weim_base + 0x90)); | ||
205 | |||
206 | /* specify 64 MB on CS1 and CS0 on GPR1 */ | ||
207 | reg = readl(iomuxc_base + 0x4); | ||
208 | reg &= ~0x3F; | ||
209 | reg |= 0x1B; | ||
210 | writel(reg, (iomuxc_base + 0x4)); | ||
211 | |||
212 | iounmap(iomuxc_base); | ||
213 | iounmap(weim_base); | ||
214 | |||
215 | return 0; | ||
216 | } | ||
217 | |||
218 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
219 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
220 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
221 | }; | ||
222 | |||
223 | void __init imx53_ard_common_init(void) | ||
224 | { | ||
225 | mxc_iomux_v3_setup_multiple_pads(mx53_ard_pads, | ||
226 | ARRAY_SIZE(mx53_ard_pads)); | ||
227 | weim_cs_config(); | ||
228 | } | ||
229 | |||
230 | static struct platform_device *devices[] __initdata = { | ||
231 | &ard_smsc_lan9220_device, | ||
232 | }; | ||
233 | |||
234 | static void __init mx53_ard_board_init(void) | ||
235 | { | ||
236 | imx53_soc_init(); | ||
237 | imx53_add_imx_uart(0, NULL); | ||
238 | |||
239 | imx53_ard_common_init(); | ||
240 | mx53_ard_io_init(); | ||
241 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
242 | ard_smsc911x_resources[1].start = gpio_to_irq(ARD_ETHERNET_INT_B); | ||
243 | ard_smsc911x_resources[1].end = gpio_to_irq(ARD_ETHERNET_INT_B); | ||
244 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
245 | |||
246 | imx53_add_sdhci_esdhc_imx(0, &mx53_ard_sd1_data); | ||
247 | imx53_add_imx2_wdt(0); | ||
248 | imx53_add_imx_i2c(1, &mx53_ard_i2c2_data); | ||
249 | imx53_add_imx_i2c(2, &mx53_ard_i2c3_data); | ||
250 | imx_add_gpio_keys(&ard_button_data); | ||
251 | imx53_add_ahci_imx(); | ||
252 | } | ||
253 | |||
254 | static void __init mx53_ard_timer_init(void) | ||
255 | { | ||
256 | mx53_clocks_init(32768, 24000000, 22579200, 0); | ||
257 | } | ||
258 | |||
259 | static struct sys_timer mx53_ard_timer = { | ||
260 | .init = mx53_ard_timer_init, | ||
261 | }; | ||
262 | |||
263 | MACHINE_START(MX53_ARD, "Freescale MX53 ARD Board") | ||
264 | .map_io = mx53_map_io, | ||
265 | .init_early = imx53_init_early, | ||
266 | .init_irq = mx53_init_irq, | ||
267 | .handle_irq = imx53_handle_irq, | ||
268 | .timer = &mx53_ard_timer, | ||
269 | .init_machine = mx53_ard_board_init, | ||
270 | .init_late = imx53_init_late, | ||
271 | .restart = mxc_restart, | ||
272 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mach-mx53_evk.c b/arch/arm/mach-imx/mach-mx53_evk.c deleted file mode 100644 index 09fe2197b491..000000000000 --- a/arch/arm/mach-imx/mach-mx53_evk.c +++ /dev/null | |||
@@ -1,179 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright (C) 2010 Yong Shen. <Yong.Shen@linaro.org> | ||
4 | */ | ||
5 | |||
6 | /* | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | |||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | |||
17 | * You should have received a copy of the GNU General Public License along | ||
18 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
20 | */ | ||
21 | |||
22 | #include <linux/init.h> | ||
23 | #include <linux/clk.h> | ||
24 | #include <linux/delay.h> | ||
25 | #include <linux/gpio.h> | ||
26 | #include <linux/spi/flash.h> | ||
27 | #include <linux/spi/spi.h> | ||
28 | #include <mach/common.h> | ||
29 | #include <mach/hardware.h> | ||
30 | #include <asm/mach-types.h> | ||
31 | #include <asm/mach/arch.h> | ||
32 | #include <asm/mach/time.h> | ||
33 | #include <mach/iomux-mx53.h> | ||
34 | |||
35 | #define MX53_EVK_FEC_PHY_RST IMX_GPIO_NR(7, 6) | ||
36 | #define EVK_ECSPI1_CS0 IMX_GPIO_NR(2, 30) | ||
37 | #define EVK_ECSPI1_CS1 IMX_GPIO_NR(3, 19) | ||
38 | #define MX53EVK_LED IMX_GPIO_NR(7, 7) | ||
39 | |||
40 | #include "devices-imx53.h" | ||
41 | |||
42 | static iomux_v3_cfg_t mx53_evk_pads[] = { | ||
43 | MX53_PAD_CSI0_DAT10__UART1_TXD_MUX, | ||
44 | MX53_PAD_CSI0_DAT11__UART1_RXD_MUX, | ||
45 | |||
46 | MX53_PAD_PATA_BUFFER_EN__UART2_RXD_MUX, | ||
47 | MX53_PAD_PATA_DMARQ__UART2_TXD_MUX, | ||
48 | MX53_PAD_PATA_DIOR__UART2_RTS, | ||
49 | MX53_PAD_PATA_INTRQ__UART2_CTS, | ||
50 | |||
51 | MX53_PAD_PATA_CS_0__UART3_TXD_MUX, | ||
52 | MX53_PAD_PATA_CS_1__UART3_RXD_MUX, | ||
53 | |||
54 | MX53_PAD_EIM_D16__ECSPI1_SCLK, | ||
55 | MX53_PAD_EIM_D17__ECSPI1_MISO, | ||
56 | MX53_PAD_EIM_D18__ECSPI1_MOSI, | ||
57 | |||
58 | /* ecspi chip select lines */ | ||
59 | MX53_PAD_EIM_EB2__GPIO2_30, | ||
60 | MX53_PAD_EIM_D19__GPIO3_19, | ||
61 | /* LED */ | ||
62 | MX53_PAD_PATA_DA_1__GPIO7_7, | ||
63 | }; | ||
64 | |||
65 | static const struct imxuart_platform_data mx53_evk_uart_pdata __initconst = { | ||
66 | .flags = IMXUART_HAVE_RTSCTS, | ||
67 | }; | ||
68 | |||
69 | static const struct gpio_led mx53evk_leds[] __initconst = { | ||
70 | { | ||
71 | .name = "green", | ||
72 | .default_trigger = "heartbeat", | ||
73 | .gpio = MX53EVK_LED, | ||
74 | }, | ||
75 | }; | ||
76 | |||
77 | static const struct gpio_led_platform_data mx53evk_leds_data __initconst = { | ||
78 | .leds = mx53evk_leds, | ||
79 | .num_leds = ARRAY_SIZE(mx53evk_leds), | ||
80 | }; | ||
81 | |||
82 | static inline void mx53_evk_init_uart(void) | ||
83 | { | ||
84 | imx53_add_imx_uart(0, NULL); | ||
85 | imx53_add_imx_uart(1, &mx53_evk_uart_pdata); | ||
86 | imx53_add_imx_uart(2, NULL); | ||
87 | } | ||
88 | |||
89 | static const struct imxi2c_platform_data mx53_evk_i2c_data __initconst = { | ||
90 | .bitrate = 100000, | ||
91 | }; | ||
92 | |||
93 | static inline void mx53_evk_fec_reset(void) | ||
94 | { | ||
95 | int ret; | ||
96 | |||
97 | /* reset FEC PHY */ | ||
98 | ret = gpio_request_one(MX53_EVK_FEC_PHY_RST, GPIOF_OUT_INIT_LOW, | ||
99 | "fec-phy-reset"); | ||
100 | if (ret) { | ||
101 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); | ||
102 | return; | ||
103 | } | ||
104 | msleep(1); | ||
105 | gpio_set_value(MX53_EVK_FEC_PHY_RST, 1); | ||
106 | } | ||
107 | |||
108 | static const struct fec_platform_data mx53_evk_fec_pdata __initconst = { | ||
109 | .phy = PHY_INTERFACE_MODE_RMII, | ||
110 | }; | ||
111 | |||
112 | static struct spi_board_info mx53_evk_spi_board_info[] __initdata = { | ||
113 | { | ||
114 | .modalias = "mtd_dataflash", | ||
115 | .max_speed_hz = 25000000, | ||
116 | .bus_num = 0, | ||
117 | .chip_select = 1, | ||
118 | .mode = SPI_MODE_0, | ||
119 | .platform_data = NULL, | ||
120 | }, | ||
121 | }; | ||
122 | |||
123 | static int mx53_evk_spi_cs[] = { | ||
124 | EVK_ECSPI1_CS0, | ||
125 | EVK_ECSPI1_CS1, | ||
126 | }; | ||
127 | |||
128 | static const struct spi_imx_master mx53_evk_spi_data __initconst = { | ||
129 | .chipselect = mx53_evk_spi_cs, | ||
130 | .num_chipselect = ARRAY_SIZE(mx53_evk_spi_cs), | ||
131 | }; | ||
132 | |||
133 | void __init imx53_evk_common_init(void) | ||
134 | { | ||
135 | mxc_iomux_v3_setup_multiple_pads(mx53_evk_pads, | ||
136 | ARRAY_SIZE(mx53_evk_pads)); | ||
137 | } | ||
138 | |||
139 | static void __init mx53_evk_board_init(void) | ||
140 | { | ||
141 | imx53_soc_init(); | ||
142 | imx53_evk_common_init(); | ||
143 | |||
144 | mx53_evk_init_uart(); | ||
145 | mx53_evk_fec_reset(); | ||
146 | imx53_add_fec(&mx53_evk_fec_pdata); | ||
147 | |||
148 | imx53_add_imx_i2c(0, &mx53_evk_i2c_data); | ||
149 | imx53_add_imx_i2c(1, &mx53_evk_i2c_data); | ||
150 | |||
151 | imx53_add_sdhci_esdhc_imx(0, NULL); | ||
152 | imx53_add_sdhci_esdhc_imx(1, NULL); | ||
153 | |||
154 | spi_register_board_info(mx53_evk_spi_board_info, | ||
155 | ARRAY_SIZE(mx53_evk_spi_board_info)); | ||
156 | imx53_add_ecspi(0, &mx53_evk_spi_data); | ||
157 | imx53_add_imx2_wdt(0); | ||
158 | gpio_led_register_device(-1, &mx53evk_leds_data); | ||
159 | } | ||
160 | |||
161 | static void __init mx53_evk_timer_init(void) | ||
162 | { | ||
163 | mx53_clocks_init(32768, 24000000, 22579200, 0); | ||
164 | } | ||
165 | |||
166 | static struct sys_timer mx53_evk_timer = { | ||
167 | .init = mx53_evk_timer_init, | ||
168 | }; | ||
169 | |||
170 | MACHINE_START(MX53_EVK, "Freescale MX53 EVK Board") | ||
171 | .map_io = mx53_map_io, | ||
172 | .init_early = imx53_init_early, | ||
173 | .init_irq = mx53_init_irq, | ||
174 | .handle_irq = imx53_handle_irq, | ||
175 | .timer = &mx53_evk_timer, | ||
176 | .init_machine = mx53_evk_board_init, | ||
177 | .init_late = imx53_init_late, | ||
178 | .restart = mxc_restart, | ||
179 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mach-mx53_loco.c b/arch/arm/mach-imx/mach-mx53_loco.c deleted file mode 100644 index 8abe23c1d3c8..000000000000 --- a/arch/arm/mach-imx/mach-mx53_loco.c +++ /dev/null | |||
@@ -1,321 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | |||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | |||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | |||
21 | #include <linux/init.h> | ||
22 | #include <linux/clk.h> | ||
23 | #include <linux/delay.h> | ||
24 | #include <linux/gpio.h> | ||
25 | #include <linux/i2c.h> | ||
26 | |||
27 | #include <mach/common.h> | ||
28 | #include <mach/hardware.h> | ||
29 | #include <mach/iomux-mx53.h> | ||
30 | |||
31 | #include <asm/mach-types.h> | ||
32 | #include <asm/mach/arch.h> | ||
33 | #include <asm/mach/time.h> | ||
34 | |||
35 | #include "devices-imx53.h" | ||
36 | |||
37 | #define MX53_LOCO_POWER IMX_GPIO_NR(1, 8) | ||
38 | #define MX53_LOCO_UI1 IMX_GPIO_NR(2, 14) | ||
39 | #define MX53_LOCO_UI2 IMX_GPIO_NR(2, 15) | ||
40 | #define LOCO_FEC_PHY_RST IMX_GPIO_NR(7, 6) | ||
41 | #define LOCO_LED IMX_GPIO_NR(7, 7) | ||
42 | #define LOCO_SD3_CD IMX_GPIO_NR(3, 11) | ||
43 | #define LOCO_SD3_WP IMX_GPIO_NR(3, 12) | ||
44 | #define LOCO_SD1_CD IMX_GPIO_NR(3, 13) | ||
45 | #define LOCO_ACCEL_EN IMX_GPIO_NR(6, 14) | ||
46 | |||
47 | static iomux_v3_cfg_t mx53_loco_pads[] = { | ||
48 | /* FEC */ | ||
49 | MX53_PAD_FEC_MDC__FEC_MDC, | ||
50 | MX53_PAD_FEC_MDIO__FEC_MDIO, | ||
51 | MX53_PAD_FEC_REF_CLK__FEC_TX_CLK, | ||
52 | MX53_PAD_FEC_RX_ER__FEC_RX_ER, | ||
53 | MX53_PAD_FEC_CRS_DV__FEC_RX_DV, | ||
54 | MX53_PAD_FEC_RXD1__FEC_RDATA_1, | ||
55 | MX53_PAD_FEC_RXD0__FEC_RDATA_0, | ||
56 | MX53_PAD_FEC_TX_EN__FEC_TX_EN, | ||
57 | MX53_PAD_FEC_TXD1__FEC_TDATA_1, | ||
58 | MX53_PAD_FEC_TXD0__FEC_TDATA_0, | ||
59 | /* FEC_nRST */ | ||
60 | MX53_PAD_PATA_DA_0__GPIO7_6, | ||
61 | /* FEC_nINT */ | ||
62 | MX53_PAD_PATA_DATA4__GPIO2_4, | ||
63 | /* AUDMUX5 */ | ||
64 | MX53_PAD_KEY_COL0__AUDMUX_AUD5_TXC, | ||
65 | MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD, | ||
66 | MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS, | ||
67 | MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD, | ||
68 | /* I2C1 */ | ||
69 | MX53_PAD_CSI0_DAT8__I2C1_SDA, | ||
70 | MX53_PAD_CSI0_DAT9__I2C1_SCL, | ||
71 | MX53_PAD_NANDF_CS1__GPIO6_14, /* Accelerometer Enable */ | ||
72 | /* I2C2 */ | ||
73 | MX53_PAD_KEY_COL3__I2C2_SCL, | ||
74 | MX53_PAD_KEY_ROW3__I2C2_SDA, | ||
75 | /* SD1 */ | ||
76 | MX53_PAD_SD1_CMD__ESDHC1_CMD, | ||
77 | MX53_PAD_SD1_CLK__ESDHC1_CLK, | ||
78 | MX53_PAD_SD1_DATA0__ESDHC1_DAT0, | ||
79 | MX53_PAD_SD1_DATA1__ESDHC1_DAT1, | ||
80 | MX53_PAD_SD1_DATA2__ESDHC1_DAT2, | ||
81 | MX53_PAD_SD1_DATA3__ESDHC1_DAT3, | ||
82 | /* SD1_CD */ | ||
83 | MX53_PAD_EIM_DA13__GPIO3_13, | ||
84 | /* SD3 */ | ||
85 | MX53_PAD_PATA_DATA8__ESDHC3_DAT0, | ||
86 | MX53_PAD_PATA_DATA9__ESDHC3_DAT1, | ||
87 | MX53_PAD_PATA_DATA10__ESDHC3_DAT2, | ||
88 | MX53_PAD_PATA_DATA11__ESDHC3_DAT3, | ||
89 | MX53_PAD_PATA_DATA0__ESDHC3_DAT4, | ||
90 | MX53_PAD_PATA_DATA1__ESDHC3_DAT5, | ||
91 | MX53_PAD_PATA_DATA2__ESDHC3_DAT6, | ||
92 | MX53_PAD_PATA_DATA3__ESDHC3_DAT7, | ||
93 | MX53_PAD_PATA_IORDY__ESDHC3_CLK, | ||
94 | MX53_PAD_PATA_RESET_B__ESDHC3_CMD, | ||
95 | /* SD3_CD */ | ||
96 | MX53_PAD_EIM_DA11__GPIO3_11, | ||
97 | /* SD3_WP */ | ||
98 | MX53_PAD_EIM_DA12__GPIO3_12, | ||
99 | /* VGA */ | ||
100 | MX53_PAD_EIM_OE__IPU_DI1_PIN7, | ||
101 | MX53_PAD_EIM_RW__IPU_DI1_PIN8, | ||
102 | /* DISPLB */ | ||
103 | MX53_PAD_EIM_D20__IPU_SER_DISP0_CS, | ||
104 | MX53_PAD_EIM_D21__IPU_DISPB0_SER_CLK, | ||
105 | MX53_PAD_EIM_D22__IPU_DISPB0_SER_DIN, | ||
106 | MX53_PAD_EIM_D23__IPU_DI0_D0_CS, | ||
107 | /* DISP0_POWER_EN */ | ||
108 | MX53_PAD_EIM_D24__GPIO3_24, | ||
109 | /* DISP0 DET INT */ | ||
110 | MX53_PAD_EIM_D31__GPIO3_31, | ||
111 | /* LVDS */ | ||
112 | MX53_PAD_LVDS0_TX3_P__LDB_LVDS0_TX3, | ||
113 | MX53_PAD_LVDS0_CLK_P__LDB_LVDS0_CLK, | ||
114 | MX53_PAD_LVDS0_TX2_P__LDB_LVDS0_TX2, | ||
115 | MX53_PAD_LVDS0_TX1_P__LDB_LVDS0_TX1, | ||
116 | MX53_PAD_LVDS0_TX0_P__LDB_LVDS0_TX0, | ||
117 | MX53_PAD_LVDS1_TX3_P__LDB_LVDS1_TX3, | ||
118 | MX53_PAD_LVDS1_TX2_P__LDB_LVDS1_TX2, | ||
119 | MX53_PAD_LVDS1_CLK_P__LDB_LVDS1_CLK, | ||
120 | MX53_PAD_LVDS1_TX1_P__LDB_LVDS1_TX1, | ||
121 | MX53_PAD_LVDS1_TX0_P__LDB_LVDS1_TX0, | ||
122 | /* I2C1 */ | ||
123 | MX53_PAD_CSI0_DAT8__I2C1_SDA, | ||
124 | MX53_PAD_CSI0_DAT9__I2C1_SCL, | ||
125 | /* UART1 */ | ||
126 | MX53_PAD_CSI0_DAT10__UART1_TXD_MUX, | ||
127 | MX53_PAD_CSI0_DAT11__UART1_RXD_MUX, | ||
128 | /* CSI0 */ | ||
129 | MX53_PAD_CSI0_DAT12__IPU_CSI0_D_12, | ||
130 | MX53_PAD_CSI0_DAT13__IPU_CSI0_D_13, | ||
131 | MX53_PAD_CSI0_DAT14__IPU_CSI0_D_14, | ||
132 | MX53_PAD_CSI0_DAT15__IPU_CSI0_D_15, | ||
133 | MX53_PAD_CSI0_DAT16__IPU_CSI0_D_16, | ||
134 | MX53_PAD_CSI0_DAT17__IPU_CSI0_D_17, | ||
135 | MX53_PAD_CSI0_DAT18__IPU_CSI0_D_18, | ||
136 | MX53_PAD_CSI0_DAT19__IPU_CSI0_D_19, | ||
137 | MX53_PAD_CSI0_VSYNC__IPU_CSI0_VSYNC, | ||
138 | MX53_PAD_CSI0_MCLK__IPU_CSI0_HSYNC, | ||
139 | MX53_PAD_CSI0_PIXCLK__IPU_CSI0_PIXCLK, | ||
140 | /* DISPLAY */ | ||
141 | MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK, | ||
142 | MX53_PAD_DI0_PIN15__IPU_DI0_PIN15, | ||
143 | MX53_PAD_DI0_PIN2__IPU_DI0_PIN2, | ||
144 | MX53_PAD_DI0_PIN3__IPU_DI0_PIN3, | ||
145 | MX53_PAD_DISP0_DAT0__IPU_DISP0_DAT_0, | ||
146 | MX53_PAD_DISP0_DAT1__IPU_DISP0_DAT_1, | ||
147 | MX53_PAD_DISP0_DAT2__IPU_DISP0_DAT_2, | ||
148 | MX53_PAD_DISP0_DAT3__IPU_DISP0_DAT_3, | ||
149 | MX53_PAD_DISP0_DAT4__IPU_DISP0_DAT_4, | ||
150 | MX53_PAD_DISP0_DAT5__IPU_DISP0_DAT_5, | ||
151 | MX53_PAD_DISP0_DAT6__IPU_DISP0_DAT_6, | ||
152 | MX53_PAD_DISP0_DAT7__IPU_DISP0_DAT_7, | ||
153 | MX53_PAD_DISP0_DAT8__IPU_DISP0_DAT_8, | ||
154 | MX53_PAD_DISP0_DAT9__IPU_DISP0_DAT_9, | ||
155 | MX53_PAD_DISP0_DAT10__IPU_DISP0_DAT_10, | ||
156 | MX53_PAD_DISP0_DAT11__IPU_DISP0_DAT_11, | ||
157 | MX53_PAD_DISP0_DAT12__IPU_DISP0_DAT_12, | ||
158 | MX53_PAD_DISP0_DAT13__IPU_DISP0_DAT_13, | ||
159 | MX53_PAD_DISP0_DAT14__IPU_DISP0_DAT_14, | ||
160 | MX53_PAD_DISP0_DAT15__IPU_DISP0_DAT_15, | ||
161 | MX53_PAD_DISP0_DAT16__IPU_DISP0_DAT_16, | ||
162 | MX53_PAD_DISP0_DAT17__IPU_DISP0_DAT_17, | ||
163 | MX53_PAD_DISP0_DAT18__IPU_DISP0_DAT_18, | ||
164 | MX53_PAD_DISP0_DAT19__IPU_DISP0_DAT_19, | ||
165 | MX53_PAD_DISP0_DAT20__IPU_DISP0_DAT_20, | ||
166 | MX53_PAD_DISP0_DAT21__IPU_DISP0_DAT_21, | ||
167 | MX53_PAD_DISP0_DAT22__IPU_DISP0_DAT_22, | ||
168 | MX53_PAD_DISP0_DAT23__IPU_DISP0_DAT_23, | ||
169 | /* Audio CLK*/ | ||
170 | MX53_PAD_GPIO_0__CCM_SSI_EXT1_CLK, | ||
171 | /* PWM */ | ||
172 | MX53_PAD_GPIO_1__PWM2_PWMO, | ||
173 | /* SPDIF */ | ||
174 | MX53_PAD_GPIO_7__SPDIF_PLOCK, | ||
175 | MX53_PAD_GPIO_17__SPDIF_OUT1, | ||
176 | /* GPIO */ | ||
177 | MX53_PAD_PATA_DA_1__GPIO7_7, /* LED */ | ||
178 | MX53_PAD_PATA_DA_2__GPIO7_8, | ||
179 | MX53_PAD_PATA_DATA5__GPIO2_5, | ||
180 | MX53_PAD_PATA_DATA6__GPIO2_6, | ||
181 | MX53_PAD_PATA_DATA14__GPIO2_14, | ||
182 | MX53_PAD_PATA_DATA15__GPIO2_15, | ||
183 | MX53_PAD_PATA_INTRQ__GPIO7_2, | ||
184 | MX53_PAD_EIM_WAIT__GPIO5_0, | ||
185 | MX53_PAD_NANDF_WP_B__GPIO6_9, | ||
186 | MX53_PAD_NANDF_RB0__GPIO6_10, | ||
187 | MX53_PAD_NANDF_CS1__GPIO6_14, | ||
188 | MX53_PAD_NANDF_CS2__GPIO6_15, | ||
189 | MX53_PAD_NANDF_CS3__GPIO6_16, | ||
190 | MX53_PAD_GPIO_5__GPIO1_5, | ||
191 | MX53_PAD_GPIO_16__GPIO7_11, | ||
192 | MX53_PAD_GPIO_8__GPIO1_8, | ||
193 | }; | ||
194 | |||
195 | #define GPIO_BUTTON(gpio_num, ev_code, act_low, descr, wake) \ | ||
196 | { \ | ||
197 | .gpio = gpio_num, \ | ||
198 | .type = EV_KEY, \ | ||
199 | .code = ev_code, \ | ||
200 | .active_low = act_low, \ | ||
201 | .desc = "btn " descr, \ | ||
202 | .wakeup = wake, \ | ||
203 | } | ||
204 | |||
205 | static struct gpio_keys_button loco_buttons[] = { | ||
206 | GPIO_BUTTON(MX53_LOCO_POWER, KEY_POWER, 1, "power", 0), | ||
207 | GPIO_BUTTON(MX53_LOCO_UI1, KEY_VOLUMEUP, 1, "volume-up", 0), | ||
208 | GPIO_BUTTON(MX53_LOCO_UI2, KEY_VOLUMEDOWN, 1, "volume-down", 0), | ||
209 | }; | ||
210 | |||
211 | static const struct gpio_keys_platform_data loco_button_data __initconst = { | ||
212 | .buttons = loco_buttons, | ||
213 | .nbuttons = ARRAY_SIZE(loco_buttons), | ||
214 | }; | ||
215 | |||
216 | static const struct esdhc_platform_data mx53_loco_sd1_data __initconst = { | ||
217 | .cd_gpio = LOCO_SD1_CD, | ||
218 | .cd_type = ESDHC_CD_GPIO, | ||
219 | .wp_type = ESDHC_WP_NONE, | ||
220 | }; | ||
221 | |||
222 | static const struct esdhc_platform_data mx53_loco_sd3_data __initconst = { | ||
223 | .cd_gpio = LOCO_SD3_CD, | ||
224 | .wp_gpio = LOCO_SD3_WP, | ||
225 | .cd_type = ESDHC_CD_GPIO, | ||
226 | .wp_type = ESDHC_WP_GPIO, | ||
227 | }; | ||
228 | |||
229 | static inline void mx53_loco_fec_reset(void) | ||
230 | { | ||
231 | int ret; | ||
232 | |||
233 | /* reset FEC PHY */ | ||
234 | ret = gpio_request(LOCO_FEC_PHY_RST, "fec-phy-reset"); | ||
235 | if (ret) { | ||
236 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); | ||
237 | return; | ||
238 | } | ||
239 | gpio_direction_output(LOCO_FEC_PHY_RST, 0); | ||
240 | msleep(1); | ||
241 | gpio_set_value(LOCO_FEC_PHY_RST, 1); | ||
242 | } | ||
243 | |||
244 | static const struct fec_platform_data mx53_loco_fec_data __initconst = { | ||
245 | .phy = PHY_INTERFACE_MODE_RMII, | ||
246 | }; | ||
247 | |||
248 | static const struct imxi2c_platform_data mx53_loco_i2c_data __initconst = { | ||
249 | .bitrate = 100000, | ||
250 | }; | ||
251 | |||
252 | static const struct gpio_led mx53loco_leds[] __initconst = { | ||
253 | { | ||
254 | .name = "green", | ||
255 | .default_trigger = "heartbeat", | ||
256 | .gpio = LOCO_LED, | ||
257 | }, | ||
258 | }; | ||
259 | |||
260 | static const struct gpio_led_platform_data mx53loco_leds_data __initconst = { | ||
261 | .leds = mx53loco_leds, | ||
262 | .num_leds = ARRAY_SIZE(mx53loco_leds), | ||
263 | }; | ||
264 | |||
265 | void __init imx53_qsb_common_init(void) | ||
266 | { | ||
267 | mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads, | ||
268 | ARRAY_SIZE(mx53_loco_pads)); | ||
269 | } | ||
270 | |||
271 | static struct i2c_board_info mx53loco_i2c_devices[] = { | ||
272 | { | ||
273 | I2C_BOARD_INFO("mma8450", 0x1C), | ||
274 | }, | ||
275 | }; | ||
276 | |||
277 | static void __init mx53_loco_board_init(void) | ||
278 | { | ||
279 | int ret; | ||
280 | imx53_soc_init(); | ||
281 | imx53_qsb_common_init(); | ||
282 | |||
283 | imx53_add_imx_uart(0, NULL); | ||
284 | mx53_loco_fec_reset(); | ||
285 | imx53_add_fec(&mx53_loco_fec_data); | ||
286 | imx53_add_imx2_wdt(0); | ||
287 | |||
288 | ret = gpio_request_one(LOCO_ACCEL_EN, GPIOF_OUT_INIT_HIGH, "accel_en"); | ||
289 | if (ret) | ||
290 | pr_err("Cannot request ACCEL_EN pin: %d\n", ret); | ||
291 | |||
292 | i2c_register_board_info(0, mx53loco_i2c_devices, | ||
293 | ARRAY_SIZE(mx53loco_i2c_devices)); | ||
294 | imx53_add_imx_i2c(0, &mx53_loco_i2c_data); | ||
295 | imx53_add_imx_i2c(1, &mx53_loco_i2c_data); | ||
296 | imx53_add_sdhci_esdhc_imx(0, &mx53_loco_sd1_data); | ||
297 | imx53_add_sdhci_esdhc_imx(2, &mx53_loco_sd3_data); | ||
298 | imx_add_gpio_keys(&loco_button_data); | ||
299 | gpio_led_register_device(-1, &mx53loco_leds_data); | ||
300 | imx53_add_ahci_imx(); | ||
301 | } | ||
302 | |||
303 | static void __init mx53_loco_timer_init(void) | ||
304 | { | ||
305 | mx53_clocks_init(32768, 24000000, 0, 0); | ||
306 | } | ||
307 | |||
308 | static struct sys_timer mx53_loco_timer = { | ||
309 | .init = mx53_loco_timer_init, | ||
310 | }; | ||
311 | |||
312 | MACHINE_START(MX53_LOCO, "Freescale MX53 LOCO Board") | ||
313 | .map_io = mx53_map_io, | ||
314 | .init_early = imx53_init_early, | ||
315 | .init_irq = mx53_init_irq, | ||
316 | .handle_irq = imx53_handle_irq, | ||
317 | .timer = &mx53_loco_timer, | ||
318 | .init_machine = mx53_loco_board_init, | ||
319 | .init_late = imx53_init_late, | ||
320 | .restart = mxc_restart, | ||
321 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mach-mx53_smd.c b/arch/arm/mach-imx/mach-mx53_smd.c deleted file mode 100644 index b15d6a6d3b68..000000000000 --- a/arch/arm/mach-imx/mach-mx53_smd.c +++ /dev/null | |||
@@ -1,168 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | |||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | |||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | |||
21 | #include <linux/init.h> | ||
22 | #include <linux/clk.h> | ||
23 | #include <linux/delay.h> | ||
24 | #include <linux/gpio.h> | ||
25 | |||
26 | #include <mach/common.h> | ||
27 | #include <mach/hardware.h> | ||
28 | #include <mach/iomux-mx53.h> | ||
29 | |||
30 | #include <asm/mach-types.h> | ||
31 | #include <asm/mach/arch.h> | ||
32 | #include <asm/mach/time.h> | ||
33 | |||
34 | #include "devices-imx53.h" | ||
35 | |||
36 | #define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6) | ||
37 | #define MX53_SMD_SATA_PWR_EN IMX_GPIO_NR(3, 3) | ||
38 | |||
39 | static iomux_v3_cfg_t mx53_smd_pads[] = { | ||
40 | MX53_PAD_CSI0_DAT10__UART1_TXD_MUX, | ||
41 | MX53_PAD_CSI0_DAT11__UART1_RXD_MUX, | ||
42 | |||
43 | MX53_PAD_PATA_BUFFER_EN__UART2_RXD_MUX, | ||
44 | MX53_PAD_PATA_DMARQ__UART2_TXD_MUX, | ||
45 | |||
46 | MX53_PAD_PATA_CS_0__UART3_TXD_MUX, | ||
47 | MX53_PAD_PATA_CS_1__UART3_RXD_MUX, | ||
48 | MX53_PAD_PATA_DA_1__UART3_CTS, | ||
49 | MX53_PAD_PATA_DA_2__UART3_RTS, | ||
50 | /* I2C1 */ | ||
51 | MX53_PAD_CSI0_DAT8__I2C1_SDA, | ||
52 | MX53_PAD_CSI0_DAT9__I2C1_SCL, | ||
53 | /* SD1 */ | ||
54 | MX53_PAD_SD1_CMD__ESDHC1_CMD, | ||
55 | MX53_PAD_SD1_CLK__ESDHC1_CLK, | ||
56 | MX53_PAD_SD1_DATA0__ESDHC1_DAT0, | ||
57 | MX53_PAD_SD1_DATA1__ESDHC1_DAT1, | ||
58 | MX53_PAD_SD1_DATA2__ESDHC1_DAT2, | ||
59 | MX53_PAD_SD1_DATA3__ESDHC1_DAT3, | ||
60 | /* SD2 */ | ||
61 | MX53_PAD_SD2_CMD__ESDHC2_CMD, | ||
62 | MX53_PAD_SD2_CLK__ESDHC2_CLK, | ||
63 | MX53_PAD_SD2_DATA0__ESDHC2_DAT0, | ||
64 | MX53_PAD_SD2_DATA1__ESDHC2_DAT1, | ||
65 | MX53_PAD_SD2_DATA2__ESDHC2_DAT2, | ||
66 | MX53_PAD_SD2_DATA3__ESDHC2_DAT3, | ||
67 | /* SD3 */ | ||
68 | MX53_PAD_PATA_DATA8__ESDHC3_DAT0, | ||
69 | MX53_PAD_PATA_DATA9__ESDHC3_DAT1, | ||
70 | MX53_PAD_PATA_DATA10__ESDHC3_DAT2, | ||
71 | MX53_PAD_PATA_DATA11__ESDHC3_DAT3, | ||
72 | MX53_PAD_PATA_DATA0__ESDHC3_DAT4, | ||
73 | MX53_PAD_PATA_DATA1__ESDHC3_DAT5, | ||
74 | MX53_PAD_PATA_DATA2__ESDHC3_DAT6, | ||
75 | MX53_PAD_PATA_DATA3__ESDHC3_DAT7, | ||
76 | MX53_PAD_PATA_IORDY__ESDHC3_CLK, | ||
77 | MX53_PAD_PATA_RESET_B__ESDHC3_CMD, | ||
78 | }; | ||
79 | |||
80 | static const struct imxuart_platform_data mx53_smd_uart_data __initconst = { | ||
81 | .flags = IMXUART_HAVE_RTSCTS, | ||
82 | }; | ||
83 | |||
84 | static inline void mx53_smd_init_uart(void) | ||
85 | { | ||
86 | imx53_add_imx_uart(0, NULL); | ||
87 | imx53_add_imx_uart(1, NULL); | ||
88 | imx53_add_imx_uart(2, &mx53_smd_uart_data); | ||
89 | } | ||
90 | |||
91 | static inline void mx53_smd_fec_reset(void) | ||
92 | { | ||
93 | int ret; | ||
94 | |||
95 | /* reset FEC PHY */ | ||
96 | ret = gpio_request(SMD_FEC_PHY_RST, "fec-phy-reset"); | ||
97 | if (ret) { | ||
98 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); | ||
99 | return; | ||
100 | } | ||
101 | gpio_direction_output(SMD_FEC_PHY_RST, 0); | ||
102 | msleep(1); | ||
103 | gpio_set_value(SMD_FEC_PHY_RST, 1); | ||
104 | } | ||
105 | |||
106 | static const struct fec_platform_data mx53_smd_fec_data __initconst = { | ||
107 | .phy = PHY_INTERFACE_MODE_RMII, | ||
108 | }; | ||
109 | |||
110 | static const struct imxi2c_platform_data mx53_smd_i2c_data __initconst = { | ||
111 | .bitrate = 100000, | ||
112 | }; | ||
113 | |||
114 | static inline void mx53_smd_ahci_pwr_on(void) | ||
115 | { | ||
116 | int ret; | ||
117 | |||
118 | /* Enable SATA PWR */ | ||
119 | ret = gpio_request_one(MX53_SMD_SATA_PWR_EN, | ||
120 | GPIOF_DIR_OUT | GPIOF_INIT_HIGH, "ahci-sata-pwr"); | ||
121 | if (ret) { | ||
122 | pr_err("failed to enable SATA_PWR_EN: %d\n", ret); | ||
123 | return; | ||
124 | } | ||
125 | } | ||
126 | |||
127 | void __init imx53_smd_common_init(void) | ||
128 | { | ||
129 | mxc_iomux_v3_setup_multiple_pads(mx53_smd_pads, | ||
130 | ARRAY_SIZE(mx53_smd_pads)); | ||
131 | } | ||
132 | |||
133 | static void __init mx53_smd_board_init(void) | ||
134 | { | ||
135 | imx53_soc_init(); | ||
136 | imx53_smd_common_init(); | ||
137 | |||
138 | mx53_smd_init_uart(); | ||
139 | mx53_smd_fec_reset(); | ||
140 | imx53_add_fec(&mx53_smd_fec_data); | ||
141 | imx53_add_imx2_wdt(0); | ||
142 | imx53_add_imx_i2c(0, &mx53_smd_i2c_data); | ||
143 | imx53_add_sdhci_esdhc_imx(0, NULL); | ||
144 | imx53_add_sdhci_esdhc_imx(1, NULL); | ||
145 | imx53_add_sdhci_esdhc_imx(2, NULL); | ||
146 | mx53_smd_ahci_pwr_on(); | ||
147 | imx53_add_ahci_imx(); | ||
148 | } | ||
149 | |||
150 | static void __init mx53_smd_timer_init(void) | ||
151 | { | ||
152 | mx53_clocks_init(32768, 24000000, 22579200, 0); | ||
153 | } | ||
154 | |||
155 | static struct sys_timer mx53_smd_timer = { | ||
156 | .init = mx53_smd_timer_init, | ||
157 | }; | ||
158 | |||
159 | MACHINE_START(MX53_SMD, "Freescale MX53 SMD Board") | ||
160 | .map_io = mx53_map_io, | ||
161 | .init_early = imx53_init_early, | ||
162 | .init_irq = mx53_init_irq, | ||
163 | .handle_irq = imx53_handle_irq, | ||
164 | .timer = &mx53_smd_timer, | ||
165 | .init_machine = mx53_smd_board_init, | ||
166 | .init_late = imx53_init_late, | ||
167 | .restart = mxc_restart, | ||
168 | MACHINE_END | ||