Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 1 | /* |
| 2 | * marzen board support |
| 3 | * |
| 4 | * Copyright (C) 2011 Renesas Solutions Corp. |
| 5 | * Copyright (C) 2011 Magnus Damm |
| 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 | #include <linux/kernel.h> |
| 22 | #include <linux/init.h> |
| 23 | #include <linux/interrupt.h> |
| 24 | #include <linux/irq.h> |
| 25 | #include <linux/platform_device.h> |
| 26 | #include <linux/delay.h> |
| 27 | #include <linux/io.h> |
Laurent Pinchart | 48b1e3e | 2013-03-10 03:43:32 +0100 | [diff] [blame] | 28 | #include <linux/leds.h> |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 29 | #include <linux/dma-mapping.h> |
Laurent Pinchart | 4a655ec | 2013-03-06 14:22:11 +0100 | [diff] [blame] | 30 | #include <linux/pinctrl/machine.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> |
Kuninori Morimoto | 94e1f7f | 2012-10-29 01:15:34 -0700 | [diff] [blame] | 39 | #include <linux/usb/otg.h> |
| 40 | #include <linux/usb/ehci_pdriver.h> |
Kuninori Morimoto | ac7c4ea | 2012-10-29 01:15:43 -0700 | [diff] [blame] | 41 | #include <linux/usb/ohci_pdriver.h> |
Kuninori Morimoto | 94e1f7f | 2012-10-29 01:15:34 -0700 | [diff] [blame] | 42 | #include <linux/pm_runtime.h> |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 43 | #include <mach/hardware.h> |
| 44 | #include <mach/r8a7779.h> |
| 45 | #include <mach/common.h> |
Rob Herring | 250a272 | 2012-01-03 16:57:33 -0600 | [diff] [blame] | 46 | #include <mach/irqs.h> |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 47 | #include <asm/mach-types.h> |
| 48 | #include <asm/mach/arch.h> |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 49 | #include <asm/traps.h> |
| 50 | |
Phil Edworthy | 894cda1 | 2012-08-06 13:31:05 +0100 | [diff] [blame] | 51 | /* Fixed 3.3V regulator to be used by SDHI0 */ |
| 52 | static struct regulator_consumer_supply fixed3v3_power_consumers[] = { |
| 53 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"), |
| 54 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"), |
| 55 | }; |
| 56 | |
Guennadi Liakhovetski | b354e22 | 2012-06-27 00:32:32 +0200 | [diff] [blame] | 57 | /* Dummy supplies, where voltage doesn't matter */ |
| 58 | static struct regulator_consumer_supply dummy_supplies[] = { |
| 59 | REGULATOR_SUPPLY("vddvario", "smsc911x"), |
| 60 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), |
| 61 | }; |
| 62 | |
Magnus Damm | db5eb99 | 2011-12-14 01:36:51 +0900 | [diff] [blame] | 63 | /* SMSC LAN89218 */ |
| 64 | static struct resource smsc911x_resources[] = { |
| 65 | [0] = { |
| 66 | .start = 0x18000000, /* ExCS0 */ |
| 67 | .end = 0x180000ff, /* A1->A7 */ |
| 68 | .flags = IORESOURCE_MEM, |
| 69 | }, |
| 70 | [1] = { |
Kuninori Morimoto | 0b6794e | 2013-02-25 01:39:44 -0800 | [diff] [blame] | 71 | .start = gic_iid(0x3c), /* IRQ 1 */ |
Magnus Damm | db5eb99 | 2011-12-14 01:36:51 +0900 | [diff] [blame] | 72 | .flags = IORESOURCE_IRQ, |
| 73 | }, |
| 74 | }; |
| 75 | |
| 76 | static struct smsc911x_platform_config smsc911x_platdata = { |
| 77 | .flags = SMSC911X_USE_32BIT, /* 32-bit SW on 16-bit HW bus */ |
| 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", |
Kuninori Morimoto | 497dcf6 | 2012-08-29 18:58:01 -0700 | [diff] [blame] | 85 | .id = -1, |
Magnus Damm | db5eb99 | 2011-12-14 01:36:51 +0900 | [diff] [blame] | 86 | .dev = { |
| 87 | .platform_data = &smsc911x_platdata, |
| 88 | }, |
| 89 | .resource = smsc911x_resources, |
| 90 | .num_resources = ARRAY_SIZE(smsc911x_resources), |
| 91 | }; |
| 92 | |
Phil Edworthy | 894cda1 | 2012-08-06 13:31:05 +0100 | [diff] [blame] | 93 | static struct resource sdhi0_resources[] = { |
| 94 | [0] = { |
| 95 | .name = "sdhi0", |
| 96 | .start = 0xffe4c000, |
| 97 | .end = 0xffe4c0ff, |
| 98 | .flags = IORESOURCE_MEM, |
| 99 | }, |
| 100 | [1] = { |
Kuninori Morimoto | 0b6794e | 2013-02-25 01:39:44 -0800 | [diff] [blame] | 101 | .start = gic_iid(0x88), |
Phil Edworthy | 894cda1 | 2012-08-06 13:31:05 +0100 | [diff] [blame] | 102 | .flags = IORESOURCE_IRQ, |
| 103 | }, |
| 104 | }; |
| 105 | |
| 106 | static struct sh_mobile_sdhi_info sdhi0_platform_data = { |
| 107 | .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT, |
| 108 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, |
| 109 | }; |
| 110 | |
| 111 | static struct platform_device sdhi0_device = { |
| 112 | .name = "sh_mobile_sdhi", |
| 113 | .num_resources = ARRAY_SIZE(sdhi0_resources), |
| 114 | .resource = sdhi0_resources, |
| 115 | .id = 0, |
| 116 | .dev = { |
| 117 | .platform_data = &sdhi0_platform_data, |
| 118 | } |
| 119 | }; |
| 120 | |
Kuninori Morimoto | eb8ca94 | 2012-08-27 19:00:15 -0700 | [diff] [blame] | 121 | /* Thermal */ |
| 122 | static struct resource thermal_resources[] = { |
| 123 | [0] = { |
| 124 | .start = 0xFFC48000, |
| 125 | .end = 0xFFC48038 - 1, |
| 126 | .flags = IORESOURCE_MEM, |
| 127 | }, |
| 128 | }; |
| 129 | |
| 130 | static struct platform_device thermal_device = { |
| 131 | .name = "rcar_thermal", |
| 132 | .resource = thermal_resources, |
| 133 | .num_resources = ARRAY_SIZE(thermal_resources), |
| 134 | }; |
| 135 | |
Kuninori Morimoto | b82573e | 2012-10-10 19:57:02 -0700 | [diff] [blame] | 136 | /* HSPI */ |
| 137 | static struct resource hspi_resources[] = { |
| 138 | [0] = { |
| 139 | .start = 0xFFFC7000, |
| 140 | .end = 0xFFFC7018 - 1, |
| 141 | .flags = IORESOURCE_MEM, |
| 142 | }, |
| 143 | }; |
| 144 | |
| 145 | static struct platform_device hspi_device = { |
| 146 | .name = "sh-hspi", |
| 147 | .id = 0, |
| 148 | .resource = hspi_resources, |
| 149 | .num_resources = ARRAY_SIZE(hspi_resources), |
| 150 | }; |
| 151 | |
Kuninori Morimoto | b5ce635 | 2012-10-29 01:15:25 -0700 | [diff] [blame] | 152 | /* USB PHY */ |
| 153 | static struct resource usb_phy_resources[] = { |
| 154 | [0] = { |
| 155 | .start = 0xffe70000, |
| 156 | .end = 0xffe70900 - 1, |
| 157 | .flags = IORESOURCE_MEM, |
| 158 | }, |
| 159 | [1] = { |
| 160 | .start = 0xfff70000, |
| 161 | .end = 0xfff70900 - 1, |
| 162 | .flags = IORESOURCE_MEM, |
| 163 | }, |
| 164 | }; |
| 165 | |
| 166 | static struct platform_device usb_phy_device = { |
| 167 | .name = "rcar_usb_phy", |
| 168 | .resource = usb_phy_resources, |
| 169 | .num_resources = ARRAY_SIZE(usb_phy_resources), |
| 170 | }; |
| 171 | |
Laurent Pinchart | 48b1e3e | 2013-03-10 03:43:32 +0100 | [diff] [blame] | 172 | /* LEDS */ |
| 173 | static struct gpio_led marzen_leds[] = { |
| 174 | { |
| 175 | .name = "led2", |
| 176 | .gpio = 157, |
| 177 | .default_state = LEDS_GPIO_DEFSTATE_ON, |
| 178 | }, { |
| 179 | .name = "led3", |
| 180 | .gpio = 158, |
| 181 | .default_state = LEDS_GPIO_DEFSTATE_ON, |
| 182 | }, { |
| 183 | .name = "led4", |
| 184 | .gpio = 159, |
| 185 | .default_state = LEDS_GPIO_DEFSTATE_ON, |
| 186 | }, |
| 187 | }; |
| 188 | |
| 189 | static struct gpio_led_platform_data marzen_leds_pdata = { |
| 190 | .leds = marzen_leds, |
| 191 | .num_leds = ARRAY_SIZE(marzen_leds), |
| 192 | }; |
| 193 | |
| 194 | static struct platform_device leds_device = { |
| 195 | .name = "leds-gpio", |
| 196 | .id = 0, |
| 197 | .dev = { |
| 198 | .platform_data = &marzen_leds_pdata, |
| 199 | }, |
| 200 | }; |
| 201 | |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 202 | static struct platform_device *marzen_devices[] __initdata = { |
Magnus Damm | db5eb99 | 2011-12-14 01:36:51 +0900 | [diff] [blame] | 203 | ð_device, |
Phil Edworthy | 894cda1 | 2012-08-06 13:31:05 +0100 | [diff] [blame] | 204 | &sdhi0_device, |
Kuninori Morimoto | eb8ca94 | 2012-08-27 19:00:15 -0700 | [diff] [blame] | 205 | &thermal_device, |
Kuninori Morimoto | b82573e | 2012-10-10 19:57:02 -0700 | [diff] [blame] | 206 | &hspi_device, |
Kuninori Morimoto | b5ce635 | 2012-10-29 01:15:25 -0700 | [diff] [blame] | 207 | &usb_phy_device, |
Laurent Pinchart | 48b1e3e | 2013-03-10 03:43:32 +0100 | [diff] [blame] | 208 | &leds_device, |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 209 | }; |
| 210 | |
Kuninori Morimoto | 94e1f7f | 2012-10-29 01:15:34 -0700 | [diff] [blame] | 211 | /* USB */ |
| 212 | static struct usb_phy *phy; |
| 213 | static int usb_power_on(struct platform_device *pdev) |
| 214 | { |
Simon Horman | 5f10428 | 2013-05-16 12:14:59 +0900 | [diff] [blame^] | 215 | if (IS_ERR(phy)) |
| 216 | return PTR_ERR(phy); |
Kuninori Morimoto | 94e1f7f | 2012-10-29 01:15:34 -0700 | [diff] [blame] | 217 | |
| 218 | pm_runtime_enable(&pdev->dev); |
| 219 | pm_runtime_get_sync(&pdev->dev); |
| 220 | |
| 221 | usb_phy_init(phy); |
| 222 | |
| 223 | return 0; |
| 224 | } |
| 225 | |
| 226 | static void usb_power_off(struct platform_device *pdev) |
| 227 | { |
Simon Horman | 5f10428 | 2013-05-16 12:14:59 +0900 | [diff] [blame^] | 228 | if (IS_ERR(phy)) |
Kuninori Morimoto | 94e1f7f | 2012-10-29 01:15:34 -0700 | [diff] [blame] | 229 | return; |
| 230 | |
| 231 | usb_phy_shutdown(phy); |
| 232 | |
| 233 | pm_runtime_put_sync(&pdev->dev); |
| 234 | pm_runtime_disable(&pdev->dev); |
| 235 | } |
| 236 | |
| 237 | static struct usb_ehci_pdata ehcix_pdata = { |
| 238 | .power_on = usb_power_on, |
| 239 | .power_off = usb_power_off, |
| 240 | .power_suspend = usb_power_off, |
| 241 | }; |
| 242 | |
| 243 | static struct resource ehci0_resources[] = { |
| 244 | [0] = { |
| 245 | .start = 0xffe70000, |
| 246 | .end = 0xffe70400 - 1, |
| 247 | .flags = IORESOURCE_MEM, |
| 248 | }, |
| 249 | [1] = { |
Kuninori Morimoto | 0b6794e | 2013-02-25 01:39:44 -0800 | [diff] [blame] | 250 | .start = gic_iid(0x4c), |
Kuninori Morimoto | 94e1f7f | 2012-10-29 01:15:34 -0700 | [diff] [blame] | 251 | .flags = IORESOURCE_IRQ, |
| 252 | }, |
| 253 | }; |
| 254 | |
| 255 | static struct platform_device ehci0_device = { |
| 256 | .name = "ehci-platform", |
| 257 | .id = 0, |
| 258 | .dev = { |
| 259 | .dma_mask = &ehci0_device.dev.coherent_dma_mask, |
| 260 | .coherent_dma_mask = 0xffffffff, |
| 261 | .platform_data = &ehcix_pdata, |
| 262 | }, |
| 263 | .num_resources = ARRAY_SIZE(ehci0_resources), |
| 264 | .resource = ehci0_resources, |
| 265 | }; |
| 266 | |
| 267 | static struct resource ehci1_resources[] = { |
| 268 | [0] = { |
| 269 | .start = 0xfff70000, |
| 270 | .end = 0xfff70400 - 1, |
| 271 | .flags = IORESOURCE_MEM, |
| 272 | }, |
| 273 | [1] = { |
Kuninori Morimoto | 0b6794e | 2013-02-25 01:39:44 -0800 | [diff] [blame] | 274 | .start = gic_iid(0x4d), |
Kuninori Morimoto | 94e1f7f | 2012-10-29 01:15:34 -0700 | [diff] [blame] | 275 | .flags = IORESOURCE_IRQ, |
| 276 | }, |
| 277 | }; |
| 278 | |
| 279 | static struct platform_device ehci1_device = { |
| 280 | .name = "ehci-platform", |
| 281 | .id = 1, |
| 282 | .dev = { |
| 283 | .dma_mask = &ehci1_device.dev.coherent_dma_mask, |
| 284 | .coherent_dma_mask = 0xffffffff, |
| 285 | .platform_data = &ehcix_pdata, |
| 286 | }, |
| 287 | .num_resources = ARRAY_SIZE(ehci1_resources), |
| 288 | .resource = ehci1_resources, |
| 289 | }; |
| 290 | |
Kuninori Morimoto | ac7c4ea | 2012-10-29 01:15:43 -0700 | [diff] [blame] | 291 | static struct usb_ohci_pdata ohcix_pdata = { |
| 292 | .power_on = usb_power_on, |
| 293 | .power_off = usb_power_off, |
| 294 | .power_suspend = usb_power_off, |
| 295 | }; |
| 296 | |
| 297 | static struct resource ohci0_resources[] = { |
| 298 | [0] = { |
| 299 | .start = 0xffe70400, |
| 300 | .end = 0xffe70800 - 1, |
| 301 | .flags = IORESOURCE_MEM, |
| 302 | }, |
| 303 | [1] = { |
Kuninori Morimoto | 0b6794e | 2013-02-25 01:39:44 -0800 | [diff] [blame] | 304 | .start = gic_iid(0x4c), |
Kuninori Morimoto | ac7c4ea | 2012-10-29 01:15:43 -0700 | [diff] [blame] | 305 | .flags = IORESOURCE_IRQ, |
| 306 | }, |
| 307 | }; |
| 308 | |
| 309 | static struct platform_device ohci0_device = { |
| 310 | .name = "ohci-platform", |
| 311 | .id = 0, |
| 312 | .dev = { |
| 313 | .dma_mask = &ohci0_device.dev.coherent_dma_mask, |
| 314 | .coherent_dma_mask = 0xffffffff, |
| 315 | .platform_data = &ohcix_pdata, |
| 316 | }, |
| 317 | .num_resources = ARRAY_SIZE(ohci0_resources), |
| 318 | .resource = ohci0_resources, |
| 319 | }; |
| 320 | |
| 321 | static struct resource ohci1_resources[] = { |
| 322 | [0] = { |
| 323 | .start = 0xfff70400, |
| 324 | .end = 0xfff70800 - 1, |
| 325 | .flags = IORESOURCE_MEM, |
| 326 | }, |
| 327 | [1] = { |
Kuninori Morimoto | 0b6794e | 2013-02-25 01:39:44 -0800 | [diff] [blame] | 328 | .start = gic_iid(0x4d), |
Kuninori Morimoto | ac7c4ea | 2012-10-29 01:15:43 -0700 | [diff] [blame] | 329 | .flags = IORESOURCE_IRQ, |
| 330 | }, |
| 331 | }; |
| 332 | |
| 333 | static struct platform_device ohci1_device = { |
| 334 | .name = "ohci-platform", |
| 335 | .id = 1, |
| 336 | .dev = { |
| 337 | .dma_mask = &ohci1_device.dev.coherent_dma_mask, |
| 338 | .coherent_dma_mask = 0xffffffff, |
| 339 | .platform_data = &ohcix_pdata, |
| 340 | }, |
| 341 | .num_resources = ARRAY_SIZE(ohci1_resources), |
| 342 | .resource = ohci1_resources, |
| 343 | }; |
| 344 | |
Kuninori Morimoto | 94e1f7f | 2012-10-29 01:15:34 -0700 | [diff] [blame] | 345 | static struct platform_device *marzen_late_devices[] __initdata = { |
| 346 | &ehci0_device, |
| 347 | &ehci1_device, |
Kuninori Morimoto | ac7c4ea | 2012-10-29 01:15:43 -0700 | [diff] [blame] | 348 | &ohci0_device, |
| 349 | &ohci1_device, |
Kuninori Morimoto | 94e1f7f | 2012-10-29 01:15:34 -0700 | [diff] [blame] | 350 | }; |
| 351 | |
| 352 | void __init marzen_init_late(void) |
| 353 | { |
| 354 | /* get usb phy */ |
| 355 | phy = usb_get_phy(USB_PHY_TYPE_USB2); |
| 356 | |
| 357 | shmobile_init_late(); |
| 358 | platform_add_devices(marzen_late_devices, |
| 359 | ARRAY_SIZE(marzen_late_devices)); |
| 360 | } |
| 361 | |
Laurent Pinchart | 4a655ec | 2013-03-06 14:22:11 +0100 | [diff] [blame] | 362 | static const struct pinctrl_map marzen_pinctrl_map[] = { |
Laurent Pinchart | a321747 | 2013-03-06 14:22:11 +0100 | [diff] [blame] | 363 | /* HSPI0 */ |
| 364 | PIN_MAP_MUX_GROUP_DEFAULT("sh-hspi.0", "pfc-r8a7779", |
| 365 | "hspi0", "hspi0"), |
Laurent Pinchart | e9cd49f | 2013-03-06 14:22:11 +0100 | [diff] [blame] | 366 | /* SCIF2 (CN18: DEBUG0) */ |
| 367 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.2", "pfc-r8a7779", |
| 368 | "scif2_data_c", "scif2"), |
| 369 | /* SCIF4 (CN19: DEBUG1) */ |
| 370 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.4", "pfc-r8a7779", |
| 371 | "scif4_data", "scif4"), |
Laurent Pinchart | 4a655ec | 2013-03-06 14:22:11 +0100 | [diff] [blame] | 372 | /* SDHI0 */ |
| 373 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779", |
| 374 | "sdhi0_data4", "sdhi0"), |
| 375 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779", |
| 376 | "sdhi0_ctrl", "sdhi0"), |
| 377 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779", |
| 378 | "sdhi0_cd", "sdhi0"), |
| 379 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779", |
| 380 | "sdhi0_wp", "sdhi0"), |
Laurent Pinchart | f423df8 | 2013-03-07 13:46:02 +0100 | [diff] [blame] | 381 | /* SMSC */ |
| 382 | PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a7779", |
Laurent Pinchart | ee097e6 | 2013-03-07 13:46:02 +0100 | [diff] [blame] | 383 | "intc_irq1_b", "intc"), |
| 384 | PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a7779", |
Laurent Pinchart | f423df8 | 2013-03-07 13:46:02 +0100 | [diff] [blame] | 385 | "lbsc_ex_cs0", "lbsc"), |
Laurent Pinchart | a00f6e5 | 2013-03-07 13:46:02 +0100 | [diff] [blame] | 386 | /* USB0 */ |
| 387 | PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform.0", "pfc-r8a7779", |
| 388 | "usb0", "usb0"), |
| 389 | /* USB1 */ |
| 390 | PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform.0", "pfc-r8a7779", |
| 391 | "usb1", "usb1"), |
| 392 | /* USB2 */ |
| 393 | PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform.1", "pfc-r8a7779", |
| 394 | "usb2", "usb2"), |
Laurent Pinchart | 4a655ec | 2013-03-06 14:22:11 +0100 | [diff] [blame] | 395 | }; |
| 396 | |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 397 | static void __init marzen_init(void) |
| 398 | { |
Phil Edworthy | 894cda1 | 2012-08-06 13:31:05 +0100 | [diff] [blame] | 399 | regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers, |
| 400 | ARRAY_SIZE(fixed3v3_power_consumers), 3300000); |
Kuninori Morimoto | 90b85af | 2012-08-29 18:58:15 -0700 | [diff] [blame] | 401 | regulator_register_fixed(1, dummy_supplies, |
Phil Edworthy | 894cda1 | 2012-08-06 13:31:05 +0100 | [diff] [blame] | 402 | ARRAY_SIZE(dummy_supplies)); |
Guennadi Liakhovetski | b354e22 | 2012-06-27 00:32:32 +0200 | [diff] [blame] | 403 | |
Laurent Pinchart | 4a655ec | 2013-03-06 14:22:11 +0100 | [diff] [blame] | 404 | pinctrl_register_mappings(marzen_pinctrl_map, |
| 405 | ARRAY_SIZE(marzen_pinctrl_map)); |
Magnus Damm | 19c43fc | 2011-12-14 01:36:22 +0900 | [diff] [blame] | 406 | r8a7779_pinmux_init(); |
| 407 | |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 408 | r8a7779_add_standard_devices(); |
| 409 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); |
| 410 | } |
| 411 | |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 412 | MACHINE_START(MARZEN, "marzen") |
Marc Zyngier | a62580e | 2011-09-08 13:15:22 +0100 | [diff] [blame] | 413 | .smp = smp_ops(r8a7779_smp_ops), |
Magnus Damm | 3e353b87 | 2012-02-29 21:37:43 +0900 | [diff] [blame] | 414 | .map_io = r8a7779_map_io, |
| 415 | .init_early = r8a7779_add_early_devices, |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 416 | .nr_irqs = NR_IRQS_LEGACY, |
| 417 | .init_irq = r8a7779_init_irq, |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 418 | .init_machine = marzen_init, |
Kuninori Morimoto | 94e1f7f | 2012-10-29 01:15:34 -0700 | [diff] [blame] | 419 | .init_late = marzen_init_late, |
Stephen Warren | 6bb27d7 | 2012-11-08 12:40:59 -0700 | [diff] [blame] | 420 | .init_time = r8a7779_earlytimer_init, |
Magnus Damm | f411fad | 2011-12-14 01:36:12 +0900 | [diff] [blame] | 421 | MACHINE_END |