mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 10:01:43 +00:00
Second round of Renesas ARM-based SoC board updates for v3.12
* Enable ether on lager board * Enable GPIO LEDs and switches on ape6evm board -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABAgAGBQJSAaWuAAoJENfPZGlqN0++bUoQALJQutZd8seRYADRQID+tlMV QPdvoZefnigoBQn9+bWOPOz3XjdqPS35r65caKthLeurtms+0/N6OxToMiaMoAqL RPgXBin2xMwl4awHojK6BtxOr9OF0qDcTCDj8kHgBvb2aAcV/e7DPnOsSPDEhwgM GlMpjL+DxR0/PwZnBIrgvcW5v+DzImr6o2Nrc3jCCyRpEcrVvcKpU0eFAdLFu32/ VlFuB7sHaLQubEQwG7GJMFsv7+y0W1kPKTl2XqCQa1Z8km78u9DgeLVLaeFIn4eQ gT7zdcA2uS1jVBIVTrx7Z7B78sw1B4dgW8vGsLHIneVASpgMxw/ArD5b8eEyUIX2 ccXxs5fhCRB3jH/8wYTCa0qgElXw4n90VUYGXf5/QgA8qx003nU4SjxuE3XUR2wP dKBxDAYitq5P2YtFFr6UkvcJQf64aq3lbp+fkmQgSeKGPoGeAmZGsefmuTZAmWVY uCJr/HUTrEnUb29x5MZRclFuPgZMDUJ1NN0UnPIqQIBf27N9IfAe41ZasYRbQ5ag AN80ga9CaWhFBbJEZN/0UWop2IMhxwfBz8fPh7jAcWZ5CvStNPbWNTe1FgGi+D/X OemTfknjo286gbb2EIJnlZNuYZ1tVE00FIta0jNnub5JwK6nVrkHFOS2DweEXFkP z3GRYbJm7jE19S2T17Kq =pEy9 -----END PGP SIGNATURE----- Merge tag 'renesas-boards2-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/boards From Simon Horman: Second round of Renesas ARM-based SoC board updates for v3.12 * Enable ether on lager board * Enable GPIO LEDs and switches on ape6evm board * tag 'renesas-boards2-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: lager: enable Ether ARM: shmobile: ape6evm: Add GPIO LEDs ARM: shmobile: ape6evm: support GPIO switches Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
commit
70ba4d285a
@ -19,6 +19,8 @@
|
||||
*/
|
||||
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/mfd/tmio.h>
|
||||
@ -37,6 +39,58 @@
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
/* LEDS */
|
||||
static struct gpio_led ape6evm_leds[] = {
|
||||
{
|
||||
.name = "gnss-en",
|
||||
.gpio = 28,
|
||||
.default_state = LEDS_GPIO_DEFSTATE_OFF,
|
||||
}, {
|
||||
.name = "nfc-nrst",
|
||||
.gpio = 126,
|
||||
.default_state = LEDS_GPIO_DEFSTATE_OFF,
|
||||
}, {
|
||||
.name = "gnss-nrst",
|
||||
.gpio = 132,
|
||||
.default_state = LEDS_GPIO_DEFSTATE_OFF,
|
||||
}, {
|
||||
.name = "bt-wakeup",
|
||||
.gpio = 232,
|
||||
.default_state = LEDS_GPIO_DEFSTATE_OFF,
|
||||
}, {
|
||||
.name = "strobe",
|
||||
.gpio = 250,
|
||||
.default_state = LEDS_GPIO_DEFSTATE_OFF,
|
||||
}, {
|
||||
.name = "bbresetout",
|
||||
.gpio = 288,
|
||||
.default_state = LEDS_GPIO_DEFSTATE_OFF,
|
||||
},
|
||||
};
|
||||
|
||||
static __initdata struct gpio_led_platform_data ape6evm_leds_pdata = {
|
||||
.leds = ape6evm_leds,
|
||||
.num_leds = ARRAY_SIZE(ape6evm_leds),
|
||||
};
|
||||
|
||||
/* GPIO KEY */
|
||||
#define GPIO_KEY(c, g, d, ...) \
|
||||
{ .code = c, .gpio = g, .desc = d, .active_low = 1 }
|
||||
|
||||
static struct gpio_keys_button gpio_buttons[] = {
|
||||
GPIO_KEY(KEY_0, 324, "S16"),
|
||||
GPIO_KEY(KEY_MENU, 325, "S17"),
|
||||
GPIO_KEY(KEY_HOME, 326, "S18"),
|
||||
GPIO_KEY(KEY_BACK, 327, "S19"),
|
||||
GPIO_KEY(KEY_VOLUMEUP, 328, "S20"),
|
||||
GPIO_KEY(KEY_VOLUMEDOWN, 329, "S21"),
|
||||
};
|
||||
|
||||
static struct __initdata gpio_keys_platform_data ape6evm_keys_pdata = {
|
||||
.buttons = gpio_buttons,
|
||||
.nbuttons = ARRAY_SIZE(gpio_buttons),
|
||||
};
|
||||
|
||||
/* Dummy supplies, where voltage doesn't matter */
|
||||
static struct regulator_consumer_supply dummy_supplies[] = {
|
||||
REGULATOR_SUPPLY("vddvario", "smsc911x"),
|
||||
@ -172,6 +226,12 @@ static void __init ape6evm_add_standard_devices(void)
|
||||
platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 1,
|
||||
sdhi1_resources, ARRAY_SIZE(sdhi1_resources),
|
||||
&sdhi1_pdata, sizeof(sdhi1_pdata));
|
||||
platform_device_register_data(&platform_bus, "gpio-keys", -1,
|
||||
&ape6evm_keys_pdata,
|
||||
sizeof(ape6evm_keys_pdata));
|
||||
platform_device_register_data(&platform_bus, "leds-gpio", -1,
|
||||
&ape6evm_leds_pdata,
|
||||
sizeof(ape6evm_leds_pdata));
|
||||
}
|
||||
|
||||
static const char *ape6evm_boards_compat_dt[] __initdata = {
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regulator/fixed.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/sh_eth.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/r8a7790.h>
|
||||
@ -91,6 +92,20 @@ static struct resource mmcif1_resources[] = {
|
||||
DEFINE_RES_IRQ(gic_spi(170)),
|
||||
};
|
||||
|
||||
/* Ether */
|
||||
static struct sh_eth_plat_data ether_pdata __initdata = {
|
||||
.phy = 0x1,
|
||||
.edmac_endian = EDMAC_LITTLE_ENDIAN,
|
||||
.register_type = SH_ETH_REG_FAST_RCAR,
|
||||
.phy_interface = PHY_INTERFACE_MODE_RMII,
|
||||
.ether_link_active_low = 1,
|
||||
};
|
||||
|
||||
static struct resource ether_resources[] __initdata = {
|
||||
DEFINE_RES_MEM(0xee700000, 0x400),
|
||||
DEFINE_RES_IRQ(gic_spi(162)),
|
||||
};
|
||||
|
||||
static const struct pinctrl_map lager_pinctrl_map[] = {
|
||||
/* SCIF0 (CN19: DEBUG SERIAL0) */
|
||||
PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790",
|
||||
@ -103,6 +118,15 @@ static const struct pinctrl_map lager_pinctrl_map[] = {
|
||||
"mmc1_data8", "mmc1"),
|
||||
PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.1", "pfc-r8a7790",
|
||||
"mmc1_ctrl", "mmc1"),
|
||||
/* Ether */
|
||||
PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790",
|
||||
"eth_link", "eth"),
|
||||
PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790",
|
||||
"eth_mdio", "eth"),
|
||||
PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790",
|
||||
"eth_rmii", "eth"),
|
||||
PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790",
|
||||
"intc_irq0", "intc"),
|
||||
};
|
||||
|
||||
static void __init lager_add_standard_devices(void)
|
||||
@ -125,6 +149,11 @@ static void __init lager_add_standard_devices(void)
|
||||
platform_device_register_resndata(&platform_bus, "sh_mmcif", 1,
|
||||
mmcif1_resources, ARRAY_SIZE(mmcif1_resources),
|
||||
&mmcif1_pdata, sizeof(mmcif1_pdata));
|
||||
|
||||
platform_device_register_resndata(&platform_bus, "r8a7790-ether", -1,
|
||||
ether_resources,
|
||||
ARRAY_SIZE(ether_resources),
|
||||
ðer_pdata, sizeof(ether_pdata));
|
||||
}
|
||||
|
||||
static const char *lager_boards_compat_dt[] __initdata = {
|
||||
|
Loading…
Reference in New Issue
Block a user