From b8568a0483a3363eda73d629536c8a019256a0bf Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 4 Apr 2013 21:24:27 -0700 Subject: [PATCH 01/27] ARM: shmobile: ape6evm: MP clock parent become EXTAL2 The orignal commit 3263e09d287fbaa8a9424b5e69396599a3bbd518 (ARM: shmobile: Initial r8a73a4 SoC support V3) put MP clock parent as EXTAL2, but its code was removed on DIV6 clock support commit. This patch makes it consistent. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-ape6evm.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c index 55b8c9fef954..5eb0caa6a7d0 100644 --- a/arch/arm/mach-shmobile/board-ape6evm.c +++ b/arch/arm/mach-shmobile/board-ape6evm.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -65,7 +66,21 @@ static const struct pinctrl_map ape6evm_pinctrl_map[] = { static void __init ape6evm_add_standard_devices(void) { + + struct clk *parent; + struct clk *mp; + r8a73a4_clock_init(); + + /* MP clock parent = extal2 */ + parent = clk_get(NULL, "extal2"); + mp = clk_get(NULL, "mp"); + BUG_ON(IS_ERR(parent) || IS_ERR(mp)); + + clk_set_parent(mp, parent); + clk_put(parent); + clk_put(mp); + pinctrl_register_mappings(ape6evm_pinctrl_map, ARRAY_SIZE(ape6evm_pinctrl_map)); r8a73a4_pinmux_init(); From 44bfe6847a088c6207a4a21974e5cfe8517d3e4f Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 16 Apr 2013 22:17:42 -0700 Subject: [PATCH 02/27] ARM: shmobile: bockw: define FPGA address and rename iomem variable Bock-W board will needs more board specific ioremap() method. This patch tidyup current FPGA specific settings Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-bockw.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index dac4365c5158..badde08d96c4 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -46,10 +46,11 @@ static const struct pinctrl_map bockw_pinctrl_map[] = { "scif0_ctrl", "scif0"), }; +#define FPGA 0x18200000 #define IRQ0MR 0x30 static void __init bockw_init(void) { - void __iomem *fpga; + void __iomem *base; r8a7778_clock_init(); r8a7778_init_irq_extpin(1); @@ -59,8 +60,8 @@ static void __init bockw_init(void) ARRAY_SIZE(bockw_pinctrl_map)); r8a7778_pinmux_init(); - fpga = ioremap_nocache(0x18200000, SZ_1M); - if (fpga) { + base = ioremap_nocache(FPGA, SZ_1M); + if (base) { /* * CAUTION * @@ -68,10 +69,10 @@ static void __init bockw_init(void) * it should be cared in the future * Now, it is assuming IRQ0 was used only from SMSC. */ - u16 val = ioread16(fpga + IRQ0MR); + u16 val = ioread16(base + IRQ0MR); val &= ~(1 << 4); /* enable SMSC911x */ - iowrite16(val, fpga + IRQ0MR); - iounmap(fpga); + iowrite16(val, base + IRQ0MR); + iounmap(base); platform_device_register_resndata( &platform_bus, "smsc911x", -1, From df53721a60022263017c5d72e17a7780d0e5dc4c Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Thu, 4 Apr 2013 11:20:33 +0900 Subject: [PATCH 03/27] ARM: shmobile: kzm9d: resigser smsc911x platform device with id -1 As the kzm9d only has one smsc911x device it may be registered as a platform device with id -1. This allows the kzm9d board to access the smsc911x device when CONFIG_REGULATOR (and CONFIG_REGULATOR_FIXED_VOLTAGE) are set. The motivation for which is twofold: using regulators seems to be generally a good thing; it will move the kzm9d defconfig one step closer to being able to be consolidated with other shmobile defconfigs. An alternate but so far untested approach would be to update the definition of dummy_supplies in board-kzm9d.c to use "smsc911x.0" instead of "smsc911x". Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-kzm9d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/board-kzm9d.c b/arch/arm/mach-shmobile/board-kzm9d.c index c016ccd92433..4368000e1127 100644 --- a/arch/arm/mach-shmobile/board-kzm9d.c +++ b/arch/arm/mach-shmobile/board-kzm9d.c @@ -56,7 +56,7 @@ static struct smsc911x_platform_config smsc911x_platdata = { static struct platform_device smsc91x_device = { .name = "smsc911x", - .id = 0, + .id = -1, .dev = { .platform_data = &smsc911x_platdata, }, From 28307e0a7c3841f2d54876639235c07ebe3d2999 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Tue, 12 Feb 2013 17:15:31 +0000 Subject: [PATCH 04/27] ARM: shmobile: kzm9g: add AS3711 PMIC platform data KZM9G uses an AS3711 PMIC to supply power to the CPU and the LCD backlight. The PMIC on the board is pre-programmed to supply correct voltages to the CPU, power supply to the backlight has to be turned on at run-time. The latter is currently performed by a hard-coded I2C command sequence in the board file. This patch removes the backlight hack and instead adds an I2C device to instantiate the AS3711 MFD driver, which will add a regulator device to dynamically adjust CPU voltages and a backlight device. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-kzm9g.c | 193 +++++++++++++++++++-------- 1 file changed, 140 insertions(+), 53 deletions(-) diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index 1fdf05cb6da1..165483c9bee2 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -606,6 +607,140 @@ static struct platform_device fsi_ak4648_device = { }; /* I2C */ + +/* StepDown1 is used to supply 1.315V to the CPU */ +static struct regulator_init_data as3711_sd1 = { + .constraints = { + .name = "1.315V CPU", + .boot_on = 1, + .always_on = 1, + .min_uV = 1315000, + .max_uV = 1335000, + }, +}; + +/* StepDown2 is used to supply 1.8V to the CPU and to the board */ +static struct regulator_init_data as3711_sd2 = { + .constraints = { + .name = "1.8V", + .boot_on = 1, + .always_on = 1, + .min_uV = 1800000, + .max_uV = 1800000, + }, +}; + +/* + * StepDown3 is switched in parallel with StepDown2, seems to be off, + * according to read-back pre-set register values + */ + +/* StepDown4 is used to supply 1.215V to the CPU and to the board */ +static struct regulator_init_data as3711_sd4 = { + .constraints = { + .name = "1.215V", + .boot_on = 1, + .always_on = 1, + .min_uV = 1215000, + .max_uV = 1235000, + }, +}; + +/* LDO1 is unused and unconnected */ + +/* LDO2 is used to supply 2.8V to the CPU */ +static struct regulator_init_data as3711_ldo2 = { + .constraints = { + .name = "2.8V CPU", + .boot_on = 1, + .always_on = 1, + .min_uV = 2800000, + .max_uV = 2800000, + }, +}; + +/* LDO3 is used to supply 3.0V to the CPU */ +static struct regulator_init_data as3711_ldo3 = { + .constraints = { + .name = "3.0V CPU", + .boot_on = 1, + .always_on = 1, + .min_uV = 3000000, + .max_uV = 3000000, + }, +}; + +/* LDO4 is used to supply 2.8V to the board */ +static struct regulator_init_data as3711_ldo4 = { + .constraints = { + .name = "2.8V", + .boot_on = 1, + .always_on = 1, + .min_uV = 2800000, + .max_uV = 2800000, + }, +}; + +/* LDO5 is switched parallel to LDO4, also set to 2.8V */ +static struct regulator_init_data as3711_ldo5 = { + .constraints = { + .name = "2.8V #2", + .boot_on = 1, + .always_on = 1, + .min_uV = 2800000, + .max_uV = 2800000, + }, +}; + +/* LDO6 is unused and unconnected */ + +/* LDO7 is used to supply 1.15V to the CPU */ +static struct regulator_init_data as3711_ldo7 = { + .constraints = { + .name = "1.15V CPU", + .boot_on = 1, + .always_on = 1, + .min_uV = 1150000, + .max_uV = 1150000, + }, +}; + +/* LDO8 is switched parallel to LDO7, also set to 1.15V */ +static struct regulator_init_data as3711_ldo8 = { + .constraints = { + .name = "1.15V CPU #2", + .boot_on = 1, + .always_on = 1, + .min_uV = 1150000, + .max_uV = 1150000, + }, +}; + +static struct as3711_platform_data as3711_pdata = { + .regulator = { + .init_data = { + [AS3711_REGULATOR_SD_1] = &as3711_sd1, + [AS3711_REGULATOR_SD_2] = &as3711_sd2, + [AS3711_REGULATOR_SD_4] = &as3711_sd4, + [AS3711_REGULATOR_LDO_2] = &as3711_ldo2, + [AS3711_REGULATOR_LDO_3] = &as3711_ldo3, + [AS3711_REGULATOR_LDO_4] = &as3711_ldo4, + [AS3711_REGULATOR_LDO_5] = &as3711_ldo5, + [AS3711_REGULATOR_LDO_7] = &as3711_ldo7, + [AS3711_REGULATOR_LDO_8] = &as3711_ldo8, + }, + }, + .backlight = { + .su2_fb = "sh_mobile_lcdc_fb.0", + .su2_max_uA = 36000, + .su2_feedback = AS3711_SU2_CURR_AUTO, + .su2_fbprot = AS3711_SU2_GPIO4, + .su2_auto_curr1 = true, + .su2_auto_curr2 = true, + .su2_auto_curr3 = true, + }, +}; + static struct pcf857x_platform_data pcf8575_pdata = { .gpio_base = GPIO_PCF8575_BASE, }; @@ -625,6 +760,11 @@ static struct i2c_board_info i2c0_devices[] = { I2C_BOARD_INFO("adxl34x", 0x1d), .irq = irq_pin(26), /* IRQ26 */ }, + { + I2C_BOARD_INFO("as3711", 0x40), + .irq = intcs_evt2irq(0x3300), /* IRQ24 */ + .platform_data = &as3711_pdata, + }, }; static struct i2c_board_info i2c1_devices[] = { @@ -715,59 +855,6 @@ static const struct pinctrl_map kzm_pinctrl_map[] = { "usb_vbus", "usb"), }; -/* - * FIXME - * - * This is quick hack for enabling LCDC backlight - */ -static int __init as3711_enable_lcdc_backlight(void) -{ - struct i2c_adapter *a = i2c_get_adapter(0); - struct i2c_msg msg; - int i, ret; - __u8 magic[] = { - 0x40, 0x2a, - 0x43, 0x3c, - 0x44, 0x3c, - 0x45, 0x3c, - 0x54, 0x03, - 0x51, 0x00, - 0x51, 0x01, - 0xff, 0x00, /* wait */ - 0x43, 0xf0, - 0x44, 0xf0, - 0x45, 0xf0, - }; - - if (!of_machine_is_compatible("renesas,kzm9g")) - return 0; - - if (!a) - return 0; - - msg.addr = 0x40; - msg.len = 2; - msg.flags = 0; - - for (i = 0; i < ARRAY_SIZE(magic); i += 2) { - msg.buf = magic + i; - - if (0xff == msg.buf[0]) { - udelay(500); - continue; - } - - ret = i2c_transfer(a, &msg, 1); - if (ret < 0) { - pr_err("i2c transfer fail\n"); - break; - } - } - - return 0; -} -device_initcall(as3711_enable_lcdc_backlight); - static void __init kzm_init(void) { regulator_register_always_on(2, "fixed-1.8V", fixed1v8_power_consumers, From d998cef3fc7ccd52c0ea2c849453dfcde38c8a56 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Apr 2013 23:54:16 -0700 Subject: [PATCH 05/27] ARM: shmobile: bockw: add CN9 SCIF/RCAN selection dipswitch explanation Debug serial (= SCIF0) is connected to CN9 upper side, and it is shared by RCAN. This patch adds SCIF/RCAN dipswitch explanation on comment area for developers. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-bockw.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index badde08d96c4..3ce020a7bdd9 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -26,6 +26,14 @@ #include #include +/* + * CN9(Upper side) SCIF/RCAN selection + * + * 1,4 3,6 + * SW40 SCIF RCAN + * SW41 SCIF RCAN + */ + static struct smsc911x_platform_config smsc911x_data = { .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, From 741440e868f5f08f747292097620ebad43cc5ef0 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 9 Apr 2013 02:37:15 -0700 Subject: [PATCH 06/27] ARM: shmobile: bockw: add dummy regulators for SMSC SMSC driver will try to get regulator if .config had CONFIG_REGULATOR, and, shmobile_defconfig has it. SMSC driver on Bock-W board will be failed if it doens't have dummy regulator settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-bockw.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index 3ce020a7bdd9..4d6571590135 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -20,6 +20,8 @@ #include #include +#include +#include #include #include #include @@ -34,6 +36,12 @@ * SW41 SCIF RCAN */ +/* Dummy supplies, where voltage doesn't matter */ +static struct regulator_consumer_supply dummy_supplies[] = { + REGULATOR_SUPPLY("vddvario", "smsc911x"), + REGULATOR_SUPPLY("vdd33a", "smsc911x"), +}; + static struct smsc911x_platform_config smsc911x_data = { .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, @@ -82,6 +90,9 @@ static void __init bockw_init(void) iowrite16(val, base + IRQ0MR); iounmap(base); + regulator_register_fixed(0, dummy_supplies, + ARRAY_SIZE(dummy_supplies)); + platform_device_register_resndata( &platform_bus, "smsc911x", -1, smsc911x_resources, ARRAY_SIZE(smsc911x_resources), From 1034f4ee3f07b7d525c490d702b3dcbee3b56b54 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Tue, 23 Apr 2013 02:37:05 +0000 Subject: [PATCH 07/27] ARM: shmobile: lager: Add GPIO LEDs The board has 3 LEDs connected to GPIOs. Add a led-gpio device to support them. Based on "ARM: shmobile: marzen: Add GPIO LEDs" by Laurent Pinchart. Cc: Laurent Pinchart Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-lager.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 6114edd0a977..6a1ba38fae26 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -21,13 +21,37 @@ #include #include #include +#include #include +#include #include #include #include #include #include +/* LEDS */ +static struct gpio_led lager_leds[] = { + { + .name = "led8", + .gpio = RCAR_GP_PIN(5, 17), + .default_state = LEDS_GPIO_DEFSTATE_ON, + }, { + .name = "led7", + .gpio = RCAR_GP_PIN(4, 23), + .default_state = LEDS_GPIO_DEFSTATE_ON, + }, { + .name = "led6", + .gpio = RCAR_GP_PIN(4, 22), + .default_state = LEDS_GPIO_DEFSTATE_ON, + }, +}; + +static struct gpio_led_platform_data lager_leds_pdata = { + .leds = lager_leds, + .num_leds = ARRAY_SIZE(lager_leds), +}; + static const struct pinctrl_map lager_pinctrl_map[] = { /* SCIF0 (CN19: DEBUG SERIAL0) */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790", @@ -46,6 +70,9 @@ static void __init lager_add_standard_devices(void) r8a7790_pinmux_init(); r8a7790_add_standard_devices(); + platform_device_register_data(&platform_bus, "leds-gpio", -1, + &lager_leds_pdata, + sizeof(lager_leds_pdata)); } static const char *lager_boards_compat_dt[] __initdata = { From c3842e4fcbb7664276443b79187b7808c2e80a35 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Mon, 13 May 2013 16:04:31 +0900 Subject: [PATCH 08/27] ARM: shmobile: lager: support GPIO switches The lager board has pins 1 - 4 of SW2 wired up to GPIO pins. This patch allows access to those pins as KEYS 1 - 4 using gpio-keys. Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-lager.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 6a1ba38fae26..d73e21d3ea8a 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -18,6 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include +#include +#include #include #include #include @@ -47,11 +50,27 @@ static struct gpio_led lager_leds[] = { }, }; -static struct gpio_led_platform_data lager_leds_pdata = { +static __initdata struct gpio_led_platform_data lager_leds_pdata = { .leds = lager_leds, .num_leds = ARRAY_SIZE(lager_leds), }; +/* GPIO KEY */ +#define GPIO_KEY(c, g, d, ...) \ + { .code = c, .gpio = g, .desc = d, .active_low = 1 } + +static __initdata struct gpio_keys_button gpio_buttons[] = { + GPIO_KEY(KEY_4, RCAR_GP_PIN(1, 28), "SW2-pin4"), + GPIO_KEY(KEY_3, RCAR_GP_PIN(1, 26), "SW2-pin3"), + GPIO_KEY(KEY_2, RCAR_GP_PIN(1, 24), "SW2-pin2"), + GPIO_KEY(KEY_1, RCAR_GP_PIN(1, 14), "SW2-pin1"), +}; + +static __initdata struct gpio_keys_platform_data lager_keys_pdata = { + .buttons = gpio_buttons, + .nbuttons = ARRAY_SIZE(gpio_buttons), +}; + static const struct pinctrl_map lager_pinctrl_map[] = { /* SCIF0 (CN19: DEBUG SERIAL0) */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790", @@ -73,6 +92,9 @@ static void __init lager_add_standard_devices(void) platform_device_register_data(&platform_bus, "leds-gpio", -1, &lager_leds_pdata, sizeof(lager_leds_pdata)); + platform_device_register_data(&platform_bus, "gpio-keys", -1, + &lager_keys_pdata, + sizeof(lager_keys_pdata)); } static const char *lager_boards_compat_dt[] __initdata = { From 6e267030252ab5309e074c3a19c92ceb7a01fc8b Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Thu, 18 Apr 2013 21:21:09 +0900 Subject: [PATCH 09/27] ARM: shmobile: marzen: Use INTC External IRQ pin driver for SMSC Update the marzen board to use the INTC External IRQ pin driver for SMSC. This code was originally posted by Magnus Damm as part of "ARM: shmobile: INTC External IRQ pin driver on r8a7779" but somehow omitted when I applied that patch. Cc: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-marzen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index fac9e0f87897..71f174e12932 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c @@ -69,7 +69,7 @@ static struct resource smsc911x_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = gic_iid(0x3c), /* IRQ 1 */ + .start = irq_pin(1), /* IRQ 1 */ .flags = IORESOURCE_IRQ, }, }; @@ -405,6 +405,7 @@ static void __init marzen_init(void) pinctrl_register_mappings(marzen_pinctrl_map, ARRAY_SIZE(marzen_pinctrl_map)); r8a7779_pinmux_init(); + r8a7779_init_irq_extpin(1); /* IRQ1 as individual interrupt */ r8a7779_add_standard_devices(); platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); From ca7bb309485e4ec89a9addd47beaa1d079841b7d Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 17 Apr 2013 05:17:56 +0000 Subject: [PATCH 10/27] ARM: shmobile: bockw: add SDHI0 support This patch is directly accessing to PUPR4 register which can control SDHI0 CD/WP pin pull-up setting. It should be replaced in the future. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-bockw.c | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index 4d6571590135..2b6103e55c34 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include +#include #include #include #include @@ -54,16 +56,28 @@ static struct resource smsc911x_resources[] = { DEFINE_RES_IRQ(irq_pin(0)), /* IRQ 0 */ }; +/* SDHI */ +static struct sh_mobile_sdhi_info sdhi0_info = { + .tmio_caps = MMC_CAP_SD_HIGHSPEED, + .tmio_ocr_mask = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, + .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, +}; + static const struct pinctrl_map bockw_pinctrl_map[] = { /* SCIF0 */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", "scif0_data_a", "scif0"), PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", "scif0_ctrl", "scif0"), + /* SDHI0 */ + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778", + "sdhi0", "sdhi0"), }; #define FPGA 0x18200000 #define IRQ0MR 0x30 +#define PFC 0xfffc0000 +#define PUPR4 0x110 static void __init bockw_init(void) { void __iomem *base; @@ -76,6 +90,7 @@ static void __init bockw_init(void) ARRAY_SIZE(bockw_pinctrl_map)); r8a7778_pinmux_init(); + /* for SMSC */ base = ioremap_nocache(FPGA, SZ_1M); if (base) { /* @@ -98,6 +113,20 @@ static void __init bockw_init(void) smsc911x_resources, ARRAY_SIZE(smsc911x_resources), &smsc911x_data, sizeof(smsc911x_data)); } + + /* for SDHI */ + base = ioremap_nocache(PFC, 0x200); + if (base) { + /* + * FIXME + * + * SDHI CD/WP pin needs pull-up + */ + iowrite32(ioread32(base + PUPR4) | (3 << 26), base + PUPR4); + iounmap(base); + + r8a7778_sdhi_init(0, &sdhi0_info); + } } static const char *bockw_boards_compat_dt[] __initdata = { From f3031ff3f2e14f0ced4d45150316df2607b70a27 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 17 Apr 2013 23:33:47 -0700 Subject: [PATCH 11/27] ARM: shmobile: marzen: keep local function as static marzen_init_late() should be static Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-marzen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index 71f174e12932..9b5ed7eb0315 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c @@ -350,7 +350,7 @@ static struct platform_device *marzen_late_devices[] __initdata = { &ohci1_device, }; -void __init marzen_init_late(void) +static void __init marzen_init_late(void) { /* get usb phy */ phy = usb_get_phy(USB_PHY_TYPE_USB2); From 4c370abbc11311d3753ea9145564ba1997c489fc Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Sun, 9 Jun 2013 01:24:35 +0400 Subject: [PATCH 12/27] ARM: shmobile: r8a7779: fix Ether device name While recasting commit dace48d04dee46a3409d5e13cd98031522e46377 (ARM: shmobile: R8A7779: add Ether support), I made a typo in the platform device's name: used underscore instead of hyphen. However, there's now patch merged to net-next.git renaming the platform device from "sh-eth" to "r8a777x-ehter", so it makes the most sense to change the name straight to that one. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/setup-r8a7779.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index b0b394842ea5..d8a70dcd7223 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c @@ -443,7 +443,7 @@ void __init r8a7779_add_standard_devices(void) void __init r8a7779_add_ether_device(struct sh_eth_plat_data *pdata) { - platform_device_register_resndata(&platform_bus, "sh_eth", -1, + platform_device_register_resndata(&platform_bus, "r8a777x-ether", -1, ether_resources, ARRAY_SIZE(ether_resources), pdata, sizeof(*pdata)); From c02f846938fe64800240e97cb113a2bff0149c92 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Sun, 9 Jun 2013 01:23:24 +0400 Subject: [PATCH 13/27] ARM: shmobile: r8a7778: fix Ether device name While recasting commit 524219146a89aee5366326c225ccd71231419d89 (ARM: shmobile: R8A7778: add Ether support), I made a typo in the platform device's name: used underscore instead of hyphen. However, there's now patch merged to net-next.git renaming the platform device from "sh-eth" to "r8a777x-ehter", so it makes the most sense to change the name straight to that one. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/setup-r8a7778.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index f5b2a57a330e..ce44fbb9bad2 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c @@ -96,7 +96,7 @@ static struct resource ether_resources[] = { void __init r8a7778_add_ether_device(struct sh_eth_plat_data *pdata) { - platform_device_register_resndata(&platform_bus, "sh_eth", -1, + platform_device_register_resndata(&platform_bus, "r8a777x-ether", -1, ether_resources, ARRAY_SIZE(ether_resources), pdata, sizeof(*pdata)); From 729cb826d45cc2e58bb0256b66f1a8e42173bf54 Mon Sep 17 00:00:00 2001 From: Ulrich Hecht Date: Fri, 31 May 2013 17:57:02 +0200 Subject: [PATCH 14/27] ARM: shmobile: r8a7790: HSCIF support Adds support for HSCIF0 and HSCIF1 on the r8a7790. Signed-off-by: Ulrich Hecht Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/clock-r8a7790.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c index b393592edc83..379bce698a29 100644 --- a/arch/arm/mach-shmobile/clock-r8a7790.c +++ b/arch/arm/mach-shmobile/clock-r8a7790.c @@ -181,6 +181,7 @@ static struct clk div6_clks[DIV6_NR] = { /* MSTP */ enum { MSTP721, MSTP720, + MSTP717, MSTP716, MSTP304, MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP_NR @@ -196,6 +197,8 @@ static struct clk mstp_clks[MSTP_NR] = { [MSTP204] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 4, 0), /* SCIFA0 */ [MSTP203] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 3, 0), /* SCIFA1 */ [MSTP202] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 2, 0), /* SCIFA2 */ + [MSTP717] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 17, 0), /* HSCIF0 */ + [MSTP716] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 16, 0), /* HSCIF1 */ }; static struct clk_lookup lookups[] = { @@ -249,6 +252,8 @@ static struct clk_lookup lookups[] = { CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP202]), CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP721]), CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP720]), + CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP717]), + CLKDEV_DEV_ID("sh-sci.9", &mstp_clks[MSTP716]), }; #define R8A7790_CLOCK_ROOT(e, m, p0, p1, p30, p31) \ From b6bb9a6426cab90216763374b9d2ebc4abc48016 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 3 Jun 2013 22:10:24 -0700 Subject: [PATCH 15/27] ARM: shmobile: r8a7778: add support I2C clock This patch adds r8a7778 I2C clock support. It also adds peripheral_clk which is requiested from i2c-rcar driver Signed-off-by: Yusuke Goda Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/clock-r8a7778.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c index b251e4d0924d..1386c59b8e31 100644 --- a/arch/arm/mach-shmobile/clock-r8a7778.c +++ b/arch/arm/mach-shmobile/clock-r8a7778.c @@ -105,7 +105,8 @@ static struct clk *main_clks[] = { enum { MSTP323, MSTP322, MSTP321, MSTP114, - MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021, + MSTP030, + MSTP029, MSTP028, MSTP027, MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021, MSTP016, MSTP015, MSTP_NR }; @@ -114,6 +115,10 @@ static struct clk mstp_clks[MSTP_NR] = { [MSTP322] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 22, 0), /* SDHI1 */ [MSTP321] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 21, 0), /* SDHI2 */ [MSTP114] = SH_CLK_MSTP32(&p_clk, MSTPCR1, 14, 0), /* Ether */ + [MSTP030] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 30, 0), /* I2C0 */ + [MSTP029] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 29, 0), /* I2C1 */ + [MSTP028] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 28, 0), /* I2C2 */ + [MSTP027] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 27, 0), /* I2C3 */ [MSTP026] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 26, 0), /* SCIF0 */ [MSTP025] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 25, 0), /* SCIF1 */ [MSTP024] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 24, 0), /* SCIF2 */ @@ -125,11 +130,18 @@ static struct clk mstp_clks[MSTP_NR] = { }; static struct clk_lookup lookups[] = { + /* main */ + CLKDEV_CON_ID("peripheral_clk", &p_clk), + /* MSTP32 clocks */ CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */ CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ CLKDEV_DEV_ID("sh-eth", &mstp_clks[MSTP114]), /* Ether */ + CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */ + CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP029]), /* I2C1 */ + CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP028]), /* I2C2 */ + CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */ CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */ CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */ CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */ From 3dd691ef07abd55154de913b241f9804fc78b979 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 3 Jun 2013 22:11:24 -0700 Subject: [PATCH 16/27] ARM: shmobile: r8a7778: add support HSPI clock This patch adds r8a7778 HSPI clock support. It also adds shyway_clk which is requiested from sh-hspi driver Signed-off-by: Yusuke Goda Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/clock-r8a7778.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c index 1386c59b8e31..c2c1895b9846 100644 --- a/arch/arm/mach-shmobile/clock-r8a7778.c +++ b/arch/arm/mach-shmobile/clock-r8a7778.c @@ -108,6 +108,7 @@ enum { MSTP030, MSTP029, MSTP028, MSTP027, MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021, MSTP016, MSTP015, + MSTP007, MSTP_NR }; static struct clk mstp_clks[MSTP_NR] = { @@ -127,10 +128,12 @@ static struct clk mstp_clks[MSTP_NR] = { [MSTP021] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 21, 0), /* SCIF5 */ [MSTP016] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 16, 0), /* TMU0 */ [MSTP015] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 15, 0), /* TMU1 */ + [MSTP007] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 7, 0), /* HSPI */ }; static struct clk_lookup lookups[] = { /* main */ + CLKDEV_CON_ID("shyway_clk", &s_clk), CLKDEV_CON_ID("peripheral_clk", &p_clk), /* MSTP32 clocks */ @@ -150,6 +153,9 @@ static struct clk_lookup lookups[] = { CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */ CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP016]), /* TMU00 */ CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP015]), /* TMU01 */ + CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */ + CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */ + CLKDEV_DEV_ID("sh-hspi.2", &mstp_clks[MSTP007]), /* HSPI2 */ }; void __init r8a7778_clock_init(void) From 2ad3c8eb17ac7aed7fad870ba85acd4639cc8cdf Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 3 Jun 2013 22:11:39 -0700 Subject: [PATCH 17/27] ARM: shmobile: r8a7778: add support MMC clock This patch adds r8a7778 MMC clock support. Signed-off-by: Yusuke Goda Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/clock-r8a7778.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c index c2c1895b9846..18d44f51ca67 100644 --- a/arch/arm/mach-shmobile/clock-r8a7778.c +++ b/arch/arm/mach-shmobile/clock-r8a7778.c @@ -103,6 +103,7 @@ static struct clk *main_clks[] = { }; enum { + MSTP331, MSTP323, MSTP322, MSTP321, MSTP114, MSTP030, @@ -112,6 +113,7 @@ enum { MSTP_NR }; static struct clk mstp_clks[MSTP_NR] = { + [MSTP331] = SH_CLK_MSTP32(&s4_clk, MSTPCR3, 31, 0), /* MMC */ [MSTP323] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 23, 0), /* SDHI0 */ [MSTP322] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 22, 0), /* SDHI1 */ [MSTP321] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 21, 0), /* SDHI2 */ @@ -137,6 +139,7 @@ static struct clk_lookup lookups[] = { CLKDEV_CON_ID("peripheral_clk", &p_clk), /* MSTP32 clocks */ + CLKDEV_DEV_ID("sh_mmcif", &mstp_clks[MSTP331]), /* MMC */ CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */ CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ From 46b9a092dacea4f30dbdfc58ca2c1ac4e97f6255 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 3 Jun 2013 22:11:58 -0700 Subject: [PATCH 18/27] ARM: shmobile: r8a7778: add support I2C driver Add a platform device for the r8a7778 I2C. Signed-off-by: Yusuke Goda Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/include/mach/r8a7778.h | 2 ++ arch/arm/mach-shmobile/setup-r8a7778.c | 25 +++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h index b5173b3428ac..9e5835b326e8 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7778.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h @@ -24,6 +24,8 @@ extern void r8a7778_add_standard_devices(void); extern void r8a7778_add_standard_devices_dt(void); extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata); +extern void r8a7778_add_i2c_device(int id); + extern void r8a7778_init_delay(void); extern void r8a7778_init_irq(void); extern void r8a7778_init_irq_dt(void); diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index ce44fbb9bad2..6625a386abaf 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c @@ -126,6 +126,31 @@ void __init r8a7778_sdhi_init(int id, info, sizeof(*info)); } +/* I2C */ +static struct resource i2c_resources[] __initdata = { + /* I2C0 */ + DEFINE_RES_MEM(0xffc70000, 0x1000), + DEFINE_RES_IRQ(gic_iid(0x63)), + /* I2C1 */ + DEFINE_RES_MEM(0xffc71000, 0x1000), + DEFINE_RES_IRQ(gic_iid(0x6e)), + /* I2C2 */ + DEFINE_RES_MEM(0xffc72000, 0x1000), + DEFINE_RES_IRQ(gic_iid(0x6c)), + /* I2C3 */ + DEFINE_RES_MEM(0xffc73000, 0x1000), + DEFINE_RES_IRQ(gic_iid(0x6d)), +}; + +void __init r8a7778_add_i2c_device(int id) +{ + BUG_ON(id < 0 || id > 3); + + platform_device_register_simple( + "i2c-rcar", id, + i2c_resources + (2 * id), 2); +} + void __init r8a7778_add_standard_devices(void) { int i; From 8b89797f3273e6e1574e1727f73dc8ac7d5f5a9c Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 3 Jun 2013 22:12:08 -0700 Subject: [PATCH 19/27] ARM: shmobile: r8a7778: add support HSPI driver Add a platform device for the r8a7778 HSPI. Signed-off-by: Yusuke Goda Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/include/mach/r8a7778.h | 1 + arch/arm/mach-shmobile/setup-r8a7778.c | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h index 9e5835b326e8..af668c47a3d9 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7778.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h @@ -25,6 +25,7 @@ extern void r8a7778_add_standard_devices(void); extern void r8a7778_add_standard_devices_dt(void); extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata); extern void r8a7778_add_i2c_device(int id); +extern void r8a7778_add_hspi_device(int id); extern void r8a7778_init_delay(void); extern void r8a7778_init_irq(void); diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index 6625a386abaf..a1e693005370 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c @@ -151,6 +151,29 @@ void __init r8a7778_add_i2c_device(int id) i2c_resources + (2 * id), 2); } +/* HSPI */ +static struct resource hspi_resources[] __initdata = { + /* HSPI0 */ + DEFINE_RES_MEM(0xfffc7000, 0x18), + DEFINE_RES_IRQ(gic_iid(0x5f)), + /* HSPI1 */ + DEFINE_RES_MEM(0xfffc8000, 0x18), + DEFINE_RES_IRQ(gic_iid(0x74)), + /* HSPI2 */ + DEFINE_RES_MEM(0xfffc6000, 0x18), + DEFINE_RES_IRQ(gic_iid(0x75)), +}; + +void __init r8a7778_add_hspi_device(int id) +{ + BUG_ON(id < 0 || id > 2); + + platform_device_register_simple( + "sh-hspi", id, + hspi_resources + (2 * id), 2); +} + + void __init r8a7778_add_standard_devices(void) { int i; From 31b2eaccd60c3480ad81a3302faed463fdc5df12 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 3 Jun 2013 22:12:22 -0700 Subject: [PATCH 20/27] ARM: shmobile: r8a7778: add support MMC driver Add a platform device for the r8a7778 MMC. Signed-off-by: Yusuke Goda Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/include/mach/r8a7778.h | 2 ++ arch/arm/mach-shmobile/setup-r8a7778.c | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h index af668c47a3d9..97ba66b3a7a1 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7778.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h @@ -18,6 +18,7 @@ #ifndef __ASM_R8A7778_H__ #define __ASM_R8A7778_H__ +#include #include #include @@ -26,6 +27,7 @@ extern void r8a7778_add_standard_devices_dt(void); extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata); extern void r8a7778_add_i2c_device(int id); extern void r8a7778_add_hspi_device(int id); +extern void r8a7778_add_mmc_device(struct sh_mmcif_plat_data *info); extern void r8a7778_init_delay(void); extern void r8a7778_init_irq(void); diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index a1e693005370..c8e481f6c9e2 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c @@ -173,6 +173,19 @@ void __init r8a7778_add_hspi_device(int id) hspi_resources + (2 * id), 2); } +/* MMC */ +static struct resource mmc_resources[] __initdata = { + DEFINE_RES_MEM(0xffe4e000, 0x100), + DEFINE_RES_IRQ(gic_iid(0x5d)), +}; + +void __init r8a7778_add_mmc_device(struct sh_mmcif_plat_data *info) +{ + platform_device_register_resndata( + &platform_bus, "sh_mmcif", -1, + mmc_resources, ARRAY_SIZE(mmc_resources), + info, sizeof(*info)); +} void __init r8a7778_add_standard_devices(void) { From 111fad56a8e6b0478a5156a82f5f3709150f93a9 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Fri, 17 May 2013 16:55:14 +0200 Subject: [PATCH 21/27] ARM: shmobile: r8a73a4: add clock definitions and aliases for MMCIF and SDHI Add MSTP clock definitions and fix aliases for the two MMCIF and three SDHI interfaces on r8a73a4 (APE6). Signed-off-by: Guennadi Liakhovetski Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/clock-r8a73a4.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-shmobile/clock-r8a73a4.c b/arch/arm/mach-shmobile/clock-r8a73a4.c index f6227bb10aca..5f7fe628b8a1 100644 --- a/arch/arm/mach-shmobile/clock-r8a73a4.c +++ b/arch/arm/mach-shmobile/clock-r8a73a4.c @@ -29,6 +29,7 @@ #define CPG_LEN 0x270 #define SMSTPCR2 0xe6150138 +#define SMSTPCR3 0xe615013c #define SMSTPCR5 0xe6150144 #define FRQCRA 0xE6150000 @@ -348,6 +349,7 @@ static struct clk div6_clks[DIV6_NR] = { /* MSTP */ enum { MSTP217, MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, + MSTP315, MSTP314, MSTP313, MSTP312, MSTP305, MSTP522, MSTP_NR }; @@ -359,6 +361,11 @@ static struct clk mstp_clks[MSTP_NR] = { [MSTP207] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 7, 0), /* SCIFB1 */ [MSTP216] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 16, 0), /* SCIFB2 */ [MSTP217] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 17, 0), /* SCIFB3 */ + [MSTP305] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC1],SMSTPCR3, 5, 0), /* MMCIF1 */ + [MSTP312] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI2],SMSTPCR3, 12, 0), /* SDHI2 */ + [MSTP313] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI1],SMSTPCR3, 13, 0), /* SDHI1 */ + [MSTP314] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI0],SMSTPCR3, 14, 0), /* SDHI0 */ + [MSTP315] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC0],SMSTPCR3, 15, 0), /* MMCIF0 */ [MSTP522] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR5, 22, 0), /* Thermal */ }; @@ -381,11 +388,6 @@ static struct clk_lookup lookups[] = { /* DIV6 */ CLKDEV_CON_ID("zb", &div6_clks[DIV6_ZB]), - CLKDEV_CON_ID("sdhi0", &div6_clks[DIV6_SDHI0]), - CLKDEV_CON_ID("sdhi1", &div6_clks[DIV6_SDHI1]), - CLKDEV_CON_ID("sdhi2", &div6_clks[DIV6_SDHI2]), - CLKDEV_CON_ID("mmc0", &div6_clks[DIV6_MMC0]), - CLKDEV_CON_ID("mmc1", &div6_clks[DIV6_MMC1]), CLKDEV_CON_ID("vck1", &div6_clks[DIV6_VCK1]), CLKDEV_CON_ID("vck2", &div6_clks[DIV6_VCK2]), CLKDEV_CON_ID("vck3", &div6_clks[DIV6_VCK3]), @@ -406,6 +408,16 @@ static struct clk_lookup lookups[] = { CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP216]), CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP217]), CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), + CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]), + CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]), + CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP312]), + CLKDEV_DEV_ID("ee140000.sdhi", &mstp_clks[MSTP312]), + CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), + CLKDEV_DEV_ID("ee120000.sdhi", &mstp_clks[MSTP313]), + CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), + CLKDEV_DEV_ID("ee100000.sdhi", &mstp_clks[MSTP314]), + CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]), + CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]), /* for DT */ CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]), From 018222f5d32bc5ca9fd830aebfeed10f1be96c93 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Fri, 17 May 2013 16:55:15 +0200 Subject: [PATCH 22/27] ARM: shmobile: r8a7790: add clock definitions and aliases for MMCIF and SDHI Add MSTP clock definitions and fix aliases for the two MMCIF and four SDHI interfaces on r8a7790 (H2). Signed-off-by: Guennadi Liakhovetski [horms+renesas@verge.net.au: applied manually] Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/clock-r8a7790.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c index 379bce698a29..5d71313df52d 100644 --- a/arch/arm/mach-shmobile/clock-r8a7790.c +++ b/arch/arm/mach-shmobile/clock-r8a7790.c @@ -182,7 +182,7 @@ static struct clk div6_clks[DIV6_NR] = { enum { MSTP721, MSTP720, MSTP717, MSTP716, - MSTP304, + MSTP315, MSTP314, MSTP313, MSTP312, MSTP311, MSTP305, MSTP304, MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP_NR }; @@ -190,6 +190,12 @@ enum { static struct clk mstp_clks[MSTP_NR] = { [MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */ [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */ + [MSTP315] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC0], SMSTPCR3, 15, 0), /* MMC0 */ + [MSTP314] = SH_CLK_MSTP32(&div4_clks[DIV4_SD0], SMSTPCR3, 14, 0), /* SDHI0 */ + [MSTP313] = SH_CLK_MSTP32(&div4_clks[DIV4_SD1], SMSTPCR3, 13, 0), /* SDHI1 */ + [MSTP312] = SH_CLK_MSTP32(&div6_clks[DIV6_SD2], SMSTPCR3, 12, 0), /* SDHI2 */ + [MSTP311] = SH_CLK_MSTP32(&div6_clks[DIV6_SD3], SMSTPCR3, 11, 0), /* SDHI3 */ + [MSTP305] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC1], SMSTPCR3, 5, 0), /* MMC1 */ [MSTP304] = SH_CLK_MSTP32(&cp_clk, SMSTPCR3, 4, 0), /* TPU0 */ [MSTP216] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 16, 0), /* SCIFB2 */ [MSTP207] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 7, 0), /* SCIFB1 */ @@ -232,14 +238,8 @@ static struct clk_lookup lookups[] = { /* DIV4 */ CLKDEV_CON_ID("sdh", &div4_clks[DIV4_SDH]), - CLKDEV_CON_ID("sd0", &div4_clks[DIV4_SD0]), - CLKDEV_CON_ID("sd1", &div4_clks[DIV4_SD1]), /* DIV6 */ - CLKDEV_CON_ID("sd2", &div6_clks[DIV6_SD2]), - CLKDEV_CON_ID("sd3", &div6_clks[DIV6_SD3]), - CLKDEV_CON_ID("mmc0", &div6_clks[DIV6_MMC0]), - CLKDEV_CON_ID("mmc1", &div6_clks[DIV6_MMC1]), CLKDEV_CON_ID("ssp", &div6_clks[DIV6_SSP]), CLKDEV_CON_ID("ssprs", &div6_clks[DIV6_SSPRS]), @@ -254,6 +254,18 @@ static struct clk_lookup lookups[] = { CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP720]), CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP717]), CLKDEV_DEV_ID("sh-sci.9", &mstp_clks[MSTP716]), + CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]), + CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]), + CLKDEV_DEV_ID("ee100000.sdhi", &mstp_clks[MSTP314]), + CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), + CLKDEV_DEV_ID("ee120000.sdhi", &mstp_clks[MSTP313]), + CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), + CLKDEV_DEV_ID("ee140000.sdhi", &mstp_clks[MSTP312]), + CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP312]), + CLKDEV_DEV_ID("ee160000.sdhi", &mstp_clks[MSTP311]), + CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP311]), + CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]), + CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]), }; #define R8A7790_CLOCK_ROOT(e, m, p0, p1, p30, p31) \ From 9aa3853a6f6652901f7ae42ed6bfd85a11bdc795 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Sun, 2 Jun 2013 02:40:55 +0400 Subject: [PATCH 23/27] ARM: shmobile: BOCK-W: add Ether support Register Ether device from bockw_init(), passing the platform data to it, adding only the RMII pin group to bockw_pinctrl_map[]. Although the LINK signal exists on the board, it's connected to the link/activity LED output of the PHY, thus the link disappears and reappears after each packet. We'd be better off ignoring such signal and getting the link state from the PHY indirectly. Signed-off-by: Sergei Shtylyov [horms+renesas@verge.net.au: manually applied] Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-bockw.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index 2b6103e55c34..bfe8f6769cf9 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -63,7 +63,24 @@ static struct sh_mobile_sdhi_info sdhi0_info = { .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, }; +static struct sh_eth_plat_data ether_platform_data __initdata = { + .phy = 0x01, + .edmac_endian = EDMAC_LITTLE_ENDIAN, + .register_type = SH_ETH_REG_FAST_RCAR, + .phy_interface = PHY_INTERFACE_MODE_RMII, + /* + * Although the LINK signal is available on the board, it's connected to + * the link/activity LED output of the PHY, thus the link disappears and + * reappears after each packet. We'd be better off ignoring such signal + * and getting the link state from the PHY indirectly. + */ + .no_ether_link = 1, +}; + static const struct pinctrl_map bockw_pinctrl_map[] = { + /* Ether */ + PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7778", + "ether_rmii", "ether"), /* SCIF0 */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", "scif0_data_a", "scif0"), @@ -85,6 +102,7 @@ static void __init bockw_init(void) r8a7778_clock_init(); r8a7778_init_irq_extpin(1); r8a7778_add_standard_devices(); + r8a7778_add_ether_device(ðer_platform_data); pinctrl_register_mappings(bockw_pinctrl_map, ARRAY_SIZE(bockw_pinctrl_map)); From ed17be92c00fde00b2431b31828736f8572d7ba7 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 11 Jun 2013 19:11:17 -0700 Subject: [PATCH 24/27] ARM: shmobile: bockw: add I2C device support This patch enables rx8581 on I2C0 Signed-off-by: Yusuke Goda Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-bockw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index bfe8f6769cf9..a4251cc2a405 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -77,6 +77,13 @@ static struct sh_eth_plat_data ether_platform_data __initdata = { .no_ether_link = 1, }; +/* I2C */ +static struct i2c_board_info i2c0_devices[] = { + { + I2C_BOARD_INFO("rx8581", 0x51), + }, +}; + static const struct pinctrl_map bockw_pinctrl_map[] = { /* Ether */ PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7778", @@ -103,7 +110,10 @@ static void __init bockw_init(void) r8a7778_init_irq_extpin(1); r8a7778_add_standard_devices(); r8a7778_add_ether_device(ðer_platform_data); + r8a7778_add_i2c_device(0); + i2c_register_board_info(0, i2c0_devices, + ARRAY_SIZE(i2c0_devices)); pinctrl_register_mappings(bockw_pinctrl_map, ARRAY_SIZE(bockw_pinctrl_map)); r8a7778_pinmux_init(); From c06a164ce2f0f8791ac566a44eaf1d227a5b6b5b Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 11 Jun 2013 19:11:41 -0700 Subject: [PATCH 25/27] ARM: shmobile: bockw: add SPI FLASH support This patch enables Spansion S25FL008K chip on HSPI0 Signed-off-by: Yusuke Goda Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-bockw.c | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index a4251cc2a405..7d42f12bf790 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -20,11 +20,14 @@ #include #include +#include #include #include #include #include #include +#include +#include #include #include #include @@ -84,10 +87,40 @@ static struct i2c_board_info i2c0_devices[] = { }, }; +/* HSPI*/ +static struct mtd_partition m25p80_spi_flash_partitions[] = { + { + .name = "data(spi)", + .size = 0x0100000, + .offset = 0, + }, +}; + +static struct flash_platform_data spi_flash_data = { + .name = "m25p80", + .type = "s25fl008k", + .parts = m25p80_spi_flash_partitions, + .nr_parts = ARRAY_SIZE(m25p80_spi_flash_partitions), +}; + +static struct spi_board_info spi_board_info[] __initdata = { + { + .modalias = "m25p80", + .max_speed_hz = 104000000, + .chip_select = 0, + .bus_num = 0, + .mode = SPI_MODE_0, + .platform_data = &spi_flash_data, + }, +}; + static const struct pinctrl_map bockw_pinctrl_map[] = { /* Ether */ PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7778", "ether_rmii", "ether"), + /* HSPI0 */ + PIN_MAP_MUX_GROUP_DEFAULT("sh-hspi.0", "pfc-r8a7778", + "hspi0_a", "hspi0"), /* SCIF0 */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", "scif0_data_a", "scif0"), @@ -111,9 +144,12 @@ static void __init bockw_init(void) r8a7778_add_standard_devices(); r8a7778_add_ether_device(ðer_platform_data); r8a7778_add_i2c_device(0); + r8a7778_add_hspi_device(0); i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices)); + spi_register_board_info(spi_board_info, + ARRAY_SIZE(spi_board_info)); pinctrl_register_mappings(bockw_pinctrl_map, ARRAY_SIZE(bockw_pinctrl_map)); r8a7778_pinmux_init(); From 1e0edb76e925927d396be60e22f9c5ab815f2ab0 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 11 Jun 2013 19:12:06 -0700 Subject: [PATCH 26/27] ARM: shmobile: bockw: add MMCIF support This patch enables CN26 MMCIF Signed-off-by: Yusuke Goda Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-bockw.c | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index 7d42f12bf790..7d4846147882 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -41,6 +41,23 @@ * SW41 SCIF RCAN */ +/* + * MMC (CN26) pin + * + * SW6 (D2) 3 pin + * SW7 (D5) ON + * SW8 (D3) 3 pin + * SW10 (D4) 1 pin + * SW12 (CLK) 1 pin + * SW13 (D6) 3 pin + * SW14 (CMD) ON + * SW15 (D6) 1 pin + * SW16 (D0) ON + * SW17 (D1) ON + * SW18 (D7) 3 pin + * SW19 (MMC) 1 pin + */ + /* Dummy supplies, where voltage doesn't matter */ static struct regulator_consumer_supply dummy_supplies[] = { REGULATOR_SUPPLY("vddvario", "smsc911x"), @@ -114,6 +131,15 @@ static struct spi_board_info spi_board_info[] __initdata = { }, }; +/* MMC */ +static struct sh_mmcif_plat_data sh_mmcif_plat = { + .sup_pclk = 0, + .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, + .caps = MMC_CAP_4_BIT_DATA | + MMC_CAP_8_BIT_DATA | + MMC_CAP_NEEDS_POLL, +}; + static const struct pinctrl_map bockw_pinctrl_map[] = { /* Ether */ PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7778", @@ -121,6 +147,11 @@ static const struct pinctrl_map bockw_pinctrl_map[] = { /* HSPI0 */ PIN_MAP_MUX_GROUP_DEFAULT("sh-hspi.0", "pfc-r8a7778", "hspi0_a", "hspi0"), + /* MMC */ + PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif", "pfc-r8a7778", + "mmc_data8", "mmc"), + PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif", "pfc-r8a7778", + "mmc_ctrl", "mmc"), /* SCIF0 */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", "scif0_data_a", "scif0"), @@ -145,6 +176,7 @@ static void __init bockw_init(void) r8a7778_add_ether_device(ðer_platform_data); r8a7778_add_i2c_device(0); r8a7778_add_hspi_device(0); + r8a7778_add_mmc_device(&sh_mmcif_plat); i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices)); From 2c83322ce820bcf2d5e8265de831489076ee211e Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Mon, 17 Jun 2013 23:39:44 +0400 Subject: [PATCH 27/27] ARM: shmobile: BOCK-W: change Ether device name When changing the name of Ether platform device in the commit c02f846938fe (ARM: shmobile: r8a7778: fix Ether device name), I completely forgot that there's also platform device name used in bockw_pinctrl_map[], so the commit "ARM: shmobile: BOCK-W: add Ether support" went in with the old "sh-eth" device name. Now change it to "r8a777x-ether" in accordance with the commits that are now in the 'net- next.git' repository, otherwise BOCK-W Ether support won't work in 3.11. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-bockw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index 7d4846147882..ce56381e0077 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -142,7 +142,7 @@ static struct sh_mmcif_plat_data sh_mmcif_plat = { static const struct pinctrl_map bockw_pinctrl_map[] = { /* Ether */ - PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7778", + PIN_MAP_MUX_GROUP_DEFAULT("r8a777x-ether", "pfc-r8a7778", "ether_rmii", "ether"), /* HSPI0 */ PIN_MAP_MUX_GROUP_DEFAULT("sh-hspi.0", "pfc-r8a7778",