diff options
author | Simon Horman <horms+renesas@verge.net.au> | 2013-07-21 21:23:09 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-07-24 03:35:23 -0400 |
commit | c0bb9b3027690e10cf8f20a027039db3c7a50d98 (patch) | |
tree | 91d7f5f1e97e997744d95f03aabd31512d82f1cb | |
parent | 5fa6d27612635f4b3e6c19d763c0a65275933898 (diff) |
ARCH: ARM: shmobile: Remove ag5evm board support
Remove support for the sh73a0 based ag5evm board.
The sh73a0 SoC is continued to be supported using
the kzm9g board.
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r-- | arch/arm/configs/ag5evm_defconfig | 83 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/Kconfig | 7 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/Makefile.boot | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-ag5evm.c | 639 |
5 files changed, 0 insertions, 731 deletions
diff --git a/arch/arm/configs/ag5evm_defconfig b/arch/arm/configs/ag5evm_defconfig deleted file mode 100644 index 212ead354a6b..000000000000 --- a/arch/arm/configs/ag5evm_defconfig +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_IKCONFIG=y | ||
4 | CONFIG_IKCONFIG_PROC=y | ||
5 | CONFIG_LOG_BUF_SHIFT=16 | ||
6 | CONFIG_NAMESPACES=y | ||
7 | # CONFIG_UTS_NS is not set | ||
8 | # CONFIG_IPC_NS is not set | ||
9 | # CONFIG_USER_NS is not set | ||
10 | # CONFIG_PID_NS is not set | ||
11 | CONFIG_BLK_DEV_INITRD=y | ||
12 | CONFIG_INITRAMFS_SOURCE="" | ||
13 | CONFIG_EXPERT=y | ||
14 | CONFIG_SLAB=y | ||
15 | # CONFIG_BLK_DEV_BSG is not set | ||
16 | # CONFIG_IOSCHED_DEADLINE is not set | ||
17 | # CONFIG_IOSCHED_CFQ is not set | ||
18 | CONFIG_ARCH_SHMOBILE=y | ||
19 | CONFIG_ARCH_SH73A0=y | ||
20 | CONFIG_MACH_AG5EVM=y | ||
21 | CONFIG_MEMORY_SIZE=0x10000000 | ||
22 | CONFIG_CPU_BPREDICT_DISABLE=y | ||
23 | CONFIG_ARM_ERRATA_430973=y | ||
24 | CONFIG_ARM_ERRATA_458693=y | ||
25 | CONFIG_NO_HZ=y | ||
26 | CONFIG_AEABI=y | ||
27 | # CONFIG_OABI_COMPAT is not set | ||
28 | CONFIG_HIGHMEM=y | ||
29 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
30 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
31 | CONFIG_CMDLINE="console=tty0 console=ttySC2,115200 earlyprintk=sh-sci.2,115200 ignore_loglevel" | ||
32 | CONFIG_CMDLINE_FORCE=y | ||
33 | CONFIG_KEXEC=y | ||
34 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
35 | CONFIG_PM=y | ||
36 | # CONFIG_SUSPEND is not set | ||
37 | CONFIG_PM_RUNTIME=y | ||
38 | CONFIG_NET=y | ||
39 | CONFIG_PACKET=y | ||
40 | CONFIG_UNIX=y | ||
41 | CONFIG_INET=y | ||
42 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
43 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
44 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
45 | # CONFIG_INET_LRO is not set | ||
46 | # CONFIG_INET_DIAG is not set | ||
47 | # CONFIG_IPV6 is not set | ||
48 | # CONFIG_WIRELESS is not set | ||
49 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
50 | # CONFIG_BLK_DEV is not set | ||
51 | CONFIG_NETDEVICES=y | ||
52 | CONFIG_NET_ETHERNET=y | ||
53 | CONFIG_SMSC911X=y | ||
54 | # CONFIG_NETDEV_1000 is not set | ||
55 | # CONFIG_NETDEV_10000 is not set | ||
56 | # CONFIG_WLAN is not set | ||
57 | CONFIG_INPUT_SPARSEKMAP=y | ||
58 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
59 | CONFIG_INPUT_EVDEV=y | ||
60 | # CONFIG_INPUT_KEYBOARD is not set | ||
61 | # CONFIG_INPUT_MOUSE is not set | ||
62 | CONFIG_SERIAL_SH_SCI=y | ||
63 | CONFIG_SERIAL_SH_SCI_NR_UARTS=9 | ||
64 | CONFIG_SERIAL_SH_SCI_CONSOLE=y | ||
65 | # CONFIG_LEGACY_PTYS is not set | ||
66 | # CONFIG_HW_RANDOM is not set | ||
67 | CONFIG_I2C=y | ||
68 | CONFIG_I2C_SH_MOBILE=y | ||
69 | # CONFIG_HWMON is not set | ||
70 | # CONFIG_MFD_SUPPORT is not set | ||
71 | CONFIG_FB=y | ||
72 | CONFIG_FB_SH_MOBILE_LCDC=y | ||
73 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
74 | CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y | ||
75 | # CONFIG_HID_SUPPORT is not set | ||
76 | # CONFIG_USB_SUPPORT is not set | ||
77 | # CONFIG_DNOTIFY is not set | ||
78 | # CONFIG_INOTIFY_USER is not set | ||
79 | CONFIG_TMPFS=y | ||
80 | # CONFIG_MISC_FILESYSTEMS is not set | ||
81 | CONFIG_MAGIC_SYSRQ=y | ||
82 | CONFIG_DEBUG_KERNEL=y | ||
83 | # CONFIG_FTRACE is not set | ||
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index c536cca9fdcb..e4ad4089f6ff 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -71,13 +71,6 @@ config ARCH_EMEV2 | |||
71 | 71 | ||
72 | comment "SH-Mobile Board Type" | 72 | comment "SH-Mobile Board Type" |
73 | 73 | ||
74 | config MACH_AG5EVM | ||
75 | bool "AG5EVM board" | ||
76 | depends on ARCH_SH73A0 | ||
77 | select ARCH_REQUIRE_GPIOLIB | ||
78 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
79 | select SH_LCD_MIPI_DSI | ||
80 | |||
81 | config MACH_APE6EVM | 74 | config MACH_APE6EVM |
82 | bool "APE6EVM board" | 75 | bool "APE6EVM board" |
83 | depends on ARCH_R8A73A4 | 76 | depends on ARCH_R8A73A4 |
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index 857a09d3ea11..62574c145813 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
@@ -35,7 +35,6 @@ obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o | |||
35 | obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o | 35 | obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o |
36 | 36 | ||
37 | # Board objects | 37 | # Board objects |
38 | obj-$(CONFIG_MACH_AG5EVM) += board-ag5evm.o | ||
39 | obj-$(CONFIG_MACH_APE6EVM) += board-ape6evm.o | 38 | obj-$(CONFIG_MACH_APE6EVM) += board-ape6evm.o |
40 | obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o | 39 | obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o |
41 | obj-$(CONFIG_MACH_BOCKW) += board-bockw.o | 40 | obj-$(CONFIG_MACH_BOCKW) += board-bockw.o |
diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot index 9156c56aee80..b8c1a21fcaf3 100644 --- a/arch/arm/mach-shmobile/Makefile.boot +++ b/arch/arm/mach-shmobile/Makefile.boot | |||
@@ -1,6 +1,5 @@ | |||
1 | # per-board load address for uImage | 1 | # per-board load address for uImage |
2 | loadaddr-y := | 2 | loadaddr-y := |
3 | loadaddr-$(CONFIG_MACH_AG5EVM) += 0x40008000 | ||
4 | loadaddr-$(CONFIG_MACH_APE6EVM) += 0x40008000 | 3 | loadaddr-$(CONFIG_MACH_APE6EVM) += 0x40008000 |
5 | loadaddr-$(CONFIG_MACH_ARMADILLO800EVA) += 0x40008000 | 4 | loadaddr-$(CONFIG_MACH_ARMADILLO800EVA) += 0x40008000 |
6 | loadaddr-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += 0x40008000 | 5 | loadaddr-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += 0x40008000 |
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c deleted file mode 100644 index f6d64495c405..000000000000 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ /dev/null | |||
@@ -1,639 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-shmobile/board-ag5evm.c | ||
3 | * | ||
4 | * Copyright (C) 2010 Takashi Yoshii <yoshii.takashi.zj@renesas.com> | ||
5 | * Copyright (C) 2009 Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> | ||
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; version 2 of the License. | ||
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 | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | * | ||
20 | */ | ||
21 | |||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <linux/interrupt.h> | ||
25 | #include <linux/irq.h> | ||
26 | #include <linux/pinctrl/machine.h> | ||
27 | #include <linux/pinctrl/pinconf-generic.h> | ||
28 | #include <linux/platform_device.h> | ||
29 | #include <linux/delay.h> | ||
30 | #include <linux/io.h> | ||
31 | #include <linux/dma-mapping.h> | ||
32 | #include <linux/regulator/fixed.h> | ||
33 | #include <linux/regulator/machine.h> | ||
34 | #include <linux/serial_sci.h> | ||
35 | #include <linux/smsc911x.h> | ||
36 | #include <linux/gpio.h> | ||
37 | #include <linux/videodev2.h> | ||
38 | #include <linux/input.h> | ||
39 | #include <linux/input/sh_keysc.h> | ||
40 | #include <linux/mmc/host.h> | ||
41 | #include <linux/mmc/sh_mmcif.h> | ||
42 | #include <linux/mmc/sh_mobile_sdhi.h> | ||
43 | #include <linux/mfd/tmio.h> | ||
44 | #include <linux/platform_data/bd6107.h> | ||
45 | #include <linux/sh_clk.h> | ||
46 | #include <linux/irqchip/arm-gic.h> | ||
47 | #include <video/sh_mobile_lcdc.h> | ||
48 | #include <video/sh_mipi_dsi.h> | ||
49 | #include <sound/sh_fsi.h> | ||
50 | #include <mach/hardware.h> | ||
51 | #include <mach/irqs.h> | ||
52 | #include <mach/sh73a0.h> | ||
53 | #include <mach/common.h> | ||
54 | #include <asm/mach-types.h> | ||
55 | #include <asm/mach/arch.h> | ||
56 | #include <asm/hardware/cache-l2x0.h> | ||
57 | #include <asm/traps.h> | ||
58 | |||
59 | /* Dummy supplies, where voltage doesn't matter */ | ||
60 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
61 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
62 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
63 | }; | ||
64 | |||
65 | static struct resource smsc9220_resources[] = { | ||
66 | [0] = { | ||
67 | .start = 0x14000000, | ||
68 | .end = 0x14000000 + SZ_64K - 1, | ||
69 | .flags = IORESOURCE_MEM, | ||
70 | }, | ||
71 | [1] = { | ||
72 | .start = SH73A0_PINT0_IRQ(2), /* PINTA2 */ | ||
73 | .flags = IORESOURCE_IRQ, | ||
74 | }, | ||
75 | }; | ||
76 | |||
77 | static struct smsc911x_platform_config smsc9220_platdata = { | ||
78 | .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS, | ||
79 | .phy_interface = PHY_INTERFACE_MODE_MII, | ||
80 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
81 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, | ||
82 | }; | ||
83 | |||
84 | static struct platform_device eth_device = { | ||
85 | .name = "smsc911x", | ||
86 | .id = 0, | ||
87 | .dev = { | ||
88 | .platform_data = &smsc9220_platdata, | ||
89 | }, | ||
90 | .resource = smsc9220_resources, | ||
91 | .num_resources = ARRAY_SIZE(smsc9220_resources), | ||
92 | }; | ||
93 | |||
94 | static struct sh_keysc_info keysc_platdata = { | ||
95 | .mode = SH_KEYSC_MODE_6, | ||
96 | .scan_timing = 3, | ||
97 | .delay = 100, | ||
98 | .keycodes = { | ||
99 | KEY_A, KEY_B, KEY_C, KEY_D, KEY_E, KEY_F, KEY_G, | ||
100 | KEY_H, KEY_I, KEY_J, KEY_K, KEY_L, KEY_M, KEY_N, | ||
101 | KEY_O, KEY_P, KEY_Q, KEY_R, KEY_S, KEY_T, KEY_U, | ||
102 | KEY_V, KEY_W, KEY_X, KEY_Y, KEY_Z, KEY_HOME, KEY_SLEEP, | ||
103 | KEY_SPACE, KEY_9, KEY_6, KEY_3, KEY_WAKEUP, KEY_RIGHT, \ | ||
104 | KEY_COFFEE, | ||
105 | KEY_0, KEY_8, KEY_5, KEY_2, KEY_DOWN, KEY_ENTER, KEY_UP, | ||
106 | KEY_KPASTERISK, KEY_7, KEY_4, KEY_1, KEY_STOP, KEY_LEFT, \ | ||
107 | KEY_COMPUTER, | ||
108 | }, | ||
109 | }; | ||
110 | |||
111 | static struct resource keysc_resources[] = { | ||
112 | [0] = { | ||
113 | .name = "KEYSC", | ||
114 | .start = 0xe61b0000, | ||
115 | .end = 0xe61b0098 - 1, | ||
116 | .flags = IORESOURCE_MEM, | ||
117 | }, | ||
118 | [1] = { | ||
119 | .start = gic_spi(71), | ||
120 | .flags = IORESOURCE_IRQ, | ||
121 | }, | ||
122 | }; | ||
123 | |||
124 | static struct platform_device keysc_device = { | ||
125 | .name = "sh_keysc", | ||
126 | .id = 0, | ||
127 | .num_resources = ARRAY_SIZE(keysc_resources), | ||
128 | .resource = keysc_resources, | ||
129 | .dev = { | ||
130 | .platform_data = &keysc_platdata, | ||
131 | }, | ||
132 | }; | ||
133 | |||
134 | /* FSI A */ | ||
135 | static struct resource fsi_resources[] = { | ||
136 | [0] = { | ||
137 | .name = "FSI", | ||
138 | .start = 0xEC230000, | ||
139 | .end = 0xEC230400 - 1, | ||
140 | .flags = IORESOURCE_MEM, | ||
141 | }, | ||
142 | [1] = { | ||
143 | .start = gic_spi(146), | ||
144 | .flags = IORESOURCE_IRQ, | ||
145 | }, | ||
146 | }; | ||
147 | |||
148 | static struct platform_device fsi_device = { | ||
149 | .name = "sh_fsi2", | ||
150 | .id = -1, | ||
151 | .num_resources = ARRAY_SIZE(fsi_resources), | ||
152 | .resource = fsi_resources, | ||
153 | }; | ||
154 | |||
155 | /* Fixed 1.8V regulator to be used by MMCIF */ | ||
156 | static struct regulator_consumer_supply fixed1v8_power_consumers[] = | ||
157 | { | ||
158 | REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"), | ||
159 | REGULATOR_SUPPLY("vqmmc", "sh_mmcif.0"), | ||
160 | }; | ||
161 | |||
162 | static struct resource sh_mmcif_resources[] = { | ||
163 | [0] = { | ||
164 | .name = "MMCIF", | ||
165 | .start = 0xe6bd0000, | ||
166 | .end = 0xe6bd00ff, | ||
167 | .flags = IORESOURCE_MEM, | ||
168 | }, | ||
169 | [1] = { | ||
170 | .start = gic_spi(141), | ||
171 | .flags = IORESOURCE_IRQ, | ||
172 | }, | ||
173 | [2] = { | ||
174 | .start = gic_spi(140), | ||
175 | .flags = IORESOURCE_IRQ, | ||
176 | }, | ||
177 | }; | ||
178 | |||
179 | static struct sh_mmcif_plat_data sh_mmcif_platdata = { | ||
180 | .sup_pclk = 0, | ||
181 | .ocr = MMC_VDD_165_195, | ||
182 | .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE, | ||
183 | .slave_id_tx = SHDMA_SLAVE_MMCIF_TX, | ||
184 | .slave_id_rx = SHDMA_SLAVE_MMCIF_RX, | ||
185 | }; | ||
186 | |||
187 | static struct platform_device mmc_device = { | ||
188 | .name = "sh_mmcif", | ||
189 | .id = 0, | ||
190 | .dev = { | ||
191 | .dma_mask = NULL, | ||
192 | .coherent_dma_mask = 0xffffffff, | ||
193 | .platform_data = &sh_mmcif_platdata, | ||
194 | }, | ||
195 | .num_resources = ARRAY_SIZE(sh_mmcif_resources), | ||
196 | .resource = sh_mmcif_resources, | ||
197 | }; | ||
198 | |||
199 | /* IrDA */ | ||
200 | static struct resource irda_resources[] = { | ||
201 | [0] = { | ||
202 | .start = 0xE6D00000, | ||
203 | .end = 0xE6D01FD4 - 1, | ||
204 | .flags = IORESOURCE_MEM, | ||
205 | }, | ||
206 | [1] = { | ||
207 | .start = gic_spi(95), | ||
208 | .flags = IORESOURCE_IRQ, | ||
209 | }, | ||
210 | }; | ||
211 | |||
212 | static struct platform_device irda_device = { | ||
213 | .name = "sh_irda", | ||
214 | .id = 0, | ||
215 | .resource = irda_resources, | ||
216 | .num_resources = ARRAY_SIZE(irda_resources), | ||
217 | }; | ||
218 | |||
219 | /* MIPI-DSI */ | ||
220 | static struct resource mipidsi0_resources[] = { | ||
221 | [0] = { | ||
222 | .name = "DSI0", | ||
223 | .start = 0xfeab0000, | ||
224 | .end = 0xfeab3fff, | ||
225 | .flags = IORESOURCE_MEM, | ||
226 | }, | ||
227 | [1] = { | ||
228 | .name = "DSI0", | ||
229 | .start = 0xfeab4000, | ||
230 | .end = 0xfeab7fff, | ||
231 | .flags = IORESOURCE_MEM, | ||
232 | }, | ||
233 | }; | ||
234 | |||
235 | static int sh_mipi_set_dot_clock(struct platform_device *pdev, | ||
236 | void __iomem *base, | ||
237 | int enable) | ||
238 | { | ||
239 | struct clk *pck, *phy; | ||
240 | int ret; | ||
241 | |||
242 | pck = clk_get(&pdev->dev, "dsip_clk"); | ||
243 | if (IS_ERR(pck)) { | ||
244 | ret = PTR_ERR(pck); | ||
245 | goto sh_mipi_set_dot_clock_pck_err; | ||
246 | } | ||
247 | |||
248 | phy = clk_get(&pdev->dev, "dsiphy_clk"); | ||
249 | if (IS_ERR(phy)) { | ||
250 | ret = PTR_ERR(phy); | ||
251 | goto sh_mipi_set_dot_clock_phy_err; | ||
252 | } | ||
253 | |||
254 | if (enable) { | ||
255 | clk_set_rate(pck, clk_round_rate(pck, 24000000)); | ||
256 | clk_set_rate(phy, clk_round_rate(pck, 510000000)); | ||
257 | clk_enable(pck); | ||
258 | clk_enable(phy); | ||
259 | } else { | ||
260 | clk_disable(pck); | ||
261 | clk_disable(phy); | ||
262 | } | ||
263 | |||
264 | ret = 0; | ||
265 | |||
266 | clk_put(phy); | ||
267 | sh_mipi_set_dot_clock_phy_err: | ||
268 | clk_put(pck); | ||
269 | sh_mipi_set_dot_clock_pck_err: | ||
270 | return ret; | ||
271 | } | ||
272 | |||
273 | static struct sh_mipi_dsi_info mipidsi0_info = { | ||
274 | .data_format = MIPI_RGB888, | ||
275 | .channel = LCDC_CHAN_MAINLCD, | ||
276 | .lane = 2, | ||
277 | .vsynw_offset = 20, | ||
278 | .clksrc = 1, | ||
279 | .flags = SH_MIPI_DSI_HSABM | | ||
280 | SH_MIPI_DSI_SYNC_PULSES_MODE | | ||
281 | SH_MIPI_DSI_HSbyteCLK, | ||
282 | .set_dot_clock = sh_mipi_set_dot_clock, | ||
283 | }; | ||
284 | |||
285 | static struct platform_device mipidsi0_device = { | ||
286 | .name = "sh-mipi-dsi", | ||
287 | .num_resources = ARRAY_SIZE(mipidsi0_resources), | ||
288 | .resource = mipidsi0_resources, | ||
289 | .id = 0, | ||
290 | .dev = { | ||
291 | .platform_data = &mipidsi0_info, | ||
292 | }, | ||
293 | }; | ||
294 | |||
295 | /* LCDC0 and backlight */ | ||
296 | static const struct fb_videomode lcdc0_modes[] = { | ||
297 | { | ||
298 | .name = "R63302(QHD)", | ||
299 | .xres = 544, | ||
300 | .yres = 961, | ||
301 | .left_margin = 72, | ||
302 | .right_margin = 600, | ||
303 | .hsync_len = 16, | ||
304 | .upper_margin = 8, | ||
305 | .lower_margin = 8, | ||
306 | .vsync_len = 2, | ||
307 | .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT, | ||
308 | }, | ||
309 | }; | ||
310 | |||
311 | static struct sh_mobile_lcdc_info lcdc0_info = { | ||
312 | .clock_source = LCDC_CLK_PERIPHERAL, | ||
313 | .ch[0] = { | ||
314 | .chan = LCDC_CHAN_MAINLCD, | ||
315 | .interface_type = RGB24, | ||
316 | .clock_divider = 1, | ||
317 | .flags = LCDC_FLAGS_DWPOL, | ||
318 | .fourcc = V4L2_PIX_FMT_RGB565, | ||
319 | .lcd_modes = lcdc0_modes, | ||
320 | .num_modes = ARRAY_SIZE(lcdc0_modes), | ||
321 | .panel_cfg = { | ||
322 | .width = 44, | ||
323 | .height = 79, | ||
324 | }, | ||
325 | .tx_dev = &mipidsi0_device, | ||
326 | } | ||
327 | }; | ||
328 | |||
329 | static struct resource lcdc0_resources[] = { | ||
330 | [0] = { | ||
331 | .name = "LCDC0", | ||
332 | .start = 0xfe940000, /* P4-only space */ | ||
333 | .end = 0xfe943fff, | ||
334 | .flags = IORESOURCE_MEM, | ||
335 | }, | ||
336 | [1] = { | ||
337 | .start = intcs_evt2irq(0x580), | ||
338 | .flags = IORESOURCE_IRQ, | ||
339 | }, | ||
340 | }; | ||
341 | |||
342 | static struct platform_device lcdc0_device = { | ||
343 | .name = "sh_mobile_lcdc_fb", | ||
344 | .num_resources = ARRAY_SIZE(lcdc0_resources), | ||
345 | .resource = lcdc0_resources, | ||
346 | .id = 0, | ||
347 | .dev = { | ||
348 | .platform_data = &lcdc0_info, | ||
349 | .coherent_dma_mask = ~0, | ||
350 | }, | ||
351 | }; | ||
352 | |||
353 | static struct bd6107_platform_data backlight_data = { | ||
354 | .fbdev = &lcdc0_device.dev, | ||
355 | .reset = 235, | ||
356 | .def_value = 0, | ||
357 | }; | ||
358 | |||
359 | static struct i2c_board_info backlight_board_info = { | ||
360 | I2C_BOARD_INFO("bd6107", 0x6d), | ||
361 | .platform_data = &backlight_data, | ||
362 | }; | ||
363 | |||
364 | /* Fixed 2.8V regulators to be used by SDHI0 */ | ||
365 | static struct regulator_consumer_supply fixed2v8_power_consumers[] = | ||
366 | { | ||
367 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"), | ||
368 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"), | ||
369 | }; | ||
370 | |||
371 | /* SDHI0 */ | ||
372 | static struct sh_mobile_sdhi_info sdhi0_info = { | ||
373 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, | ||
374 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, | ||
375 | .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD, | ||
376 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, | ||
377 | .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, | ||
378 | .cd_gpio = 251, | ||
379 | }; | ||
380 | |||
381 | static struct resource sdhi0_resources[] = { | ||
382 | [0] = { | ||
383 | .name = "SDHI0", | ||
384 | .start = 0xee100000, | ||
385 | .end = 0xee1000ff, | ||
386 | .flags = IORESOURCE_MEM, | ||
387 | }, | ||
388 | [1] = { | ||
389 | .name = SH_MOBILE_SDHI_IRQ_CARD_DETECT, | ||
390 | .start = gic_spi(83), | ||
391 | .flags = IORESOURCE_IRQ, | ||
392 | }, | ||
393 | [2] = { | ||
394 | .name = SH_MOBILE_SDHI_IRQ_SDCARD, | ||
395 | .start = gic_spi(84), | ||
396 | .flags = IORESOURCE_IRQ, | ||
397 | }, | ||
398 | [3] = { | ||
399 | .name = SH_MOBILE_SDHI_IRQ_SDIO, | ||
400 | .start = gic_spi(85), | ||
401 | .flags = IORESOURCE_IRQ, | ||
402 | }, | ||
403 | }; | ||
404 | |||
405 | static struct platform_device sdhi0_device = { | ||
406 | .name = "sh_mobile_sdhi", | ||
407 | .id = 0, | ||
408 | .num_resources = ARRAY_SIZE(sdhi0_resources), | ||
409 | .resource = sdhi0_resources, | ||
410 | .dev = { | ||
411 | .platform_data = &sdhi0_info, | ||
412 | }, | ||
413 | }; | ||
414 | |||
415 | /* Fixed 3.3V regulator to be used by SDHI1 */ | ||
416 | static struct regulator_consumer_supply cn4_power_consumers[] = | ||
417 | { | ||
418 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"), | ||
419 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"), | ||
420 | }; | ||
421 | |||
422 | static struct regulator_init_data cn4_power_init_data = { | ||
423 | .constraints = { | ||
424 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
425 | }, | ||
426 | .num_consumer_supplies = ARRAY_SIZE(cn4_power_consumers), | ||
427 | .consumer_supplies = cn4_power_consumers, | ||
428 | }; | ||
429 | |||
430 | static struct fixed_voltage_config cn4_power_info = { | ||
431 | .supply_name = "CN4 SD/MMC Vdd", | ||
432 | .microvolts = 3300000, | ||
433 | .gpio = 114, | ||
434 | .enable_high = 1, | ||
435 | .init_data = &cn4_power_init_data, | ||
436 | }; | ||
437 | |||
438 | static struct platform_device cn4_power = { | ||
439 | .name = "reg-fixed-voltage", | ||
440 | .id = 2, | ||
441 | .dev = { | ||
442 | .platform_data = &cn4_power_info, | ||
443 | }, | ||
444 | }; | ||
445 | |||
446 | static void ag5evm_sdhi1_set_pwr(struct platform_device *pdev, int state) | ||
447 | { | ||
448 | static int power_gpio = -EINVAL; | ||
449 | |||
450 | if (power_gpio < 0) { | ||
451 | int ret = gpio_request_one(114, GPIOF_OUT_INIT_LOW, | ||
452 | "sdhi1_power"); | ||
453 | if (!ret) | ||
454 | power_gpio = 114; | ||
455 | } | ||
456 | |||
457 | /* | ||
458 | * If requesting the GPIO above failed, it means, that the regulator got | ||
459 | * probed and grabbed the GPIO, but we don't know, whether the sdhi | ||
460 | * driver already uses the regulator. If it doesn't, we have to toggle | ||
461 | * the GPIO ourselves, even though it is now owned by the fixed | ||
462 | * regulator driver. We have to live with the race in case the driver | ||
463 | * gets unloaded and the GPIO freed between these two steps. | ||
464 | */ | ||
465 | gpio_set_value(114, state); | ||
466 | } | ||
467 | |||
468 | static struct sh_mobile_sdhi_info sh_sdhi1_info = { | ||
469 | .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT, | ||
470 | .tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ, | ||
471 | .tmio_ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | ||
472 | .set_pwr = ag5evm_sdhi1_set_pwr, | ||
473 | }; | ||
474 | |||
475 | static struct resource sdhi1_resources[] = { | ||
476 | [0] = { | ||
477 | .name = "SDHI1", | ||
478 | .start = 0xee120000, | ||
479 | .end = 0xee1200ff, | ||
480 | .flags = IORESOURCE_MEM, | ||
481 | }, | ||
482 | [1] = { | ||
483 | .name = SH_MOBILE_SDHI_IRQ_CARD_DETECT, | ||
484 | .start = gic_spi(87), | ||
485 | .flags = IORESOURCE_IRQ, | ||
486 | }, | ||
487 | [2] = { | ||
488 | .name = SH_MOBILE_SDHI_IRQ_SDCARD, | ||
489 | .start = gic_spi(88), | ||
490 | .flags = IORESOURCE_IRQ, | ||
491 | }, | ||
492 | [3] = { | ||
493 | .name = SH_MOBILE_SDHI_IRQ_SDIO, | ||
494 | .start = gic_spi(89), | ||
495 | .flags = IORESOURCE_IRQ, | ||
496 | }, | ||
497 | }; | ||
498 | |||
499 | static struct platform_device sdhi1_device = { | ||
500 | .name = "sh_mobile_sdhi", | ||
501 | .id = 1, | ||
502 | .dev = { | ||
503 | .platform_data = &sh_sdhi1_info, | ||
504 | }, | ||
505 | .num_resources = ARRAY_SIZE(sdhi1_resources), | ||
506 | .resource = sdhi1_resources, | ||
507 | }; | ||
508 | |||
509 | static struct platform_device *ag5evm_devices[] __initdata = { | ||
510 | &cn4_power, | ||
511 | ð_device, | ||
512 | &keysc_device, | ||
513 | &fsi_device, | ||
514 | &mmc_device, | ||
515 | &irda_device, | ||
516 | &mipidsi0_device, | ||
517 | &lcdc0_device, | ||
518 | &sdhi0_device, | ||
519 | &sdhi1_device, | ||
520 | }; | ||
521 | |||
522 | static unsigned long pin_pullup_conf[] = { | ||
523 | PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_UP, 0), | ||
524 | }; | ||
525 | |||
526 | static const struct pinctrl_map ag5evm_pinctrl_map[] = { | ||
527 | /* FSIA */ | ||
528 | PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2.0", "pfc-sh73a0", | ||
529 | "fsia_mclk_in", "fsia"), | ||
530 | PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2.0", "pfc-sh73a0", | ||
531 | "fsia_sclk_in", "fsia"), | ||
532 | PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2.0", "pfc-sh73a0", | ||
533 | "fsia_data_in", "fsia"), | ||
534 | PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2.0", "pfc-sh73a0", | ||
535 | "fsia_data_out", "fsia"), | ||
536 | /* I2C2 & I2C3 */ | ||
537 | PIN_MAP_MUX_GROUP_DEFAULT("i2c-sh_mobile.2", "pfc-sh73a0", | ||
538 | "i2c2_0", "i2c2"), | ||
539 | PIN_MAP_MUX_GROUP_DEFAULT("i2c-sh_mobile.3", "pfc-sh73a0", | ||
540 | "i2c3_0", "i2c3"), | ||
541 | /* IrDA */ | ||
542 | PIN_MAP_MUX_GROUP_DEFAULT("sh_irda.0", "pfc-sh73a0", | ||
543 | "irda_0", "irda"), | ||
544 | /* KEYSC */ | ||
545 | PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0", | ||
546 | "keysc_in8", "keysc"), | ||
547 | PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0", | ||
548 | "keysc_out04", "keysc"), | ||
549 | PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0", | ||
550 | "keysc_out5", "keysc"), | ||
551 | PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0", | ||
552 | "keysc_out6_0", "keysc"), | ||
553 | PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0", | ||
554 | "keysc_out7_0", "keysc"), | ||
555 | PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0", | ||
556 | "keysc_out8_0", "keysc"), | ||
557 | PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0", | ||
558 | "keysc_out9_2", "keysc"), | ||
559 | PIN_MAP_CONFIGS_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0", | ||
560 | "keysc_in8", pin_pullup_conf), | ||
561 | /* MMCIF */ | ||
562 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-sh73a0", | ||
563 | "mmc0_data8_0", "mmc0"), | ||
564 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-sh73a0", | ||
565 | "mmc0_ctrl_0", "mmc0"), | ||
566 | PIN_MAP_CONFIGS_PIN_DEFAULT("sh_mmcif.0", "pfc-sh73a0", | ||
567 | "PORT279", pin_pullup_conf), | ||
568 | PIN_MAP_CONFIGS_GROUP_DEFAULT("sh_mmcif.0", "pfc-sh73a0", | ||
569 | "mmc0_data8_0", pin_pullup_conf), | ||
570 | /* SCIFA2 */ | ||
571 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.2", "pfc-sh73a0", | ||
572 | "scifa2_data_0", "scifa2"), | ||
573 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.2", "pfc-sh73a0", | ||
574 | "scifa2_ctrl_0", "scifa2"), | ||
575 | /* SDHI0 (CN15 [SD I/F]) */ | ||
576 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0", | ||
577 | "sdhi0_data4", "sdhi0"), | ||
578 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0", | ||
579 | "sdhi0_ctrl", "sdhi0"), | ||
580 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0", | ||
581 | "sdhi0_wp", "sdhi0"), | ||
582 | /* SDHI1 (CN4 [WLAN I/F]) */ | ||
583 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-sh73a0", | ||
584 | "sdhi1_data4", "sdhi1"), | ||
585 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-sh73a0", | ||
586 | "sdhi1_ctrl", "sdhi1"), | ||
587 | PIN_MAP_CONFIGS_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-sh73a0", | ||
588 | "sdhi1_data4", pin_pullup_conf), | ||
589 | PIN_MAP_CONFIGS_PIN_DEFAULT("sh_mobile_sdhi.1", "pfc-sh73a0", | ||
590 | "PORT263", pin_pullup_conf), | ||
591 | }; | ||
592 | |||
593 | static void __init ag5evm_init(void) | ||
594 | { | ||
595 | regulator_register_always_on(0, "fixed-1.8V", fixed1v8_power_consumers, | ||
596 | ARRAY_SIZE(fixed1v8_power_consumers), 1800000); | ||
597 | regulator_register_always_on(1, "fixed-2.8V", fixed2v8_power_consumers, | ||
598 | ARRAY_SIZE(fixed2v8_power_consumers), 3300000); | ||
599 | regulator_register_fixed(3, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
600 | |||
601 | pinctrl_register_mappings(ag5evm_pinctrl_map, | ||
602 | ARRAY_SIZE(ag5evm_pinctrl_map)); | ||
603 | sh73a0_pinmux_init(); | ||
604 | |||
605 | /* enable MMCIF */ | ||
606 | gpio_request_one(208, GPIOF_OUT_INIT_HIGH, NULL); /* Reset */ | ||
607 | |||
608 | /* enable SMSC911X */ | ||
609 | gpio_request_one(144, GPIOF_IN, NULL); /* PINTA2 */ | ||
610 | gpio_request_one(145, GPIOF_OUT_INIT_HIGH, NULL); /* RESET */ | ||
611 | |||
612 | /* LCD panel */ | ||
613 | gpio_request_one(217, GPIOF_OUT_INIT_LOW, NULL); /* RESET */ | ||
614 | mdelay(1); | ||
615 | gpio_set_value(217, 1); | ||
616 | mdelay(100); | ||
617 | |||
618 | |||
619 | #ifdef CONFIG_CACHE_L2X0 | ||
620 | /* Shared attribute override enable, 64K*8way */ | ||
621 | l2x0_init(IOMEM(0xf0100000), 0x00460000, 0xc2000fff); | ||
622 | #endif | ||
623 | sh73a0_add_standard_devices(); | ||
624 | |||
625 | i2c_register_board_info(1, &backlight_board_info, 1); | ||
626 | |||
627 | platform_add_devices(ag5evm_devices, ARRAY_SIZE(ag5evm_devices)); | ||
628 | } | ||
629 | |||
630 | MACHINE_START(AG5EVM, "ag5evm") | ||
631 | .smp = smp_ops(sh73a0_smp_ops), | ||
632 | .map_io = sh73a0_map_io, | ||
633 | .init_early = sh73a0_add_early_devices, | ||
634 | .nr_irqs = NR_IRQS_LEGACY, | ||
635 | .init_irq = sh73a0_init_irq, | ||
636 | .init_machine = ag5evm_init, | ||
637 | .init_late = shmobile_init_late, | ||
638 | .init_time = sh73a0_earlytimer_init, | ||
639 | MACHINE_END | ||