linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] mmc: imx: a few fixes and new feature add
@ 2015-06-10  8:50 Haibo Chen
  2015-06-10  8:50 ` [PATCH 1/6] mmc: sdhci-esdhc-imx: add imx7d support and support HS400 Haibo Chen
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Haibo Chen @ 2015-06-10  8:50 UTC (permalink / raw)
  To: linux-arm-kernel

Patch 1 add imx7d support, and also HS400 mode support.
Patch 2 add tuning-step, which can be get from dts.
Patch 3 add eMMC5.0 support for imx7d in dts.
Patch 4~6 small fixes.

Haibo Chen (6):
  mmc: sdhci-esdhc-imx: add imx7d support and support HS400
  mmc: sdhci-esdhc-imx: add tuning-step seting support
  ARM: dts: imx7d-sdb: add eMMC5.0 support
  mmc: sdhci-esdhc-imx: config watermater levles and burst lengths
  mmc: sdhci-esdhc-imx: set back the burst_length_enable bit to 1
  mmc: sdhci-esdhc-imx: add compatible string in binding doc

 .../devicetree/bindings/mmc/fsl-imx-esdhc.txt      |  1 +
 arch/arm/boot/dts/imx7d-sdb.dts                    | 13 +++
 drivers/mmc/host/sdhci-esdhc-imx.c                 | 97 +++++++++++++++++++++-
 include/linux/platform_data/mmc-esdhc-imx.h        |  1 +
 4 files changed, 111 insertions(+), 1 deletion(-)

-- 
1.9.1

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

* [PATCH 1/6] mmc: sdhci-esdhc-imx: add imx7d support and support HS400
  2015-06-10  8:50 [PATCH 0/6] mmc: imx: a few fixes and new feature add Haibo Chen
@ 2015-06-10  8:50 ` Haibo Chen
  2015-06-10  8:50 ` [PATCH 2/6] mmc: sdhci-esdhc-imx: add tuning-step seting support Haibo Chen
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Haibo Chen @ 2015-06-10  8:50 UTC (permalink / raw)
  To: linux-arm-kernel

The imx7d usdhc is derived from imx6sx, the difference is that
imx7d support HS400.

So introduce a new compatible string for imx7d and add HS400
support for imx7d usdhc.

Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
---
 drivers/mmc/host/sdhci-esdhc-imx.c | 66 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index faf0cb9..763b928 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -44,6 +44,7 @@
 #define  ESDHC_MIX_CTRL_EXE_TUNE	(1 << 22)
 #define  ESDHC_MIX_CTRL_SMPCLK_SEL	(1 << 23)
 #define  ESDHC_MIX_CTRL_FBCLK_SEL	(1 << 25)
+#define  ESDHC_MIX_CTRL_HS400_EN	(1 << 26)
 /* Bits 3 and 6 are not SDHCI standard definitions */
 #define  ESDHC_MIX_CTRL_SDHCI_MASK	0xb7
 /* Tuning bits */
@@ -60,6 +61,16 @@
 #define  ESDHC_TUNE_CTRL_MIN		0
 #define  ESDHC_TUNE_CTRL_MAX		((1 << 7) - 1)
 
+/* strobe dll register */
+#define ESDHC_STROBE_DLL_CTRL		0x70
+#define ESDHC_STROBE_DLL_CTRL_ENABLE	(1 << 0)
+#define ESDHC_STROBE_DLL_CTRL_RESET	(1 << 1)
+#define ESDHC_STROBE_DLL_CTRL_SLV_DLY_TARGET_SHIFT	3
+
+#define ESDHC_STROBE_DLL_STATUS		0x74
+#define ESDHC_STROBE_DLL_STS_REF_LOCK	(1 << 1)
+#define ESDHC_STROBE_DLL_STS_SLV_LOCK 	0x1
+
 #define ESDHC_TUNING_CTRL		0xcc
 #define ESDHC_STD_TUNING_EN		(1 << 24)
 /* NOTE: the minimum valid tuning start tap for mx6sl is 1 */
@@ -120,6 +131,8 @@
 #define ESDHC_FLAG_ERR004536		BIT(7)
 /* The IP supports HS200 mode */
 #define ESDHC_FLAG_HS200		BIT(8)
+/* The IP supports HS400 mode */
+#define ESDHC_FLAG_SUP_HS400		BIT(9)
 
 struct esdhc_soc_data {
 	u32 flags;
@@ -156,6 +169,12 @@ static struct esdhc_soc_data usdhc_imx6sx_data = {
 			| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200,
 };
 
+static struct esdhc_soc_data usdhc_imx7d_data = {
+	.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
+			| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
+			| ESDHC_FLAG_SUP_HS400,
+};
+
 struct pltfm_imx_data {
 	u32 scratchpad;
 	struct pinctrl *pinctrl;
@@ -199,6 +218,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,imx7d-usdhc", .data = &usdhc_imx7d_data, },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, imx_esdhc_dt_ids);
@@ -274,6 +294,10 @@ static u32 esdhc_readl_le(struct sdhci_host *host, int reg)
 				val = SDHCI_SUPPORT_DDR50 | SDHCI_SUPPORT_SDR104
 					| SDHCI_SUPPORT_SDR50
 					| SDHCI_USE_SDR50_TUNING;
+
+			/* imx7d does not have a support_hs400 register, fake one */
+			if (imx_data->socdata->flags & ESDHC_FLAG_SUP_HS400)
+				val |= SDHCI_SUPPORT_HS400;
 		}
 	}
 
@@ -779,6 +803,7 @@ static int esdhc_change_pinstate(struct sdhci_host *host,
 		break;
 	case MMC_TIMING_UHS_SDR104:
 	case MMC_TIMING_MMC_HS200:
+	case MMC_TIMING_MMC_HS400:
 		pinctrl = imx_data->pins_200mhz;
 		break;
 	default:
@@ -789,6 +814,30 @@ static int esdhc_change_pinstate(struct sdhci_host *host,
 	return pinctrl_select_state(imx_data->pinctrl, pinctrl);
 }
 
+static void esdhc_set_strobe_dll(struct sdhci_host *host)
+{
+	u32 v;
+
+	/* force a reset on strobe dll */
+	writel(ESDHC_STROBE_DLL_CTRL_RESET, host->ioaddr + ESDHC_STROBE_DLL_CTRL);
+	/*
+	 * enable strobe dll ctrl and adjust the delay target
+	 * for the uSDHC loopback read clock
+	 */
+	v = ESDHC_STROBE_DLL_CTRL_ENABLE |
+		(7 << ESDHC_STROBE_DLL_CTRL_SLV_DLY_TARGET_SHIFT);
+	writel(v, host->ioaddr + ESDHC_STROBE_DLL_CTRL);
+	/* wait 1us to make sure strobe dll status register stable */
+	udelay(1);
+	v = readl(host->ioaddr + ESDHC_STROBE_DLL_STATUS);
+	if (!(v & ESDHC_STROBE_DLL_STS_REF_LOCK))
+		dev_warn(mmc_dev(host->mmc),
+			"warning! HS400 strobe DLL status REF not lock!\n");
+	if (!(v & ESDHC_STROBE_DLL_STS_SLV_LOCK))
+		dev_warn(mmc_dev(host->mmc),
+			"warning! HS400 strobe DLL status SLV not lock!\n");
+}
+
 static void esdhc_set_uhs_signaling(struct sdhci_host *host, unsigned timing)
 {
 	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
@@ -800,7 +849,13 @@ static void esdhc_set_uhs_signaling(struct sdhci_host *host, unsigned timing)
 	case MMC_TIMING_UHS_SDR25:
 	case MMC_TIMING_UHS_SDR50:
 	case MMC_TIMING_UHS_SDR104:
+		break;
 	case MMC_TIMING_MMC_HS200:
+		/* disable ddr mode and disable HS400 mode */
+		writel(readl(host->ioaddr + ESDHC_MIX_CTRL) &
+			~(ESDHC_MIX_CTRL_DDREN | ESDHC_MIX_CTRL_HS400_EN),
+			host->ioaddr + ESDHC_MIX_CTRL);
+		imx_data->is_ddr = 0;
 		break;
 	case MMC_TIMING_UHS_DDR50:
 	case MMC_TIMING_MMC_DDR52:
@@ -818,6 +873,14 @@ static void esdhc_set_uhs_signaling(struct sdhci_host *host, unsigned timing)
 			writel(v, host->ioaddr + ESDHC_DLL_CTRL);
 		}
 		break;
+	case MMC_TIMING_MMC_HS400:
+		writel(readl(host->ioaddr + ESDHC_MIX_CTRL) |
+				ESDHC_MIX_CTRL_DDREN | ESDHC_MIX_CTRL_HS400_EN,
+				host->ioaddr + ESDHC_MIX_CTRL);
+		imx_data->is_ddr = 1;
+		if (host->clock == 200000000)
+			esdhc_set_strobe_dll(host);
+		break;
 	}
 
 	esdhc_change_pinstate(host, timing);
@@ -1030,6 +1093,9 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
 	if (imx_data->socdata->flags & ESDHC_FLAG_ERR004536)
 		host->quirks |= SDHCI_QUIRK_BROKEN_ADMA;
 
+	if (imx_data->socdata->flags & ESDHC_FLAG_SUP_HS400)
+		host->quirks2 |= SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400;
+
 	boarddata = &imx_data->boarddata;
 	if (sdhci_esdhc_imx_probe_dt(pdev, host, boarddata) < 0) {
 		if (!host->mmc->parent->platform_data) {
-- 
1.9.1

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

* [PATCH 2/6] mmc: sdhci-esdhc-imx: add tuning-step seting support
  2015-06-10  8:50 [PATCH 0/6] mmc: imx: a few fixes and new feature add Haibo Chen
  2015-06-10  8:50 ` [PATCH 1/6] mmc: sdhci-esdhc-imx: add imx7d support and support HS400 Haibo Chen
@ 2015-06-10  8:50 ` Haibo Chen
  2015-07-03 11:10   ` Shawn Guo
  2015-06-10  8:50 ` [PATCH 3/6] ARM: dts: imx7d-sdb: add eMMC5.0 support Haibo Chen
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Haibo Chen @ 2015-06-10  8:50 UTC (permalink / raw)
  To: linux-arm-kernel

tuning-step is the delay cell steps in tuning procedure. The default value
of tuning-step is 1. For imx6 series usdhc, tuning procedure can be passed
when the tuning-step value is 1. But imx7d usdhc need the tuning-step value
as 2, otherwise it can't pass the tuning procedure.

So this patch add the tuning-step setting in driver, so that user can set the
tuning-step value in dts.

Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
---
 drivers/mmc/host/sdhci-esdhc-imx.c          | 9 +++++++++
 include/linux/platform_data/mmc-esdhc-imx.h | 1 +
 2 files changed, 10 insertions(+)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 763b928..f7ec66e 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -75,6 +75,7 @@
 #define ESDHC_STD_TUNING_EN		(1 << 24)
 /* NOTE: the minimum valid tuning start tap for mx6sl is 1 */
 #define ESDHC_TUNING_START_TAP		0x1
+#define ESDHC_TUNING_STEP_SHIFT		16
 
 /* pinctrl state */
 #define ESDHC_PINCTRL_STATE_100MHZ	"state_100mhz"
@@ -472,6 +473,7 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg)
 		} else if (imx_data->socdata->flags & ESDHC_FLAG_STD_TUNING) {
 			u32 v = readl(host->ioaddr + SDHCI_ACMD12_ERR);
 			u32 m = readl(host->ioaddr + ESDHC_MIX_CTRL);
+			u32 tuning_ctrl;
 			if (val & SDHCI_CTRL_TUNED_CLK) {
 				v |= ESDHC_MIX_CTRL_SMPCLK_SEL;
 			} else {
@@ -482,6 +484,11 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg)
 			if (val & SDHCI_CTRL_EXEC_TUNING) {
 				v |= ESDHC_MIX_CTRL_EXE_TUNE;
 				m |= ESDHC_MIX_CTRL_FBCLK_SEL;
+				tuning_ctrl = readl(host->ioaddr + ESDHC_TUNING_CTRL);
+				tuning_ctrl |= ESDHC_STD_TUNING_EN | ESDHC_TUNING_START_TAP;
+				if (imx_data->boarddata.tuning_step)
+					tuning_ctrl |= imx_data->boarddata.tuning_step << ESDHC_TUNING_STEP_SHIFT;
+					writel(tuning_ctrl, host->ioaddr + ESDHC_TUNING_CTRL);
 			} else {
 				v &= ~ESDHC_MIX_CTRL_EXE_TUNE;
 			}
@@ -969,6 +976,8 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
 
 	of_property_read_u32(np, "max-frequency", &boarddata->f_max);
 
+	of_property_read_u32(np, "tuning-step", &boarddata->tuning_step);
+
 	if (of_find_property(np, "no-1-8-v", NULL))
 		boarddata->support_vsel = false;
 	else
diff --git a/include/linux/platform_data/mmc-esdhc-imx.h b/include/linux/platform_data/mmc-esdhc-imx.h
index 75f70f6..cedbf8e 100644
--- a/include/linux/platform_data/mmc-esdhc-imx.h
+++ b/include/linux/platform_data/mmc-esdhc-imx.h
@@ -46,5 +46,6 @@ struct esdhc_platform_data {
 	unsigned int f_max;
 	bool support_vsel;
 	unsigned int delay_line;
+	unsigned int tuning_step;	/* The delay cell steps in tuning procedure */
 };
 #endif /* __ASM_ARCH_IMX_ESDHC_H */
-- 
1.9.1

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

* [PATCH 3/6] ARM: dts: imx7d-sdb: add eMMC5.0 support
  2015-06-10  8:50 [PATCH 0/6] mmc: imx: a few fixes and new feature add Haibo Chen
  2015-06-10  8:50 ` [PATCH 1/6] mmc: sdhci-esdhc-imx: add imx7d support and support HS400 Haibo Chen
  2015-06-10  8:50 ` [PATCH 2/6] mmc: sdhci-esdhc-imx: add tuning-step seting support Haibo Chen
@ 2015-06-10  8:50 ` Haibo Chen
  2015-06-10  8:50 ` [PATCH 4/6] mmc: sdhci-esdhc-imx: config watermater levles and burst lengths Haibo Chen
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Haibo Chen @ 2015-06-10  8:50 UTC (permalink / raw)
  To: linux-arm-kernel

imx7d-sdb board has a eMMC5.0 on usdhc3. This eMMC support HS400.
This patch add usdhc3 support for HS400

Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
---
 arch/arm/boot/dts/imx7d-sdb.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/imx7d-sdb.dts b/arch/arm/boot/dts/imx7d-sdb.dts
index 4d1a4b9..896eb54 100644
--- a/arch/arm/boot/dts/imx7d-sdb.dts
+++ b/arch/arm/boot/dts/imx7d-sdb.dts
@@ -241,6 +241,19 @@
 	status = "okay";
 };
 
+&usdhc3 {
+	pinctrl-names = "default", "state_100mhz", "state_200mhz";
+	pinctrl-0 = <&pinctrl_usdhc3>;
+	pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
+	pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
+	assigned-clocks = <&clks IMX7D_USDHC3_ROOT_CLK>;
+	assigned-clock-rates = <400000000>;
+	bus-width = <8>;
+	tuning-step = <2>;
+	non-removable;
+	status = "okay";
+};
+
 &iomuxc {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_hog>;
-- 
1.9.1

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

* [PATCH 4/6] mmc: sdhci-esdhc-imx: config watermater levles and burst lengths
  2015-06-10  8:50 [PATCH 0/6] mmc: imx: a few fixes and new feature add Haibo Chen
                   ` (2 preceding siblings ...)
  2015-06-10  8:50 ` [PATCH 3/6] ARM: dts: imx7d-sdb: add eMMC5.0 support Haibo Chen
@ 2015-06-10  8:50 ` Haibo Chen
  2015-06-10 14:36   ` Eric Nelson
  2015-06-10  8:50 ` [PATCH 5/6] mmc: sdhci-esdhc-imx: set back the burst_length_enable bit to 1 Haibo Chen
  2015-06-10  8:50 ` [PATCH 6/6] mmc: sdhci-esdhc-imx: add compatible string in binding doc Haibo Chen
  5 siblings, 1 reply; 11+ messages in thread
From: Haibo Chen @ 2015-06-10  8:50 UTC (permalink / raw)
  To: linux-arm-kernel

i.MX7D support eMMC HS400 mode, this mode can run in 8 bit,200MHZ
DDR mode. So the I/O speed improve a lot compare to SD3.0

The default burst length is 8, if we don't change this value, in
HS400 mode, when we do eMMC read operation, we can find that the
clock signal will stop for a period of time. This means the speed
of data moving on AHB bus is slower than I/O speed. So we should
improve the speed of data moving on AHB bus.

For imx7d usdhc, this patch set the burst length as 16, and set
watermater levle as 64. The test result is the clock signal has
no stop during the eMMC HS400 operation. For other imx usdhc, remain
the default value: burst length as 8, watermater level as 16.

Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
---
 drivers/mmc/host/sdhci-esdhc-imx.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index f7ec66e..1f0e0d9 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -239,6 +239,11 @@ static inline int is_imx6q_usdhc(struct pltfm_imx_data *data)
 	return data->socdata == &usdhc_imx6q_data;
 }
 
+static inline int is_imx7d_usdhc(struct pltfm_imx_data *data)
+{
+	return data->socdata == &usdhc_imx7d_data;
+}
+
 static inline int esdhc_is_usdhc(struct pltfm_imx_data *data)
 {
 	return !!(data->socdata->flags & ESDHC_FLAG_USDHC);
@@ -1075,7 +1080,11 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
 	 * to something insane.  Change it back here.
 	 */
 	if (esdhc_is_usdhc(imx_data)) {
-		writel(0x08100810, host->ioaddr + ESDHC_WTMK_LVL);
+		if (is_imx7d_usdhc(imx_data))
+			writel(0x10401040, host->ioaddr + ESDHC_WTMK_LVL);
+		else
+			writel(0x08100810, host->ioaddr + ESDHC_WTMK_LVL);
+
 		host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN;
 		host->mmc->caps |= MMC_CAP_1_8V_DDR;
 
-- 
1.9.1

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

* [PATCH 5/6] mmc: sdhci-esdhc-imx: set back the burst_length_enable bit to 1
  2015-06-10  8:50 [PATCH 0/6] mmc: imx: a few fixes and new feature add Haibo Chen
                   ` (3 preceding siblings ...)
  2015-06-10  8:50 ` [PATCH 4/6] mmc: sdhci-esdhc-imx: config watermater levles and burst lengths Haibo Chen
@ 2015-06-10  8:50 ` Haibo Chen
  2015-06-10  8:50 ` [PATCH 6/6] mmc: sdhci-esdhc-imx: add compatible string in binding doc Haibo Chen
  5 siblings, 0 replies; 11+ messages in thread
From: Haibo Chen @ 2015-06-10  8:50 UTC (permalink / raw)
  To: linux-arm-kernel

Currently we find that if a usdhc is choosed to boot system, then ROM
code will set the burst length enable bit of this usdhc as 0.

This will make performance drop a lot if this usdhc's burst length is
16. So this patch set back the burst_length_enable bit as 1, which is
the default value, and means burst length is enabled for INCR.

Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
---
 drivers/mmc/host/sdhci-esdhc-imx.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 1f0e0d9..e6a1995 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -32,6 +32,7 @@
 #include "sdhci-esdhc.h"
 
 #define	ESDHC_CTRL_D3CD			0x08
+#define ESDHC_BURST_LEN_EN_INCR		(1 << 27)
 /* VENDOR SPEC register */
 #define ESDHC_VENDOR_SPEC		0xc0
 #define  ESDHC_VENDOR_SPEC_SDIO_QUIRK	(1 << 1)
@@ -1088,6 +1089,16 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
 		host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN;
 		host->mmc->caps |= MMC_CAP_1_8V_DDR;
 
+		/*
+		 * ROM code will change the burst_length_enable setting to
+		 * zero if this usdhc is choosed to boot system. Change it
+		 * back here, otherwise it will impact the performance a
+		 * lot if the burst length is 16.
+		 */
+		writel(readl(host->ioaddr + SDHCI_HOST_CONTROL)
+			| ESDHC_BURST_LEN_EN_INCR,
+			host->ioaddr + SDHCI_HOST_CONTROL);
+
 		if (!(imx_data->socdata->flags & ESDHC_FLAG_HS200))
 			host->quirks2 |= SDHCI_QUIRK2_BROKEN_HS200;
 
-- 
1.9.1

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

* [PATCH 6/6] mmc: sdhci-esdhc-imx: add compatible string in binding doc
  2015-06-10  8:50 [PATCH 0/6] mmc: imx: a few fixes and new feature add Haibo Chen
                   ` (4 preceding siblings ...)
  2015-06-10  8:50 ` [PATCH 5/6] mmc: sdhci-esdhc-imx: set back the burst_length_enable bit to 1 Haibo Chen
@ 2015-06-10  8:50 ` Haibo Chen
  5 siblings, 0 replies; 11+ messages in thread
From: Haibo Chen @ 2015-06-10  8:50 UTC (permalink / raw)
  To: linux-arm-kernel

Add a compatible string in binding doc to avoid checkpatch
warning.

Signed-off-by: Haibo Chen <haibo.chen@freescale.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 5d0376b..1c522ac 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,imx7d-usdhc"
 
 Optional properties:
 - fsl,cd-controller : Indicate to use controller internal card detection
-- 
1.9.1

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

* [PATCH 4/6] mmc: sdhci-esdhc-imx: config watermater levles and burst lengths
  2015-06-10  8:50 ` [PATCH 4/6] mmc: sdhci-esdhc-imx: config watermater levles and burst lengths Haibo Chen
@ 2015-06-10 14:36   ` Eric Nelson
  0 siblings, 0 replies; 11+ messages in thread
From: Eric Nelson @ 2015-06-10 14:36 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Haibo,

On 06/10/2015 01:50 AM, Haibo Chen wrote:
> i.MX7D support eMMC HS400 mode, this mode can run in 8 bit,200MHZ
> DDR mode. So the I/O speed improve a lot compare to SD3.0
> 
> The default burst length is 8, if we don't change this value, in
> HS400 mode, when we do eMMC read operation, we can find that the
> clock signal will stop for a period of time. This means the speed
> of data moving on AHB bus is slower than I/O speed. So we should
> improve the speed of data moving on AHB bus.
> 
> For imx7d usdhc, this patch set the burst length as 16, and set
> watermater levle as 64. The test result is the clock signal has
> no stop during the eMMC HS400 operation. For other imx usdhc, remain

"watermark", not "watermater".

> the default value: burst length as 8, watermater level as 16.
> 
Same goes for the subject.

Also "levels", not "levles", so:
	mmc: sdhci-esdhc-imx: config watermark level and burst length

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

* [PATCH 2/6] mmc: sdhci-esdhc-imx: add tuning-step seting support
  2015-06-10  8:50 ` [PATCH 2/6] mmc: sdhci-esdhc-imx: add tuning-step seting support Haibo Chen
@ 2015-07-03 11:10   ` Shawn Guo
  2015-07-06  3:05     ` Chen Bough
  0 siblings, 1 reply; 11+ messages in thread
From: Shawn Guo @ 2015-07-03 11:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jun 10, 2015 at 04:50:40PM +0800, Haibo Chen wrote:
> @@ -969,6 +976,8 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
>  
>  	of_property_read_u32(np, "max-frequency", &boarddata->f_max);
>  
> +	of_property_read_u32(np, "tuning-step", &boarddata->tuning_step);
> +

Where is the binding doc for this device tree property?

Shawn

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

* [PATCH 2/6] mmc: sdhci-esdhc-imx: add tuning-step seting support
  2015-07-03 11:10   ` Shawn Guo
@ 2015-07-06  3:05     ` Chen Bough
  2015-07-08  9:00       ` Shawn Guo
  0 siblings, 1 reply; 11+ messages in thread
From: Chen Bough @ 2015-07-06  3:05 UTC (permalink / raw)
  To: linux-arm-kernel


> -----Original Message-----
> From: Shawn Guo [mailto:shawnguo at kernel.org]
> Sent: Friday, July 03, 2015 7:10 PM
> To: Chen Haibo-B51421
> Cc: linux-mmc at vger.kernel.org; Dong Aisheng-B29396;
> ulf.hansson at linaro.org; chris at printf.net; shawn.guo at linaro.org; linux-
> arm-kernel at lists.infradead.org
> Subject: Re: [PATCH 2/6] mmc: sdhci-esdhc-imx: add tuning-step seting
> support
> 
> On Wed, Jun 10, 2015 at 04:50:40PM +0800, Haibo Chen wrote:
> > @@ -969,6 +976,8 @@ sdhci_esdhc_imx_probe_dt(struct platform_device
> *pdev,
> >
> >  	of_property_read_u32(np, "max-frequency", &boarddata->f_max);
> >
> > +	of_property_read_u32(np, "tuning-step", &boarddata->tuning_step);
> > +
> 
> Where is the binding doc for this device tree property?
> 
> Shawn

I will add this in next version, Thanks for your review.


Haibo

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

* [PATCH 2/6] mmc: sdhci-esdhc-imx: add tuning-step seting support
  2015-07-06  3:05     ` Chen Bough
@ 2015-07-08  9:00       ` Shawn Guo
  0 siblings, 0 replies; 11+ messages in thread
From: Shawn Guo @ 2015-07-08  9:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 06, 2015 at 03:05:47AM +0000, Chen Bough wrote:
> 
> > -----Original Message-----
> > From: Shawn Guo [mailto:shawnguo at kernel.org]
> > Sent: Friday, July 03, 2015 7:10 PM
> > To: Chen Haibo-B51421
> > Cc: linux-mmc at vger.kernel.org; Dong Aisheng-B29396;
> > ulf.hansson at linaro.org; chris at printf.net; shawn.guo at linaro.org; linux-
> > arm-kernel at lists.infradead.org
> > Subject: Re: [PATCH 2/6] mmc: sdhci-esdhc-imx: add tuning-step seting
> > support
> > 
> > On Wed, Jun 10, 2015 at 04:50:40PM +0800, Haibo Chen wrote:
> > > @@ -969,6 +976,8 @@ sdhci_esdhc_imx_probe_dt(struct platform_device
> > *pdev,
> > >
> > >  	of_property_read_u32(np, "max-frequency", &boarddata->f_max);
> > >
> > > +	of_property_read_u32(np, "tuning-step", &boarddata->tuning_step);
> > > +
> > 
> > Where is the binding doc for this device tree property?
> > 
> > Shawn
> 
> I will add this in next version, Thanks for your review.

If this is a vendor specific property rather than generic one, do not
forget to have a vendor prefix for the property, i.e. "fsl,tuning-step".

Shawn

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

end of thread, other threads:[~2015-07-08  9:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-10  8:50 [PATCH 0/6] mmc: imx: a few fixes and new feature add Haibo Chen
2015-06-10  8:50 ` [PATCH 1/6] mmc: sdhci-esdhc-imx: add imx7d support and support HS400 Haibo Chen
2015-06-10  8:50 ` [PATCH 2/6] mmc: sdhci-esdhc-imx: add tuning-step seting support Haibo Chen
2015-07-03 11:10   ` Shawn Guo
2015-07-06  3:05     ` Chen Bough
2015-07-08  9:00       ` Shawn Guo
2015-06-10  8:50 ` [PATCH 3/6] ARM: dts: imx7d-sdb: add eMMC5.0 support Haibo Chen
2015-06-10  8:50 ` [PATCH 4/6] mmc: sdhci-esdhc-imx: config watermater levles and burst lengths Haibo Chen
2015-06-10 14:36   ` Eric Nelson
2015-06-10  8:50 ` [PATCH 5/6] mmc: sdhci-esdhc-imx: set back the burst_length_enable bit to 1 Haibo Chen
2015-06-10  8:50 ` [PATCH 6/6] mmc: sdhci-esdhc-imx: add compatible string in binding doc Haibo Chen

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).