All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-esdhc-imx: support voltage-range property
@ 2015-03-24 13:45 ` Marc Kleine-Budde
  0 siblings, 0 replies; 4+ messages in thread
From: Marc Kleine-Budde @ 2015-03-24 13:45 UTC (permalink / raw)
  To: Chris Ball
  Cc: linux-mmc, linux-arm-kernel, kernel, Sascha Hauer, Marc Kleine-Budde

From: Sascha Hauer <s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | 4 ++++
 drivers/mmc/host/sdhci-esdhc-imx.c                      | 6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
index 9046ba06c47a..415c5575cbf7 100644
--- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
+++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
@@ -17,6 +17,10 @@ Optional properties:
   to select a proper data sampling window in case the clock quality is not good
   due to signal path is too long on the board. Please refer to eSDHC/uSDHC
   chapter, DLL (Delay Line) section in RM for details.
+- voltage-ranges : Specify the voltage range in case there are software
+  transparent level shifters on the outputs of the controller. Two cells are
+  required, first cell specifies minimum slot voltage (mV), second cell
+  specifies maximum slot voltage (mV). Several ranges could be specified.
 
 Examples:
 
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 10ef8244a239..a85fb3181ded 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -864,6 +864,7 @@ static const struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = {
 #ifdef CONFIG_OF
 static int
 sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
+			 struct sdhci_host *host,
 			 struct esdhc_platform_data *boarddata)
 {
 	struct device_node *np = pdev->dev.of_node;
@@ -900,11 +901,14 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
 	if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line))
 		boarddata->delay_line = 0;
 
+	mmc_of_parse_voltage(np, &host->ocr_mask);
+
 	return 0;
 }
 #else
 static inline int
 sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
+			 struct sdhci_host *host,
 			 struct esdhc_platform_data *boarddata)
 {
 	return -ENODEV;
@@ -999,7 +1003,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
 			host->ioaddr + ESDHC_TUNING_CTRL);
 
 	boarddata = &imx_data->boarddata;
-	if (sdhci_esdhc_imx_probe_dt(pdev, boarddata) < 0) {
+	if (sdhci_esdhc_imx_probe_dt(pdev, host, boarddata) < 0) {
 		if (!host->mmc->parent->platform_data) {
 			dev_err(mmc_dev(host->mmc), "no board data!\n");
 			err = -EINVAL;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] mmc: sdhci-esdhc-imx: support voltage-range property
@ 2015-03-24 13:45 ` Marc Kleine-Budde
  0 siblings, 0 replies; 4+ messages in thread
From: Marc Kleine-Budde @ 2015-03-24 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

From: Sascha Hauer <s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | 4 ++++
 drivers/mmc/host/sdhci-esdhc-imx.c                      | 6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
index 9046ba06c47a..415c5575cbf7 100644
--- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
+++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
@@ -17,6 +17,10 @@ Optional properties:
   to select a proper data sampling window in case the clock quality is not good
   due to signal path is too long on the board. Please refer to eSDHC/uSDHC
   chapter, DLL (Delay Line) section in RM for details.
+- voltage-ranges : Specify the voltage range in case there are software
+  transparent level shifters on the outputs of the controller. Two cells are
+  required, first cell specifies minimum slot voltage (mV), second cell
+  specifies maximum slot voltage (mV). Several ranges could be specified.
 
 Examples:
 
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 10ef8244a239..a85fb3181ded 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -864,6 +864,7 @@ static const struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = {
 #ifdef CONFIG_OF
 static int
 sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
+			 struct sdhci_host *host,
 			 struct esdhc_platform_data *boarddata)
 {
 	struct device_node *np = pdev->dev.of_node;
@@ -900,11 +901,14 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
 	if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line))
 		boarddata->delay_line = 0;
 
+	mmc_of_parse_voltage(np, &host->ocr_mask);
+
 	return 0;
 }
 #else
 static inline int
 sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
+			 struct sdhci_host *host,
 			 struct esdhc_platform_data *boarddata)
 {
 	return -ENODEV;
@@ -999,7 +1003,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
 			host->ioaddr + ESDHC_TUNING_CTRL);
 
 	boarddata = &imx_data->boarddata;
-	if (sdhci_esdhc_imx_probe_dt(pdev, boarddata) < 0) {
+	if (sdhci_esdhc_imx_probe_dt(pdev, host, boarddata) < 0) {
 		if (!host->mmc->parent->platform_data) {
 			dev_err(mmc_dev(host->mmc), "no board data!\n");
 			err = -EINVAL;
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: sdhci-esdhc-imx: support voltage-range property
  2015-03-24 13:45 ` Marc Kleine-Budde
@ 2015-03-25  8:51   ` Ulf Hansson
  -1 siblings, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2015-03-25  8:51 UTC (permalink / raw)
  To: Marc Kleine-Budde
  Cc: Chris Ball, linux-mmc, linux-arm-kernel, Sascha Hauer, Sascha Hauer

On 24 March 2015 at 14:45, Marc Kleine-Budde <mkl@pengutronix.de> wrote:
> From: Sascha Hauer <s.hauer@pengutronix.de>
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

Thanks! Applied.

Kind regards
Uffe


> ---
>  Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | 4 ++++
>  drivers/mmc/host/sdhci-esdhc-imx.c                      | 6 +++++-
>  2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> index 9046ba06c47a..415c5575cbf7 100644
> --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> @@ -17,6 +17,10 @@ Optional properties:
>    to select a proper data sampling window in case the clock quality is not good
>    due to signal path is too long on the board. Please refer to eSDHC/uSDHC
>    chapter, DLL (Delay Line) section in RM for details.
> +- voltage-ranges : Specify the voltage range in case there are software
> +  transparent level shifters on the outputs of the controller. Two cells are
> +  required, first cell specifies minimum slot voltage (mV), second cell
> +  specifies maximum slot voltage (mV). Several ranges could be specified.
>
>  Examples:
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 10ef8244a239..a85fb3181ded 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -864,6 +864,7 @@ static const struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = {
>  #ifdef CONFIG_OF
>  static int
>  sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
> +                        struct sdhci_host *host,
>                          struct esdhc_platform_data *boarddata)
>  {
>         struct device_node *np = pdev->dev.of_node;
> @@ -900,11 +901,14 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
>         if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line))
>                 boarddata->delay_line = 0;
>
> +       mmc_of_parse_voltage(np, &host->ocr_mask);
> +
>         return 0;
>  }
>  #else
>  static inline int
>  sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
> +                        struct sdhci_host *host,
>                          struct esdhc_platform_data *boarddata)
>  {
>         return -ENODEV;
> @@ -999,7 +1003,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
>                         host->ioaddr + ESDHC_TUNING_CTRL);
>
>         boarddata = &imx_data->boarddata;
> -       if (sdhci_esdhc_imx_probe_dt(pdev, boarddata) < 0) {
> +       if (sdhci_esdhc_imx_probe_dt(pdev, host, boarddata) < 0) {
>                 if (!host->mmc->parent->platform_data) {
>                         dev_err(mmc_dev(host->mmc), "no board data!\n");
>                         err = -EINVAL;
> --
> 2.1.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] mmc: sdhci-esdhc-imx: support voltage-range property
@ 2015-03-25  8:51   ` Ulf Hansson
  0 siblings, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2015-03-25  8:51 UTC (permalink / raw)
  To: linux-arm-kernel

On 24 March 2015 at 14:45, Marc Kleine-Budde <mkl@pengutronix.de> wrote:
> From: Sascha Hauer <s.hauer@pengutronix.de>
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

Thanks! Applied.

Kind regards
Uffe


> ---
>  Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | 4 ++++
>  drivers/mmc/host/sdhci-esdhc-imx.c                      | 6 +++++-
>  2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> index 9046ba06c47a..415c5575cbf7 100644
> --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> @@ -17,6 +17,10 @@ Optional properties:
>    to select a proper data sampling window in case the clock quality is not good
>    due to signal path is too long on the board. Please refer to eSDHC/uSDHC
>    chapter, DLL (Delay Line) section in RM for details.
> +- voltage-ranges : Specify the voltage range in case there are software
> +  transparent level shifters on the outputs of the controller. Two cells are
> +  required, first cell specifies minimum slot voltage (mV), second cell
> +  specifies maximum slot voltage (mV). Several ranges could be specified.
>
>  Examples:
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 10ef8244a239..a85fb3181ded 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -864,6 +864,7 @@ static const struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = {
>  #ifdef CONFIG_OF
>  static int
>  sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
> +                        struct sdhci_host *host,
>                          struct esdhc_platform_data *boarddata)
>  {
>         struct device_node *np = pdev->dev.of_node;
> @@ -900,11 +901,14 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
>         if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line))
>                 boarddata->delay_line = 0;
>
> +       mmc_of_parse_voltage(np, &host->ocr_mask);
> +
>         return 0;
>  }
>  #else
>  static inline int
>  sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
> +                        struct sdhci_host *host,
>                          struct esdhc_platform_data *boarddata)
>  {
>         return -ENODEV;
> @@ -999,7 +1003,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
>                         host->ioaddr + ESDHC_TUNING_CTRL);
>
>         boarddata = &imx_data->boarddata;
> -       if (sdhci_esdhc_imx_probe_dt(pdev, boarddata) < 0) {
> +       if (sdhci_esdhc_imx_probe_dt(pdev, host, boarddata) < 0) {
>                 if (!host->mmc->parent->platform_data) {
>                         dev_err(mmc_dev(host->mmc), "no board data!\n");
>                         err = -EINVAL;
> --
> 2.1.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-25  8:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-24 13:45 [PATCH] mmc: sdhci-esdhc-imx: support voltage-range property Marc Kleine-Budde
2015-03-24 13:45 ` Marc Kleine-Budde
2015-03-25  8:51 ` Ulf Hansson
2015-03-25  8:51   ` Ulf Hansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.