aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-shmobile/board-ape6evm.c60
-rw-r--r--arch/arm/mach-shmobile/board-lager.c29
2 files changed, 89 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c
index ccf8b0429083..db97460665d5 100644
--- a/arch/arm/mach-shmobile/board-ape6evm.c
+++ b/arch/arm/mach-shmobile/board-ape6evm.c
@@ -19,6 +19,8 @@
19 */ 19 */
20 20
21#include <linux/gpio.h> 21#include <linux/gpio.h>
22#include <linux/gpio_keys.h>
23#include <linux/input.h>
22#include <linux/interrupt.h> 24#include <linux/interrupt.h>
23#include <linux/kernel.h> 25#include <linux/kernel.h>
24#include <linux/mfd/tmio.h> 26#include <linux/mfd/tmio.h>
@@ -37,6 +39,58 @@
37#include <asm/mach-types.h> 39#include <asm/mach-types.h>
38#include <asm/mach/arch.h> 40#include <asm/mach/arch.h>
39 41
42/* LEDS */
43static struct gpio_led ape6evm_leds[] = {
44 {
45 .name = "gnss-en",
46 .gpio = 28,
47 .default_state = LEDS_GPIO_DEFSTATE_OFF,
48 }, {
49 .name = "nfc-nrst",
50 .gpio = 126,
51 .default_state = LEDS_GPIO_DEFSTATE_OFF,
52 }, {
53 .name = "gnss-nrst",
54 .gpio = 132,
55 .default_state = LEDS_GPIO_DEFSTATE_OFF,
56 }, {
57 .name = "bt-wakeup",
58 .gpio = 232,
59 .default_state = LEDS_GPIO_DEFSTATE_OFF,
60 }, {
61 .name = "strobe",
62 .gpio = 250,
63 .default_state = LEDS_GPIO_DEFSTATE_OFF,
64 }, {
65 .name = "bbresetout",
66 .gpio = 288,
67 .default_state = LEDS_GPIO_DEFSTATE_OFF,
68 },
69};
70
71static __initdata struct gpio_led_platform_data ape6evm_leds_pdata = {
72 .leds = ape6evm_leds,
73 .num_leds = ARRAY_SIZE(ape6evm_leds),
74};
75
76/* GPIO KEY */
77#define GPIO_KEY(c, g, d, ...) \
78 { .code = c, .gpio = g, .desc = d, .active_low = 1 }
79
80static struct gpio_keys_button gpio_buttons[] = {
81 GPIO_KEY(KEY_0, 324, "S16"),
82 GPIO_KEY(KEY_MENU, 325, "S17"),
83 GPIO_KEY(KEY_HOME, 326, "S18"),
84 GPIO_KEY(KEY_BACK, 327, "S19"),
85 GPIO_KEY(KEY_VOLUMEUP, 328, "S20"),
86 GPIO_KEY(KEY_VOLUMEDOWN, 329, "S21"),
87};
88
89static struct __initdata gpio_keys_platform_data ape6evm_keys_pdata = {
90 .buttons = gpio_buttons,
91 .nbuttons = ARRAY_SIZE(gpio_buttons),
92};
93
40/* Dummy supplies, where voltage doesn't matter */ 94/* Dummy supplies, where voltage doesn't matter */
41static struct regulator_consumer_supply dummy_supplies[] = { 95static struct regulator_consumer_supply dummy_supplies[] = {
42 REGULATOR_SUPPLY("vddvario", "smsc911x"), 96 REGULATOR_SUPPLY("vddvario", "smsc911x"),
@@ -172,6 +226,12 @@ static void __init ape6evm_add_standard_devices(void)
172 platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 1, 226 platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 1,
173 sdhi1_resources, ARRAY_SIZE(sdhi1_resources), 227 sdhi1_resources, ARRAY_SIZE(sdhi1_resources),
174 &sdhi1_pdata, sizeof(sdhi1_pdata)); 228 &sdhi1_pdata, sizeof(sdhi1_pdata));
229 platform_device_register_data(&platform_bus, "gpio-keys", -1,
230 &ape6evm_keys_pdata,
231 sizeof(ape6evm_keys_pdata));
232 platform_device_register_data(&platform_bus, "leds-gpio", -1,
233 &ape6evm_leds_pdata,
234 sizeof(ape6evm_leds_pdata));
175} 235}
176 236
177static const char *ape6evm_boards_compat_dt[] __initdata = { 237static const char *ape6evm_boards_compat_dt[] __initdata = {
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
index 3c67b2ad4494..79151532ef04 100644
--- a/arch/arm/mach-shmobile/board-lager.c
+++ b/arch/arm/mach-shmobile/board-lager.c
@@ -31,6 +31,7 @@
31#include <linux/platform_device.h> 31#include <linux/platform_device.h>
32#include <linux/regulator/fixed.h> 32#include <linux/regulator/fixed.h>
33#include <linux/regulator/machine.h> 33#include <linux/regulator/machine.h>
34#include <linux/sh_eth.h>
34#include <mach/common.h> 35#include <mach/common.h>
35#include <mach/irqs.h> 36#include <mach/irqs.h>
36#include <mach/r8a7790.h> 37#include <mach/r8a7790.h>
@@ -91,6 +92,20 @@ static struct resource mmcif1_resources[] = {
91 DEFINE_RES_IRQ(gic_spi(170)), 92 DEFINE_RES_IRQ(gic_spi(170)),
92}; 93};
93 94
95/* Ether */
96static struct sh_eth_plat_data ether_pdata __initdata = {
97 .phy = 0x1,
98 .edmac_endian = EDMAC_LITTLE_ENDIAN,
99 .register_type = SH_ETH_REG_FAST_RCAR,
100 .phy_interface = PHY_INTERFACE_MODE_RMII,
101 .ether_link_active_low = 1,
102};
103
104static struct resource ether_resources[] __initdata = {
105 DEFINE_RES_MEM(0xee700000, 0x400),
106 DEFINE_RES_IRQ(gic_spi(162)),
107};
108
94static const struct pinctrl_map lager_pinctrl_map[] = { 109static const struct pinctrl_map lager_pinctrl_map[] = {
95 /* SCIF0 (CN19: DEBUG SERIAL0) */ 110 /* SCIF0 (CN19: DEBUG SERIAL0) */
96 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790", 111 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790",
@@ -103,6 +118,15 @@ static const struct pinctrl_map lager_pinctrl_map[] = {
103 "mmc1_data8", "mmc1"), 118 "mmc1_data8", "mmc1"),
104 PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.1", "pfc-r8a7790", 119 PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.1", "pfc-r8a7790",
105 "mmc1_ctrl", "mmc1"), 120 "mmc1_ctrl", "mmc1"),
121 /* Ether */
122 PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790",
123 "eth_link", "eth"),
124 PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790",
125 "eth_mdio", "eth"),
126 PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790",
127 "eth_rmii", "eth"),
128 PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790",
129 "intc_irq0", "intc"),
106}; 130};
107 131
108static void __init lager_add_standard_devices(void) 132static void __init lager_add_standard_devices(void)
@@ -125,6 +149,11 @@ static void __init lager_add_standard_devices(void)
125 platform_device_register_resndata(&platform_bus, "sh_mmcif", 1, 149 platform_device_register_resndata(&platform_bus, "sh_mmcif", 1,
126 mmcif1_resources, ARRAY_SIZE(mmcif1_resources), 150 mmcif1_resources, ARRAY_SIZE(mmcif1_resources),
127 &mmcif1_pdata, sizeof(mmcif1_pdata)); 151 &mmcif1_pdata, sizeof(mmcif1_pdata));
152
153 platform_device_register_resndata(&platform_bus, "r8a7790-ether", -1,
154 ether_resources,
155 ARRAY_SIZE(ether_resources),
156 &ether_pdata, sizeof(ether_pdata));
128} 157}
129 158
130static const char *lager_boards_compat_dt[] __initdata = { 159static const char *lager_boards_compat_dt[] __initdata = {