Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 1 | /* |
| 2 | * marzen board support |
| 3 | * |
Vladimir Barinov | 7cef5e7f | 2013-08-22 17:25:25 -0300 | [diff] [blame] | 4 | * Copyright (C) 2011, 2013 Renesas Solutions Corp. |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 5 | * Copyright (C) 2011 Magnus Damm |
Vladimir Barinov | 7cef5e7f | 2013-08-22 17:25:25 -0300 | [diff] [blame] | 6 | * Copyright (C) 2013 Cogent Embedded, Inc. |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; version 2 of the License. |
| 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. |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 16 | */ |
| 17 | |
| 18 | #include <linux/kernel.h> |
| 19 | #include <linux/init.h> |
| 20 | #include <linux/interrupt.h> |
| 21 | #include <linux/irq.h> |
| 22 | #include <linux/platform_device.h> |
| 23 | #include <linux/delay.h> |
| 24 | #include <linux/io.h> |
Laurent Pinchart | 48b1e3e | 2013-03-10 03:43:32 +0100 | [diff] [blame] | 25 | #include <linux/leds.h> |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 26 | #include <linux/dma-mapping.h> |
Laurent Pinchart | 4a655ec | 2013-03-06 14:22:11 +0100 | [diff] [blame] | 27 | #include <linux/pinctrl/machine.h> |
Kuninori Morimoto | 2f3927e | 2013-10-31 18:00:03 -0700 | [diff] [blame] | 28 | #include <linux/platform_data/camera-rcar.h> |
Laurent Pinchart | 5fcf4a3 | 2013-04-08 12:05:32 +0200 | [diff] [blame] | 29 | #include <linux/platform_data/gpio-rcar.h> |
Kuninori Morimoto | fee529d | 2013-07-26 00:35:29 -0700 | [diff] [blame] | 30 | #include <linux/platform_data/usb-rcar-phy.h> |
Guennadi Liakhovetski | b354e22 | 2012-06-27 00:32:32 +0200 | [diff] [blame] | 31 | #include <linux/regulator/fixed.h> |
| 32 | #include <linux/regulator/machine.h> |
Magnus Damm | db5eb99 | 2011-12-14 01:36:51 +0900 | [diff] [blame] | 33 | #include <linux/smsc911x.h> |
Kuninori Morimoto | b82573e | 2012-10-10 19:57:02 -0700 | [diff] [blame] | 34 | #include <linux/spi/spi.h> |
| 35 | #include <linux/spi/sh_hspi.h> |
Simon Horman | 44e9ac4 | 2013-02-13 09:45:50 +0000 | [diff] [blame] | 36 | #include <linux/mmc/host.h> |
Phil Edworthy | 894cda1 | 2012-08-06 13:31:05 +0100 | [diff] [blame] | 37 | #include <linux/mmc/sh_mobile_sdhi.h> |
| 38 | #include <linux/mfd/tmio.h> |
Geert Uytterhoeven | 1b55353 | 2014-06-20 18:53:05 +0200 | [diff] [blame] | 39 | |
Vladimir Barinov | 7cef5e7f | 2013-08-22 17:25:25 -0300 | [diff] [blame] | 40 | #include <media/soc_camera.h> |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 41 | #include <asm/mach-types.h> |
| 42 | #include <asm/mach/arch.h> |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 43 | #include <asm/traps.h> |
Geert Uytterhoeven | 1b55353 | 2014-06-20 18:53:05 +0200 | [diff] [blame] | 44 | |
Magnus Damm | fd44aa5 | 2014-06-17 16:47:37 +0900 | [diff] [blame] | 45 | #include "common.h" |
Magnus Damm | b6bab12 | 2014-06-17 16:47:29 +0900 | [diff] [blame] | 46 | #include "irqs.h" |
Geert Uytterhoeven | 1b55353 | 2014-06-20 18:53:05 +0200 | [diff] [blame] | 47 | #include "r8a7779.h" |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 48 | |
Phil Edworthy | 894cda1 | 2012-08-06 13:31:05 +0100 | [diff] [blame] | 49 | /* Fixed 3.3V regulator to be used by SDHI0 */ |
| 50 | static struct regulator_consumer_supply fixed3v3_power_consumers[] = { |
| 51 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"), |
| 52 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"), |
| 53 | }; |
| 54 | |
Guennadi Liakhovetski | b354e22 | 2012-06-27 00:32:32 +0200 | [diff] [blame] | 55 | /* Dummy supplies, where voltage doesn't matter */ |
| 56 | static struct regulator_consumer_supply dummy_supplies[] = { |
| 57 | REGULATOR_SUPPLY("vddvario", "smsc911x"), |
| 58 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), |
| 59 | }; |
| 60 | |
Kuninori Morimoto | fee529d | 2013-07-26 00:35:29 -0700 | [diff] [blame] | 61 | /* USB PHY */ |
| 62 | static struct resource usb_phy_resources[] = { |
| 63 | [0] = { |
| 64 | .start = 0xffe70800, |
| 65 | .end = 0xffe70900 - 1, |
| 66 | .flags = IORESOURCE_MEM, |
| 67 | }, |
| 68 | }; |
| 69 | |
| 70 | static struct rcar_phy_platform_data usb_phy_platform_data; |
| 71 | |
| 72 | static struct platform_device usb_phy = { |
| 73 | .name = "rcar_usb_phy", |
| 74 | .id = -1, |
| 75 | .dev = { |
| 76 | .platform_data = &usb_phy_platform_data, |
| 77 | }, |
| 78 | .resource = usb_phy_resources, |
| 79 | .num_resources = ARRAY_SIZE(usb_phy_resources), |
| 80 | }; |
Sergei Shtylyov | 2437b27 | 2013-06-02 01:55:04 +0400 | [diff] [blame] | 81 | |
Magnus Damm | db5eb99 | 2011-12-14 01:36:51 +0900 | [diff] [blame] | 82 | /* SMSC LAN89218 */ |
| 83 | static struct resource smsc911x_resources[] = { |
| 84 | [0] = { |
| 85 | .start = 0x18000000, /* ExCS0 */ |
| 86 | .end = 0x180000ff, /* A1->A7 */ |
| 87 | .flags = IORESOURCE_MEM, |
| 88 | }, |
| 89 | [1] = { |
Simon Horman | 6e26703 | 2013-04-18 21:21:09 +0900 | [diff] [blame] | 90 | .start = irq_pin(1), /* IRQ 1 */ |
Magnus Damm | db5eb99 | 2011-12-14 01:36:51 +0900 | [diff] [blame] | 91 | .flags = IORESOURCE_IRQ, |
| 92 | }, |
| 93 | }; |
| 94 | |
| 95 | static struct smsc911x_platform_config smsc911x_platdata = { |
| 96 | .flags = SMSC911X_USE_32BIT, /* 32-bit SW on 16-bit HW bus */ |
| 97 | .phy_interface = PHY_INTERFACE_MODE_MII, |
| 98 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, |
| 99 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, |
| 100 | }; |
| 101 | |
| 102 | static struct platform_device eth_device = { |
| 103 | .name = "smsc911x", |
Kuninori Morimoto | 497dcf6 | 2012-08-29 18:58:01 -0700 | [diff] [blame] | 104 | .id = -1, |
Magnus Damm | db5eb99 | 2011-12-14 01:36:51 +0900 | [diff] [blame] | 105 | .dev = { |
| 106 | .platform_data = &smsc911x_platdata, |
| 107 | }, |
| 108 | .resource = smsc911x_resources, |
| 109 | .num_resources = ARRAY_SIZE(smsc911x_resources), |
| 110 | }; |
| 111 | |
Phil Edworthy | 894cda1 | 2012-08-06 13:31:05 +0100 | [diff] [blame] | 112 | static struct resource sdhi0_resources[] = { |
| 113 | [0] = { |
| 114 | .name = "sdhi0", |
| 115 | .start = 0xffe4c000, |
| 116 | .end = 0xffe4c0ff, |
| 117 | .flags = IORESOURCE_MEM, |
| 118 | }, |
| 119 | [1] = { |
Kuninori Morimoto | 0b6794e | 2013-02-25 01:39:44 -0800 | [diff] [blame] | 120 | .start = gic_iid(0x88), |
Phil Edworthy | 894cda1 | 2012-08-06 13:31:05 +0100 | [diff] [blame] | 121 | .flags = IORESOURCE_IRQ, |
| 122 | }, |
| 123 | }; |
| 124 | |
Kuninori Morimoto | 84f11d5 | 2015-02-24 02:07:07 +0000 | [diff] [blame] | 125 | static struct tmio_mmc_data sdhi0_platform_data = { |
| 126 | .chan_priv_tx = (void *)HPBDMA_SLAVE_SDHI0_TX, |
| 127 | .chan_priv_rx = (void *)HPBDMA_SLAVE_SDHI0_RX, |
| 128 | .flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT, |
| 129 | .capabilities = MMC_CAP_SD_HIGHSPEED, |
Phil Edworthy | 894cda1 | 2012-08-06 13:31:05 +0100 | [diff] [blame] | 130 | }; |
| 131 | |
| 132 | static struct platform_device sdhi0_device = { |
| 133 | .name = "sh_mobile_sdhi", |
| 134 | .num_resources = ARRAY_SIZE(sdhi0_resources), |
| 135 | .resource = sdhi0_resources, |
| 136 | .id = 0, |
| 137 | .dev = { |
| 138 | .platform_data = &sdhi0_platform_data, |
| 139 | } |
| 140 | }; |
| 141 | |
Kuninori Morimoto | eb8ca94 | 2012-08-27 19:00:15 -0700 | [diff] [blame] | 142 | /* Thermal */ |
| 143 | static struct resource thermal_resources[] = { |
| 144 | [0] = { |
| 145 | .start = 0xFFC48000, |
| 146 | .end = 0xFFC48038 - 1, |
| 147 | .flags = IORESOURCE_MEM, |
| 148 | }, |
| 149 | }; |
| 150 | |
| 151 | static struct platform_device thermal_device = { |
| 152 | .name = "rcar_thermal", |
| 153 | .resource = thermal_resources, |
| 154 | .num_resources = ARRAY_SIZE(thermal_resources), |
| 155 | }; |
| 156 | |
Kuninori Morimoto | b82573e | 2012-10-10 19:57:02 -0700 | [diff] [blame] | 157 | /* HSPI */ |
| 158 | static struct resource hspi_resources[] = { |
| 159 | [0] = { |
| 160 | .start = 0xFFFC7000, |
| 161 | .end = 0xFFFC7018 - 1, |
| 162 | .flags = IORESOURCE_MEM, |
| 163 | }, |
| 164 | }; |
| 165 | |
| 166 | static struct platform_device hspi_device = { |
| 167 | .name = "sh-hspi", |
| 168 | .id = 0, |
| 169 | .resource = hspi_resources, |
| 170 | .num_resources = ARRAY_SIZE(hspi_resources), |
| 171 | }; |
| 172 | |
Laurent Pinchart | 48b1e3e | 2013-03-10 03:43:32 +0100 | [diff] [blame] | 173 | /* LEDS */ |
| 174 | static struct gpio_led marzen_leds[] = { |
| 175 | { |
| 176 | .name = "led2", |
Laurent Pinchart | 5fcf4a3 | 2013-04-08 12:05:32 +0200 | [diff] [blame] | 177 | .gpio = RCAR_GP_PIN(4, 29), |
Laurent Pinchart | 48b1e3e | 2013-03-10 03:43:32 +0100 | [diff] [blame] | 178 | .default_state = LEDS_GPIO_DEFSTATE_ON, |
| 179 | }, { |
| 180 | .name = "led3", |
Laurent Pinchart | 5fcf4a3 | 2013-04-08 12:05:32 +0200 | [diff] [blame] | 181 | .gpio = RCAR_GP_PIN(4, 30), |
Laurent Pinchart | 48b1e3e | 2013-03-10 03:43:32 +0100 | [diff] [blame] | 182 | .default_state = LEDS_GPIO_DEFSTATE_ON, |
| 183 | }, { |
| 184 | .name = "led4", |
Laurent Pinchart | 5fcf4a3 | 2013-04-08 12:05:32 +0200 | [diff] [blame] | 185 | .gpio = RCAR_GP_PIN(4, 31), |
Laurent Pinchart | 48b1e3e | 2013-03-10 03:43:32 +0100 | [diff] [blame] | 186 | .default_state = LEDS_GPIO_DEFSTATE_ON, |
| 187 | }, |
| 188 | }; |
| 189 | |
| 190 | static struct gpio_led_platform_data marzen_leds_pdata = { |
| 191 | .leds = marzen_leds, |
| 192 | .num_leds = ARRAY_SIZE(marzen_leds), |
| 193 | }; |
| 194 | |
| 195 | static struct platform_device leds_device = { |
| 196 | .name = "leds-gpio", |
| 197 | .id = 0, |
| 198 | .dev = { |
| 199 | .platform_data = &marzen_leds_pdata, |
| 200 | }, |
| 201 | }; |
| 202 | |
Kuninori Morimoto | 4bd4c5b | 2013-10-14 19:45:36 -0700 | [diff] [blame] | 203 | /* VIN */ |
Vladimir Barinov | 7cef5e7f | 2013-08-22 17:25:25 -0300 | [diff] [blame] | 204 | static struct rcar_vin_platform_data vin_platform_data __initdata = { |
| 205 | .flags = RCAR_VIN_BT656, |
| 206 | }; |
| 207 | |
Kuninori Morimoto | 4bd4c5b | 2013-10-14 19:45:36 -0700 | [diff] [blame] | 208 | #define MARZEN_VIN(idx) \ |
| 209 | static struct resource vin##idx##_resources[] __initdata = { \ |
| 210 | DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000), \ |
| 211 | DEFINE_RES_IRQ(gic_iid(0x5f + (idx))), \ |
| 212 | }; \ |
| 213 | \ |
| 214 | static struct platform_device_info vin##idx##_info __initdata = { \ |
Kuninori Morimoto | 4bd4c5b | 2013-10-14 19:45:36 -0700 | [diff] [blame] | 215 | .name = "r8a7779-vin", \ |
| 216 | .id = idx, \ |
| 217 | .res = vin##idx##_resources, \ |
| 218 | .num_res = ARRAY_SIZE(vin##idx##_resources), \ |
| 219 | .dma_mask = DMA_BIT_MASK(32), \ |
| 220 | .data = &vin_platform_data, \ |
| 221 | .size_data = sizeof(vin_platform_data), \ |
| 222 | } |
| 223 | MARZEN_VIN(1); |
| 224 | MARZEN_VIN(3); |
| 225 | |
Vladimir Barinov | 7cef5e7f | 2013-08-22 17:25:25 -0300 | [diff] [blame] | 226 | #define MARZEN_CAMERA(idx) \ |
| 227 | static struct i2c_board_info camera##idx##_info = { \ |
| 228 | I2C_BOARD_INFO("adv7180", 0x20 + (idx)), \ |
| 229 | }; \ |
| 230 | \ |
| 231 | static struct soc_camera_link iclink##idx##_adv7180 = { \ |
| 232 | .bus_id = 1 + 2 * (idx), \ |
| 233 | .i2c_adapter_id = 0, \ |
| 234 | .board_info = &camera##idx##_info, \ |
| 235 | }; \ |
| 236 | \ |
| 237 | static struct platform_device camera##idx##_device = { \ |
| 238 | .name = "soc-camera-pdrv", \ |
| 239 | .id = idx, \ |
| 240 | .dev = { \ |
| 241 | .platform_data = &iclink##idx##_adv7180, \ |
| 242 | }, \ |
| 243 | }; |
| 244 | |
| 245 | MARZEN_CAMERA(0); |
| 246 | MARZEN_CAMERA(1); |
| 247 | |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 248 | static struct platform_device *marzen_devices[] __initdata = { |
Magnus Damm | db5eb99 | 2011-12-14 01:36:51 +0900 | [diff] [blame] | 249 | ð_device, |
Phil Edworthy | 894cda1 | 2012-08-06 13:31:05 +0100 | [diff] [blame] | 250 | &sdhi0_device, |
Kuninori Morimoto | eb8ca94 | 2012-08-27 19:00:15 -0700 | [diff] [blame] | 251 | &thermal_device, |
Kuninori Morimoto | b82573e | 2012-10-10 19:57:02 -0700 | [diff] [blame] | 252 | &hspi_device, |
Laurent Pinchart | 48b1e3e | 2013-03-10 03:43:32 +0100 | [diff] [blame] | 253 | &leds_device, |
Kuninori Morimoto | fee529d | 2013-07-26 00:35:29 -0700 | [diff] [blame] | 254 | &usb_phy, |
Vladimir Barinov | 7cef5e7f | 2013-08-22 17:25:25 -0300 | [diff] [blame] | 255 | &camera0_device, |
| 256 | &camera1_device, |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 257 | }; |
| 258 | |
Laurent Pinchart | 4a655ec | 2013-03-06 14:22:11 +0100 | [diff] [blame] | 259 | static const struct pinctrl_map marzen_pinctrl_map[] = { |
Laurent Pinchart | df83d90 | 2013-03-27 11:55:35 +0100 | [diff] [blame] | 260 | /* DU (CN10: ARGB0, CN13: LVDS) */ |
| 261 | PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7779", "pfc-r8a7779", |
| 262 | "du0_rgb888", "du0"), |
| 263 | PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7779", "pfc-r8a7779", |
| 264 | "du0_sync_1", "du0"), |
| 265 | PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7779", "pfc-r8a7779", |
| 266 | "du0_clk_out_0", "du0"), |
| 267 | PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7779", "pfc-r8a7779", |
| 268 | "du1_rgb666", "du1"), |
| 269 | PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7779", "pfc-r8a7779", |
| 270 | "du1_sync_1", "du1"), |
| 271 | PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7779", "pfc-r8a7779", |
| 272 | "du1_clk_out", "du1"), |
Laurent Pinchart | a321747 | 2013-03-06 14:22:11 +0100 | [diff] [blame] | 273 | /* HSPI0 */ |
| 274 | PIN_MAP_MUX_GROUP_DEFAULT("sh-hspi.0", "pfc-r8a7779", |
| 275 | "hspi0", "hspi0"), |
Laurent Pinchart | e9cd49f | 2013-03-06 14:22:11 +0100 | [diff] [blame] | 276 | /* SCIF2 (CN18: DEBUG0) */ |
| 277 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.2", "pfc-r8a7779", |
| 278 | "scif2_data_c", "scif2"), |
| 279 | /* SCIF4 (CN19: DEBUG1) */ |
| 280 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.4", "pfc-r8a7779", |
| 281 | "scif4_data", "scif4"), |
Laurent Pinchart | 4a655ec | 2013-03-06 14:22:11 +0100 | [diff] [blame] | 282 | /* SDHI0 */ |
| 283 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779", |
| 284 | "sdhi0_data4", "sdhi0"), |
| 285 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779", |
| 286 | "sdhi0_ctrl", "sdhi0"), |
| 287 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779", |
| 288 | "sdhi0_cd", "sdhi0"), |
Laurent Pinchart | f423df8 | 2013-03-07 13:46:02 +0100 | [diff] [blame] | 289 | /* SMSC */ |
| 290 | PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a7779", |
Laurent Pinchart | ee097e6 | 2013-03-07 13:46:02 +0100 | [diff] [blame] | 291 | "intc_irq1_b", "intc"), |
| 292 | PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a7779", |
Laurent Pinchart | f423df8 | 2013-03-07 13:46:02 +0100 | [diff] [blame] | 293 | "lbsc_ex_cs0", "lbsc"), |
Laurent Pinchart | a00f6e5 | 2013-03-07 13:46:02 +0100 | [diff] [blame] | 294 | /* USB0 */ |
| 295 | PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform.0", "pfc-r8a7779", |
| 296 | "usb0", "usb0"), |
| 297 | /* USB1 */ |
| 298 | PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform.0", "pfc-r8a7779", |
| 299 | "usb1", "usb1"), |
| 300 | /* USB2 */ |
| 301 | PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform.1", "pfc-r8a7779", |
| 302 | "usb2", "usb2"), |
Vladimir Barinov | 7cef5e7f | 2013-08-22 17:25:25 -0300 | [diff] [blame] | 303 | /* VIN1 */ |
| 304 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7779-vin.1", "pfc-r8a7779", |
| 305 | "vin1_clk", "vin1"), |
| 306 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7779-vin.1", "pfc-r8a7779", |
| 307 | "vin1_data8", "vin1"), |
| 308 | /* VIN3 */ |
| 309 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7779-vin.3", "pfc-r8a7779", |
| 310 | "vin3_clk", "vin3"), |
| 311 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7779-vin.3", "pfc-r8a7779", |
| 312 | "vin3_data8", "vin3"), |
Laurent Pinchart | 4a655ec | 2013-03-06 14:22:11 +0100 | [diff] [blame] | 313 | }; |
| 314 | |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 315 | static void __init marzen_init(void) |
| 316 | { |
Phil Edworthy | 894cda1 | 2012-08-06 13:31:05 +0100 | [diff] [blame] | 317 | regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers, |
| 318 | ARRAY_SIZE(fixed3v3_power_consumers), 3300000); |
Kuninori Morimoto | 90b85af | 2012-08-29 18:58:15 -0700 | [diff] [blame] | 319 | regulator_register_fixed(1, dummy_supplies, |
Phil Edworthy | 894cda1 | 2012-08-06 13:31:05 +0100 | [diff] [blame] | 320 | ARRAY_SIZE(dummy_supplies)); |
Guennadi Liakhovetski | b354e22 | 2012-06-27 00:32:32 +0200 | [diff] [blame] | 321 | |
Laurent Pinchart | 4a655ec | 2013-03-06 14:22:11 +0100 | [diff] [blame] | 322 | pinctrl_register_mappings(marzen_pinctrl_map, |
| 323 | ARRAY_SIZE(marzen_pinctrl_map)); |
Magnus Damm | 19c43fc | 2011-12-14 01:36:22 +0900 | [diff] [blame] | 324 | r8a7779_pinmux_init(); |
Simon Horman | 6e26703 | 2013-04-18 21:21:09 +0900 | [diff] [blame] | 325 | r8a7779_init_irq_extpin(1); /* IRQ1 as individual interrupt */ |
Magnus Damm | 19c43fc | 2011-12-14 01:36:22 +0900 | [diff] [blame] | 326 | |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 327 | r8a7779_add_standard_devices(); |
Kuninori Morimoto | 4bd4c5b | 2013-10-14 19:45:36 -0700 | [diff] [blame] | 328 | platform_device_register_full(&vin1_info); |
| 329 | platform_device_register_full(&vin3_info); |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 330 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); |
| 331 | } |
| 332 | |
Magnus Damm | 7ebbb4a | 2013-07-24 16:30:42 +0900 | [diff] [blame] | 333 | static const char *marzen_boards_compat_dt[] __initdata = { |
| 334 | "renesas,marzen", |
| 335 | NULL, |
| 336 | }; |
| 337 | |
| 338 | DT_MACHINE_START(MARZEN, "marzen") |
Marc Zyngier | a62580e | 2011-09-08 13:15:22 +0100 | [diff] [blame] | 339 | .smp = smp_ops(r8a7779_smp_ops), |
Magnus Damm | 3e353b87 | 2012-02-29 21:37:43 +0900 | [diff] [blame] | 340 | .map_io = r8a7779_map_io, |
| 341 | .init_early = r8a7779_add_early_devices, |
Kuninori Morimoto | 693ac41 | 2013-08-01 23:39:34 -0700 | [diff] [blame] | 342 | .init_irq = r8a7779_init_irq_dt, |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 343 | .init_machine = marzen_init, |
Sergei Shtylyov | 2c8788b | 2013-06-02 01:30:15 +0400 | [diff] [blame] | 344 | .init_late = r8a7779_init_late, |
Magnus Damm | 7ebbb4a | 2013-07-24 16:30:42 +0900 | [diff] [blame] | 345 | .dt_compat = marzen_boards_compat_dt, |
Stephen Warren | 6bb27d7 | 2012-11-08 12:40:59 -0700 | [diff] [blame] | 346 | .init_time = r8a7779_earlytimer_init, |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 347 | MACHINE_END |