aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2014-03-17 03:00:03 -0400
committerOlof Johansson <olof@lixom.net>2014-03-17 03:00:03 -0400
commitd89893272a0e2193be8532177c1850f356f4d5db (patch)
tree096fffa775f09f64af20daba2f07db17ed43addd
parent79c37662b46e2b183bf6648b733968273fc9947c (diff)
parent6197c08ab81cf1430cbe7346fd6ca0b5a18580bf (diff)
Merge tag 'renesas-boards3-for-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/boards
Merge "Third Round of Renesas ARM Based SoC Boards Updates for v3.15" from Simon Horman: * r7s72100 SoC (RZ/A1H) based Genmai board - Set proper DMA masks for Ether device * r8a7791 (R-Car M2) based Koelsch board - Remove Koelsch DT reference legacy clock bits - Set proper DMA masks for Ether device - Add DU device to koelsch-reference - Refactor clock lookup hack in koelsch-reference - Add SDHI devices * r8a7790 (R-Car H2) based Lager board - Remove Lager DT reference legacy clock bits - Set proper DMA masks for Ether device - Add internal USB PCI support - Add QSPI pinmux - Sdd SDHI0/2 support * emev2 (Emma Mobile EV2) based kzm9d board - Remove KZM9D board code * r8a7778 (R-Car M1) based bock-w board - Set proper DMA masks for Ether device * r8a7740 (R-Mobile A1) based Armadillo 800 EVA board - Set proper DMA masks for Ether device * tag 'renesas-boards3-for-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: Remove Lager DT reference legacy clock bits ARM: shmobile: Remove Koelsch DT reference legacy clock bits ARM: shmobile: Remove KZM9D board code ARM: shmobile: Genmai: set proper DMA masks for Ether device ARM: shmobile: Koelsch: set proper DMA masks for Ether device ARM: shmobile: Lager: set proper DMA masks for Ether device ARM: shmobile: BOCK-W: set proper DMA masks for Ether device ARM: shmobile: Armadillo 800 EVA: set proper DMA masks for Ether device ARM: shmobile: koelsch-reference: Add DU device ARM: shmobile: koelsch-reference: Refactor clock lookup hack ARM: shmobile: lager-reference: Add DU device ARM: shmobile: lager-reference: Refactor clock lookup hack ARM: shmobile: lager: Add internal USB PCI support ARM: shmobile: lager legacy: Add QSPI pinmux ARM: shmobile: lager: add SDHI0/2 support ARM: shmobile: Add SDHI devices for legacy Koelsch Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r--arch/arm/mach-shmobile/Kconfig6
-rw-r--r--arch/arm/mach-shmobile/Makefile1
-rw-r--r--arch/arm/mach-shmobile/board-armadillo800eva.c2
-rw-r--r--arch/arm/mach-shmobile/board-bockw.c21
-rw-r--r--arch/arm/mach-shmobile/board-genmai.c19
-rw-r--r--arch/arm/mach-shmobile/board-koelsch-reference.c104
-rw-r--r--arch/arm/mach-shmobile/board-koelsch.c174
-rw-r--r--arch/arm/mach-shmobile/board-kzm9d-reference.c47
-rw-r--r--arch/arm/mach-shmobile/board-lager-reference.c107
-rw-r--r--arch/arm/mach-shmobile/board-lager.c138
10 files changed, 506 insertions, 113 deletions
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index deb6dc884bf0..2f5c6f319a71 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -47,12 +47,6 @@ config MACH_KOELSCH
47 depends on ARCH_R8A7791 47 depends on ARCH_R8A7791
48 select MICREL_PHY if SH_ETH 48 select MICREL_PHY if SH_ETH
49 49
50config MACH_KZM9D
51 bool "KZM9D board"
52 depends on ARCH_EMEV2
53 select REGULATOR_FIXED_VOLTAGE if REGULATOR
54 select SMSC_PHY if SMSC911X
55
56config MACH_LAGER 50config MACH_LAGER
57 bool "Lager board" 51 bool "Lager board"
58 depends on ARCH_R8A7790 52 depends on ARCH_R8A7790
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index fe7d4ff706e4..1402d602f5a4 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -58,7 +58,6 @@ obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o
58ifdef CONFIG_ARCH_SHMOBILE_MULTI 58ifdef CONFIG_ARCH_SHMOBILE_MULTI
59obj-$(CONFIG_MACH_GENMAI) += board-genmai-reference.o 59obj-$(CONFIG_MACH_GENMAI) += board-genmai-reference.o
60obj-$(CONFIG_MACH_KOELSCH) += board-koelsch-reference.o 60obj-$(CONFIG_MACH_KOELSCH) += board-koelsch-reference.o
61obj-$(CONFIG_MACH_KZM9D) += board-kzm9d-reference.o
62obj-$(CONFIG_MACH_LAGER) += board-lager-reference.o 61obj-$(CONFIG_MACH_LAGER) += board-lager-reference.o
63else 62else
64obj-$(CONFIG_MACH_APE6EVM) += board-ape6evm.o 63obj-$(CONFIG_MACH_APE6EVM) += board-ape6evm.o
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index 93533e2710a8..4da3da7be3fa 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -383,6 +383,8 @@ static struct platform_device sh_eth_device = {
383 .id = -1, 383 .id = -1,
384 .dev = { 384 .dev = {
385 .platform_data = &sh_eth_platdata, 385 .platform_data = &sh_eth_platdata,
386 .dma_mask = &sh_eth_device.dev.coherent_dma_mask,
387 .coherent_dma_mask = DMA_BIT_MASK(32),
386 }, 388 },
387 .resource = sh_eth_resources, 389 .resource = sh_eth_resources,
388 .num_resources = ARRAY_SIZE(sh_eth_resources), 390 .num_resources = ARRAY_SIZE(sh_eth_resources),
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
index 684a529e400d..aaed215e96b9 100644
--- a/arch/arm/mach-shmobile/board-bockw.c
+++ b/arch/arm/mach-shmobile/board-bockw.c
@@ -1,9 +1,9 @@
1/* 1/*
2 * Bock-W board support 2 * Bock-W board support
3 * 3 *
4 * Copyright (C) 2013 Renesas Solutions Corp. 4 * Copyright (C) 2013-2014 Renesas Solutions Corp.
5 * Copyright (C) 2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> 5 * Copyright (C) 2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
6 * Copyright (C) 2013 Cogent Embedded, Inc. 6 * Copyright (C) 2013-2014 Cogent Embedded, Inc.
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 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 9 * it under the terms of the GNU General Public License as published by
@@ -235,6 +235,17 @@ static struct sh_eth_plat_data ether_platform_data __initdata = {
235 .no_ether_link = 1, 235 .no_ether_link = 1,
236}; 236};
237 237
238static struct platform_device_info ether_info __initdata = {
239 .parent = &platform_bus,
240 .name = "r8a777x-ether",
241 .id = -1,
242 .res = ether_resources,
243 .num_res = ARRAY_SIZE(ether_resources),
244 .data = &ether_platform_data,
245 .size_data = sizeof(ether_platform_data),
246 .dma_mask = DMA_BIT_MASK(32),
247};
248
238/* I2C */ 249/* I2C */
239static struct i2c_board_info i2c0_devices[] = { 250static struct i2c_board_info i2c0_devices[] = {
240 { 251 {
@@ -592,11 +603,7 @@ static void __init bockw_init(void)
592 r8a7778_init_irq_extpin(1); 603 r8a7778_init_irq_extpin(1);
593 r8a7778_add_standard_devices(); 604 r8a7778_add_standard_devices();
594 605
595 platform_device_register_resndata(&platform_bus, "r8a777x-ether", -1, 606 platform_device_register_full(&ether_info);
596 ether_resources,
597 ARRAY_SIZE(ether_resources),
598 &ether_platform_data,
599 sizeof(ether_platform_data));
600 607
601 platform_device_register_full(&vin0_info); 608 platform_device_register_full(&vin0_info);
602 /* VIN1 has a pin conflict with Ether */ 609 /* VIN1 has a pin conflict with Ether */
diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c
index e240980cc227..6c328d63b819 100644
--- a/arch/arm/mach-shmobile/board-genmai.c
+++ b/arch/arm/mach-shmobile/board-genmai.c
@@ -1,8 +1,9 @@
1/* 1/*
2 * Genmai board support 2 * Genmai board support
3 * 3 *
4 * Copyright (C) 2013 Renesas Solutions Corp. 4 * Copyright (C) 2013-2014 Renesas Solutions Corp.
5 * Copyright (C) 2013 Magnus Damm 5 * Copyright (C) 2013 Magnus Damm
6 * Copyright (C) 2014 Cogent Embedded, Inc.
6 * 7 *
7 * This program is free software; you can redistribute it and/or modify 8 * 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 * it under the terms of the GNU General Public License as published by
@@ -43,6 +44,17 @@ static const struct resource ether_resources[] __initconst = {
43 DEFINE_RES_IRQ(gic_iid(359)), 44 DEFINE_RES_IRQ(gic_iid(359)),
44}; 45};
45 46
47static const struct platform_device_info ether_info __initconst = {
48 .parent = &platform_bus,
49 .name = "r7s72100-ether",
50 .id = -1,
51 .res = ether_resources,
52 .num_res = ARRAY_SIZE(ether_resources),
53 .data = &ether_pdata,
54 .size_data = sizeof(ether_pdata),
55 .dma_mask = DMA_BIT_MASK(32),
56};
57
46/* RSPI */ 58/* RSPI */
47#define RSPI_RESOURCE(idx, baseaddr, irq) \ 59#define RSPI_RESOURCE(idx, baseaddr, irq) \
48static const struct resource rspi##idx##_resources[] __initconst = { \ 60static const struct resource rspi##idx##_resources[] __initconst = { \
@@ -82,10 +94,7 @@ static void __init genmai_add_standard_devices(void)
82 r7s72100_clock_init(); 94 r7s72100_clock_init();
83 r7s72100_add_dt_devices(); 95 r7s72100_add_dt_devices();
84 96
85 platform_device_register_resndata(&platform_bus, "r7s72100-ether", -1, 97 platform_device_register_full(&ether_info);
86 ether_resources,
87 ARRAY_SIZE(ether_resources),
88 &ether_pdata, sizeof(ether_pdata));
89 98
90 r7s72100_register_rspi(0); 99 r7s72100_register_rspi(0);
91 r7s72100_register_rspi(1); 100 r7s72100_register_rspi(1);
diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
index feb8d97ea2f7..a3fd30242bd8 100644
--- a/arch/arm/mach-shmobile/board-koelsch-reference.c
+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
@@ -21,46 +21,114 @@
21 21
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/clkdev.h> 23#include <linux/clkdev.h>
24#include <linux/dma-mapping.h>
24#include <linux/kernel.h> 25#include <linux/kernel.h>
25#include <linux/of_platform.h> 26#include <linux/of_platform.h>
27#include <linux/platform_data/rcar-du.h>
26#include <mach/common.h> 28#include <mach/common.h>
29#include <mach/irqs.h>
27#include <mach/rcar-gen2.h> 30#include <mach/rcar-gen2.h>
28#include <mach/r8a7791.h> 31#include <mach/r8a7791.h>
29#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
30 33
34/* DU */
35static struct rcar_du_encoder_data koelsch_du_encoders[] = {
36 {
37 .type = RCAR_DU_ENCODER_NONE,
38 .output = RCAR_DU_OUTPUT_LVDS0,
39 .connector.lvds.panel = {
40 .width_mm = 210,
41 .height_mm = 158,
42 .mode = {
43 .clock = 65000,
44 .hdisplay = 1024,
45 .hsync_start = 1048,
46 .hsync_end = 1184,
47 .htotal = 1344,
48 .vdisplay = 768,
49 .vsync_start = 771,
50 .vsync_end = 777,
51 .vtotal = 806,
52 .flags = 0,
53 },
54 },
55 },
56};
57
58static struct rcar_du_platform_data koelsch_du_pdata = {
59 .encoders = koelsch_du_encoders,
60 .num_encoders = ARRAY_SIZE(koelsch_du_encoders),
61};
62
63static const struct resource du_resources[] __initconst = {
64 DEFINE_RES_MEM(0xfeb00000, 0x40000),
65 DEFINE_RES_MEM_NAMED(0xfeb90000, 0x1c, "lvds.0"),
66 DEFINE_RES_IRQ(gic_spi(256)),
67 DEFINE_RES_IRQ(gic_spi(268)),
68};
69
70static void __init koelsch_add_du_device(void)
71{
72 struct platform_device_info info = {
73 .name = "rcar-du-r8a7791",
74 .id = -1,
75 .res = du_resources,
76 .num_res = ARRAY_SIZE(du_resources),
77 .data = &koelsch_du_pdata,
78 .size_data = sizeof(koelsch_du_pdata),
79 .dma_mask = DMA_BIT_MASK(32),
80 };
81
82 platform_device_register_full(&info);
83}
84
31static void __init koelsch_add_standard_devices(void) 85static void __init koelsch_add_standard_devices(void)
32{ 86{
33#ifdef CONFIG_COMMON_CLK
34 /* 87 /*
35 * This is a really crude hack to provide clkdev support to the SCIF 88 * This is a really crude hack to provide clkdev support to the CMT and
36 * and CMT devices until they get moved to DT. 89 * DU devices until they get moved to DT.
37 */ 90 */
38 static const char * const scif_names[] = { 91 static const struct clk_name {
39 "scifa0", "scifa1", "scifb0", "scifb1", "scifb2", "scifa2", 92 const char *clk;
40 "scif0", "scif1", "scif2", "scif3", "scif4", "scif5", "scifa3", 93 const char *con_id;
41 "scifa4", "scifa5", 94 const char *dev_id;
95 } clk_names[] = {
96 { "cmt0", NULL, "sh_cmt.0" },
97 { "scifa0", NULL, "sh-sci.0" },
98 { "scifa1", NULL, "sh-sci.1" },
99 { "scifb0", NULL, "sh-sci.2" },
100 { "scifb1", NULL, "sh-sci.3" },
101 { "scifb2", NULL, "sh-sci.4" },
102 { "scifa2", NULL, "sh-sci.5" },
103 { "scif0", NULL, "sh-sci.6" },
104 { "scif1", NULL, "sh-sci.7" },
105 { "scif2", NULL, "sh-sci.8" },
106 { "scif3", NULL, "sh-sci.9" },
107 { "scif4", NULL, "sh-sci.10" },
108 { "scif5", NULL, "sh-sci.11" },
109 { "scifa3", NULL, "sh-sci.12" },
110 { "scifa4", NULL, "sh-sci.13" },
111 { "scifa5", NULL, "sh-sci.14" },
112 { "du0", "du.0", "rcar-du-r8a7791" },
113 { "du1", "du.1", "rcar-du-r8a7791" },
114 { "lvds0", "lvds.0", "rcar-du-r8a7791" },
42 }; 115 };
43 struct clk *clk; 116 struct clk *clk;
44 unsigned int i; 117 unsigned int i;
45 118
46 for (i = 0; i < ARRAY_SIZE(scif_names); ++i) { 119 for (i = 0; i < ARRAY_SIZE(clk_names); ++i) {
47 clk = clk_get(NULL, scif_names[i]); 120 clk = clk_get(NULL, clk_names[i].clk);
48 if (!IS_ERR(clk)) { 121 if (!IS_ERR(clk)) {
49 clk_register_clkdev(clk, NULL, "sh-sci.%u", i); 122 clk_register_clkdev(clk, clk_names[i].con_id,
123 clk_names[i].dev_id);
50 clk_put(clk); 124 clk_put(clk);
51 } 125 }
52 } 126 }
53 127
54 clk = clk_get(NULL, "cmt0");
55 if (!IS_ERR(clk)) {
56 clk_register_clkdev(clk, NULL, "sh_cmt.0");
57 clk_put(clk);
58 }
59#else
60 r8a7791_clock_init();
61#endif
62 r8a7791_add_dt_devices(); 128 r8a7791_add_dt_devices();
63 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 129 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
130
131 koelsch_add_du_device();
64} 132}
65 133
66static const char * const koelsch_boards_compat_dt[] __initconst = { 134static const char * const koelsch_boards_compat_dt[] __initconst = {
diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
index d42637db596a..5a034ff405d0 100644
--- a/arch/arm/mach-shmobile/board-koelsch.c
+++ b/arch/arm/mach-shmobile/board-koelsch.c
@@ -2,8 +2,9 @@
2 * Koelsch board support 2 * Koelsch board support
3 * 3 *
4 * Copyright (C) 2013 Renesas Electronics Corporation 4 * Copyright (C) 2013 Renesas Electronics Corporation
5 * Copyright (C) 2013 Renesas Solutions Corp. 5 * Copyright (C) 2013-2014 Renesas Solutions Corp.
6 * Copyright (C) 2013 Magnus Damm 6 * Copyright (C) 2013 Magnus Damm
7 * Copyright (C) 2014 Cogent Embedded, Inc.
7 * 8 *
8 * This program is free software; you can redistribute it and/or modify 9 * 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 * it under the terms of the GNU General Public License as published by
@@ -26,6 +27,9 @@
26#include <linux/irq.h> 27#include <linux/irq.h>
27#include <linux/kernel.h> 28#include <linux/kernel.h>
28#include <linux/leds.h> 29#include <linux/leds.h>
30#include <linux/mfd/tmio.h>
31#include <linux/mmc/host.h>
32#include <linux/mmc/sh_mobile_sdhi.h>
29#include <linux/mtd/mtd.h> 33#include <linux/mtd/mtd.h>
30#include <linux/mtd/partitions.h> 34#include <linux/mtd/partitions.h>
31#include <linux/phy.h> 35#include <linux/phy.h>
@@ -33,6 +37,10 @@
33#include <linux/platform_data/gpio-rcar.h> 37#include <linux/platform_data/gpio-rcar.h>
34#include <linux/platform_data/rcar-du.h> 38#include <linux/platform_data/rcar-du.h>
35#include <linux/platform_device.h> 39#include <linux/platform_device.h>
40#include <linux/regulator/driver.h>
41#include <linux/regulator/fixed.h>
42#include <linux/regulator/gpio-regulator.h>
43#include <linux/regulator/machine.h>
36#include <linux/sh_eth.h> 44#include <linux/sh_eth.h>
37#include <linux/spi/flash.h> 45#include <linux/spi/flash.h>
38#include <linux/spi/rspi.h> 46#include <linux/spi/rspi.h>
@@ -109,6 +117,17 @@ static const struct resource ether_resources[] __initconst = {
109 DEFINE_RES_IRQ(gic_spi(162)), 117 DEFINE_RES_IRQ(gic_spi(162)),
110}; 118};
111 119
120static const struct platform_device_info ether_info __initconst = {
121 .parent = &platform_bus,
122 .name = "r8a7791-ether",
123 .id = -1,
124 .res = ether_resources,
125 .num_res = ARRAY_SIZE(ether_resources),
126 .data = &ether_pdata,
127 .size_data = sizeof(ether_pdata),
128 .dma_mask = DMA_BIT_MASK(32),
129};
130
112/* LEDS */ 131/* LEDS */
113static struct gpio_led koelsch_leds[] = { 132static struct gpio_led koelsch_leds[] = {
114 { 133 {
@@ -251,6 +270,103 @@ static void __init koelsch_add_i2c(unsigned idx)
251 i2c_resources + res_idx, 2); 270 i2c_resources + res_idx, 2);
252} 271}
253 272
273#define SDHI_REGULATOR(idx, vdd_pin, vccq_pin) \
274static struct regulator_consumer_supply vcc_sdhi##idx##_consumer = \
275 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi." #idx); \
276 \
277static struct regulator_init_data vcc_sdhi##idx##_init_data = { \
278 .constraints = { \
279 .valid_ops_mask = REGULATOR_CHANGE_STATUS, \
280 }, \
281 .consumer_supplies = &vcc_sdhi##idx##_consumer, \
282 .num_consumer_supplies = 1, \
283}; \
284 \
285static const struct fixed_voltage_config vcc_sdhi##idx##_info __initconst = {\
286 .supply_name = "SDHI" #idx "Vcc", \
287 .microvolts = 3300000, \
288 .gpio = vdd_pin, \
289 .enable_high = 1, \
290 .init_data = &vcc_sdhi##idx##_init_data, \
291}; \
292 \
293static struct regulator_consumer_supply vccq_sdhi##idx##_consumer = \
294 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi." #idx); \
295 \
296static struct regulator_init_data vccq_sdhi##idx##_init_data = { \
297 .constraints = { \
298 .input_uV = 3300000, \
299 .min_uV = 1800000, \
300 .max_uV = 3300000, \
301 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | \
302 REGULATOR_CHANGE_STATUS, \
303 }, \
304 .consumer_supplies = &vccq_sdhi##idx##_consumer, \
305 .num_consumer_supplies = 1, \
306}; \
307 \
308static struct gpio vccq_sdhi##idx##_gpio = \
309 { vccq_pin, GPIOF_OUT_INIT_HIGH, "vccq-sdhi" #idx }; \
310 \
311static struct gpio_regulator_state vccq_sdhi##idx##_states[] = { \
312 { .value = 1800000, .gpios = 0 }, \
313 { .value = 3300000, .gpios = 1 }, \
314}; \
315 \
316static const struct gpio_regulator_config vccq_sdhi##idx##_info __initconst = {\
317 .supply_name = "vqmmc", \
318 .gpios = &vccq_sdhi##idx##_gpio, \
319 .nr_gpios = 1, \
320 .states = vccq_sdhi##idx##_states, \
321 .nr_states = ARRAY_SIZE(vccq_sdhi##idx##_states), \
322 .type = REGULATOR_VOLTAGE, \
323 .init_data = &vccq_sdhi##idx##_init_data, \
324};
325
326SDHI_REGULATOR(0, RCAR_GP_PIN(7, 17), RCAR_GP_PIN(2, 12));
327SDHI_REGULATOR(1, RCAR_GP_PIN(7, 18), RCAR_GP_PIN(2, 13));
328SDHI_REGULATOR(2, RCAR_GP_PIN(7, 19), RCAR_GP_PIN(2, 26));
329
330/* SDHI0 */
331static struct sh_mobile_sdhi_info sdhi0_info __initdata = {
332 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
333 MMC_CAP_POWER_OFF_CARD,
334 .tmio_caps2 = MMC_CAP2_NO_MULTI_READ,
335 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,
336};
337
338static struct resource sdhi0_resources[] __initdata = {
339 DEFINE_RES_MEM(0xee100000, 0x200),
340 DEFINE_RES_IRQ(gic_spi(165)),
341};
342
343/* SDHI1 */
344static struct sh_mobile_sdhi_info sdhi1_info __initdata = {
345 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
346 MMC_CAP_POWER_OFF_CARD,
347 .tmio_caps2 = MMC_CAP2_NO_MULTI_READ,
348 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,
349};
350
351static struct resource sdhi1_resources[] __initdata = {
352 DEFINE_RES_MEM(0xee140000, 0x100),
353 DEFINE_RES_IRQ(gic_spi(167)),
354};
355
356/* SDHI2 */
357static struct sh_mobile_sdhi_info sdhi2_info __initdata = {
358 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
359 MMC_CAP_POWER_OFF_CARD,
360 .tmio_caps2 = MMC_CAP2_NO_MULTI_READ,
361 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT |
362 TMIO_MMC_WRPROTECT_DISABLE,
363};
364
365static struct resource sdhi2_resources[] __initdata = {
366 DEFINE_RES_MEM(0xee160000, 0x100),
367 DEFINE_RES_IRQ(gic_spi(168)),
368};
369
254static const struct pinctrl_map koelsch_pinctrl_map[] = { 370static const struct pinctrl_map koelsch_pinctrl_map[] = {
255 /* DU */ 371 /* DU */
256 PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7791", "pfc-r8a7791", 372 PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7791", "pfc-r8a7791",
@@ -288,6 +404,31 @@ static const struct pinctrl_map koelsch_pinctrl_map[] = {
288 /* I2C4 */ 404 /* I2C4 */
289 PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar_gen2.4", "pfc-r8a7791", 405 PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar_gen2.4", "pfc-r8a7791",
290 "i2c4_c", "i2c4"), 406 "i2c4_c", "i2c4"),
407 /* SDHI0 */
408 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791",
409 "sdhi0_data4", "sdhi0"),
410 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791",
411 "sdhi0_ctrl", "sdhi0"),
412 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791",
413 "sdhi0_cd", "sdhi0"),
414 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791",
415 "sdhi0_wp", "sdhi0"),
416 /* SDHI2 */
417 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791",
418 "sdhi1_data4", "sdhi1"),
419 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791",
420 "sdhi1_ctrl", "sdhi1"),
421 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791",
422 "sdhi1_cd", "sdhi1"),
423 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791",
424 "sdhi1_wp", "sdhi1"),
425 /* SDHI2 */
426 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7791",
427 "sdhi2_data4", "sdhi2"),
428 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7791",
429 "sdhi2_ctrl", "sdhi2"),
430 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7791",
431 "sdhi2_cd", "sdhi2"),
291}; 432};
292 433
293static void __init koelsch_add_standard_devices(void) 434static void __init koelsch_add_standard_devices(void)
@@ -297,10 +438,7 @@ static void __init koelsch_add_standard_devices(void)
297 ARRAY_SIZE(koelsch_pinctrl_map)); 438 ARRAY_SIZE(koelsch_pinctrl_map));
298 r8a7791_pinmux_init(); 439 r8a7791_pinmux_init();
299 r8a7791_add_standard_devices(); 440 r8a7791_add_standard_devices();
300 platform_device_register_resndata(&platform_bus, "r8a7791-ether", -1, 441 platform_device_register_full(&ether_info);
301 ether_resources,
302 ARRAY_SIZE(ether_resources),
303 &ether_pdata, sizeof(ether_pdata));
304 platform_device_register_data(&platform_bus, "leds-gpio", -1, 442 platform_device_register_data(&platform_bus, "leds-gpio", -1,
305 &koelsch_leds_pdata, 443 &koelsch_leds_pdata,
306 sizeof(koelsch_leds_pdata)); 444 sizeof(koelsch_leds_pdata));
@@ -321,6 +459,32 @@ static void __init koelsch_add_standard_devices(void)
321 koelsch_add_i2c(2); 459 koelsch_add_i2c(2);
322 koelsch_add_i2c(4); 460 koelsch_add_i2c(4);
323 koelsch_add_i2c(5); 461 koelsch_add_i2c(5);
462
463 platform_device_register_data(&platform_bus, "reg-fixed-voltage", 0,
464 &vcc_sdhi0_info, sizeof(struct fixed_voltage_config));
465 platform_device_register_data(&platform_bus, "reg-fixed-voltage", 1,
466 &vcc_sdhi1_info, sizeof(struct fixed_voltage_config));
467 platform_device_register_data(&platform_bus, "reg-fixed-voltage", 2,
468 &vcc_sdhi2_info, sizeof(struct fixed_voltage_config));
469 platform_device_register_data(&platform_bus, "gpio-regulator", 0,
470 &vccq_sdhi0_info, sizeof(struct gpio_regulator_config));
471 platform_device_register_data(&platform_bus, "gpio-regulator", 1,
472 &vccq_sdhi1_info, sizeof(struct gpio_regulator_config));
473 platform_device_register_data(&platform_bus, "gpio-regulator", 2,
474 &vccq_sdhi2_info, sizeof(struct gpio_regulator_config));
475
476 platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 0,
477 sdhi0_resources, ARRAY_SIZE(sdhi0_resources),
478 &sdhi0_info, sizeof(struct sh_mobile_sdhi_info));
479
480 platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 1,
481 sdhi1_resources, ARRAY_SIZE(sdhi1_resources),
482 &sdhi1_info, sizeof(struct sh_mobile_sdhi_info));
483
484 platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 2,
485 sdhi2_resources, ARRAY_SIZE(sdhi2_resources),
486 &sdhi2_info, sizeof(struct sh_mobile_sdhi_info));
487
324} 488}
325 489
326/* 490/*
diff --git a/arch/arm/mach-shmobile/board-kzm9d-reference.c b/arch/arm/mach-shmobile/board-kzm9d-reference.c
deleted file mode 100644
index 853003c8988a..000000000000
--- a/arch/arm/mach-shmobile/board-kzm9d-reference.c
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2 * kzm9d board support - Reference DT implementation
3 *
4 * Copyright (C) 2013 Renesas Solutions Corp.
5 * Copyright (C) 2013 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/init.h>
22#include <linux/of_platform.h>
23#include <linux/clk-provider.h>
24#include <mach/emev2.h>
25#include <mach/common.h>
26#include <asm/mach/arch.h>
27
28static void __init kzm9d_add_standard_devices(void)
29{
30 of_clk_init(NULL);
31 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
32}
33
34static const char *kzm9d_boards_compat_dt[] __initdata = {
35 "renesas,kzm9d",
36 "renesas,kzm9d-reference",
37 NULL,
38};
39
40DT_MACHINE_START(KZM9D_DT, "kzm9d")
41 .smp = smp_ops(emev2_smp_ops),
42 .map_io = emev2_map_io,
43 .init_early = emev2_init_delay,
44 .init_machine = kzm9d_add_standard_devices,
45 .init_late = shmobile_init_late,
46 .dt_compat = kzm9d_boards_compat_dt,
47MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
index dc8d76b9a9f1..440aac36d693 100644
--- a/arch/arm/mach-shmobile/board-lager-reference.c
+++ b/arch/arm/mach-shmobile/board-lager-reference.c
@@ -20,47 +20,116 @@
20 20
21#include <linux/clk.h> 21#include <linux/clk.h>
22#include <linux/clkdev.h> 22#include <linux/clkdev.h>
23#include <linux/dma-mapping.h>
23#include <linux/init.h> 24#include <linux/init.h>
24#include <linux/of_platform.h> 25#include <linux/of_platform.h>
26#include <linux/platform_data/rcar-du.h>
25#include <mach/common.h> 27#include <mach/common.h>
28#include <mach/irqs.h>
26#include <mach/rcar-gen2.h> 29#include <mach/rcar-gen2.h>
27#include <mach/r8a7790.h> 30#include <mach/r8a7790.h>
28#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
29 32
33/* DU */
34static struct rcar_du_encoder_data lager_du_encoders[] = {
35 {
36 .type = RCAR_DU_ENCODER_VGA,
37 .output = RCAR_DU_OUTPUT_DPAD0,
38 }, {
39 .type = RCAR_DU_ENCODER_NONE,
40 .output = RCAR_DU_OUTPUT_LVDS1,
41 .connector.lvds.panel = {
42 .width_mm = 210,
43 .height_mm = 158,
44 .mode = {
45 .clock = 65000,
46 .hdisplay = 1024,
47 .hsync_start = 1048,
48 .hsync_end = 1184,
49 .htotal = 1344,
50 .vdisplay = 768,
51 .vsync_start = 771,
52 .vsync_end = 777,
53 .vtotal = 806,
54 .flags = 0,
55 },
56 },
57 },
58};
59
60static struct rcar_du_platform_data lager_du_pdata = {
61 .encoders = lager_du_encoders,
62 .num_encoders = ARRAY_SIZE(lager_du_encoders),
63};
64
65static const struct resource du_resources[] __initconst = {
66 DEFINE_RES_MEM(0xfeb00000, 0x70000),
67 DEFINE_RES_MEM_NAMED(0xfeb90000, 0x1c, "lvds.0"),
68 DEFINE_RES_MEM_NAMED(0xfeb94000, 0x1c, "lvds.1"),
69 DEFINE_RES_IRQ(gic_spi(256)),
70 DEFINE_RES_IRQ(gic_spi(268)),
71 DEFINE_RES_IRQ(gic_spi(269)),
72};
73
74static void __init lager_add_du_device(void)
75{
76 struct platform_device_info info = {
77 .name = "rcar-du-r8a7790",
78 .id = -1,
79 .res = du_resources,
80 .num_res = ARRAY_SIZE(du_resources),
81 .data = &lager_du_pdata,
82 .size_data = sizeof(lager_du_pdata),
83 .dma_mask = DMA_BIT_MASK(32),
84 };
85
86 platform_device_register_full(&info);
87}
88
30static void __init lager_add_standard_devices(void) 89static void __init lager_add_standard_devices(void)
31{ 90{
32#ifdef CONFIG_COMMON_CLK
33 /* 91 /*
34 * This is a really crude hack to provide clkdev support to the SCIF 92 * This is a really crude hack to provide clkdev support to platform
35 * and CMT devices until they get moved to DT. 93 * devices until they get moved to DT.
36 */ 94 */
37 static const char * const scif_names[] = { 95 static const struct clk_name {
38 "scifa0", "scifa1", "scifb0", "scifb1", 96 const char *clk;
39 "scifb2", "scifa2", "scif0", "scif1", 97 const char *con_id;
40 "hscif0", "hscif1", 98 const char *dev_id;
99 } clk_names[] = {
100 { "cmt0", NULL, "sh_cmt.0" },
101 { "scifa0", NULL, "sh-sci.0" },
102 { "scifa1", NULL, "sh-sci.1" },
103 { "scifb0", NULL, "sh-sci.2" },
104 { "scifb1", NULL, "sh-sci.3" },
105 { "scifb2", NULL, "sh-sci.4" },
106 { "scifa2", NULL, "sh-sci.5" },
107 { "scif0", NULL, "sh-sci.6" },
108 { "scif1", NULL, "sh-sci.7" },
109 { "hscif0", NULL, "sh-sci.8" },
110 { "hscif1", NULL, "sh-sci.9" },
111 { "du0", "du.0", "rcar-du-r8a7790" },
112 { "du1", "du.1", "rcar-du-r8a7790" },
113 { "du2", "du.2", "rcar-du-r8a7790" },
114 { "lvds0", "lvds.0", "rcar-du-r8a7790" },
115 { "lvds1", "lvds.1", "rcar-du-r8a7790" },
41 }; 116 };
42 struct clk *clk; 117 struct clk *clk;
43 unsigned int i; 118 unsigned int i;
44 119
45 for (i = 0; i < ARRAY_SIZE(scif_names); ++i) { 120 for (i = 0; i < ARRAY_SIZE(clk_names); ++i) {
46 clk = clk_get(NULL, scif_names[i]); 121 clk = clk_get(NULL, clk_names[i].clk);
47 if (!IS_ERR(clk)) { 122 if (!IS_ERR(clk)) {
48 clk_register_clkdev(clk, NULL, "sh-sci.%u", i); 123 clk_register_clkdev(clk, clk_names[i].con_id,
124 clk_names[i].dev_id);
49 clk_put(clk); 125 clk_put(clk);
50 } 126 }
51 } 127 }
52 128
53 clk = clk_get(NULL, "cmt0");
54 if (!IS_ERR(clk)) {
55 clk_register_clkdev(clk, NULL, "sh_cmt.0");
56 clk_put(clk);
57 }
58#else
59 r8a7790_clock_init();
60#endif
61
62 r8a7790_add_dt_devices(); 129 r8a7790_add_dt_devices();
63 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 130 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
131
132 lager_add_du_device();
64} 133}
65 134
66static const char *lager_boards_compat_dt[] __initdata = { 135static const char *lager_boards_compat_dt[] __initdata = {
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
index 317574864e7b..f0104bfe544e 100644
--- a/arch/arm/mach-shmobile/board-lager.c
+++ b/arch/arm/mach-shmobile/board-lager.c
@@ -1,8 +1,9 @@
1/* 1/*
2 * Lager board support 2 * Lager board support
3 * 3 *
4 * Copyright (C) 2013 Renesas Solutions Corp. 4 * Copyright (C) 2013-2014 Renesas Solutions Corp.
5 * Copyright (C) 2013 Magnus Damm 5 * Copyright (C) 2013 Magnus Damm
6 * Copyright (C) 2014 Cogent Embedded, Inc.
6 * 7 *
7 * This program is free software; you can redistribute it and/or modify 8 * 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 * it under the terms of the GNU General Public License as published by
@@ -26,8 +27,10 @@
26#include <linux/irq.h> 27#include <linux/irq.h>
27#include <linux/kernel.h> 28#include <linux/kernel.h>
28#include <linux/leds.h> 29#include <linux/leds.h>
30#include <linux/mfd/tmio.h>
29#include <linux/mmc/host.h> 31#include <linux/mmc/host.h>
30#include <linux/mmc/sh_mmcif.h> 32#include <linux/mmc/sh_mmcif.h>
33#include <linux/mmc/sh_mobile_sdhi.h>
31#include <linux/pinctrl/machine.h> 34#include <linux/pinctrl/machine.h>
32#include <linux/platform_data/camera-rcar.h> 35#include <linux/platform_data/camera-rcar.h>
33#include <linux/platform_data/gpio-rcar.h> 36#include <linux/platform_data/gpio-rcar.h>
@@ -68,6 +71,19 @@
68 * # amixer set "LINEOUT Mixer DACL" on 71 * # amixer set "LINEOUT Mixer DACL" on
69 */ 72 */
70 73
74/*
75 * SDHI0 (CN8)
76 *
77 * JP3: pin1
78 * SW20: pin1
79
80 * GP5_24: 1: VDD 3.3V (defult)
81 * 0: VDD 0.0V
82 * GP5_29: 1: VccQ 3.3V (defult)
83 * 0: VccQ 1.8V
84 *
85 */
86
71/* DU */ 87/* DU */
72static struct rcar_du_encoder_data lager_du_encoders[] = { 88static struct rcar_du_encoder_data lager_du_encoders[] = {
73 { 89 {
@@ -260,6 +276,17 @@ static const struct resource ether_resources[] __initconst = {
260 DEFINE_RES_IRQ(gic_spi(162)), 276 DEFINE_RES_IRQ(gic_spi(162)),
261}; 277};
262 278
279static const struct platform_device_info ether_info __initconst = {
280 .parent = &platform_bus,
281 .name = "r8a7790-ether",
282 .id = -1,
283 .res = ether_resources,
284 .num_res = ARRAY_SIZE(ether_resources),
285 .data = &ether_pdata,
286 .size_data = sizeof(ether_pdata),
287 .dma_mask = DMA_BIT_MASK(32),
288};
289
263/* SPI Flash memory (Spansion S25FL512SAGMFIG11 64Mb) */ 290/* SPI Flash memory (Spansion S25FL512SAGMFIG11 64Mb) */
264static struct mtd_partition spi_flash_part[] = { 291static struct mtd_partition spi_flash_part[] = {
265 /* Reserved for user loader program, read-only */ 292 /* Reserved for user loader program, read-only */
@@ -595,6 +622,76 @@ static void __init lager_add_rsnd_device(void)
595 platform_device_register_full(&cardinfo); 622 platform_device_register_full(&cardinfo);
596} 623}
597 624
625/* SDHI0 */
626static struct sh_mobile_sdhi_info sdhi0_info __initdata = {
627 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
628 MMC_CAP_POWER_OFF_CARD,
629 .tmio_caps2 = MMC_CAP2_NO_MULTI_READ,
630 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT |
631 TMIO_MMC_WRPROTECT_DISABLE,
632};
633
634static struct resource sdhi0_resources[] __initdata = {
635 DEFINE_RES_MEM(0xee100000, 0x200),
636 DEFINE_RES_IRQ(gic_spi(165)),
637};
638
639/* SDHI2 */
640static struct sh_mobile_sdhi_info sdhi2_info __initdata = {
641 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
642 MMC_CAP_POWER_OFF_CARD,
643 .tmio_caps2 = MMC_CAP2_NO_MULTI_READ,
644 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT |
645 TMIO_MMC_WRPROTECT_DISABLE,
646};
647
648static struct resource sdhi2_resources[] __initdata = {
649 DEFINE_RES_MEM(0xee140000, 0x100),
650 DEFINE_RES_IRQ(gic_spi(167)),
651};
652
653/* Internal PCI1 */
654static const struct resource pci1_resources[] __initconst = {
655 DEFINE_RES_MEM(0xee0b0000, 0x10000), /* CFG */
656 DEFINE_RES_MEM(0xee0a0000, 0x10000), /* MEM */
657 DEFINE_RES_IRQ(gic_spi(112)),
658};
659
660static const struct platform_device_info pci1_info __initconst = {
661 .parent = &platform_bus,
662 .name = "pci-rcar-gen2",
663 .id = 1,
664 .res = pci1_resources,
665 .num_res = ARRAY_SIZE(pci1_resources),
666 .dma_mask = DMA_BIT_MASK(32),
667};
668
669static void __init lager_add_usb1_device(void)
670{
671 platform_device_register_full(&pci1_info);
672}
673
674/* Internal PCI2 */
675static const struct resource pci2_resources[] __initconst = {
676 DEFINE_RES_MEM(0xee0d0000, 0x10000), /* CFG */
677 DEFINE_RES_MEM(0xee0c0000, 0x10000), /* MEM */
678 DEFINE_RES_IRQ(gic_spi(113)),
679};
680
681static const struct platform_device_info pci2_info __initconst = {
682 .parent = &platform_bus,
683 .name = "pci-rcar-gen2",
684 .id = 2,
685 .res = pci2_resources,
686 .num_res = ARRAY_SIZE(pci2_resources),
687 .dma_mask = DMA_BIT_MASK(32),
688};
689
690static void __init lager_add_usb2_device(void)
691{
692 platform_device_register_full(&pci2_info);
693}
694
598static const struct pinctrl_map lager_pinctrl_map[] = { 695static const struct pinctrl_map lager_pinctrl_map[] = {
599 /* DU (CN10: ARGB0, CN13: LVDS) */ 696 /* DU (CN10: ARGB0, CN13: LVDS) */
600 PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790", 697 PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790",
@@ -606,12 +703,31 @@ static const struct pinctrl_map lager_pinctrl_map[] = {
606 /* I2C2 */ 703 /* I2C2 */
607 PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar.2", "pfc-r8a7790", 704 PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar.2", "pfc-r8a7790",
608 "i2c2", "i2c2"), 705 "i2c2", "i2c2"),
706 /* QSPI */
707 PIN_MAP_MUX_GROUP_DEFAULT("qspi.0", "pfc-r8a7790",
708 "qspi_ctrl", "qspi"),
709 PIN_MAP_MUX_GROUP_DEFAULT("qspi.0", "pfc-r8a7790",
710 "qspi_data4", "qspi"),
609 /* SCIF0 (CN19: DEBUG SERIAL0) */ 711 /* SCIF0 (CN19: DEBUG SERIAL0) */
610 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790", 712 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790",
611 "scif0_data", "scif0"), 713 "scif0_data", "scif0"),
612 /* SCIF1 (CN20: DEBUG SERIAL1) */ 714 /* SCIF1 (CN20: DEBUG SERIAL1) */
613 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790", 715 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790",
614 "scif1_data", "scif1"), 716 "scif1_data", "scif1"),
717 /* SDHI0 */
718 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7790",
719 "sdhi0_data4", "sdhi0"),
720 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7790",
721 "sdhi0_ctrl", "sdhi0"),
722 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7790",
723 "sdhi0_cd", "sdhi0"),
724 /* SDHI2 */
725 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7790",
726 "sdhi2_data4", "sdhi2"),
727 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7790",
728 "sdhi2_ctrl", "sdhi2"),
729 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7790",
730 "sdhi2_cd", "sdhi2"),
615 /* SSI (CN17: sound) */ 731 /* SSI (CN17: sound) */
616 PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7790", 732 PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7790",
617 "ssi0129_ctrl", "ssi"), 733 "ssi0129_ctrl", "ssi"),
@@ -654,6 +770,12 @@ static const struct pinctrl_map lager_pinctrl_map[] = {
654 /* USB0 */ 770 /* USB0 */
655 PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs", "pfc-r8a7790", 771 PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs", "pfc-r8a7790",
656 "usb0_ovc_vbus", "usb0"), 772 "usb0_ovc_vbus", "usb0"),
773 /* USB1 */
774 PIN_MAP_MUX_GROUP_DEFAULT("pci-rcar-gen2.1", "pfc-r8a7790",
775 "usb1", "usb1"),
776 /* USB2 */
777 PIN_MAP_MUX_GROUP_DEFAULT("pci-rcar-gen2.2", "pfc-r8a7790",
778 "usb2", "usb2"),
657}; 779};
658 780
659static void __init lager_add_standard_devices(void) 781static void __init lager_add_standard_devices(void)
@@ -681,10 +803,7 @@ static void __init lager_add_standard_devices(void)
681 mmcif1_resources, ARRAY_SIZE(mmcif1_resources), 803 mmcif1_resources, ARRAY_SIZE(mmcif1_resources),
682 &mmcif1_pdata, sizeof(mmcif1_pdata)); 804 &mmcif1_pdata, sizeof(mmcif1_pdata));
683 805
684 platform_device_register_resndata(&platform_bus, "r8a7790-ether", -1, 806 platform_device_register_full(&ether_info);
685 ether_resources,
686 ARRAY_SIZE(ether_resources),
687 &ether_pdata, sizeof(ether_pdata));
688 807
689 lager_add_du_device(); 808 lager_add_du_device();
690 809
@@ -714,8 +833,17 @@ static void __init lager_add_standard_devices(void)
714 &usbhs_phy_pdata, 833 &usbhs_phy_pdata,
715 sizeof(usbhs_phy_pdata)); 834 sizeof(usbhs_phy_pdata));
716 lager_register_usbhs(); 835 lager_register_usbhs();
836 lager_add_usb1_device();
837 lager_add_usb2_device();
717 838
718 lager_add_rsnd_device(); 839 lager_add_rsnd_device();
840
841 platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 0,
842 sdhi0_resources, ARRAY_SIZE(sdhi0_resources),
843 &sdhi0_info, sizeof(struct sh_mobile_sdhi_info));
844 platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 2,
845 sdhi2_resources, ARRAY_SIZE(sdhi2_resources),
846 &sdhi2_info, sizeof(struct sh_mobile_sdhi_info));
719} 847}
720 848
721/* 849/*