* [PATCH v2 1/3] dt-bindings: mmc: fsl-imx-esdhc: add imx6ull compatible string
@ 2018-12-28 3:26 ` BOUGH CHEN
0 siblings, 0 replies; 16+ messages in thread
From: BOUGH CHEN @ 2018-12-28 3:26 UTC (permalink / raw)
To: ulf.hansson, robh+dt, mark.rutland, shawnguo, s.hauer, kernel,
adrian.hunter, rmk+kernel
Cc: Fabio Estevam, devicetree, linux-mmc, dl-linux-imx, linux-arm-kernel
Add imx6ull compatible string
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
index 9201a7d8d7b0..540c65ed9cba 100644
--- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
+++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
@@ -15,6 +15,7 @@ Required properties:
"fsl,imx6q-usdhc"
"fsl,imx6sl-usdhc"
"fsl,imx6sx-usdhc"
+ "fsl,imx6ull-usdhc"
"fsl,imx7d-usdhc"
"fsl,imx8qxp-usdhc"
--
2.17.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 1/3] dt-bindings: mmc: fsl-imx-esdhc: add imx6ull compatible string
@ 2018-12-28 3:26 ` BOUGH CHEN
0 siblings, 0 replies; 16+ messages in thread
From: BOUGH CHEN @ 2018-12-28 3:26 UTC (permalink / raw)
To: ulf.hansson, robh+dt, mark.rutland, shawnguo, s.hauer, kernel,
adrian.hunter, rmk+kernel
Cc: Fabio Estevam, devicetree, linux-mmc, dl-linux-imx, linux-arm-kernel
Add imx6ull compatible string
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
index 9201a7d8d7b0..540c65ed9cba 100644
--- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
+++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
@@ -15,6 +15,7 @@ Required properties:
"fsl,imx6q-usdhc"
"fsl,imx6sl-usdhc"
"fsl,imx6sx-usdhc"
+ "fsl,imx6ull-usdhc"
"fsl,imx7d-usdhc"
"fsl,imx8qxp-usdhc"
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 2/3] mmc: sdhci-esdhc-imx: add SD clock limitation for imx6ull
2018-12-28 3:26 ` BOUGH CHEN
@ 2018-12-28 3:26 ` BOUGH CHEN
-1 siblings, 0 replies; 16+ messages in thread
From: BOUGH CHEN @ 2018-12-28 3:26 UTC (permalink / raw)
To: ulf.hansson, robh+dt, mark.rutland, shawnguo, s.hauer, kernel,
adrian.hunter, rmk+kernel
Cc: Fabio Estevam, devicetree, linux-mmc, dl-linux-imx, linux-arm-kernel
i.MX6ULL has errata ERR010450, point out that due to SOC I/O
timing limitation, for eMMC HS200 and SD/SDIO 3.0 SDR104, the
clock rate can't exceed 150MHz. And for eMMC DDR52 and SD/SDIO
DDR50 mode, the clock rate can't exceed 45MHz.
This patch add this limit for imx6ull.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 7cfcc8618e45..e1d9b2985979 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -138,7 +138,11 @@
#define ESDHC_FLAG_HS200 BIT(8)
/* The IP supports HS400 mode */
#define ESDHC_FLAG_HS400 BIT(9)
-
+/* The IP has errata ERR010450
+ * uSDHC: Due to the I/O timing limit, for SDR mode, SD card clock can't
+ * exceed 150MHz, for DDR mode, SD card clock can't exceed 45MHz.
+ */
+#define ESDHC_FLAG_ERR010450 BIT(10)
/* A clock frequency higher than this rate requires strobe dll control */
#define ESDHC_STROBE_DLL_CLK_FREQ 100000000
@@ -177,6 +181,12 @@ static struct esdhc_soc_data usdhc_imx6sx_data = {
| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200,
};
+static struct esdhc_soc_data usdhc_imx6ull_data = {
+ .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
+ | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
+ | ESDHC_FLAG_ERR010450,
+};
+
static struct esdhc_soc_data usdhc_imx7d_data = {
.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
@@ -227,6 +237,7 @@ static const struct of_device_id imx_esdhc_dt_ids[] = {
{ .compatible = "fsl,imx6sx-usdhc", .data = &usdhc_imx6sx_data, },
{ .compatible = "fsl,imx6sl-usdhc", .data = &usdhc_imx6sl_data, },
{ .compatible = "fsl,imx6q-usdhc", .data = &usdhc_imx6q_data, },
+ { .compatible = "fsl,imx6ull-usdhc", .data = &usdhc_imx6ull_data, },
{ .compatible = "fsl,imx7d-usdhc", .data = &usdhc_imx7d_data, },
{ /* sentinel */ }
};
@@ -733,6 +744,14 @@ static inline void esdhc_pltfm_set_clock(struct sdhci_host *host,
| ESDHC_CLOCK_MASK);
sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL);
+ if (imx_data->socdata->flags & ESDHC_FLAG_ERR010450) {
+ unsigned int max_clock;
+
+ max_clock = imx_data->is_ddr ? 45000000 : 150000000;
+
+ clock = min(clock, max_clock);
+ }
+
while (host_clock / (16 * pre_div * ddr_pre_div) > clock &&
pre_div < 256)
pre_div *= 2;
--
2.17.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 2/3] mmc: sdhci-esdhc-imx: add SD clock limitation for imx6ull
@ 2018-12-28 3:26 ` BOUGH CHEN
0 siblings, 0 replies; 16+ messages in thread
From: BOUGH CHEN @ 2018-12-28 3:26 UTC (permalink / raw)
To: ulf.hansson, robh+dt, mark.rutland, shawnguo, s.hauer, kernel,
adrian.hunter, rmk+kernel
Cc: Fabio Estevam, devicetree, linux-mmc, dl-linux-imx, linux-arm-kernel
i.MX6ULL has errata ERR010450, point out that due to SOC I/O
timing limitation, for eMMC HS200 and SD/SDIO 3.0 SDR104, the
clock rate can't exceed 150MHz. And for eMMC DDR52 and SD/SDIO
DDR50 mode, the clock rate can't exceed 45MHz.
This patch add this limit for imx6ull.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 7cfcc8618e45..e1d9b2985979 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -138,7 +138,11 @@
#define ESDHC_FLAG_HS200 BIT(8)
/* The IP supports HS400 mode */
#define ESDHC_FLAG_HS400 BIT(9)
-
+/* The IP has errata ERR010450
+ * uSDHC: Due to the I/O timing limit, for SDR mode, SD card clock can't
+ * exceed 150MHz, for DDR mode, SD card clock can't exceed 45MHz.
+ */
+#define ESDHC_FLAG_ERR010450 BIT(10)
/* A clock frequency higher than this rate requires strobe dll control */
#define ESDHC_STROBE_DLL_CLK_FREQ 100000000
@@ -177,6 +181,12 @@ static struct esdhc_soc_data usdhc_imx6sx_data = {
| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200,
};
+static struct esdhc_soc_data usdhc_imx6ull_data = {
+ .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
+ | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
+ | ESDHC_FLAG_ERR010450,
+};
+
static struct esdhc_soc_data usdhc_imx7d_data = {
.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
@@ -227,6 +237,7 @@ static const struct of_device_id imx_esdhc_dt_ids[] = {
{ .compatible = "fsl,imx6sx-usdhc", .data = &usdhc_imx6sx_data, },
{ .compatible = "fsl,imx6sl-usdhc", .data = &usdhc_imx6sl_data, },
{ .compatible = "fsl,imx6q-usdhc", .data = &usdhc_imx6q_data, },
+ { .compatible = "fsl,imx6ull-usdhc", .data = &usdhc_imx6ull_data, },
{ .compatible = "fsl,imx7d-usdhc", .data = &usdhc_imx7d_data, },
{ /* sentinel */ }
};
@@ -733,6 +744,14 @@ static inline void esdhc_pltfm_set_clock(struct sdhci_host *host,
| ESDHC_CLOCK_MASK);
sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL);
+ if (imx_data->socdata->flags & ESDHC_FLAG_ERR010450) {
+ unsigned int max_clock;
+
+ max_clock = imx_data->is_ddr ? 45000000 : 150000000;
+
+ clock = min(clock, max_clock);
+ }
+
while (host_clock / (16 * pre_div * ddr_pre_div) > clock &&
pre_div < 256)
pre_div *= 2;
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 3/3] ARM: dts: imx6ull: change to use new compatible "fsl,imx6ull-usdhc" for usdhc
2018-12-28 3:26 ` BOUGH CHEN
@ 2018-12-28 3:26 ` BOUGH CHEN
-1 siblings, 0 replies; 16+ messages in thread
From: BOUGH CHEN @ 2018-12-28 3:26 UTC (permalink / raw)
To: ulf.hansson, robh+dt, mark.rutland, shawnguo, s.hauer, kernel,
adrian.hunter, rmk+kernel
Cc: Fabio Estevam, devicetree, linux-mmc, dl-linux-imx, linux-arm-kernel
i.MX6ULL has errata ERR010450, there is I/O timing limitation,
for SDR mode, SD card clock can't exceed 150MHz, for DDR mode,
SD card clock can't exceed 45MHz. This patch change to use the
new compatible "fsl,imx6ull-usdhc" to follow this limitation.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
arch/arm/boot/dts/imx6ull.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/imx6ull.dtsi b/arch/arm/boot/dts/imx6ull.dtsi
index f3668fe69eac..4ad58283a9f4 100644
--- a/arch/arm/boot/dts/imx6ull.dtsi
+++ b/arch/arm/boot/dts/imx6ull.dtsi
@@ -30,6 +30,14 @@
>;
};
+&usdhc1 {
+ compatible = "fsl,imx6ull-usdhc", "fsl,imx6sx-usdhc";
+};
+
+&usdhc2 {
+ compatible = "fsl,imx6ull-usdhc", "fsl,imx6sx-usdhc";
+};
+
/ {
soc {
aips3: aips-bus@2200000 {
--
2.17.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 3/3] ARM: dts: imx6ull: change to use new compatible "fsl,imx6ull-usdhc" for usdhc
@ 2018-12-28 3:26 ` BOUGH CHEN
0 siblings, 0 replies; 16+ messages in thread
From: BOUGH CHEN @ 2018-12-28 3:26 UTC (permalink / raw)
To: ulf.hansson, robh+dt, mark.rutland, shawnguo, s.hauer, kernel,
adrian.hunter, rmk+kernel
Cc: Fabio Estevam, devicetree, linux-mmc, dl-linux-imx, linux-arm-kernel
i.MX6ULL has errata ERR010450, there is I/O timing limitation,
for SDR mode, SD card clock can't exceed 150MHz, for DDR mode,
SD card clock can't exceed 45MHz. This patch change to use the
new compatible "fsl,imx6ull-usdhc" to follow this limitation.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
arch/arm/boot/dts/imx6ull.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/imx6ull.dtsi b/arch/arm/boot/dts/imx6ull.dtsi
index f3668fe69eac..4ad58283a9f4 100644
--- a/arch/arm/boot/dts/imx6ull.dtsi
+++ b/arch/arm/boot/dts/imx6ull.dtsi
@@ -30,6 +30,14 @@
>;
};
+&usdhc1 {
+ compatible = "fsl,imx6ull-usdhc", "fsl,imx6sx-usdhc";
+};
+
+&usdhc2 {
+ compatible = "fsl,imx6ull-usdhc", "fsl,imx6sx-usdhc";
+};
+
/ {
soc {
aips3: aips-bus@2200000 {
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: mmc: fsl-imx-esdhc: add imx6ull compatible string
2018-12-28 3:26 ` BOUGH CHEN
@ 2018-12-28 18:09 ` Fabio Estevam
-1 siblings, 0 replies; 16+ messages in thread
From: Fabio Estevam @ 2018-12-28 18:09 UTC (permalink / raw)
To: BOUGH CHEN
Cc: mark.rutland, devicetree, ulf.hansson, s.hauer, linux-mmc,
adrian.hunter, rmk+kernel, robh+dt, dl-linux-imx, kernel,
Fabio Estevam, shawnguo, linux-arm-kernel
Hi Bough,
On Fri, Dec 28, 2018 at 1:26 AM BOUGH CHEN <haibo.chen@nxp.com> wrote:
>
> Add imx6ull compatible string
Please explain the reason, like you did in the other commit log that
explains the need for handling erratum ERR010450 on i.MX6ULL.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: mmc: fsl-imx-esdhc: add imx6ull compatible string
@ 2018-12-28 18:09 ` Fabio Estevam
0 siblings, 0 replies; 16+ messages in thread
From: Fabio Estevam @ 2018-12-28 18:09 UTC (permalink / raw)
To: BOUGH CHEN
Cc: mark.rutland, devicetree, ulf.hansson, s.hauer, linux-mmc,
adrian.hunter, rmk+kernel, robh+dt, dl-linux-imx, kernel,
Fabio Estevam, shawnguo, linux-arm-kernel
Hi Bough,
On Fri, Dec 28, 2018 at 1:26 AM BOUGH CHEN <haibo.chen@nxp.com> wrote:
>
> Add imx6ull compatible string
Please explain the reason, like you did in the other commit log that
explains the need for handling erratum ERR010450 on i.MX6ULL.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: mmc: fsl-imx-esdhc: add imx6ull compatible string
2018-12-28 3:26 ` BOUGH CHEN
@ 2018-12-28 22:15 ` Rob Herring
-1 siblings, 0 replies; 16+ messages in thread
From: Rob Herring @ 2018-12-28 22:15 UTC (permalink / raw)
To: BOUGH CHEN
Cc: mark.rutland, devicetree, ulf.hansson, s.hauer, linux-mmc,
adrian.hunter, rmk+kernel, robh+dt, dl-linux-imx, kernel,
Fabio Estevam, shawnguo, linux-arm-kernel
On Fri, 28 Dec 2018 03:26:04 +0000, BOUGH CHEN wrote:
> Add imx6ull compatible string
>
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
> ---
> Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | 1 +
> 1 file changed, 1 insertion(+)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: mmc: fsl-imx-esdhc: add imx6ull compatible string
@ 2018-12-28 22:15 ` Rob Herring
0 siblings, 0 replies; 16+ messages in thread
From: Rob Herring @ 2018-12-28 22:15 UTC (permalink / raw)
To: BOUGH CHEN
Cc: mark.rutland, devicetree, ulf.hansson, s.hauer, linux-mmc,
adrian.hunter, rmk+kernel, robh+dt, dl-linux-imx, kernel,
Fabio Estevam, shawnguo, linux-arm-kernel
On Fri, 28 Dec 2018 03:26:04 +0000, BOUGH CHEN wrote:
> Add imx6ull compatible string
>
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
> ---
> Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | 1 +
> 1 file changed, 1 insertion(+)
>
Reviewed-by: Rob Herring <robh@kernel.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: mmc: fsl-imx-esdhc: add imx6ull compatible string
2018-12-28 3:26 ` BOUGH CHEN
@ 2019-01-14 11:43 ` Ulf Hansson
-1 siblings, 0 replies; 16+ messages in thread
From: Ulf Hansson @ 2019-01-14 11:43 UTC (permalink / raw)
To: BOUGH CHEN
Cc: mark.rutland, devicetree, s.hauer, linux-mmc, adrian.hunter,
rmk+kernel, robh+dt, dl-linux-imx, kernel, Fabio Estevam,
shawnguo, linux-arm-kernel
On Fri, 28 Dec 2018 at 04:26, BOUGH CHEN <haibo.chen@nxp.com> wrote:
>
> Add imx6ull compatible string
>
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Applied for next, thanks!
I also amended the changelog by adding some more information about why
this is needed, according to the comment from Fabio.
Kind regards
Uffe
> ---
> Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> index 9201a7d8d7b0..540c65ed9cba 100644
> --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> @@ -15,6 +15,7 @@ Required properties:
> "fsl,imx6q-usdhc"
> "fsl,imx6sl-usdhc"
> "fsl,imx6sx-usdhc"
> + "fsl,imx6ull-usdhc"
> "fsl,imx7d-usdhc"
> "fsl,imx8qxp-usdhc"
>
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: mmc: fsl-imx-esdhc: add imx6ull compatible string
@ 2019-01-14 11:43 ` Ulf Hansson
0 siblings, 0 replies; 16+ messages in thread
From: Ulf Hansson @ 2019-01-14 11:43 UTC (permalink / raw)
To: BOUGH CHEN
Cc: mark.rutland, devicetree, s.hauer, linux-mmc, adrian.hunter,
rmk+kernel, robh+dt, dl-linux-imx, kernel, Fabio Estevam,
shawnguo, linux-arm-kernel
On Fri, 28 Dec 2018 at 04:26, BOUGH CHEN <haibo.chen@nxp.com> wrote:
>
> Add imx6ull compatible string
>
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Applied for next, thanks!
I also amended the changelog by adding some more information about why
this is needed, according to the comment from Fabio.
Kind regards
Uffe
> ---
> Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> index 9201a7d8d7b0..540c65ed9cba 100644
> --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> @@ -15,6 +15,7 @@ Required properties:
> "fsl,imx6q-usdhc"
> "fsl,imx6sl-usdhc"
> "fsl,imx6sx-usdhc"
> + "fsl,imx6ull-usdhc"
> "fsl,imx7d-usdhc"
> "fsl,imx8qxp-usdhc"
>
> --
> 2.17.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 2/3] mmc: sdhci-esdhc-imx: add SD clock limitation for imx6ull
2018-12-28 3:26 ` BOUGH CHEN
@ 2019-01-14 11:43 ` Ulf Hansson
-1 siblings, 0 replies; 16+ messages in thread
From: Ulf Hansson @ 2019-01-14 11:43 UTC (permalink / raw)
To: BOUGH CHEN
Cc: mark.rutland, devicetree, s.hauer, linux-mmc, adrian.hunter,
rmk+kernel, robh+dt, dl-linux-imx, kernel, Fabio Estevam,
shawnguo, linux-arm-kernel
On Fri, 28 Dec 2018 at 04:26, BOUGH CHEN <haibo.chen@nxp.com> wrote:
>
> i.MX6ULL has errata ERR010450, point out that due to SOC I/O
> timing limitation, for eMMC HS200 and SD/SDIO 3.0 SDR104, the
> clock rate can't exceed 150MHz. And for eMMC DDR52 and SD/SDIO
> DDR50 mode, the clock rate can't exceed 45MHz.
>
> This patch add this limit for imx6ull.
>
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Applied for next (I amended the patch by fixing a trivial conflict and
made the struct "const").
Kind regards
Uffe
> ---
> drivers/mmc/host/sdhci-esdhc-imx.c | 21 ++++++++++++++++++++-
> 1 file changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 7cfcc8618e45..e1d9b2985979 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -138,7 +138,11 @@
> #define ESDHC_FLAG_HS200 BIT(8)
> /* The IP supports HS400 mode */
> #define ESDHC_FLAG_HS400 BIT(9)
> -
> +/* The IP has errata ERR010450
> + * uSDHC: Due to the I/O timing limit, for SDR mode, SD card clock can't
> + * exceed 150MHz, for DDR mode, SD card clock can't exceed 45MHz.
> + */
> +#define ESDHC_FLAG_ERR010450 BIT(10)
> /* A clock frequency higher than this rate requires strobe dll control */
> #define ESDHC_STROBE_DLL_CLK_FREQ 100000000
>
> @@ -177,6 +181,12 @@ static struct esdhc_soc_data usdhc_imx6sx_data = {
> | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200,
> };
>
> +static struct esdhc_soc_data usdhc_imx6ull_data = {
> + .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
> + | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
> + | ESDHC_FLAG_ERR010450,
> +};
> +
> static struct esdhc_soc_data usdhc_imx7d_data = {
> .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
> | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
> @@ -227,6 +237,7 @@ static const struct of_device_id imx_esdhc_dt_ids[] = {
> { .compatible = "fsl,imx6sx-usdhc", .data = &usdhc_imx6sx_data, },
> { .compatible = "fsl,imx6sl-usdhc", .data = &usdhc_imx6sl_data, },
> { .compatible = "fsl,imx6q-usdhc", .data = &usdhc_imx6q_data, },
> + { .compatible = "fsl,imx6ull-usdhc", .data = &usdhc_imx6ull_data, },
> { .compatible = "fsl,imx7d-usdhc", .data = &usdhc_imx7d_data, },
> { /* sentinel */ }
> };
> @@ -733,6 +744,14 @@ static inline void esdhc_pltfm_set_clock(struct sdhci_host *host,
> | ESDHC_CLOCK_MASK);
> sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL);
>
> + if (imx_data->socdata->flags & ESDHC_FLAG_ERR010450) {
> + unsigned int max_clock;
> +
> + max_clock = imx_data->is_ddr ? 45000000 : 150000000;
> +
> + clock = min(clock, max_clock);
> + }
> +
> while (host_clock / (16 * pre_div * ddr_pre_div) > clock &&
> pre_div < 256)
> pre_div *= 2;
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 2/3] mmc: sdhci-esdhc-imx: add SD clock limitation for imx6ull
@ 2019-01-14 11:43 ` Ulf Hansson
0 siblings, 0 replies; 16+ messages in thread
From: Ulf Hansson @ 2019-01-14 11:43 UTC (permalink / raw)
To: BOUGH CHEN
Cc: mark.rutland, devicetree, s.hauer, linux-mmc, adrian.hunter,
rmk+kernel, robh+dt, dl-linux-imx, kernel, Fabio Estevam,
shawnguo, linux-arm-kernel
On Fri, 28 Dec 2018 at 04:26, BOUGH CHEN <haibo.chen@nxp.com> wrote:
>
> i.MX6ULL has errata ERR010450, point out that due to SOC I/O
> timing limitation, for eMMC HS200 and SD/SDIO 3.0 SDR104, the
> clock rate can't exceed 150MHz. And for eMMC DDR52 and SD/SDIO
> DDR50 mode, the clock rate can't exceed 45MHz.
>
> This patch add this limit for imx6ull.
>
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Applied for next (I amended the patch by fixing a trivial conflict and
made the struct "const").
Kind regards
Uffe
> ---
> drivers/mmc/host/sdhci-esdhc-imx.c | 21 ++++++++++++++++++++-
> 1 file changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 7cfcc8618e45..e1d9b2985979 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -138,7 +138,11 @@
> #define ESDHC_FLAG_HS200 BIT(8)
> /* The IP supports HS400 mode */
> #define ESDHC_FLAG_HS400 BIT(9)
> -
> +/* The IP has errata ERR010450
> + * uSDHC: Due to the I/O timing limit, for SDR mode, SD card clock can't
> + * exceed 150MHz, for DDR mode, SD card clock can't exceed 45MHz.
> + */
> +#define ESDHC_FLAG_ERR010450 BIT(10)
> /* A clock frequency higher than this rate requires strobe dll control */
> #define ESDHC_STROBE_DLL_CLK_FREQ 100000000
>
> @@ -177,6 +181,12 @@ static struct esdhc_soc_data usdhc_imx6sx_data = {
> | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200,
> };
>
> +static struct esdhc_soc_data usdhc_imx6ull_data = {
> + .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
> + | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
> + | ESDHC_FLAG_ERR010450,
> +};
> +
> static struct esdhc_soc_data usdhc_imx7d_data = {
> .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
> | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
> @@ -227,6 +237,7 @@ static const struct of_device_id imx_esdhc_dt_ids[] = {
> { .compatible = "fsl,imx6sx-usdhc", .data = &usdhc_imx6sx_data, },
> { .compatible = "fsl,imx6sl-usdhc", .data = &usdhc_imx6sl_data, },
> { .compatible = "fsl,imx6q-usdhc", .data = &usdhc_imx6q_data, },
> + { .compatible = "fsl,imx6ull-usdhc", .data = &usdhc_imx6ull_data, },
> { .compatible = "fsl,imx7d-usdhc", .data = &usdhc_imx7d_data, },
> { /* sentinel */ }
> };
> @@ -733,6 +744,14 @@ static inline void esdhc_pltfm_set_clock(struct sdhci_host *host,
> | ESDHC_CLOCK_MASK);
> sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL);
>
> + if (imx_data->socdata->flags & ESDHC_FLAG_ERR010450) {
> + unsigned int max_clock;
> +
> + max_clock = imx_data->is_ddr ? 45000000 : 150000000;
> +
> + clock = min(clock, max_clock);
> + }
> +
> while (host_clock / (16 * pre_div * ddr_pre_div) > clock &&
> pre_div < 256)
> pre_div *= 2;
> --
> 2.17.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 3/3] ARM: dts: imx6ull: change to use new compatible "fsl,imx6ull-usdhc" for usdhc
2018-12-28 3:26 ` BOUGH CHEN
@ 2019-01-15 14:56 ` Shawn Guo
-1 siblings, 0 replies; 16+ messages in thread
From: Shawn Guo @ 2019-01-15 14:56 UTC (permalink / raw)
To: BOUGH CHEN
Cc: mark.rutland, devicetree, ulf.hansson, s.hauer, linux-mmc,
adrian.hunter, rmk+kernel, robh+dt, dl-linux-imx, kernel,
Fabio Estevam, linux-arm-kernel
On Fri, Dec 28, 2018 at 03:26:16AM +0000, BOUGH CHEN wrote:
> i.MX6ULL has errata ERR010450, there is I/O timing limitation,
> for SDR mode, SD card clock can't exceed 150MHz, for DDR mode,
> SD card clock can't exceed 45MHz. This patch change to use the
> new compatible "fsl,imx6ull-usdhc" to follow this limitation.
>
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 3/3] ARM: dts: imx6ull: change to use new compatible "fsl,imx6ull-usdhc" for usdhc
@ 2019-01-15 14:56 ` Shawn Guo
0 siblings, 0 replies; 16+ messages in thread
From: Shawn Guo @ 2019-01-15 14:56 UTC (permalink / raw)
To: BOUGH CHEN
Cc: mark.rutland, devicetree, ulf.hansson, s.hauer, linux-mmc,
adrian.hunter, rmk+kernel, robh+dt, dl-linux-imx, kernel,
Fabio Estevam, linux-arm-kernel
On Fri, Dec 28, 2018 at 03:26:16AM +0000, BOUGH CHEN wrote:
> i.MX6ULL has errata ERR010450, there is I/O timing limitation,
> for SDR mode, SD card clock can't exceed 150MHz, for DDR mode,
> SD card clock can't exceed 45MHz. This patch change to use the
> new compatible "fsl,imx6ull-usdhc" to follow this limitation.
>
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Applied, thanks.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2019-01-15 14:56 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-28 3:26 [PATCH v2 1/3] dt-bindings: mmc: fsl-imx-esdhc: add imx6ull compatible string BOUGH CHEN
2018-12-28 3:26 ` BOUGH CHEN
2018-12-28 3:26 ` [PATCH v2 2/3] mmc: sdhci-esdhc-imx: add SD clock limitation for imx6ull BOUGH CHEN
2018-12-28 3:26 ` BOUGH CHEN
2019-01-14 11:43 ` Ulf Hansson
2019-01-14 11:43 ` Ulf Hansson
2018-12-28 3:26 ` [PATCH v2 3/3] ARM: dts: imx6ull: change to use new compatible "fsl,imx6ull-usdhc" for usdhc BOUGH CHEN
2018-12-28 3:26 ` BOUGH CHEN
2019-01-15 14:56 ` Shawn Guo
2019-01-15 14:56 ` Shawn Guo
2018-12-28 18:09 ` [PATCH v2 1/3] dt-bindings: mmc: fsl-imx-esdhc: add imx6ull compatible string Fabio Estevam
2018-12-28 18:09 ` Fabio Estevam
2018-12-28 22:15 ` Rob Herring
2018-12-28 22:15 ` Rob Herring
2019-01-14 11:43 ` Ulf Hansson
2019-01-14 11:43 ` 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.