diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2014-08-23 07:12:09 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@freescale.com> | 2014-09-01 10:00:02 -0400 |
commit | 1ca7070d1d08e71692295ed06c6cb6331ecac3c8 (patch) | |
tree | ff3bd08c1aace4f90668a6ceb5e401318d64e099 | |
parent | 7c5deaf77526508709b320b76b0d41cec7274edc (diff) |
ARM: i.MX: Remove Phytec i.MX27 PCM038/PCM970 board files
pcm970-baseboard.c and mach-pcm038.c can be replaced with their
devicetree equivalents: imx27-phytec-phycore-rdk.dts and
imx27-phytec-phycore-som.dtsi respectively, so remove the board files.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
-rw-r--r-- | arch/arm/configs/imx_v4_v5_defconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/Kconfig | 30 | ||||
-rw-r--r-- | arch/arm/mach-imx/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/board-pcm038.h | 36 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-pcm038.c | 358 | ||||
-rw-r--r-- | arch/arm/mach-imx/pcm970-baseboard.c | 231 |
6 files changed, 0 insertions, 658 deletions
diff --git a/arch/arm/configs/imx_v4_v5_defconfig b/arch/arm/configs/imx_v4_v5_defconfig index f53074cc6a55..9d73e695a8db 100644 --- a/arch/arm/configs/imx_v4_v5_defconfig +++ b/arch/arm/configs/imx_v4_v5_defconfig | |||
@@ -30,7 +30,6 @@ CONFIG_MACH_MX25_3DS=y | |||
30 | CONFIG_MACH_EUKREA_CPUIMX25SD=y | 30 | CONFIG_MACH_EUKREA_CPUIMX25SD=y |
31 | CONFIG_MACH_IMX25_DT=y | 31 | CONFIG_MACH_IMX25_DT=y |
32 | CONFIG_MACH_MX27ADS=y | 32 | CONFIG_MACH_MX27ADS=y |
33 | CONFIG_MACH_PCM038=y | ||
34 | CONFIG_MACH_MX27_3DS=y | 33 | CONFIG_MACH_MX27_3DS=y |
35 | CONFIG_MACH_IMX27_VISSTRIM_M10=y | 34 | CONFIG_MACH_IMX27_VISSTRIM_M10=y |
36 | CONFIG_MACH_PCA100=y | 35 | CONFIG_MACH_PCA100=y |
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index e9a04590f729..62d645de8bf9 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -223,36 +223,6 @@ config MACH_MX27ADS | |||
223 | Include support for MX27ADS platform. This includes specific | 223 | Include support for MX27ADS platform. This includes specific |
224 | configurations for the board and its peripherals. | 224 | configurations for the board and its peripherals. |
225 | 225 | ||
226 | config MACH_PCM038 | ||
227 | bool "Phytec phyCORE-i.MX27 CPU module (pcm038)" | ||
228 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
229 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
230 | select IMX_HAVE_PLATFORM_IMX_UART | ||
231 | select IMX_HAVE_PLATFORM_MXC_EHCI | ||
232 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
233 | select IMX_HAVE_PLATFORM_MXC_W1 | ||
234 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
235 | select USB_ULPI_VIEWPORT if USB_ULPI | ||
236 | select SOC_IMX27 | ||
237 | help | ||
238 | Include support for phyCORE-i.MX27 (aka pcm038) platform. This | ||
239 | includes specific configurations for the module and its peripherals. | ||
240 | |||
241 | choice | ||
242 | prompt "Baseboard" | ||
243 | depends on MACH_PCM038 | ||
244 | default MACH_PCM970_BASEBOARD | ||
245 | |||
246 | config MACH_PCM970_BASEBOARD | ||
247 | bool "PHYTEC PCM970 development board" | ||
248 | select IMX_HAVE_PLATFORM_IMX_FB | ||
249 | select IMX_HAVE_PLATFORM_MXC_MMC | ||
250 | help | ||
251 | This adds board specific devices that can be found on Phytec's | ||
252 | PCM970 evaluation board. | ||
253 | |||
254 | endchoice | ||
255 | |||
256 | config MACH_MX27_3DS | 226 | config MACH_MX27_3DS |
257 | bool "MX27PDK platform" | 227 | bool "MX27PDK platform" |
258 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 228 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 30f3f5e9792a..cd30279e3692 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
@@ -56,8 +56,6 @@ obj-$(CONFIG_MACH_IMX25_DT) += imx25-dt.o | |||
56 | 56 | ||
57 | # i.MX27 based machines | 57 | # i.MX27 based machines |
58 | obj-$(CONFIG_MACH_MX27ADS) += mach-mx27ads.o | 58 | obj-$(CONFIG_MACH_MX27ADS) += mach-mx27ads.o |
59 | obj-$(CONFIG_MACH_PCM038) += mach-pcm038.o | ||
60 | obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o | ||
61 | obj-$(CONFIG_MACH_MX27_3DS) += mach-mx27_3ds.o | 59 | obj-$(CONFIG_MACH_MX27_3DS) += mach-mx27_3ds.o |
62 | obj-$(CONFIG_MACH_IMX27_VISSTRIM_M10) += mach-imx27_visstrim_m10.o | 60 | obj-$(CONFIG_MACH_IMX27_VISSTRIM_M10) += mach-imx27_visstrim_m10.o |
63 | obj-$(CONFIG_MACH_PCA100) += mach-pca100.o | 61 | obj-$(CONFIG_MACH_PCA100) += mach-pca100.o |
diff --git a/arch/arm/mach-imx/board-pcm038.h b/arch/arm/mach-imx/board-pcm038.h deleted file mode 100644 index 6f371e35753d..000000000000 --- a/arch/arm/mach-imx/board-pcm038.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
16 | * MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_ARCH_MXC_BOARD_PCM038_H__ | ||
20 | #define __ASM_ARCH_MXC_BOARD_PCM038_H__ | ||
21 | |||
22 | #ifndef __ASSEMBLY__ | ||
23 | /* | ||
24 | * This CPU module needs a baseboard to work. After basic initializing | ||
25 | * its own devices, it calls the baseboard's init function. | ||
26 | * TODO: Add your own baseboard init function and call it from | ||
27 | * inside pcm038_init(). | ||
28 | * | ||
29 | * This example here is for the development board. Refer pcm970-baseboard.c | ||
30 | */ | ||
31 | |||
32 | extern void pcm970_baseboard_init(void); | ||
33 | |||
34 | #endif | ||
35 | |||
36 | #endif /* __ASM_ARCH_MXC_BOARD_PCM038_H__ */ | ||
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c deleted file mode 100644 index ee862ad6b6fc..000000000000 --- a/arch/arm/mach-imx/mach-pcm038.c +++ /dev/null | |||
@@ -1,358 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2007 Robert Schwebel <r.schwebel@pengutronix.de>, Pengutronix | ||
3 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version 2 | ||
8 | * of the License, or (at your option) any later version. | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | #include <linux/i2c.h> | ||
21 | #include <linux/platform_data/at24.h> | ||
22 | #include <linux/io.h> | ||
23 | #include <linux/mtd/plat-ram.h> | ||
24 | #include <linux/mtd/physmap.h> | ||
25 | #include <linux/platform_device.h> | ||
26 | #include <linux/regulator/machine.h> | ||
27 | #include <linux/mfd/mc13783.h> | ||
28 | #include <linux/spi/spi.h> | ||
29 | #include <linux/irq.h> | ||
30 | #include <linux/gpio.h> | ||
31 | |||
32 | #include <asm/mach-types.h> | ||
33 | #include <asm/mach/arch.h> | ||
34 | #include <asm/mach/time.h> | ||
35 | |||
36 | #include "board-pcm038.h" | ||
37 | #include "common.h" | ||
38 | #include "devices-imx27.h" | ||
39 | #include "ehci.h" | ||
40 | #include "hardware.h" | ||
41 | #include "iomux-mx27.h" | ||
42 | #include "ulpi.h" | ||
43 | |||
44 | static const int pcm038_pins[] __initconst = { | ||
45 | /* UART1 */ | ||
46 | PE12_PF_UART1_TXD, | ||
47 | PE13_PF_UART1_RXD, | ||
48 | PE14_PF_UART1_CTS, | ||
49 | PE15_PF_UART1_RTS, | ||
50 | /* UART2 */ | ||
51 | PE3_PF_UART2_CTS, | ||
52 | PE4_PF_UART2_RTS, | ||
53 | PE6_PF_UART2_TXD, | ||
54 | PE7_PF_UART2_RXD, | ||
55 | /* UART3 */ | ||
56 | PE8_PF_UART3_TXD, | ||
57 | PE9_PF_UART3_RXD, | ||
58 | PE10_PF_UART3_CTS, | ||
59 | PE11_PF_UART3_RTS, | ||
60 | /* FEC */ | ||
61 | PD0_AIN_FEC_TXD0, | ||
62 | PD1_AIN_FEC_TXD1, | ||
63 | PD2_AIN_FEC_TXD2, | ||
64 | PD3_AIN_FEC_TXD3, | ||
65 | PD4_AOUT_FEC_RX_ER, | ||
66 | PD5_AOUT_FEC_RXD1, | ||
67 | PD6_AOUT_FEC_RXD2, | ||
68 | PD7_AOUT_FEC_RXD3, | ||
69 | PD8_AF_FEC_MDIO, | ||
70 | PD9_AIN_FEC_MDC, | ||
71 | PD10_AOUT_FEC_CRS, | ||
72 | PD11_AOUT_FEC_TX_CLK, | ||
73 | PD12_AOUT_FEC_RXD0, | ||
74 | PD13_AOUT_FEC_RX_DV, | ||
75 | PD14_AOUT_FEC_RX_CLK, | ||
76 | PD15_AOUT_FEC_COL, | ||
77 | PD16_AIN_FEC_TX_ER, | ||
78 | PF23_AIN_FEC_TX_EN, | ||
79 | /* I2C2 */ | ||
80 | PC5_PF_I2C2_SDA, | ||
81 | PC6_PF_I2C2_SCL, | ||
82 | /* SPI1 */ | ||
83 | PD25_PF_CSPI1_RDY, | ||
84 | PD29_PF_CSPI1_SCLK, | ||
85 | PD30_PF_CSPI1_MISO, | ||
86 | PD31_PF_CSPI1_MOSI, | ||
87 | /* SSI1 */ | ||
88 | PC20_PF_SSI1_FS, | ||
89 | PC21_PF_SSI1_RXD, | ||
90 | PC22_PF_SSI1_TXD, | ||
91 | PC23_PF_SSI1_CLK, | ||
92 | /* SSI4 */ | ||
93 | PC16_PF_SSI4_FS, | ||
94 | PC17_PF_SSI4_RXD, | ||
95 | PC18_PF_SSI4_TXD, | ||
96 | PC19_PF_SSI4_CLK, | ||
97 | /* USB host */ | ||
98 | PA0_PF_USBH2_CLK, | ||
99 | PA1_PF_USBH2_DIR, | ||
100 | PA2_PF_USBH2_DATA7, | ||
101 | PA3_PF_USBH2_NXT, | ||
102 | PA4_PF_USBH2_STP, | ||
103 | PD19_AF_USBH2_DATA4, | ||
104 | PD20_AF_USBH2_DATA3, | ||
105 | PD21_AF_USBH2_DATA6, | ||
106 | PD22_AF_USBH2_DATA0, | ||
107 | PD23_AF_USBH2_DATA2, | ||
108 | PD24_AF_USBH2_DATA1, | ||
109 | PD26_AF_USBH2_DATA5, | ||
110 | }; | ||
111 | |||
112 | /* | ||
113 | * Phytec's PCM038 comes with 2MiB battery buffered SRAM, | ||
114 | * 16 bit width | ||
115 | */ | ||
116 | |||
117 | static struct platdata_mtd_ram pcm038_sram_data = { | ||
118 | .bankwidth = 2, | ||
119 | }; | ||
120 | |||
121 | static struct resource pcm038_sram_resource = { | ||
122 | .start = MX27_CS1_BASE_ADDR, | ||
123 | .end = MX27_CS1_BASE_ADDR + 512 * 1024 - 1, | ||
124 | .flags = IORESOURCE_MEM, | ||
125 | }; | ||
126 | |||
127 | static struct platform_device pcm038_sram_mtd_device = { | ||
128 | .name = "mtd-ram", | ||
129 | .id = 0, | ||
130 | .dev = { | ||
131 | .platform_data = &pcm038_sram_data, | ||
132 | }, | ||
133 | .num_resources = 1, | ||
134 | .resource = &pcm038_sram_resource, | ||
135 | }; | ||
136 | |||
137 | /* | ||
138 | * Phytec's phyCORE-i.MX27 comes with 32MiB flash, | ||
139 | * 16 bit width | ||
140 | */ | ||
141 | static struct physmap_flash_data pcm038_flash_data = { | ||
142 | .width = 2, | ||
143 | }; | ||
144 | |||
145 | static struct resource pcm038_flash_resource = { | ||
146 | .start = 0xc0000000, | ||
147 | .end = 0xc1ffffff, | ||
148 | .flags = IORESOURCE_MEM, | ||
149 | }; | ||
150 | |||
151 | static struct platform_device pcm038_nor_mtd_device = { | ||
152 | .name = "physmap-flash", | ||
153 | .id = 0, | ||
154 | .dev = { | ||
155 | .platform_data = &pcm038_flash_data, | ||
156 | }, | ||
157 | .num_resources = 1, | ||
158 | .resource = &pcm038_flash_resource, | ||
159 | }; | ||
160 | |||
161 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
162 | .flags = IMXUART_HAVE_RTSCTS, | ||
163 | }; | ||
164 | |||
165 | static const struct mxc_nand_platform_data | ||
166 | pcm038_nand_board_info __initconst = { | ||
167 | .width = 1, | ||
168 | .hw_ecc = 1, | ||
169 | }; | ||
170 | |||
171 | static struct platform_device *platform_devices[] __initdata = { | ||
172 | &pcm038_nor_mtd_device, | ||
173 | &pcm038_sram_mtd_device, | ||
174 | }; | ||
175 | |||
176 | /* On pcm038 there's a sram attached to CS1, we enable the chipselect here and | ||
177 | * setup other stuffs to access the sram. */ | ||
178 | static void __init pcm038_init_sram(void) | ||
179 | { | ||
180 | __raw_writel(0x0000d843, MX27_IO_ADDRESS(MX27_WEIM_CSCRxU(1))); | ||
181 | __raw_writel(0x22252521, MX27_IO_ADDRESS(MX27_WEIM_CSCRxL(1))); | ||
182 | __raw_writel(0x22220a00, MX27_IO_ADDRESS(MX27_WEIM_CSCRxA(1))); | ||
183 | } | ||
184 | |||
185 | static const struct imxi2c_platform_data pcm038_i2c1_data __initconst = { | ||
186 | .bitrate = 100000, | ||
187 | }; | ||
188 | |||
189 | static struct at24_platform_data board_eeprom = { | ||
190 | .byte_len = 4096, | ||
191 | .page_size = 32, | ||
192 | .flags = AT24_FLAG_ADDR16, | ||
193 | }; | ||
194 | |||
195 | static struct i2c_board_info pcm038_i2c_devices[] = { | ||
196 | { | ||
197 | I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */ | ||
198 | .platform_data = &board_eeprom, | ||
199 | }, { | ||
200 | I2C_BOARD_INFO("pcf8563", 0x51), | ||
201 | }, { | ||
202 | I2C_BOARD_INFO("lm75", 0x4a), | ||
203 | } | ||
204 | }; | ||
205 | |||
206 | static int pcm038_spi_cs[] = {GPIO_PORTD + 28}; | ||
207 | |||
208 | static const struct spi_imx_master pcm038_spi0_data __initconst = { | ||
209 | .chipselect = pcm038_spi_cs, | ||
210 | .num_chipselect = ARRAY_SIZE(pcm038_spi_cs), | ||
211 | }; | ||
212 | |||
213 | static struct regulator_consumer_supply sdhc1_consumers[] = { | ||
214 | { | ||
215 | .dev_name = "imx21-mmc.1", | ||
216 | .supply = "sdhc_vcc", | ||
217 | }, | ||
218 | }; | ||
219 | |||
220 | static struct regulator_init_data sdhc1_data = { | ||
221 | .constraints = { | ||
222 | .min_uV = 3000000, | ||
223 | .max_uV = 3400000, | ||
224 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | | ||
225 | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, | ||
226 | .valid_modes_mask = REGULATOR_MODE_NORMAL | | ||
227 | REGULATOR_MODE_FAST, | ||
228 | .always_on = 0, | ||
229 | .boot_on = 0, | ||
230 | }, | ||
231 | .num_consumer_supplies = ARRAY_SIZE(sdhc1_consumers), | ||
232 | .consumer_supplies = sdhc1_consumers, | ||
233 | }; | ||
234 | |||
235 | static struct regulator_consumer_supply cam_consumers[] = { | ||
236 | { | ||
237 | .dev_name = NULL, | ||
238 | .supply = "imx_cam_vcc", | ||
239 | }, | ||
240 | }; | ||
241 | |||
242 | static struct regulator_init_data cam_data = { | ||
243 | .constraints = { | ||
244 | .min_uV = 3000000, | ||
245 | .max_uV = 3400000, | ||
246 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | | ||
247 | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, | ||
248 | .valid_modes_mask = REGULATOR_MODE_NORMAL | | ||
249 | REGULATOR_MODE_FAST, | ||
250 | .always_on = 0, | ||
251 | .boot_on = 0, | ||
252 | }, | ||
253 | .num_consumer_supplies = ARRAY_SIZE(cam_consumers), | ||
254 | .consumer_supplies = cam_consumers, | ||
255 | }; | ||
256 | |||
257 | static struct mc13xxx_regulator_init_data pcm038_regulators[] = { | ||
258 | { | ||
259 | .id = MC13783_REG_VCAM, | ||
260 | .init_data = &cam_data, | ||
261 | }, { | ||
262 | .id = MC13783_REG_VMMC1, | ||
263 | .init_data = &sdhc1_data, | ||
264 | }, | ||
265 | }; | ||
266 | |||
267 | static struct mc13xxx_platform_data pcm038_pmic = { | ||
268 | .regulators = { | ||
269 | .regulators = pcm038_regulators, | ||
270 | .num_regulators = ARRAY_SIZE(pcm038_regulators), | ||
271 | }, | ||
272 | .flags = MC13XXX_USE_ADC | MC13XXX_USE_TOUCHSCREEN, | ||
273 | }; | ||
274 | |||
275 | static struct spi_board_info pcm038_spi_board_info[] __initdata = { | ||
276 | { | ||
277 | .modalias = "mc13783", | ||
278 | /* irq number is run-time assigned */ | ||
279 | .max_speed_hz = 300000, | ||
280 | .bus_num = 0, | ||
281 | .chip_select = 0, | ||
282 | .platform_data = &pcm038_pmic, | ||
283 | .mode = SPI_CS_HIGH, | ||
284 | } | ||
285 | }; | ||
286 | |||
287 | static int pcm038_usbh2_init(struct platform_device *pdev) | ||
288 | { | ||
289 | return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED | | ||
290 | MXC_EHCI_INTERFACE_DIFF_UNI); | ||
291 | } | ||
292 | |||
293 | static const struct mxc_usbh_platform_data usbh2_pdata __initconst = { | ||
294 | .init = pcm038_usbh2_init, | ||
295 | .portsc = MXC_EHCI_MODE_ULPI, | ||
296 | }; | ||
297 | |||
298 | static void __init pcm038_init(void) | ||
299 | { | ||
300 | imx27_soc_init(); | ||
301 | |||
302 | mxc_gpio_setup_multiple_pins(pcm038_pins, ARRAY_SIZE(pcm038_pins), | ||
303 | "PCM038"); | ||
304 | |||
305 | pcm038_init_sram(); | ||
306 | |||
307 | imx27_add_imx_uart0(&uart_pdata); | ||
308 | imx27_add_imx_uart1(&uart_pdata); | ||
309 | imx27_add_imx_uart2(&uart_pdata); | ||
310 | |||
311 | mxc_gpio_mode(PE16_AF_OWIRE); | ||
312 | imx27_add_mxc_nand(&pcm038_nand_board_info); | ||
313 | |||
314 | /* only the i2c master 1 is used on this CPU card */ | ||
315 | i2c_register_board_info(1, pcm038_i2c_devices, | ||
316 | ARRAY_SIZE(pcm038_i2c_devices)); | ||
317 | |||
318 | imx27_add_imx_i2c(1, &pcm038_i2c1_data); | ||
319 | |||
320 | /* PE18 for user-LED D40 */ | ||
321 | mxc_gpio_mode(GPIO_PORTE | 18 | GPIO_GPIO | GPIO_OUT); | ||
322 | |||
323 | mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT); | ||
324 | |||
325 | /* MC13783 IRQ */ | ||
326 | mxc_gpio_mode(GPIO_PORTB | 23 | GPIO_GPIO | GPIO_IN); | ||
327 | |||
328 | imx27_add_spi_imx0(&pcm038_spi0_data); | ||
329 | pcm038_spi_board_info[0].irq = gpio_to_irq(IMX_GPIO_NR(2, 23)); | ||
330 | spi_register_board_info(pcm038_spi_board_info, | ||
331 | ARRAY_SIZE(pcm038_spi_board_info)); | ||
332 | |||
333 | imx27_add_mxc_ehci_hs(2, &usbh2_pdata); | ||
334 | |||
335 | imx27_add_fec(NULL); | ||
336 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | ||
337 | imx27_add_imx2_wdt(); | ||
338 | imx27_add_mxc_w1(); | ||
339 | |||
340 | #ifdef CONFIG_MACH_PCM970_BASEBOARD | ||
341 | pcm970_baseboard_init(); | ||
342 | #endif | ||
343 | } | ||
344 | |||
345 | static void __init pcm038_timer_init(void) | ||
346 | { | ||
347 | mx27_clocks_init(26000000); | ||
348 | } | ||
349 | |||
350 | MACHINE_START(PCM038, "phyCORE-i.MX27") | ||
351 | .atag_offset = 0x100, | ||
352 | .map_io = mx27_map_io, | ||
353 | .init_early = imx27_init_early, | ||
354 | .init_irq = mx27_init_irq, | ||
355 | .init_time = pcm038_timer_init, | ||
356 | .init_machine = pcm038_init, | ||
357 | .restart = mxc_restart, | ||
358 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/pcm970-baseboard.c b/arch/arm/mach-imx/pcm970-baseboard.c deleted file mode 100644 index 51c608234089..000000000000 --- a/arch/arm/mach-imx/pcm970-baseboard.c +++ /dev/null | |||
@@ -1,231 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
16 | * MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | #include <linux/gpio.h> | ||
20 | #include <linux/irq.h> | ||
21 | #include <linux/platform_device.h> | ||
22 | #include <linux/can/platform/sja1000.h> | ||
23 | |||
24 | #include <asm/mach/arch.h> | ||
25 | |||
26 | #include "common.h" | ||
27 | #include "devices-imx27.h" | ||
28 | #include "hardware.h" | ||
29 | #include "iomux-mx27.h" | ||
30 | |||
31 | static const int pcm970_pins[] __initconst = { | ||
32 | /* SDHC */ | ||
33 | PB4_PF_SD2_D0, | ||
34 | PB5_PF_SD2_D1, | ||
35 | PB6_PF_SD2_D2, | ||
36 | PB7_PF_SD2_D3, | ||
37 | PB8_PF_SD2_CMD, | ||
38 | PB9_PF_SD2_CLK, | ||
39 | /* display */ | ||
40 | PA5_PF_LSCLK, | ||
41 | PA6_PF_LD0, | ||
42 | PA7_PF_LD1, | ||
43 | PA8_PF_LD2, | ||
44 | PA9_PF_LD3, | ||
45 | PA10_PF_LD4, | ||
46 | PA11_PF_LD5, | ||
47 | PA12_PF_LD6, | ||
48 | PA13_PF_LD7, | ||
49 | PA14_PF_LD8, | ||
50 | PA15_PF_LD9, | ||
51 | PA16_PF_LD10, | ||
52 | PA17_PF_LD11, | ||
53 | PA18_PF_LD12, | ||
54 | PA19_PF_LD13, | ||
55 | PA20_PF_LD14, | ||
56 | PA21_PF_LD15, | ||
57 | PA22_PF_LD16, | ||
58 | PA23_PF_LD17, | ||
59 | PA24_PF_REV, | ||
60 | PA25_PF_CLS, | ||
61 | PA26_PF_PS, | ||
62 | PA27_PF_SPL_SPR, | ||
63 | PA28_PF_HSYNC, | ||
64 | PA29_PF_VSYNC, | ||
65 | PA30_PF_CONTRAST, | ||
66 | PA31_PF_OE_ACD, | ||
67 | /* | ||
68 | * it seems the data line misses a pullup, so we must enable | ||
69 | * the internal pullup as a local workaround | ||
70 | */ | ||
71 | PD17_PF_I2C_DATA | GPIO_PUEN, | ||
72 | PD18_PF_I2C_CLK, | ||
73 | /* Camera */ | ||
74 | PB10_PF_CSI_D0, | ||
75 | PB11_PF_CSI_D1, | ||
76 | PB12_PF_CSI_D2, | ||
77 | PB13_PF_CSI_D3, | ||
78 | PB14_PF_CSI_D4, | ||
79 | PB15_PF_CSI_MCLK, | ||
80 | PB16_PF_CSI_PIXCLK, | ||
81 | PB17_PF_CSI_D5, | ||
82 | PB18_PF_CSI_D6, | ||
83 | PB19_PF_CSI_D7, | ||
84 | PB20_PF_CSI_VSYNC, | ||
85 | PB21_PF_CSI_HSYNC, | ||
86 | }; | ||
87 | |||
88 | static int pcm970_sdhc2_get_ro(struct device *dev) | ||
89 | { | ||
90 | return gpio_get_value(GPIO_PORTC + 28); | ||
91 | } | ||
92 | |||
93 | static int pcm970_sdhc2_init(struct device *dev, irq_handler_t detect_irq, void *data) | ||
94 | { | ||
95 | int ret; | ||
96 | |||
97 | ret = request_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), detect_irq, | ||
98 | IRQF_TRIGGER_FALLING, "imx-mmc-detect", data); | ||
99 | if (ret) | ||
100 | return ret; | ||
101 | |||
102 | ret = gpio_request(GPIO_PORTC + 28, "imx-mmc-ro"); | ||
103 | if (ret) { | ||
104 | free_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), data); | ||
105 | return ret; | ||
106 | } | ||
107 | |||
108 | gpio_direction_input(GPIO_PORTC + 28); | ||
109 | |||
110 | return 0; | ||
111 | } | ||
112 | |||
113 | static void pcm970_sdhc2_exit(struct device *dev, void *data) | ||
114 | { | ||
115 | free_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), data); | ||
116 | gpio_free(GPIO_PORTC + 28); | ||
117 | } | ||
118 | |||
119 | static const struct imxmmc_platform_data sdhc_pdata __initconst = { | ||
120 | .get_ro = pcm970_sdhc2_get_ro, | ||
121 | .init = pcm970_sdhc2_init, | ||
122 | .exit = pcm970_sdhc2_exit, | ||
123 | }; | ||
124 | |||
125 | static struct imx_fb_videomode pcm970_modes[] = { | ||
126 | { | ||
127 | .mode = { | ||
128 | .name = "Sharp-LQ035Q7", | ||
129 | .refresh = 60, | ||
130 | .xres = 240, | ||
131 | .yres = 320, | ||
132 | .pixclock = 188679, /* in ps (5.3MHz) */ | ||
133 | .hsync_len = 7, | ||
134 | .left_margin = 5, | ||
135 | .right_margin = 16, | ||
136 | .vsync_len = 1, | ||
137 | .upper_margin = 7, | ||
138 | .lower_margin = 9, | ||
139 | }, | ||
140 | /* | ||
141 | * - HSYNC active high | ||
142 | * - VSYNC active high | ||
143 | * - clk notenabled while idle | ||
144 | * - clock not inverted | ||
145 | * - data not inverted | ||
146 | * - data enable low active | ||
147 | * - enable sharp mode | ||
148 | */ | ||
149 | .pcr = 0xF00080C0, | ||
150 | .bpp = 16, | ||
151 | }, { | ||
152 | .mode = { | ||
153 | .name = "TX090", | ||
154 | .refresh = 60, | ||
155 | .xres = 240, | ||
156 | .yres = 320, | ||
157 | .pixclock = 38255, | ||
158 | .left_margin = 144, | ||
159 | .right_margin = 0, | ||
160 | .upper_margin = 7, | ||
161 | .lower_margin = 40, | ||
162 | .hsync_len = 96, | ||
163 | .vsync_len = 1, | ||
164 | }, | ||
165 | /* | ||
166 | * - HSYNC active low (1 << 22) | ||
167 | * - VSYNC active low (1 << 23) | ||
168 | * - clk notenabled while idle | ||
169 | * - clock not inverted | ||
170 | * - data not inverted | ||
171 | * - data enable low active | ||
172 | * - enable sharp mode | ||
173 | */ | ||
174 | .pcr = 0xF0008080 | (1<<22) | (1<<23) | (1<<19), | ||
175 | .bpp = 32, | ||
176 | }, | ||
177 | }; | ||
178 | |||
179 | static const struct imx_fb_platform_data pcm038_fb_data __initconst = { | ||
180 | .mode = pcm970_modes, | ||
181 | .num_modes = ARRAY_SIZE(pcm970_modes), | ||
182 | |||
183 | .pwmr = 0x00A903FF, | ||
184 | .lscr1 = 0x00120300, | ||
185 | .dmacr = 0x00020010, | ||
186 | }; | ||
187 | |||
188 | static struct resource pcm970_sja1000_resources[] = { | ||
189 | { | ||
190 | .start = MX27_CS4_BASE_ADDR, | ||
191 | .end = MX27_CS4_BASE_ADDR + 0x100 - 1, | ||
192 | .flags = IORESOURCE_MEM, | ||
193 | }, { | ||
194 | /* irq number is run-time assigned */ | ||
195 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, | ||
196 | }, | ||
197 | }; | ||
198 | |||
199 | static struct sja1000_platform_data pcm970_sja1000_platform_data = { | ||
200 | .osc_freq = 16000000, | ||
201 | .ocr = OCR_TX1_PULLDOWN | OCR_TX0_PUSHPULL, | ||
202 | .cdr = CDR_CBP, | ||
203 | }; | ||
204 | |||
205 | static struct platform_device pcm970_sja1000 = { | ||
206 | .name = "sja1000_platform", | ||
207 | .dev = { | ||
208 | .platform_data = &pcm970_sja1000_platform_data, | ||
209 | }, | ||
210 | .resource = pcm970_sja1000_resources, | ||
211 | .num_resources = ARRAY_SIZE(pcm970_sja1000_resources), | ||
212 | }; | ||
213 | |||
214 | /* | ||
215 | * system init for baseboard usage. Will be called by pcm038 init. | ||
216 | * | ||
217 | * Add platform devices present on this baseboard and init | ||
218 | * them from CPU side as far as required to use them later on | ||
219 | */ | ||
220 | void __init pcm970_baseboard_init(void) | ||
221 | { | ||
222 | mxc_gpio_setup_multiple_pins(pcm970_pins, ARRAY_SIZE(pcm970_pins), | ||
223 | "PCM970"); | ||
224 | |||
225 | imx27_add_imx_fb(&pcm038_fb_data); | ||
226 | mxc_gpio_mode(GPIO_PORTC | 28 | GPIO_GPIO | GPIO_IN); | ||
227 | imx27_add_mxc_mmc(1, &sdhc_pdata); | ||
228 | pcm970_sja1000_resources[1].start = gpio_to_irq(IMX_GPIO_NR(5, 19)); | ||
229 | pcm970_sja1000_resources[1].end = gpio_to_irq(IMX_GPIO_NR(5, 19)); | ||
230 | platform_device_register(&pcm970_sja1000); | ||
231 | } | ||