* [PATCH RESEND 0/3] arm64: salvator-x: enable SD card slots @ 2016-02-15 15:01 Wolfram Sang 2016-02-15 15:01 ` [PATCH RESEND 1/3] mmc: sdhi: Add r8a7795 support Wolfram Sang ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: Wolfram Sang @ 2016-02-15 15:01 UTC (permalink / raw) To: linux-mmc Cc: Wolfram Sang, linux-renesas-soc, Dirk Behme, Ulf Hansson, Geert Uytterhoeven, Simon Horman These are the remaining patches needed to get the SD slots on a Salvator-X board working. I decided to collect and resend them as a separate series to make it more clear where we are and to ensure everyone is in the loop :) There are no changes to patch 1 since it was originally posted. This one should go via MMC. Patches 2+3 have never been posted but were available in my branch and people tested them. Dirk, maybe you can add your Tested-by again? Those patches should go via renesas-soc. Would be great to have this in 4.6. Thanks, Wolfram Ai Kyuse (2): arm64: dts: r8a7795: Add SDHI support to dtsi arm64: dts: r8a7795: salvator-x: enable SDHI0 & 3 Wolfram Sang (1): mmc: sdhi: Add r8a7795 support Documentation/devicetree/bindings/mmc/tmio_mmc.txt | 1 + arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 83 ++++++++++++++++++++++ arch/arm64/boot/dts/renesas/r8a7795.dtsi | 38 ++++++++++ drivers/mmc/host/Kconfig | 2 +- drivers/mmc/host/sh_mobile_sdhi.c | 47 ++++++++---- 5 files changed, 157 insertions(+), 14 deletions(-) -- 2.1.4 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH RESEND 1/3] mmc: sdhi: Add r8a7795 support 2016-02-15 15:01 [PATCH RESEND 0/3] arm64: salvator-x: enable SD card slots Wolfram Sang @ 2016-02-15 15:01 ` Wolfram Sang 2016-02-16 16:35 ` Ulf Hansson 2016-02-15 15:01 ` [PATCH RESEND 2/3] arm64: dts: r8a7795: Add SDHI support to dtsi Wolfram Sang 2016-02-15 15:01 ` [PATCH RESEND 3/3] arm64: dts: r8a7795: salvator-x: enable SDHI0 & 3 Wolfram Sang 2 siblings, 1 reply; 10+ messages in thread From: Wolfram Sang @ 2016-02-15 15:01 UTC (permalink / raw) To: linux-mmc Cc: Wolfram Sang, linux-renesas-soc, Dirk Behme, Ulf Hansson, Geert Uytterhoeven, Simon Horman From: Wolfram Sang <wsa+renesas@sang-engineering.com> Registers are 64bit apart, so we refactor bus_shift handling a little and set it based on the DT compatible. Also, EXT_ACC is different. It has been tested on a Salvator-X (Gen3) and, to check for regressions, on a Lager (Gen2). Signed-off-by: Ai Kyuse <ai.kyuse.uw@renesas.com> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> --- Documentation/devicetree/bindings/mmc/tmio_mmc.txt | 1 + drivers/mmc/host/Kconfig | 2 +- drivers/mmc/host/sh_mobile_sdhi.c | 47 ++++++++++++++++------ 3 files changed, 36 insertions(+), 14 deletions(-) diff --git a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt index 400b640fabc768..7fb746dd1a68ca 100644 --- a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt +++ b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt @@ -22,6 +22,7 @@ Required properties: "renesas,sdhi-r8a7792" - SDHI IP on R8A7792 SoC "renesas,sdhi-r8a7793" - SDHI IP on R8A7793 SoC "renesas,sdhi-r8a7794" - SDHI IP on R8A7794 SoC + "renesas,sdhi-r8a7795" - SDHI IP on R8A7795 SoC Optional properties: - toshiba,mmc-wrprotect-disable: write-protect detection is unavailable diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 4a35ebf5165d83..d9a9d92fa8379a 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -560,7 +560,7 @@ config MMC_TMIO config MMC_SDHI tristate "SH-Mobile SDHI SD/SDIO controller support" - depends on SUPERH || ARM + depends on SUPERH || ARM || ARM64 depends on SUPERH || ARCH_SHMOBILE || COMPILE_TEST select MMC_TMIO_CORE help diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index 557e2b9dadeec7..9aa147959276d0 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c @@ -1,6 +1,8 @@ /* * SuperH Mobile SDHI * + * Copyright (C) 2016 Sang Engineering, Wolfram Sang + * Copyright (C) 2015-16 Renesas Electronics Corporation * Copyright (C) 2009 Magnus Damm * * This program is free software; you can redistribute it and/or modify @@ -43,6 +45,7 @@ struct sh_mobile_sdhi_of_data { unsigned long capabilities2; enum dma_slave_buswidth dma_buswidth; dma_addr_t dma_rx_offset; + unsigned bus_shift; }; static const struct sh_mobile_sdhi_of_data sh_mobile_sdhi_of_cfg[] = { @@ -65,6 +68,13 @@ static const struct sh_mobile_sdhi_of_data of_rcar_gen2_compatible = { .dma_rx_offset = 0x2000, }; +static const struct sh_mobile_sdhi_of_data of_rcar_gen3_compatible = { + .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_WRPROTECT_DISABLE | + TMIO_MMC_CLK_ACTUAL | TMIO_MMC_FAST_CLK_CHG, + .capabilities = MMC_CAP_SD_HIGHSPEED, + .bus_shift = 2, +}; + static const struct of_device_id sh_mobile_sdhi_of_match[] = { { .compatible = "renesas,sdhi-shmobile" }, { .compatible = "renesas,sdhi-sh7372" }, @@ -78,6 +88,7 @@ static const struct of_device_id sh_mobile_sdhi_of_match[] = { { .compatible = "renesas,sdhi-r8a7792", .data = &of_rcar_gen2_compatible, }, { .compatible = "renesas,sdhi-r8a7793", .data = &of_rcar_gen2_compatible, }, { .compatible = "renesas,sdhi-r8a7794", .data = &of_rcar_gen2_compatible, }, + { .compatible = "renesas,sdhi-r8a7795", .data = &of_rcar_gen3_compatible, }, {}, }; MODULE_DEVICE_TABLE(of, sh_mobile_sdhi_of_match); @@ -103,6 +114,15 @@ static void sh_mobile_sdhi_sdbuf_width(struct tmio_mmc_host *host, int width) case 0xCB0D: val = (width == 32) ? 0x0000 : 0x0001; break; + case 0xCC10: /* Gen3, SD only */ + case 0xCD10: /* Gen3, SD + MMC */ + if (width == 64) + val = 0x0000; + else if (width == 32) + val = 0x0101; + else + val = 0x0001; + break; default: /* nothing to do */ return; @@ -233,16 +253,26 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) goto eprobe; } + if (of_id && of_id->data) { + const struct sh_mobile_sdhi_of_data *of_data = of_id->data; + + mmc_data->flags |= of_data->tmio_flags; + mmc_data->capabilities |= of_data->capabilities; + mmc_data->capabilities2 |= of_data->capabilities2; + mmc_data->dma_rx_offset = of_data->dma_rx_offset; + dma_priv->dma_buswidth = of_data->dma_buswidth; + host->bus_shift = of_data->bus_shift; + } + host->dma = dma_priv; host->write16_hook = sh_mobile_sdhi_write16_hook; host->clk_enable = sh_mobile_sdhi_clk_enable; host->clk_disable = sh_mobile_sdhi_clk_disable; host->multi_io_quirk = sh_mobile_sdhi_multi_io_quirk; - /* SD control register space size is 0x100, 0x200 for bus_shift=1 */ - if (resource_size(res) > 0x100) + + /* Orginally registers were 16 bit apart, could be 32 or 64 nowadays */ + if (!host->bus_shift && resource_size(res) > 0x100) /* old way to determine the shift */ host->bus_shift = 1; - else - host->bus_shift = 0; if (mmd) *mmc_data = *mmd; @@ -274,15 +304,6 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) */ mmc_data->flags |= TMIO_MMC_SDIO_STATUS_QUIRK; - if (of_id && of_id->data) { - const struct sh_mobile_sdhi_of_data *of_data = of_id->data; - mmc_data->flags |= of_data->tmio_flags; - mmc_data->capabilities |= of_data->capabilities; - mmc_data->capabilities2 |= of_data->capabilities2; - mmc_data->dma_rx_offset = of_data->dma_rx_offset; - dma_priv->dma_buswidth = of_data->dma_buswidth; - } - ret = tmio_mmc_host_probe(host, mmc_data); if (ret < 0) goto efree; -- 2.1.4 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH RESEND 1/3] mmc: sdhi: Add r8a7795 support 2016-02-15 15:01 ` [PATCH RESEND 1/3] mmc: sdhi: Add r8a7795 support Wolfram Sang @ 2016-02-16 16:35 ` Ulf Hansson 0 siblings, 0 replies; 10+ messages in thread From: Ulf Hansson @ 2016-02-16 16:35 UTC (permalink / raw) To: Wolfram Sang Cc: linux-mmc, linux-renesas-soc, Dirk Behme, Geert Uytterhoeven, Simon Horman On 15 February 2016 at 16:01, Wolfram Sang <wsa@the-dreams.de> wrote: > From: Wolfram Sang <wsa+renesas@sang-engineering.com> > > Registers are 64bit apart, so we refactor bus_shift handling a little and set > it based on the DT compatible. Also, EXT_ACC is different. It has been tested > on a Salvator-X (Gen3) and, to check for regressions, on a Lager (Gen2). > > Signed-off-by: Ai Kyuse <ai.kyuse.uw@renesas.com> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Thanks, applied for next! Kind regards Uffe > --- > Documentation/devicetree/bindings/mmc/tmio_mmc.txt | 1 + > drivers/mmc/host/Kconfig | 2 +- > drivers/mmc/host/sh_mobile_sdhi.c | 47 ++++++++++++++++------ > 3 files changed, 36 insertions(+), 14 deletions(-) > > diff --git a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt > index 400b640fabc768..7fb746dd1a68ca 100644 > --- a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt > +++ b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt > @@ -22,6 +22,7 @@ Required properties: > "renesas,sdhi-r8a7792" - SDHI IP on R8A7792 SoC > "renesas,sdhi-r8a7793" - SDHI IP on R8A7793 SoC > "renesas,sdhi-r8a7794" - SDHI IP on R8A7794 SoC > + "renesas,sdhi-r8a7795" - SDHI IP on R8A7795 SoC > > Optional properties: > - toshiba,mmc-wrprotect-disable: write-protect detection is unavailable > diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig > index 4a35ebf5165d83..d9a9d92fa8379a 100644 > --- a/drivers/mmc/host/Kconfig > +++ b/drivers/mmc/host/Kconfig > @@ -560,7 +560,7 @@ config MMC_TMIO > > config MMC_SDHI > tristate "SH-Mobile SDHI SD/SDIO controller support" > - depends on SUPERH || ARM > + depends on SUPERH || ARM || ARM64 > depends on SUPERH || ARCH_SHMOBILE || COMPILE_TEST > select MMC_TMIO_CORE > help > diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c > index 557e2b9dadeec7..9aa147959276d0 100644 > --- a/drivers/mmc/host/sh_mobile_sdhi.c > +++ b/drivers/mmc/host/sh_mobile_sdhi.c > @@ -1,6 +1,8 @@ > /* > * SuperH Mobile SDHI > * > + * Copyright (C) 2016 Sang Engineering, Wolfram Sang > + * Copyright (C) 2015-16 Renesas Electronics Corporation > * Copyright (C) 2009 Magnus Damm > * > * This program is free software; you can redistribute it and/or modify > @@ -43,6 +45,7 @@ struct sh_mobile_sdhi_of_data { > unsigned long capabilities2; > enum dma_slave_buswidth dma_buswidth; > dma_addr_t dma_rx_offset; > + unsigned bus_shift; > }; > > static const struct sh_mobile_sdhi_of_data sh_mobile_sdhi_of_cfg[] = { > @@ -65,6 +68,13 @@ static const struct sh_mobile_sdhi_of_data of_rcar_gen2_compatible = { > .dma_rx_offset = 0x2000, > }; > > +static const struct sh_mobile_sdhi_of_data of_rcar_gen3_compatible = { > + .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_WRPROTECT_DISABLE | > + TMIO_MMC_CLK_ACTUAL | TMIO_MMC_FAST_CLK_CHG, > + .capabilities = MMC_CAP_SD_HIGHSPEED, > + .bus_shift = 2, > +}; > + > static const struct of_device_id sh_mobile_sdhi_of_match[] = { > { .compatible = "renesas,sdhi-shmobile" }, > { .compatible = "renesas,sdhi-sh7372" }, > @@ -78,6 +88,7 @@ static const struct of_device_id sh_mobile_sdhi_of_match[] = { > { .compatible = "renesas,sdhi-r8a7792", .data = &of_rcar_gen2_compatible, }, > { .compatible = "renesas,sdhi-r8a7793", .data = &of_rcar_gen2_compatible, }, > { .compatible = "renesas,sdhi-r8a7794", .data = &of_rcar_gen2_compatible, }, > + { .compatible = "renesas,sdhi-r8a7795", .data = &of_rcar_gen3_compatible, }, > {}, > }; > MODULE_DEVICE_TABLE(of, sh_mobile_sdhi_of_match); > @@ -103,6 +114,15 @@ static void sh_mobile_sdhi_sdbuf_width(struct tmio_mmc_host *host, int width) > case 0xCB0D: > val = (width == 32) ? 0x0000 : 0x0001; > break; > + case 0xCC10: /* Gen3, SD only */ > + case 0xCD10: /* Gen3, SD + MMC */ > + if (width == 64) > + val = 0x0000; > + else if (width == 32) > + val = 0x0101; > + else > + val = 0x0001; > + break; > default: > /* nothing to do */ > return; > @@ -233,16 +253,26 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) > goto eprobe; > } > > + if (of_id && of_id->data) { > + const struct sh_mobile_sdhi_of_data *of_data = of_id->data; > + > + mmc_data->flags |= of_data->tmio_flags; > + mmc_data->capabilities |= of_data->capabilities; > + mmc_data->capabilities2 |= of_data->capabilities2; > + mmc_data->dma_rx_offset = of_data->dma_rx_offset; > + dma_priv->dma_buswidth = of_data->dma_buswidth; > + host->bus_shift = of_data->bus_shift; > + } > + > host->dma = dma_priv; > host->write16_hook = sh_mobile_sdhi_write16_hook; > host->clk_enable = sh_mobile_sdhi_clk_enable; > host->clk_disable = sh_mobile_sdhi_clk_disable; > host->multi_io_quirk = sh_mobile_sdhi_multi_io_quirk; > - /* SD control register space size is 0x100, 0x200 for bus_shift=1 */ > - if (resource_size(res) > 0x100) > + > + /* Orginally registers were 16 bit apart, could be 32 or 64 nowadays */ > + if (!host->bus_shift && resource_size(res) > 0x100) /* old way to determine the shift */ > host->bus_shift = 1; > - else > - host->bus_shift = 0; > > if (mmd) > *mmc_data = *mmd; > @@ -274,15 +304,6 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) > */ > mmc_data->flags |= TMIO_MMC_SDIO_STATUS_QUIRK; > > - if (of_id && of_id->data) { > - const struct sh_mobile_sdhi_of_data *of_data = of_id->data; > - mmc_data->flags |= of_data->tmio_flags; > - mmc_data->capabilities |= of_data->capabilities; > - mmc_data->capabilities2 |= of_data->capabilities2; > - mmc_data->dma_rx_offset = of_data->dma_rx_offset; > - dma_priv->dma_buswidth = of_data->dma_buswidth; > - } > - > ret = tmio_mmc_host_probe(host, mmc_data); > if (ret < 0) > goto efree; > -- > 2.1.4 > ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH RESEND 2/3] arm64: dts: r8a7795: Add SDHI support to dtsi 2016-02-15 15:01 [PATCH RESEND 0/3] arm64: salvator-x: enable SD card slots Wolfram Sang 2016-02-15 15:01 ` [PATCH RESEND 1/3] mmc: sdhi: Add r8a7795 support Wolfram Sang @ 2016-02-15 15:01 ` Wolfram Sang 2016-02-15 15:01 ` [PATCH RESEND 3/3] arm64: dts: r8a7795: salvator-x: enable SDHI0 & 3 Wolfram Sang 2 siblings, 0 replies; 10+ messages in thread From: Wolfram Sang @ 2016-02-15 15:01 UTC (permalink / raw) To: linux-mmc Cc: Wolfram Sang, linux-renesas-soc, Dirk Behme, Ulf Hansson, Geert Uytterhoeven, Simon Horman From: Ai Kyuse <ai.kyuse.uw@renesas.com> Signed-off-by: Ai Kyuse <ai.kyuse.uw@renesas.com> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> [wsa: squashed some fixes and added mmc-caps] Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> --- arch/arm64/boot/dts/renesas/r8a7795.dtsi | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi index afd01942e4a79f..d94abe28e698cf 100644 --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi @@ -1019,5 +1019,43 @@ power-domains = <&cpg>; status = "disabled"; }; + + sdhi0: sd@ee100000 { + compatible = "renesas,sdhi-r8a7795"; + reg = <0 0xee100000 0 0x2000>; + interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 314>; + power-domains = <&cpg>; + status = "disabled"; + }; + + sdhi1: sd@ee120000 { + compatible = "renesas,sdhi-r8a7795"; + reg = <0 0xee120000 0 0x2000>; + interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 313>; + power-domains = <&cpg>; + status = "disabled"; + }; + + sdhi2: sd@ee140000 { + compatible = "renesas,sdhi-r8a7795"; + reg = <0 0xee140000 0 0x2000>; + interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 312>; + power-domains = <&cpg>; + cap-mmc-highspeed; + status = "disabled"; + }; + + sdhi3: sd@ee160000 { + compatible = "renesas,sdhi-r8a7795"; + reg = <0 0xee160000 0 0x2000>; + interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 311>; + power-domains = <&cpg>; + cap-mmc-highspeed; + status = "disabled"; + }; }; }; -- 2.1.4 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH RESEND 3/3] arm64: dts: r8a7795: salvator-x: enable SDHI0 & 3 2016-02-15 15:01 [PATCH RESEND 0/3] arm64: salvator-x: enable SD card slots Wolfram Sang 2016-02-15 15:01 ` [PATCH RESEND 1/3] mmc: sdhi: Add r8a7795 support Wolfram Sang 2016-02-15 15:01 ` [PATCH RESEND 2/3] arm64: dts: r8a7795: Add SDHI support to dtsi Wolfram Sang @ 2016-02-15 15:01 ` Wolfram Sang 2016-02-19 17:58 ` Wolfram Sang 2 siblings, 1 reply; 10+ messages in thread From: Wolfram Sang @ 2016-02-15 15:01 UTC (permalink / raw) To: linux-mmc Cc: Wolfram Sang, linux-renesas-soc, Dirk Behme, Ulf Hansson, Geert Uytterhoeven, Simon Horman From: Ai Kyuse <ai.kyuse.uw@renesas.com> Add the exposed SD card slots. The on-board eMMC needs to wait until we fixed the 8bit support (it works with 4bit if you really want it now). Signed-off-by: Ai Kyuse <ai.kyuse.uw@renesas.com> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> --- arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts index 1cb1dcb5d4ad30..e5af6fd79731af 100644 --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts @@ -33,6 +33,7 @@ /dts-v1/; #include "r8a7795.dtsi" +#include <dt-bindings/gpio/gpio.h> / { model = "Renesas Salvator-X board based on r8a7795"; @@ -61,6 +62,54 @@ clock-frequency = <24576000>; }; + vcc_sdhi0: regulator@1 { + compatible = "regulator-fixed"; + + regulator-name = "SDHI0 Vcc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vccq_sdhi0: regulator@2 { + compatible = "regulator-gpio"; + + regulator-name = "SDHI0 VccQ"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>; + gpios-states = <1>; + states = <3300000 1 + 1800000 0>; + }; + + vcc_sdhi3: regulator@3 { + compatible = "regulator-fixed"; + + regulator-name = "SDHI3 Vcc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&gpio3 15 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vccq_sdhi3: regulator@4 { + compatible = "regulator-gpio"; + + regulator-name = "SDHI3 VccQ"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>; + gpios-states = <1>; + states = <3300000 1 + 1800000 0>; + }; + audio_clkout: audio_clkout { /* * This is same as <&rcar_sound 0> @@ -119,6 +168,16 @@ renesas,function = "avb"; }; + sdhi0_pins: sd0 { + renesas,groups = "sdhi0_data4", "sdhi0_ctrl"; + renesas,function = "sdhi0"; + }; + + sdhi3_pins: sd3 { + renesas,groups = "sdhi3_data4", "sdhi3_ctrl"; + renesas,function = "sdhi3"; + }; + sound_pins: sound { renesas,groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a"; renesas,function = "ssi"; @@ -262,6 +321,30 @@ }; }; +&sdhi0 { + pinctrl-0 = <&sdhi0_pins>; + pinctrl-names = "default"; + + vmmc-supply = <&vcc_sdhi0>; + vqmmc-supply = <&vccq_sdhi0>; + cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>; + wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>; + bus-width = <4>; + status = "okay"; +}; + +&sdhi3 { + pinctrl-0 = <&sdhi3_pins>; + pinctrl-names = "default"; + + vmmc-supply = <&vcc_sdhi3>; + vqmmc-supply = <&vccq_sdhi3>; + cd-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>; + wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>; + bus-width = <4>; + status = "okay"; +}; + &pcie_bus_clk { status = "okay"; }; -- 2.1.4 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH RESEND 3/3] arm64: dts: r8a7795: salvator-x: enable SDHI0 & 3 2016-02-15 15:01 ` [PATCH RESEND 3/3] arm64: dts: r8a7795: salvator-x: enable SDHI0 & 3 Wolfram Sang @ 2016-02-19 17:58 ` Wolfram Sang 2016-02-22 2:39 ` Simon Horman 0 siblings, 1 reply; 10+ messages in thread From: Wolfram Sang @ 2016-02-19 17:58 UTC (permalink / raw) To: linux-mmc Cc: linux-renesas-soc, Dirk Behme, Ulf Hansson, Geert Uytterhoeven, Simon Horman [-- Attachment #1: Type: text/plain, Size: 588 bytes --] On Mon, Feb 15, 2016 at 04:01:50PM +0100, Wolfram Sang wrote: > From: Ai Kyuse <ai.kyuse.uw@renesas.com> > > Add the exposed SD card slots. The on-board eMMC needs to wait until we > fixed the 8bit support (it works with 4bit if you really want it now). > > Signed-off-by: Ai Kyuse <ai.kyuse.uw@renesas.com> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Simon, if you apply this, can you drop the sentence inside the brackets? It is probably not true until I fix the timeout handling. Or do you want me to resend? Have a nice weekend, Wolfram [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH RESEND 3/3] arm64: dts: r8a7795: salvator-x: enable SDHI0 & 3 2016-02-19 17:58 ` Wolfram Sang @ 2016-02-22 2:39 ` Simon Horman 2016-02-22 4:35 ` Simon Horman 2016-02-22 8:02 ` Wolfram Sang 0 siblings, 2 replies; 10+ messages in thread From: Simon Horman @ 2016-02-22 2:39 UTC (permalink / raw) To: Wolfram Sang Cc: linux-mmc, linux-renesas-soc, Dirk Behme, Ulf Hansson, Geert Uytterhoeven On Fri, Feb 19, 2016 at 06:58:23PM +0100, Wolfram Sang wrote: > On Mon, Feb 15, 2016 at 04:01:50PM +0100, Wolfram Sang wrote: > > From: Ai Kyuse <ai.kyuse.uw@renesas.com> > > > > Add the exposed SD card slots. The on-board eMMC needs to wait until we > > fixed the 8bit support (it works with 4bit if you really want it now). > > > > Signed-off-by: Ai Kyuse <ai.kyuse.uw@renesas.com> > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> > > Simon, if you apply this, can you drop the sentence inside the brackets? > It is probably not true until I fix the timeout handling. Or do you want > me to resend? Sure, I have dropped the text in (). I have queued up the following after resolving a minor conflict. There was also some fuzz when I applied patch 2/2 so I'd appreciate it if you could double check that too. From: Ai Kyuse <ai.kyuse.uw@renesas.com> Date: Mon, 15 Feb 2016 16:01:50 +0100 Subject: [PATCH] arm64: dts: r8a7795: salvator-x: enable SDHI0 & 3 Add the exposed SD card slots. The on-board eMMC needs to wait until we fixed the 8bit support. Signed-off-by: Ai Kyuse <ai.kyuse.uw@renesas.com> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts index 31ace9c1f79d..53541351a56d 100644 --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts @@ -33,6 +33,7 @@ /dts-v1/; #include "r8a7795.dtsi" +#include <dt-bindings/gpio/gpio.h> / { model = "Renesas Salvator-X board based on r8a7795"; @@ -61,6 +62,54 @@ clock-frequency = <24576000>; }; + vcc_sdhi0: regulator@1 { + compatible = "regulator-fixed"; + + regulator-name = "SDHI0 Vcc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vccq_sdhi0: regulator@2 { + compatible = "regulator-gpio"; + + regulator-name = "SDHI0 VccQ"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>; + gpios-states = <1>; + states = <3300000 1 + 1800000 0>; + }; + + vcc_sdhi3: regulator@3 { + compatible = "regulator-fixed"; + + regulator-name = "SDHI3 Vcc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&gpio3 15 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vccq_sdhi3: regulator@4 { + compatible = "regulator-gpio"; + + regulator-name = "SDHI3 VccQ"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>; + gpios-states = <1>; + states = <3300000 1 + 1800000 0>; + }; + audio_clkout: audio_clkout { /* * This is same as <&rcar_sound 0> @@ -119,6 +168,16 @@ renesas,function = "avb"; }; + sdhi0_pins: sd0 { + renesas,groups = "sdhi0_data4", "sdhi0_ctrl"; + renesas,function = "sdhi0"; + }; + + sdhi3_pins: sd3 { + renesas,groups = "sdhi3_data4", "sdhi3_ctrl"; + renesas,function = "sdhi3"; + }; + sound_pins: sound { renesas,groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a"; renesas,function = "ssi"; @@ -226,6 +285,30 @@ &sata { status = "okay"; +; + +&sdhi0 { + pinctrl-0 = <&sdhi0_pins>; + pinctrl-names = "default"; + + vmmc-supply = <&vcc_sdhi0>; + vqmmc-supply = <&vccq_sdhi0>; + cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>; + wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>; + bus-width = <4>; + status = "okay"; +}; + +&sdhi3 { + pinctrl-0 = <&sdhi3_pins>; + pinctrl-names = "default"; + + vmmc-supply = <&vcc_sdhi3>; + vqmmc-supply = <&vccq_sdhi3>; + cd-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>; + wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>; + bus-width = <4>; + status = "okay"; }; &ssi1 { -- 2.1.4 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH RESEND 3/3] arm64: dts: r8a7795: salvator-x: enable SDHI0 & 3 2016-02-22 2:39 ` Simon Horman @ 2016-02-22 4:35 ` Simon Horman 2016-02-22 8:10 ` Wolfram Sang 2016-02-22 8:02 ` Wolfram Sang 1 sibling, 1 reply; 10+ messages in thread From: Simon Horman @ 2016-02-22 4:35 UTC (permalink / raw) To: Wolfram Sang Cc: linux-mmc, linux-renesas-soc, Dirk Behme, Ulf Hansson, Geert Uytterhoeven On Mon, Feb 22, 2016 at 11:39:12AM +0900, Simon Horman wrote: > On Fri, Feb 19, 2016 at 06:58:23PM +0100, Wolfram Sang wrote: > > On Mon, Feb 15, 2016 at 04:01:50PM +0100, Wolfram Sang wrote: > > > From: Ai Kyuse <ai.kyuse.uw@renesas.com> > > > > > > Add the exposed SD card slots. The on-board eMMC needs to wait until we > > > fixed the 8bit support (it works with 4bit if you really want it now). > > > > > > Signed-off-by: Ai Kyuse <ai.kyuse.uw@renesas.com> > > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> > > > > Simon, if you apply this, can you drop the sentence inside the brackets? > > It is probably not true until I fix the timeout handling. Or do you want > > me to resend? > > > Sure, I have dropped the text in (). > > > I have queued up the following after resolving a minor conflict. > There was also some fuzz when I applied patch 2/2 so I'd appreciate it if > you could double check that too. There was a syntax error in my previous effort. Please look over this one instead. From: Ai Kyuse <ai.kyuse.uw@renesas.com> Date: Mon, 15 Feb 2016 16:01:50 +0100 Subject: [PATCH] arm64: dts: r8a7795: salvator-x: enable SDHI0 & 3 Add the exposed SD card slots. The on-board eMMC needs to wait until we fixed the 8bit support. Signed-off-by: Ai Kyuse <ai.kyuse.uw@renesas.com> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts index 31ace9c1f79d..1af67579e07a 100644 --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts @@ -33,6 +33,7 @@ /dts-v1/; #include "r8a7795.dtsi" +#include <dt-bindings/gpio/gpio.h> / { model = "Renesas Salvator-X board based on r8a7795"; @@ -61,6 +62,54 @@ clock-frequency = <24576000>; }; + vcc_sdhi0: regulator@1 { + compatible = "regulator-fixed"; + + regulator-name = "SDHI0 Vcc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vccq_sdhi0: regulator@2 { + compatible = "regulator-gpio"; + + regulator-name = "SDHI0 VccQ"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>; + gpios-states = <1>; + states = <3300000 1 + 1800000 0>; + }; + + vcc_sdhi3: regulator@3 { + compatible = "regulator-fixed"; + + regulator-name = "SDHI3 Vcc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&gpio3 15 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vccq_sdhi3: regulator@4 { + compatible = "regulator-gpio"; + + regulator-name = "SDHI3 VccQ"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>; + gpios-states = <1>; + states = <3300000 1 + 1800000 0>; + }; + audio_clkout: audio_clkout { /* * This is same as <&rcar_sound 0> @@ -119,6 +168,16 @@ renesas,function = "avb"; }; + sdhi0_pins: sd0 { + renesas,groups = "sdhi0_data4", "sdhi0_ctrl"; + renesas,function = "sdhi0"; + }; + + sdhi3_pins: sd3 { + renesas,groups = "sdhi3_data4", "sdhi3_ctrl"; + renesas,function = "sdhi3"; + }; + sound_pins: sound { renesas,groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a"; renesas,function = "ssi"; @@ -228,6 +287,30 @@ status = "okay"; }; +&sdhi0 { + pinctrl-0 = <&sdhi0_pins>; + pinctrl-names = "default"; + + vmmc-supply = <&vcc_sdhi0>; + vqmmc-supply = <&vccq_sdhi0>; + cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>; + wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>; + bus-width = <4>; + status = "okay"; +}; + +&sdhi3 { + pinctrl-0 = <&sdhi3_pins>; + pinctrl-names = "default"; + + vmmc-supply = <&vcc_sdhi3>; + vqmmc-supply = <&vccq_sdhi3>; + cd-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>; + wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>; + bus-width = <4>; + status = "okay"; +}; + &ssi1 { shared-pin; }; -- 2.1.4 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH RESEND 3/3] arm64: dts: r8a7795: salvator-x: enable SDHI0 & 3 2016-02-22 4:35 ` Simon Horman @ 2016-02-22 8:10 ` Wolfram Sang 0 siblings, 0 replies; 10+ messages in thread From: Wolfram Sang @ 2016-02-22 8:10 UTC (permalink / raw) To: Simon Horman Cc: linux-mmc, linux-renesas-soc, Dirk Behme, Ulf Hansson, Geert Uytterhoeven [-- Attachment #1: Type: text/plain, Size: 135 bytes --] > There was a syntax error in my previous effort. > Please look over this one instead. Yeah, wit the missing '}' it's even better ;) [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH RESEND 3/3] arm64: dts: r8a7795: salvator-x: enable SDHI0 & 3 2016-02-22 2:39 ` Simon Horman 2016-02-22 4:35 ` Simon Horman @ 2016-02-22 8:02 ` Wolfram Sang 1 sibling, 0 replies; 10+ messages in thread From: Wolfram Sang @ 2016-02-22 8:02 UTC (permalink / raw) To: Simon Horman Cc: linux-mmc, linux-renesas-soc, Dirk Behme, Ulf Hansson, Geert Uytterhoeven [-- Attachment #1: Type: text/plain, Size: 207 bytes --] > I have queued up the following after resolving a minor conflict. > There was also some fuzz when I applied patch 2/2 so I'd appreciate it if > you could double check that too. Looks good to me. Thanks! [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2016-02-22 8:10 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-02-15 15:01 [PATCH RESEND 0/3] arm64: salvator-x: enable SD card slots Wolfram Sang 2016-02-15 15:01 ` [PATCH RESEND 1/3] mmc: sdhi: Add r8a7795 support Wolfram Sang 2016-02-16 16:35 ` Ulf Hansson 2016-02-15 15:01 ` [PATCH RESEND 2/3] arm64: dts: r8a7795: Add SDHI support to dtsi Wolfram Sang 2016-02-15 15:01 ` [PATCH RESEND 3/3] arm64: dts: r8a7795: salvator-x: enable SDHI0 & 3 Wolfram Sang 2016-02-19 17:58 ` Wolfram Sang 2016-02-22 2:39 ` Simon Horman 2016-02-22 4:35 ` Simon Horman 2016-02-22 8:10 ` Wolfram Sang 2016-02-22 8:02 ` Wolfram Sang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).