Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 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> |
Laurent Pinchart | b5012cd | 2013-01-03 12:54:28 +0100 | [diff] [blame] | 26 | #include <linux/pinctrl/machine.h> |
Laurent Pinchart | a1fedc4 | 2013-03-13 03:52:31 +0100 | [diff] [blame] | 27 | #include <linux/pinctrl/pinconf-generic.h> |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 28 | #include <linux/platform_device.h> |
| 29 | #include <linux/delay.h> |
| 30 | #include <linux/io.h> |
| 31 | #include <linux/dma-mapping.h> |
Guennadi Liakhovetski | 6add969 | 2012-06-29 09:32:29 +0200 | [diff] [blame] | 32 | #include <linux/regulator/fixed.h> |
| 33 | #include <linux/regulator/machine.h> |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 34 | #include <linux/serial_sci.h> |
| 35 | #include <linux/smsc911x.h> |
| 36 | #include <linux/gpio.h> |
Paul Gortmaker | 04f47a0 | 2012-01-22 14:57:25 -0500 | [diff] [blame] | 37 | #include <linux/videodev2.h> |
Yoshii Takashi | 2d22d48 | 2010-11-19 13:15:46 +0000 | [diff] [blame] | 38 | #include <linux/input.h> |
| 39 | #include <linux/input/sh_keysc.h> |
Takashi YOSHII | 6bf45a10 | 2010-12-22 06:35:30 +0000 | [diff] [blame] | 40 | #include <linux/mmc/host.h> |
| 41 | #include <linux/mmc/sh_mmcif.h> |
Magnus Damm | fb66c52 | 2011-05-23 05:10:36 +0000 | [diff] [blame] | 42 | #include <linux/mmc/sh_mobile_sdhi.h> |
| 43 | #include <linux/mfd/tmio.h> |
Magnus Damm | 170c7ab | 2011-01-20 08:41:03 +0000 | [diff] [blame] | 44 | #include <linux/sh_clk.h> |
Rob Herring | 520f7bd | 2012-12-27 13:10:24 -0600 | [diff] [blame] | 45 | #include <linux/irqchip/arm-gic.h> |
Magnus Damm | 170c7ab | 2011-01-20 08:41:03 +0000 | [diff] [blame] | 46 | #include <video/sh_mobile_lcdc.h> |
| 47 | #include <video/sh_mipi_dsi.h> |
Kuninori Morimoto | 208c7dc | 2010-11-29 02:10:08 +0000 | [diff] [blame] | 48 | #include <sound/sh_fsi.h> |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 49 | #include <mach/hardware.h> |
Rob Herring | 250a272 | 2012-01-03 16:57:33 -0600 | [diff] [blame] | 50 | #include <mach/irqs.h> |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 51 | #include <mach/sh73a0.h> |
| 52 | #include <mach/common.h> |
| 53 | #include <asm/mach-types.h> |
| 54 | #include <asm/mach/arch.h> |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 55 | #include <asm/hardware/cache-l2x0.h> |
| 56 | #include <asm/traps.h> |
| 57 | |
Guennadi Liakhovetski | 6add969 | 2012-06-29 09:32:29 +0200 | [diff] [blame] | 58 | /* Dummy supplies, where voltage doesn't matter */ |
| 59 | static struct regulator_consumer_supply dummy_supplies[] = { |
| 60 | REGULATOR_SUPPLY("vddvario", "smsc911x"), |
| 61 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), |
| 62 | }; |
| 63 | |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 64 | static struct resource smsc9220_resources[] = { |
| 65 | [0] = { |
| 66 | .start = 0x14000000, |
| 67 | .end = 0x14000000 + SZ_64K - 1, |
| 68 | .flags = IORESOURCE_MEM, |
| 69 | }, |
| 70 | [1] = { |
Magnus Damm | 566aad3 | 2011-10-17 18:00:52 +0900 | [diff] [blame] | 71 | .start = SH73A0_PINT0_IRQ(2), /* PINTA2 */ |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 72 | .flags = IORESOURCE_IRQ, |
| 73 | }, |
| 74 | }; |
| 75 | |
| 76 | static struct smsc911x_platform_config smsc9220_platdata = { |
| 77 | .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS, |
| 78 | .phy_interface = PHY_INTERFACE_MODE_MII, |
| 79 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, |
| 80 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, |
| 81 | }; |
| 82 | |
| 83 | static struct platform_device eth_device = { |
| 84 | .name = "smsc911x", |
| 85 | .id = 0, |
| 86 | .dev = { |
| 87 | .platform_data = &smsc9220_platdata, |
| 88 | }, |
| 89 | .resource = smsc9220_resources, |
| 90 | .num_resources = ARRAY_SIZE(smsc9220_resources), |
| 91 | }; |
| 92 | |
Yoshii Takashi | 2d22d48 | 2010-11-19 13:15:46 +0000 | [diff] [blame] | 93 | static struct sh_keysc_info keysc_platdata = { |
| 94 | .mode = SH_KEYSC_MODE_6, |
| 95 | .scan_timing = 3, |
| 96 | .delay = 100, |
| 97 | .keycodes = { |
| 98 | KEY_A, KEY_B, KEY_C, KEY_D, KEY_E, KEY_F, KEY_G, |
| 99 | KEY_H, KEY_I, KEY_J, KEY_K, KEY_L, KEY_M, KEY_N, |
| 100 | KEY_O, KEY_P, KEY_Q, KEY_R, KEY_S, KEY_T, KEY_U, |
| 101 | KEY_V, KEY_W, KEY_X, KEY_Y, KEY_Z, KEY_HOME, KEY_SLEEP, |
| 102 | KEY_SPACE, KEY_9, KEY_6, KEY_3, KEY_WAKEUP, KEY_RIGHT, \ |
| 103 | KEY_COFFEE, |
| 104 | KEY_0, KEY_8, KEY_5, KEY_2, KEY_DOWN, KEY_ENTER, KEY_UP, |
| 105 | KEY_KPASTERISK, KEY_7, KEY_4, KEY_1, KEY_STOP, KEY_LEFT, \ |
| 106 | KEY_COMPUTER, |
| 107 | }, |
| 108 | }; |
| 109 | |
| 110 | static struct resource keysc_resources[] = { |
| 111 | [0] = { |
| 112 | .name = "KEYSC", |
| 113 | .start = 0xe61b0000, |
| 114 | .end = 0xe61b0098 - 1, |
| 115 | .flags = IORESOURCE_MEM, |
| 116 | }, |
| 117 | [1] = { |
| 118 | .start = gic_spi(71), |
| 119 | .flags = IORESOURCE_IRQ, |
| 120 | }, |
| 121 | }; |
| 122 | |
| 123 | static struct platform_device keysc_device = { |
| 124 | .name = "sh_keysc", |
| 125 | .id = 0, |
| 126 | .num_resources = ARRAY_SIZE(keysc_resources), |
| 127 | .resource = keysc_resources, |
| 128 | .dev = { |
| 129 | .platform_data = &keysc_platdata, |
| 130 | }, |
| 131 | }; |
| 132 | |
Kuninori Morimoto | 208c7dc | 2010-11-29 02:10:08 +0000 | [diff] [blame] | 133 | /* FSI A */ |
Kuninori Morimoto | 208c7dc | 2010-11-29 02:10:08 +0000 | [diff] [blame] | 134 | static struct resource fsi_resources[] = { |
| 135 | [0] = { |
| 136 | .name = "FSI", |
| 137 | .start = 0xEC230000, |
| 138 | .end = 0xEC230400 - 1, |
| 139 | .flags = IORESOURCE_MEM, |
| 140 | }, |
| 141 | [1] = { |
| 142 | .start = gic_spi(146), |
| 143 | .flags = IORESOURCE_IRQ, |
| 144 | }, |
| 145 | }; |
| 146 | |
| 147 | static struct platform_device fsi_device = { |
| 148 | .name = "sh_fsi2", |
| 149 | .id = -1, |
| 150 | .num_resources = ARRAY_SIZE(fsi_resources), |
| 151 | .resource = fsi_resources, |
Kuninori Morimoto | 208c7dc | 2010-11-29 02:10:08 +0000 | [diff] [blame] | 152 | }; |
| 153 | |
Guennadi Liakhovetski | 6add969 | 2012-06-29 09:32:29 +0200 | [diff] [blame] | 154 | /* Fixed 1.8V regulator to be used by MMCIF */ |
| 155 | static struct regulator_consumer_supply fixed1v8_power_consumers[] = |
| 156 | { |
| 157 | REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"), |
| 158 | REGULATOR_SUPPLY("vqmmc", "sh_mmcif.0"), |
| 159 | }; |
| 160 | |
Takashi YOSHII | 6bf45a10 | 2010-12-22 06:35:30 +0000 | [diff] [blame] | 161 | static struct resource sh_mmcif_resources[] = { |
| 162 | [0] = { |
| 163 | .name = "MMCIF", |
| 164 | .start = 0xe6bd0000, |
| 165 | .end = 0xe6bd00ff, |
| 166 | .flags = IORESOURCE_MEM, |
| 167 | }, |
| 168 | [1] = { |
| 169 | .start = gic_spi(141), |
| 170 | .flags = IORESOURCE_IRQ, |
| 171 | }, |
| 172 | [2] = { |
| 173 | .start = gic_spi(140), |
| 174 | .flags = IORESOURCE_IRQ, |
| 175 | }, |
| 176 | }; |
| 177 | |
| 178 | static struct sh_mmcif_plat_data sh_mmcif_platdata = { |
| 179 | .sup_pclk = 0, |
| 180 | .ocr = MMC_VDD_165_195, |
| 181 | .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE, |
Guennadi Liakhovetski | d5bb386 | 2011-08-30 18:26:44 +0200 | [diff] [blame] | 182 | .slave_id_tx = SHDMA_SLAVE_MMCIF_TX, |
| 183 | .slave_id_rx = SHDMA_SLAVE_MMCIF_RX, |
Takashi YOSHII | 6bf45a10 | 2010-12-22 06:35:30 +0000 | [diff] [blame] | 184 | }; |
| 185 | |
| 186 | static struct platform_device mmc_device = { |
| 187 | .name = "sh_mmcif", |
| 188 | .id = 0, |
| 189 | .dev = { |
| 190 | .dma_mask = NULL, |
| 191 | .coherent_dma_mask = 0xffffffff, |
| 192 | .platform_data = &sh_mmcif_platdata, |
| 193 | }, |
| 194 | .num_resources = ARRAY_SIZE(sh_mmcif_resources), |
| 195 | .resource = sh_mmcif_resources, |
| 196 | }; |
| 197 | |
Kuninori Morimoto | a33bb8a | 2011-01-14 11:00:41 +0000 | [diff] [blame] | 198 | /* IrDA */ |
| 199 | static struct resource irda_resources[] = { |
| 200 | [0] = { |
| 201 | .start = 0xE6D00000, |
| 202 | .end = 0xE6D01FD4 - 1, |
| 203 | .flags = IORESOURCE_MEM, |
| 204 | }, |
| 205 | [1] = { |
| 206 | .start = gic_spi(95), |
| 207 | .flags = IORESOURCE_IRQ, |
| 208 | }, |
| 209 | }; |
| 210 | |
| 211 | static struct platform_device irda_device = { |
| 212 | .name = "sh_irda", |
| 213 | .id = 0, |
| 214 | .resource = irda_resources, |
| 215 | .num_resources = ARRAY_SIZE(irda_resources), |
| 216 | }; |
| 217 | |
Laurent Pinchart | 7a4fcf9 | 2012-08-13 16:11:32 +0200 | [diff] [blame] | 218 | /* MIPI-DSI */ |
| 219 | static struct resource mipidsi0_resources[] = { |
| 220 | [0] = { |
| 221 | .name = "DSI0", |
| 222 | .start = 0xfeab0000, |
| 223 | .end = 0xfeab3fff, |
| 224 | .flags = IORESOURCE_MEM, |
| 225 | }, |
| 226 | [1] = { |
| 227 | .name = "DSI0", |
| 228 | .start = 0xfeab4000, |
| 229 | .end = 0xfeab7fff, |
| 230 | .flags = IORESOURCE_MEM, |
| 231 | }, |
| 232 | }; |
| 233 | |
| 234 | static int sh_mipi_set_dot_clock(struct platform_device *pdev, |
| 235 | void __iomem *base, |
| 236 | int enable) |
| 237 | { |
| 238 | struct clk *pck, *phy; |
| 239 | int ret; |
| 240 | |
| 241 | pck = clk_get(&pdev->dev, "dsip_clk"); |
| 242 | if (IS_ERR(pck)) { |
| 243 | ret = PTR_ERR(pck); |
| 244 | goto sh_mipi_set_dot_clock_pck_err; |
| 245 | } |
| 246 | |
| 247 | phy = clk_get(&pdev->dev, "dsiphy_clk"); |
| 248 | if (IS_ERR(phy)) { |
| 249 | ret = PTR_ERR(phy); |
| 250 | goto sh_mipi_set_dot_clock_phy_err; |
| 251 | } |
| 252 | |
| 253 | if (enable) { |
| 254 | clk_set_rate(pck, clk_round_rate(pck, 24000000)); |
| 255 | clk_set_rate(phy, clk_round_rate(pck, 510000000)); |
| 256 | clk_enable(pck); |
| 257 | clk_enable(phy); |
| 258 | } else { |
| 259 | clk_disable(pck); |
| 260 | clk_disable(phy); |
| 261 | } |
| 262 | |
| 263 | ret = 0; |
| 264 | |
| 265 | clk_put(phy); |
| 266 | sh_mipi_set_dot_clock_phy_err: |
| 267 | clk_put(pck); |
| 268 | sh_mipi_set_dot_clock_pck_err: |
| 269 | return ret; |
| 270 | } |
| 271 | |
Laurent Pinchart | 7a4fcf9 | 2012-08-13 16:11:32 +0200 | [diff] [blame] | 272 | static struct sh_mipi_dsi_info mipidsi0_info = { |
| 273 | .data_format = MIPI_RGB888, |
Laurent Pinchart | 772f5d1 | 2012-08-14 12:21:17 +0200 | [diff] [blame] | 274 | .channel = LCDC_CHAN_MAINLCD, |
Laurent Pinchart | 7a4fcf9 | 2012-08-13 16:11:32 +0200 | [diff] [blame] | 275 | .lane = 2, |
| 276 | .vsynw_offset = 20, |
| 277 | .clksrc = 1, |
| 278 | .flags = SH_MIPI_DSI_HSABM | |
| 279 | SH_MIPI_DSI_SYNC_PULSES_MODE | |
| 280 | SH_MIPI_DSI_HSbyteCLK, |
| 281 | .set_dot_clock = sh_mipi_set_dot_clock, |
| 282 | }; |
| 283 | |
| 284 | static struct platform_device mipidsi0_device = { |
| 285 | .name = "sh-mipi-dsi", |
| 286 | .num_resources = ARRAY_SIZE(mipidsi0_resources), |
| 287 | .resource = mipidsi0_resources, |
| 288 | .id = 0, |
| 289 | .dev = { |
| 290 | .platform_data = &mipidsi0_info, |
| 291 | }, |
| 292 | }; |
| 293 | |
Magnus Damm | 170c7ab | 2011-01-20 08:41:03 +0000 | [diff] [blame] | 294 | static unsigned char lcd_backlight_seq[3][2] = { |
| 295 | { 0x04, 0x07 }, |
| 296 | { 0x23, 0x80 }, |
| 297 | { 0x03, 0x01 }, |
| 298 | }; |
| 299 | |
Laurent Pinchart | 37f4dd1 | 2012-08-15 18:25:27 +0200 | [diff] [blame] | 300 | static int lcd_backlight_set_brightness(int brightness) |
Magnus Damm | 170c7ab | 2011-01-20 08:41:03 +0000 | [diff] [blame] | 301 | { |
Laurent Pinchart | 37f4dd1 | 2012-08-15 18:25:27 +0200 | [diff] [blame] | 302 | struct i2c_adapter *adap; |
Magnus Damm | 170c7ab | 2011-01-20 08:41:03 +0000 | [diff] [blame] | 303 | struct i2c_msg msg; |
Laurent Pinchart | 37f4dd1 | 2012-08-15 18:25:27 +0200 | [diff] [blame] | 304 | unsigned int i; |
| 305 | int ret; |
Magnus Damm | 170c7ab | 2011-01-20 08:41:03 +0000 | [diff] [blame] | 306 | |
Laurent Pinchart | 37f4dd1 | 2012-08-15 18:25:27 +0200 | [diff] [blame] | 307 | if (brightness == 0) { |
| 308 | /* Reset the chip */ |
Guennadi Liakhovetski | b58e5fa | 2013-02-12 16:50:02 +0100 | [diff] [blame] | 309 | gpio_set_value(235, 0); |
Laurent Pinchart | 37f4dd1 | 2012-08-15 18:25:27 +0200 | [diff] [blame] | 310 | mdelay(24); |
Guennadi Liakhovetski | b58e5fa | 2013-02-12 16:50:02 +0100 | [diff] [blame] | 311 | gpio_set_value(235, 1); |
Laurent Pinchart | 37f4dd1 | 2012-08-15 18:25:27 +0200 | [diff] [blame] | 312 | return 0; |
| 313 | } |
| 314 | |
| 315 | adap = i2c_get_adapter(1); |
| 316 | if (adap == NULL) |
| 317 | return -ENODEV; |
| 318 | |
| 319 | for (i = 0; i < ARRAY_SIZE(lcd_backlight_seq); i++) { |
Magnus Damm | 170c7ab | 2011-01-20 08:41:03 +0000 | [diff] [blame] | 320 | msg.addr = 0x6d; |
Laurent Pinchart | 37f4dd1 | 2012-08-15 18:25:27 +0200 | [diff] [blame] | 321 | msg.buf = &lcd_backlight_seq[i][0]; |
Magnus Damm | 170c7ab | 2011-01-20 08:41:03 +0000 | [diff] [blame] | 322 | msg.len = 2; |
| 323 | msg.flags = 0; |
Laurent Pinchart | 37f4dd1 | 2012-08-15 18:25:27 +0200 | [diff] [blame] | 324 | |
| 325 | ret = i2c_transfer(adap, &msg, 1); |
| 326 | if (ret < 0) |
Magnus Damm | 170c7ab | 2011-01-20 08:41:03 +0000 | [diff] [blame] | 327 | break; |
| 328 | } |
Magnus Damm | 170c7ab | 2011-01-20 08:41:03 +0000 | [diff] [blame] | 329 | |
Laurent Pinchart | 37f4dd1 | 2012-08-15 18:25:27 +0200 | [diff] [blame] | 330 | i2c_put_adapter(adap); |
| 331 | return ret < 0 ? ret : 0; |
Magnus Damm | 170c7ab | 2011-01-20 08:41:03 +0000 | [diff] [blame] | 332 | } |
| 333 | |
Magnus Damm | 170c7ab | 2011-01-20 08:41:03 +0000 | [diff] [blame] | 334 | /* LCDC0 */ |
| 335 | static const struct fb_videomode lcdc0_modes[] = { |
| 336 | { |
| 337 | .name = "R63302(QHD)", |
| 338 | .xres = 544, |
| 339 | .yres = 961, |
| 340 | .left_margin = 72, |
| 341 | .right_margin = 600, |
| 342 | .hsync_len = 16, |
| 343 | .upper_margin = 8, |
| 344 | .lower_margin = 8, |
| 345 | .vsync_len = 2, |
| 346 | .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT, |
| 347 | }, |
| 348 | }; |
| 349 | |
| 350 | static struct sh_mobile_lcdc_info lcdc0_info = { |
| 351 | .clock_source = LCDC_CLK_PERIPHERAL, |
| 352 | .ch[0] = { |
| 353 | .chan = LCDC_CHAN_MAINLCD, |
| 354 | .interface_type = RGB24, |
| 355 | .clock_divider = 1, |
| 356 | .flags = LCDC_FLAGS_DWPOL, |
Laurent Pinchart | edd153a | 2011-12-13 14:02:28 +0100 | [diff] [blame] | 357 | .fourcc = V4L2_PIX_FMT_RGB565, |
Laurent Pinchart | 93ff259 | 2011-11-29 14:33:41 +0100 | [diff] [blame] | 358 | .lcd_modes = lcdc0_modes, |
| 359 | .num_modes = ARRAY_SIZE(lcdc0_modes), |
Laurent Pinchart | afaad83 | 2011-09-11 22:59:04 +0200 | [diff] [blame] | 360 | .panel_cfg = { |
| 361 | .width = 44, |
| 362 | .height = 79, |
Laurent Pinchart | 37f4dd1 | 2012-08-15 18:25:27 +0200 | [diff] [blame] | 363 | }, |
| 364 | .bl_info = { |
| 365 | .name = "sh_mobile_lcdc_bl", |
| 366 | .max_brightness = 1, |
| 367 | .set_brightness = lcd_backlight_set_brightness, |
Magnus Damm | 170c7ab | 2011-01-20 08:41:03 +0000 | [diff] [blame] | 368 | }, |
Laurent Pinchart | 7a4fcf9 | 2012-08-13 16:11:32 +0200 | [diff] [blame] | 369 | .tx_dev = &mipidsi0_device, |
Magnus Damm | 170c7ab | 2011-01-20 08:41:03 +0000 | [diff] [blame] | 370 | } |
| 371 | }; |
| 372 | |
| 373 | static struct resource lcdc0_resources[] = { |
| 374 | [0] = { |
| 375 | .name = "LCDC0", |
| 376 | .start = 0xfe940000, /* P4-only space */ |
| 377 | .end = 0xfe943fff, |
| 378 | .flags = IORESOURCE_MEM, |
| 379 | }, |
| 380 | [1] = { |
| 381 | .start = intcs_evt2irq(0x580), |
| 382 | .flags = IORESOURCE_IRQ, |
| 383 | }, |
| 384 | }; |
| 385 | |
| 386 | static struct platform_device lcdc0_device = { |
| 387 | .name = "sh_mobile_lcdc_fb", |
| 388 | .num_resources = ARRAY_SIZE(lcdc0_resources), |
| 389 | .resource = lcdc0_resources, |
| 390 | .id = 0, |
| 391 | .dev = { |
| 392 | .platform_data = &lcdc0_info, |
| 393 | .coherent_dma_mask = ~0, |
| 394 | }, |
| 395 | }; |
| 396 | |
Guennadi Liakhovetski | 6add969 | 2012-06-29 09:32:29 +0200 | [diff] [blame] | 397 | /* Fixed 2.8V regulators to be used by SDHI0 */ |
| 398 | static struct regulator_consumer_supply fixed2v8_power_consumers[] = |
| 399 | { |
| 400 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"), |
| 401 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"), |
| 402 | }; |
| 403 | |
Magnus Damm | 3087b90 | 2011-10-12 16:21:50 +0900 | [diff] [blame] | 404 | /* SDHI0 */ |
Magnus Damm | fb66c52 | 2011-05-23 05:10:36 +0000 | [diff] [blame] | 405 | static struct sh_mobile_sdhi_info sdhi0_info = { |
Magnus Damm | 6820e69 | 2011-05-24 10:42:15 +0000 | [diff] [blame] | 406 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, |
| 407 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, |
Guennadi Liakhovetski | 173e2fe | 2012-04-16 23:09:19 +0200 | [diff] [blame] | 408 | .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD, |
Magnus Damm | fb66c52 | 2011-05-23 05:10:36 +0000 | [diff] [blame] | 409 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, |
| 410 | .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, |
Guennadi Liakhovetski | b58e5fa | 2013-02-12 16:50:02 +0100 | [diff] [blame] | 411 | .cd_gpio = 251, |
Magnus Damm | fb66c52 | 2011-05-23 05:10:36 +0000 | [diff] [blame] | 412 | }; |
| 413 | |
| 414 | static struct resource sdhi0_resources[] = { |
| 415 | [0] = { |
| 416 | .name = "SDHI0", |
| 417 | .start = 0xee100000, |
| 418 | .end = 0xee1000ff, |
| 419 | .flags = IORESOURCE_MEM, |
| 420 | }, |
| 421 | [1] = { |
Simon Horman | cb2ccc3 | 2011-08-25 10:27:28 +0900 | [diff] [blame] | 422 | .name = SH_MOBILE_SDHI_IRQ_CARD_DETECT, |
Magnus Damm | fb66c52 | 2011-05-23 05:10:36 +0000 | [diff] [blame] | 423 | .start = gic_spi(83), |
| 424 | .flags = IORESOURCE_IRQ, |
| 425 | }, |
| 426 | [2] = { |
Simon Horman | cb2ccc3 | 2011-08-25 10:27:28 +0900 | [diff] [blame] | 427 | .name = SH_MOBILE_SDHI_IRQ_SDCARD, |
Magnus Damm | fb66c52 | 2011-05-23 05:10:36 +0000 | [diff] [blame] | 428 | .start = gic_spi(84), |
| 429 | .flags = IORESOURCE_IRQ, |
| 430 | }, |
| 431 | [3] = { |
Simon Horman | cb2ccc3 | 2011-08-25 10:27:28 +0900 | [diff] [blame] | 432 | .name = SH_MOBILE_SDHI_IRQ_SDIO, |
Magnus Damm | fb66c52 | 2011-05-23 05:10:36 +0000 | [diff] [blame] | 433 | .start = gic_spi(85), |
| 434 | .flags = IORESOURCE_IRQ, |
| 435 | }, |
| 436 | }; |
| 437 | |
| 438 | static struct platform_device sdhi0_device = { |
| 439 | .name = "sh_mobile_sdhi", |
| 440 | .id = 0, |
| 441 | .num_resources = ARRAY_SIZE(sdhi0_resources), |
| 442 | .resource = sdhi0_resources, |
| 443 | .dev = { |
| 444 | .platform_data = &sdhi0_info, |
| 445 | }, |
| 446 | }; |
| 447 | |
Guennadi Liakhovetski | 6add969 | 2012-06-29 09:32:29 +0200 | [diff] [blame] | 448 | /* Fixed 3.3V regulator to be used by SDHI1 */ |
| 449 | static struct regulator_consumer_supply cn4_power_consumers[] = |
Magnus Damm | fb66c52 | 2011-05-23 05:10:36 +0000 | [diff] [blame] | 450 | { |
Guennadi Liakhovetski | 6add969 | 2012-06-29 09:32:29 +0200 | [diff] [blame] | 451 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"), |
| 452 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"), |
| 453 | }; |
| 454 | |
| 455 | static struct regulator_init_data cn4_power_init_data = { |
| 456 | .constraints = { |
| 457 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
| 458 | }, |
| 459 | .num_consumer_supplies = ARRAY_SIZE(cn4_power_consumers), |
| 460 | .consumer_supplies = cn4_power_consumers, |
| 461 | }; |
| 462 | |
| 463 | static struct fixed_voltage_config cn4_power_info = { |
| 464 | .supply_name = "CN4 SD/MMC Vdd", |
| 465 | .microvolts = 3300000, |
Guennadi Liakhovetski | b58e5fa | 2013-02-12 16:50:02 +0100 | [diff] [blame] | 466 | .gpio = 114, |
Guennadi Liakhovetski | 6add969 | 2012-06-29 09:32:29 +0200 | [diff] [blame] | 467 | .enable_high = 1, |
| 468 | .init_data = &cn4_power_init_data, |
| 469 | }; |
| 470 | |
| 471 | static struct platform_device cn4_power = { |
| 472 | .name = "reg-fixed-voltage", |
| 473 | .id = 2, |
| 474 | .dev = { |
| 475 | .platform_data = &cn4_power_info, |
| 476 | }, |
| 477 | }; |
| 478 | |
| 479 | static void ag5evm_sdhi1_set_pwr(struct platform_device *pdev, int state) |
| 480 | { |
| 481 | static int power_gpio = -EINVAL; |
| 482 | |
| 483 | if (power_gpio < 0) { |
Guennadi Liakhovetski | b58e5fa | 2013-02-12 16:50:02 +0100 | [diff] [blame] | 484 | int ret = gpio_request_one(114, GPIOF_OUT_INIT_LOW, |
Laurent Pinchart | f3347b7 | 2013-01-24 13:16:28 +0100 | [diff] [blame] | 485 | "sdhi1_power"); |
| 486 | if (!ret) |
Guennadi Liakhovetski | b58e5fa | 2013-02-12 16:50:02 +0100 | [diff] [blame] | 487 | power_gpio = 114; |
Guennadi Liakhovetski | 6add969 | 2012-06-29 09:32:29 +0200 | [diff] [blame] | 488 | } |
| 489 | |
| 490 | /* |
| 491 | * If requesting the GPIO above failed, it means, that the regulator got |
| 492 | * probed and grabbed the GPIO, but we don't know, whether the sdhi |
| 493 | * driver already uses the regulator. If it doesn't, we have to toggle |
| 494 | * the GPIO ourselves, even though it is now owned by the fixed |
| 495 | * regulator driver. We have to live with the race in case the driver |
| 496 | * gets unloaded and the GPIO freed between these two steps. |
| 497 | */ |
Guennadi Liakhovetski | b58e5fa | 2013-02-12 16:50:02 +0100 | [diff] [blame] | 498 | gpio_set_value(114, state); |
Magnus Damm | fb66c52 | 2011-05-23 05:10:36 +0000 | [diff] [blame] | 499 | } |
| 500 | |
Simon Horman | 9e05cdd | 2011-06-20 23:00:11 +0000 | [diff] [blame] | 501 | static struct sh_mobile_sdhi_info sh_sdhi1_info = { |
Simon Horman | c5ad48f | 2011-06-20 23:00:12 +0000 | [diff] [blame] | 502 | .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT, |
Magnus Damm | 5294206 | 2011-06-09 09:02:25 +0000 | [diff] [blame] | 503 | .tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ, |
Magnus Damm | fb66c52 | 2011-05-23 05:10:36 +0000 | [diff] [blame] | 504 | .tmio_ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
| 505 | .set_pwr = ag5evm_sdhi1_set_pwr, |
| 506 | }; |
| 507 | |
| 508 | static struct resource sdhi1_resources[] = { |
| 509 | [0] = { |
| 510 | .name = "SDHI1", |
| 511 | .start = 0xee120000, |
| 512 | .end = 0xee1200ff, |
| 513 | .flags = IORESOURCE_MEM, |
| 514 | }, |
| 515 | [1] = { |
Simon Horman | cb2ccc3 | 2011-08-25 10:27:28 +0900 | [diff] [blame] | 516 | .name = SH_MOBILE_SDHI_IRQ_CARD_DETECT, |
Magnus Damm | fb66c52 | 2011-05-23 05:10:36 +0000 | [diff] [blame] | 517 | .start = gic_spi(87), |
| 518 | .flags = IORESOURCE_IRQ, |
| 519 | }, |
| 520 | [2] = { |
Simon Horman | cb2ccc3 | 2011-08-25 10:27:28 +0900 | [diff] [blame] | 521 | .name = SH_MOBILE_SDHI_IRQ_SDCARD, |
Magnus Damm | fb66c52 | 2011-05-23 05:10:36 +0000 | [diff] [blame] | 522 | .start = gic_spi(88), |
| 523 | .flags = IORESOURCE_IRQ, |
| 524 | }, |
| 525 | [3] = { |
Simon Horman | cb2ccc3 | 2011-08-25 10:27:28 +0900 | [diff] [blame] | 526 | .name = SH_MOBILE_SDHI_IRQ_SDIO, |
Magnus Damm | fb66c52 | 2011-05-23 05:10:36 +0000 | [diff] [blame] | 527 | .start = gic_spi(89), |
| 528 | .flags = IORESOURCE_IRQ, |
| 529 | }, |
| 530 | }; |
| 531 | |
| 532 | static struct platform_device sdhi1_device = { |
| 533 | .name = "sh_mobile_sdhi", |
| 534 | .id = 1, |
| 535 | .dev = { |
Simon Horman | 9e05cdd | 2011-06-20 23:00:11 +0000 | [diff] [blame] | 536 | .platform_data = &sh_sdhi1_info, |
Magnus Damm | fb66c52 | 2011-05-23 05:10:36 +0000 | [diff] [blame] | 537 | }, |
| 538 | .num_resources = ARRAY_SIZE(sdhi1_resources), |
| 539 | .resource = sdhi1_resources, |
| 540 | }; |
| 541 | |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 542 | static struct platform_device *ag5evm_devices[] __initdata = { |
Guennadi Liakhovetski | 6add969 | 2012-06-29 09:32:29 +0200 | [diff] [blame] | 543 | &cn4_power, |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 544 | ð_device, |
Yoshii Takashi | 2d22d48 | 2010-11-19 13:15:46 +0000 | [diff] [blame] | 545 | &keysc_device, |
Kuninori Morimoto | 208c7dc | 2010-11-29 02:10:08 +0000 | [diff] [blame] | 546 | &fsi_device, |
Takashi YOSHII | 6bf45a10 | 2010-12-22 06:35:30 +0000 | [diff] [blame] | 547 | &mmc_device, |
Kuninori Morimoto | a33bb8a | 2011-01-14 11:00:41 +0000 | [diff] [blame] | 548 | &irda_device, |
Magnus Damm | 170c7ab | 2011-01-20 08:41:03 +0000 | [diff] [blame] | 549 | &mipidsi0_device, |
Laurent Pinchart | 7a4fcf9 | 2012-08-13 16:11:32 +0200 | [diff] [blame] | 550 | &lcdc0_device, |
Magnus Damm | fb66c52 | 2011-05-23 05:10:36 +0000 | [diff] [blame] | 551 | &sdhi0_device, |
| 552 | &sdhi1_device, |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 553 | }; |
| 554 | |
Laurent Pinchart | a1fedc4 | 2013-03-13 03:52:31 +0100 | [diff] [blame] | 555 | static unsigned long pin_pullup_conf[] = { |
| 556 | PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_UP, 0), |
| 557 | }; |
| 558 | |
Laurent Pinchart | b5012cd | 2013-01-03 12:54:28 +0100 | [diff] [blame] | 559 | static const struct pinctrl_map ag5evm_pinctrl_map[] = { |
Laurent Pinchart | 9723b79 | 2013-01-03 12:54:28 +0100 | [diff] [blame] | 560 | /* FSIA */ |
| 561 | PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2.0", "pfc-sh73a0", |
| 562 | "fsia_mclk_in", "fsia"), |
| 563 | PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2.0", "pfc-sh73a0", |
| 564 | "fsia_sclk_in", "fsia"), |
| 565 | PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2.0", "pfc-sh73a0", |
| 566 | "fsia_data_in", "fsia"), |
| 567 | PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2.0", "pfc-sh73a0", |
| 568 | "fsia_data_out", "fsia"), |
Laurent Pinchart | 63d6fc9 | 2013-01-03 12:54:28 +0100 | [diff] [blame] | 569 | /* I2C2 & I2C3 */ |
| 570 | PIN_MAP_MUX_GROUP_DEFAULT("i2c-sh_mobile.2", "pfc-sh73a0", |
| 571 | "i2c2_0", "i2c2"), |
| 572 | PIN_MAP_MUX_GROUP_DEFAULT("i2c-sh_mobile.3", "pfc-sh73a0", |
| 573 | "i2c3_0", "i2c3"), |
Laurent Pinchart | 2eaa074 | 2013-03-13 03:52:31 +0100 | [diff] [blame] | 574 | /* IrDA */ |
| 575 | PIN_MAP_MUX_GROUP_DEFAULT("sh_irda.0", "pfc-sh73a0", |
| 576 | "irda_0", "irda"), |
Laurent Pinchart | 7e6455e | 2013-03-13 03:52:31 +0100 | [diff] [blame] | 577 | /* KEYSC */ |
| 578 | PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0", |
| 579 | "keysc_in8", "keysc"), |
| 580 | PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0", |
| 581 | "keysc_out04", "keysc"), |
| 582 | PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0", |
| 583 | "keysc_out5", "keysc"), |
| 584 | PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0", |
| 585 | "keysc_out6_0", "keysc"), |
| 586 | PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0", |
| 587 | "keysc_out7_0", "keysc"), |
| 588 | PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0", |
| 589 | "keysc_out8_0", "keysc"), |
| 590 | PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0", |
| 591 | "keysc_out9_2", "keysc"), |
| 592 | PIN_MAP_CONFIGS_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0", |
| 593 | "keysc_in8", pin_pullup_conf), |
Laurent Pinchart | a1fedc4 | 2013-03-13 03:52:31 +0100 | [diff] [blame] | 594 | /* MMCIF */ |
| 595 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-sh73a0", |
| 596 | "mmc0_data8_0", "mmc0"), |
| 597 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-sh73a0", |
| 598 | "mmc0_ctrl_0", "mmc0"), |
| 599 | PIN_MAP_CONFIGS_PIN_DEFAULT("sh_mmcif.0", "pfc-sh73a0", |
| 600 | "PORT279", pin_pullup_conf), |
| 601 | PIN_MAP_CONFIGS_GROUP_DEFAULT("sh_mmcif.0", "pfc-sh73a0", |
| 602 | "mmc0_data8_0", pin_pullup_conf), |
Laurent Pinchart | b5012cd | 2013-01-03 12:54:28 +0100 | [diff] [blame] | 603 | /* SCIFA2 */ |
| 604 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.2", "pfc-sh73a0", |
| 605 | "scifa2_data_0", "scifa2"), |
| 606 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.2", "pfc-sh73a0", |
| 607 | "scifa2_ctrl_0", "scifa2"), |
Laurent Pinchart | a1fedc4 | 2013-03-13 03:52:31 +0100 | [diff] [blame] | 608 | /* SDHI0 (CN15 [SD I/F]) */ |
| 609 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0", |
| 610 | "sdhi0_data4", "sdhi0"), |
| 611 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0", |
| 612 | "sdhi0_ctrl", "sdhi0"), |
| 613 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0", |
| 614 | "sdhi0_wp", "sdhi0"), |
| 615 | /* SDHI1 (CN4 [WLAN I/F]) */ |
| 616 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-sh73a0", |
| 617 | "sdhi1_data4", "sdhi1"), |
| 618 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-sh73a0", |
| 619 | "sdhi1_ctrl", "sdhi1"), |
| 620 | PIN_MAP_CONFIGS_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-sh73a0", |
| 621 | "sdhi1_data4", pin_pullup_conf), |
| 622 | PIN_MAP_CONFIGS_PIN_DEFAULT("sh_mobile_sdhi.1", "pfc-sh73a0", |
| 623 | "PORT263", pin_pullup_conf), |
Laurent Pinchart | b5012cd | 2013-01-03 12:54:28 +0100 | [diff] [blame] | 624 | }; |
| 625 | |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 626 | static void __init ag5evm_init(void) |
| 627 | { |
Guennadi Liakhovetski | 6add969 | 2012-06-29 09:32:29 +0200 | [diff] [blame] | 628 | regulator_register_always_on(0, "fixed-1.8V", fixed1v8_power_consumers, |
| 629 | ARRAY_SIZE(fixed1v8_power_consumers), 1800000); |
| 630 | regulator_register_always_on(1, "fixed-2.8V", fixed2v8_power_consumers, |
| 631 | ARRAY_SIZE(fixed2v8_power_consumers), 3300000); |
| 632 | regulator_register_fixed(3, dummy_supplies, ARRAY_SIZE(dummy_supplies)); |
| 633 | |
Laurent Pinchart | b5012cd | 2013-01-03 12:54:28 +0100 | [diff] [blame] | 634 | pinctrl_register_mappings(ag5evm_pinctrl_map, |
| 635 | ARRAY_SIZE(ag5evm_pinctrl_map)); |
Takashi YOSHII | 3256c78 | 2010-11-19 16:49:38 +0900 | [diff] [blame] | 636 | sh73a0_pinmux_init(); |
| 637 | |
Takashi YOSHII | 6bf45a10 | 2010-12-22 06:35:30 +0000 | [diff] [blame] | 638 | /* enable MMCIF */ |
Guennadi Liakhovetski | b58e5fa | 2013-02-12 16:50:02 +0100 | [diff] [blame] | 639 | gpio_request_one(208, GPIOF_OUT_INIT_HIGH, NULL); /* Reset */ |
Takashi YOSHII | 6bf45a10 | 2010-12-22 06:35:30 +0000 | [diff] [blame] | 640 | |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 641 | /* enable SMSC911X */ |
Guennadi Liakhovetski | b58e5fa | 2013-02-12 16:50:02 +0100 | [diff] [blame] | 642 | gpio_request_one(144, GPIOF_IN, NULL); /* PINTA2 */ |
| 643 | gpio_request_one(145, GPIOF_OUT_INIT_HIGH, NULL); /* RESET */ |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 644 | |
Magnus Damm | 170c7ab | 2011-01-20 08:41:03 +0000 | [diff] [blame] | 645 | /* LCD panel */ |
Guennadi Liakhovetski | b58e5fa | 2013-02-12 16:50:02 +0100 | [diff] [blame] | 646 | gpio_request_one(217, GPIOF_OUT_INIT_LOW, NULL); /* RESET */ |
Magnus Damm | 170c7ab | 2011-01-20 08:41:03 +0000 | [diff] [blame] | 647 | mdelay(1); |
Guennadi Liakhovetski | b58e5fa | 2013-02-12 16:50:02 +0100 | [diff] [blame] | 648 | gpio_set_value(217, 1); |
Magnus Damm | f55398a | 2011-01-28 09:59:17 +0000 | [diff] [blame] | 649 | mdelay(100); |
Magnus Damm | 170c7ab | 2011-01-20 08:41:03 +0000 | [diff] [blame] | 650 | |
| 651 | /* LCD backlight controller */ |
Guennadi Liakhovetski | b58e5fa | 2013-02-12 16:50:02 +0100 | [diff] [blame] | 652 | gpio_request_one(235, GPIOF_OUT_INIT_LOW, NULL); /* RESET */ |
Laurent Pinchart | 37f4dd1 | 2012-08-15 18:25:27 +0200 | [diff] [blame] | 653 | lcd_backlight_set_brightness(0); |
Magnus Damm | 170c7ab | 2011-01-20 08:41:03 +0000 | [diff] [blame] | 654 | |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 655 | #ifdef CONFIG_CACHE_L2X0 |
| 656 | /* Shared attribute override enable, 64K*8way */ |
Rob Herring | a2a47ca | 2012-03-09 17:16:40 -0600 | [diff] [blame] | 657 | l2x0_init(IOMEM(0xf0100000), 0x00460000, 0xc2000fff); |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 658 | #endif |
| 659 | sh73a0_add_standard_devices(); |
| 660 | platform_add_devices(ag5evm_devices, ARRAY_SIZE(ag5evm_devices)); |
| 661 | } |
| 662 | |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 663 | MACHINE_START(AG5EVM, "ag5evm") |
Marc Zyngier | a62580e | 2011-09-08 13:15:22 +0100 | [diff] [blame] | 664 | .smp = smp_ops(sh73a0_smp_ops), |
Magnus Damm | 50e15c3 | 2012-02-29 21:37:27 +0900 | [diff] [blame] | 665 | .map_io = sh73a0_map_io, |
| 666 | .init_early = sh73a0_add_early_devices, |
Magnus Damm | eded914 | 2011-11-22 15:31:40 +0900 | [diff] [blame] | 667 | .nr_irqs = NR_IRQS_LEGACY, |
Magnus Damm | 566aad3 | 2011-10-17 18:00:52 +0900 | [diff] [blame] | 668 | .init_irq = sh73a0_init_irq, |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 669 | .init_machine = ag5evm_init, |
Shawn Guo | 21cc1b7 | 2012-04-26 21:58:41 +0800 | [diff] [blame] | 670 | .init_late = shmobile_init_late, |
Stephen Warren | 6bb27d7 | 2012-11-08 12:40:59 -0700 | [diff] [blame] | 671 | .init_time = sh73a0_earlytimer_init, |
Magnus Damm | 6d9598e | 2010-11-17 10:59:31 +0000 | [diff] [blame] | 672 | MACHINE_END |