Skip to content

Commit

Permalink
Merge tag 'renesas-boards2-for-v3.10' of git://git.kernel.org/pub/scm…
Browse files Browse the repository at this point in the history
…/linux/kernel/git/horms/renesas into next/boards

From Simon Horman <horms+renesas@verge.net.au>:

Second round of Renesas ARM-based SoC board updates for v3.10

* Resolve a build regression on Mackerel by reverting
  "ARM: shmobile: streamline mackerel SD and MMC devices"
* DTS cleanup and corrections for kzm9g/sh73a0 from Guennadi
* SDHI voltage regulator enhancements for kzm9g and armadillo800eva
  from Guennadi

* tag 'renesas-boards2-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  Revert "ARM: shmobile: streamline mackerel SD and MMC devices"
  ARM: shmobile: kzm9g-reference: fix device-tree bindings and device names
  ARM: shmobile: kzm9g: add fixed voltage regulators for SDHI0 and SDHI2
  ARM: shmobile: armadillo800eva: add a fixed voltage regulator for SDHI1
  ARM: shmobile: sh73a0: move SDHI and MMCIF DT nodes to sh73a0.dtsi
  ARM: shmobile: kzm9g: SDHI0 and SDHI1 use a 3.3V power supply

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Arnd Bergmann committed Mar 22, 2013
2 parents 8f07b1d + ac22dde commit 271c8f9
Show file tree
Hide file tree
Showing 7 changed files with 230 additions and 150 deletions.
49 changes: 19 additions & 30 deletions arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

/dts-v1/;
/include/ "sh73a0-reference.dtsi"
/include/ "sh73a0.dtsi"

/ {
model = "KZM-A9-GT";
Expand All @@ -36,42 +36,31 @@
regulator-boot-on;
};

reg_2p8v: regulator@1 {
reg_3p3v: regulator@1 {
compatible = "regulator-fixed";
regulator-name = "fixed-2.8V";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
regulator-name = "fixed-3.3V";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
regulator-boot-on;
};

sdhi0: sdhi@0xee100000 {
compatible = "renesas,shmobile-sdhi";
reg = <0xee100000 0x100>;
interrupt-parent = <&gic>;
interrupts = <0 83 4
0 84 4
0 85 4>;
vmmc-supply = <&reg_2p8v>;
bus-width = <4>;
toshiba,mmc-has-idle-wait;
};

sdhi2: sdhi@0xee140000 {
compatible = "renesas,shmobile-sdhi";
reg = <0xee140000 0x100>;
interrupt-parent = <&gic>;
interrupts = <0 104 4
0 105 4>;
vmmc-supply = <&reg_2p8v>;
bus-width = <4>;
broken-cd;
toshiba,mmc-wrprotect-disable;
toshiba,mmc-has-idle-wait;
};
};

&mmcif {
bus-width = <8>;
vmmc-supply = <&reg_1p8v>;
status = "okay";
};

&sdhi0 {
vmmc-supply = <&reg_3p3v>;
bus-width = <4>;
status = "okay";
};

&sdhi2 {
vmmc-supply = <&reg_3p3v>;
bus-width = <4>;
broken-cd;
status = "okay";
};
24 changes: 0 additions & 24 deletions arch/arm/boot/dts/sh73a0-reference.dtsi

This file was deleted.

44 changes: 44 additions & 0 deletions arch/arm/boot/dts/sh73a0.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,48 @@
0 189 0x4
0 190 0x4>;
};

mmcif: mmcif@0x10010000 {
compatible = "renesas,sh-mmcif";
reg = <0xe6bd0000 0x100>;
interrupt-parent = <&gic>;
interrupts = <0 140 0x4
0 141 0x4>;
reg-io-width = <4>;
status = "disabled";
};

sdhi0: sdhi@0xee100000 {
compatible = "renesas,r8a7740-sdhi";
reg = <0xee100000 0x100>;
interrupt-parent = <&gic>;
interrupts = <0 83 4
0 84 4
0 85 4>;
cap-sd-highspeed;
status = "disabled";
};

/* SDHI1 and SDHI2 have no CD pins, no need for CD IRQ */
sdhi1: sdhi@0xee120000 {
compatible = "renesas,r8a7740-sdhi";
reg = <0xee120000 0x100>;
interrupt-parent = <&gic>;
interrupts = <0 88 4
0 89 4>;
toshiba,mmc-wrprotect-disable;
cap-sd-highspeed;
status = "disabled";
};

sdhi2: sdhi@0xee140000 {
compatible = "renesas,r8a7740-sdhi";
reg = <0xee140000 0x100>;
interrupt-parent = <&gic>;
interrupts = <0 104 4
0 105 4>;
toshiba,mmc-wrprotect-disable;
cap-sd-highspeed;
status = "disabled";
};
};
45 changes: 36 additions & 9 deletions arch/arm/mach-shmobile/board-armadillo800eva.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,6 @@ static struct platform_device gpio_keys_device = {

/* Fixed 3.3V regulator to be used by SDHI1, MMCIF */
static struct regulator_consumer_supply fixed3v3_power_consumers[] = {
REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"),
REGULATOR_SUPPLY("vmmc", "sh_mmcif"),
REGULATOR_SUPPLY("vqmmc", "sh_mmcif"),
};
Expand Down Expand Up @@ -645,6 +643,35 @@ static struct platform_device vccq_sdhi0 = {
},
};

/* Fixed 3.3V regulator to be used by SDHI1 */
static struct regulator_consumer_supply vcc_sdhi1_consumers[] = {
REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
};

static struct regulator_init_data vcc_sdhi1_init_data = {
.constraints = {
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(vcc_sdhi1_consumers),
.consumer_supplies = vcc_sdhi1_consumers,
};

static struct fixed_voltage_config vcc_sdhi1_info = {
.supply_name = "SDHI1 Vcc",
.microvolts = 3300000,
.gpio = GPIO_PORT16,
.enable_high = 1,
.init_data = &vcc_sdhi1_init_data,
};

static struct platform_device vcc_sdhi1 = {
.name = "reg-fixed-voltage",
.id = 2,
.dev = {
.platform_data = &vcc_sdhi1_info,
},
};

/* SDHI0 */
/*
* FIXME
Expand All @@ -658,7 +685,8 @@ static struct platform_device vccq_sdhi0 = {
static struct sh_mobile_sdhi_info sdhi0_info = {
.dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
.dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
.tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
.tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
MMC_CAP_POWER_OFF_CARD,
.tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD,
.cd_gpio = GPIO_PORT167,
};
Expand Down Expand Up @@ -699,7 +727,8 @@ static struct platform_device sdhi0_device = {
static struct sh_mobile_sdhi_info sdhi1_info = {
.dma_slave_tx = SHDMA_SLAVE_SDHI1_TX,
.dma_slave_rx = SHDMA_SLAVE_SDHI1_RX,
.tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
.tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
MMC_CAP_POWER_OFF_CARD,
.tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD,
/* Port72 cannot generate IRQs, will be used in polling mode. */
.cd_gpio = GPIO_PORT72,
Expand Down Expand Up @@ -992,6 +1021,8 @@ static struct platform_device *eva_devices[] __initdata = {
&lcdc0_device,
&gpio_keys_device,
&sh_eth_device,
&vcc_sdhi0,
&vccq_sdhi0,
&sdhi0_device,
&sh_mmcif_device,
&hdmi_device,
Expand All @@ -1002,8 +1033,6 @@ static struct platform_device *eva_devices[] __initdata = {
&fsi_wm8978_device,
&fsi_hdmi_device,
&i2c_gpio_device,
&vcc_sdhi0,
&vccq_sdhi0,
};

static const struct pinctrl_map eva_pinctrl_map[] = {
Expand Down Expand Up @@ -1198,9 +1227,7 @@ static void __init eva_init(void)
pinctrl_register_mappings(eva_sdhi1_pinctrl_map,
ARRAY_SIZE(eva_sdhi1_pinctrl_map));

/* SDSLOT2_PON */
gpio_request_one(16, GPIOF_OUT_INIT_HIGH, NULL);

platform_device_register(&vcc_sdhi1);
platform_device_register(&sdhi1_device);
}

Expand Down
27 changes: 13 additions & 14 deletions arch/arm/mach-shmobile/board-kzm9g-reference.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,35 +40,35 @@ static unsigned long pin_pullup_conf[] = {
};

static const struct pinctrl_map kzm_pinctrl_map[] = {
PIN_MAP_MUX_GROUP_DEFAULT("i2c-sh_mobile.3", "pfc-sh73a0",
PIN_MAP_MUX_GROUP_DEFAULT("e6826000.i2c", "pfc-sh73a0",
"i2c3_1", "i2c3"),
/* MMCIF */
PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-sh73a0",
PIN_MAP_MUX_GROUP_DEFAULT("e6bd0000.mmcif", "pfc-sh73a0",
"mmc0_data8_0", "mmc0"),
PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-sh73a0",
PIN_MAP_MUX_GROUP_DEFAULT("e6bd0000.mmcif", "pfc-sh73a0",
"mmc0_ctrl_0", "mmc0"),
PIN_MAP_CONFIGS_PIN_DEFAULT("sh_mmcif.0", "pfc-sh73a0",
PIN_MAP_CONFIGS_PIN_DEFAULT("e6bd0000.mmcif", "pfc-sh73a0",
"PORT279", pin_pullup_conf),
PIN_MAP_CONFIGS_GROUP_DEFAULT("sh_mmcif.0", "pfc-sh73a0",
PIN_MAP_CONFIGS_GROUP_DEFAULT("e6bd0000.mmcif", "pfc-sh73a0",
"mmc0_data8_0", pin_pullup_conf),
/* SCIFA4 */
PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.4", "pfc-sh73a0",
"scifa4_data", "scifa4"),
PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.4", "pfc-sh73a0",
"scifa4_ctrl", "scifa4"),
/* SDHI0 */
PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0",
PIN_MAP_MUX_GROUP_DEFAULT("ee100000.sdhi", "pfc-sh73a0",
"sdhi0_data4", "sdhi0"),
PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0",
PIN_MAP_MUX_GROUP_DEFAULT("ee100000.sdhi", "pfc-sh73a0",
"sdhi0_ctrl", "sdhi0"),
PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0",
PIN_MAP_MUX_GROUP_DEFAULT("ee100000.sdhi", "pfc-sh73a0",
"sdhi0_cd", "sdhi0"),
PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0",
PIN_MAP_MUX_GROUP_DEFAULT("ee100000.sdhi", "pfc-sh73a0",
"sdhi0_wp", "sdhi0"),
/* SDHI2 */
PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-sh73a0",
PIN_MAP_MUX_GROUP_DEFAULT("ee140000.sdhi", "pfc-sh73a0",
"sdhi2_data4", "sdhi2"),
PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-sh73a0",
PIN_MAP_MUX_GROUP_DEFAULT("ee140000.sdhi", "pfc-sh73a0",
"sdhi2_ctrl", "sdhi2"),
};

Expand All @@ -80,10 +80,9 @@ static void __init kzm_init(void)

/* enable SD */
gpio_request(GPIO_FN_SDHI0_VCCQ_MC0_ON, NULL);
gpio_request_one(GPIO_PORT15, GPIOF_OUT_INIT_HIGH, NULL); /* power */
gpio_request_one(15, GPIOF_OUT_INIT_HIGH, NULL); /* power */

gpio_request(GPIO_FN_SDHICLK2, NULL);
gpio_request_one(GPIO_PORT14, GPIOF_OUT_INIT_HIGH, NULL); /* power */
gpio_request_one(14, GPIOF_OUT_INIT_HIGH, NULL); /* power */

#ifdef CONFIG_CACHE_L2X0
/* Early BRESP enable, Shared attribute override enable, 64K*8way */
Expand Down
Loading

0 comments on commit 271c8f9

Please sign in to comment.