All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add support for JZ4775
@ 2021-06-10 12:58 周琰杰 (Zhou Yanjie)
  2021-06-10 12:58 ` [PATCH v2 1/2] dt-bindings: mmc: JZ4740: Add bindings " 周琰杰 (Zhou Yanjie)
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: 周琰杰 (Zhou Yanjie) @ 2021-06-10 12:58 UTC (permalink / raw)
  To: ulf.hansson, robh+dt
  Cc: linux-mips, linux-kernel, linux-mmc, devicetree, dongsheng.qiu,
	aric.pzqi, rick.tyliu, sihui.liu, jun.jiang, sernia.zhou,
	zhenwenjin, paul

v1->v2:
1.Add support for probing mmc driver on the JZ4775 SoC from Ingenic.
2.The drive clock selection and sample clock selection have been
  supported since JZ4775, not X1000. So support for these two
  functions has been added for JZ4775 and JZ4780.

周琰杰 (Zhou Yanjie) (2):
  dt-bindings: mmc: JZ4740: Add bindings for JZ4775.
  mmc: JZ4740: Add support for JZ4775.

 Documentation/devicetree/bindings/mmc/ingenic,mmc.yaml | 1 +
 drivers/mmc/host/jz4740_mmc.c                          | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

-- 
2.7.4


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

* [PATCH v2 1/2] dt-bindings: mmc: JZ4740: Add bindings for JZ4775.
  2021-06-10 12:58 [PATCH v2 0/2] Add support for JZ4775 周琰杰 (Zhou Yanjie)
@ 2021-06-10 12:58 ` 周琰杰 (Zhou Yanjie)
  2021-06-10 13:14   ` Paul Cercueil
  2021-06-10 12:58 ` [PATCH v2 2/2] mmc: JZ4740: Add support " 周琰杰 (Zhou Yanjie)
  2021-06-11  7:40 ` [PATCH v2 0/2] " Ulf Hansson
  2 siblings, 1 reply; 6+ messages in thread
From: 周琰杰 (Zhou Yanjie) @ 2021-06-10 12:58 UTC (permalink / raw)
  To: ulf.hansson, robh+dt
  Cc: linux-mips, linux-kernel, linux-mmc, devicetree, dongsheng.qiu,
	aric.pzqi, rick.tyliu, sihui.liu, jun.jiang, sernia.zhou,
	zhenwenjin, paul

Add the MMC bindings for the JZ4775 SoC from Ingenic.

Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
---

Notes:
    v1->v2:
    No change.

 Documentation/devicetree/bindings/mmc/ingenic,mmc.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/mmc/ingenic,mmc.yaml b/Documentation/devicetree/bindings/mmc/ingenic,mmc.yaml
index 04ba8b7..546480f 100644
--- a/Documentation/devicetree/bindings/mmc/ingenic,mmc.yaml
+++ b/Documentation/devicetree/bindings/mmc/ingenic,mmc.yaml
@@ -19,6 +19,7 @@ properties:
           - ingenic,jz4740-mmc
           - ingenic,jz4725b-mmc
           - ingenic,jz4760-mmc
+          - ingenic,jz4775-mmc
           - ingenic,jz4780-mmc
           - ingenic,x1000-mmc
       - items:
-- 
2.7.4


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

* [PATCH v2 2/2] mmc: JZ4740: Add support for JZ4775.
  2021-06-10 12:58 [PATCH v2 0/2] Add support for JZ4775 周琰杰 (Zhou Yanjie)
  2021-06-10 12:58 ` [PATCH v2 1/2] dt-bindings: mmc: JZ4740: Add bindings " 周琰杰 (Zhou Yanjie)
@ 2021-06-10 12:58 ` 周琰杰 (Zhou Yanjie)
  2021-06-10 13:15   ` Paul Cercueil
  2021-06-11  7:40 ` [PATCH v2 0/2] " Ulf Hansson
  2 siblings, 1 reply; 6+ messages in thread
From: 周琰杰 (Zhou Yanjie) @ 2021-06-10 12:58 UTC (permalink / raw)
  To: ulf.hansson, robh+dt
  Cc: linux-mips, linux-kernel, linux-mmc, devicetree, dongsheng.qiu,
	aric.pzqi, rick.tyliu, sihui.liu, jun.jiang, sernia.zhou,
	zhenwenjin, paul

1.Add support for probing mmc driver on the JZ4775 SoC from Ingenic.
2.The drive clock selection and sample clock selection have been
  supported since JZ4775, not X1000. So support for these two
  functions has been added for JZ4775 and JZ4780.

Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
---

Notes:
    v1->v2:
    1.Remove unnecessary renaming as Paul Cercueil's suggestion.
    2.Reuse the ID of JZ4775 and JZ4780 to simplify the code.
    3.Add support of drive clock selection and sample clock
      selection for JZ4775 and JZ4780.

 drivers/mmc/host/jz4740_mmc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
index b3c636e..f3172e5 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -674,7 +674,7 @@ static void jz4740_mmc_send_command(struct jz4740_mmc_host *host,
 			cmdat |= JZ_MMC_CMDAT_WRITE;
 		if (host->use_dma) {
 			/*
-			 * The 4780's MMC controller has integrated DMA ability
+			 * The JZ4780's MMC controller has integrated DMA ability
 			 * in addition to being able to use the external DMA
 			 * controller. It moves DMA control bits to a separate
 			 * register. The DMA_SEL bit chooses the external
@@ -866,7 +866,7 @@ static int jz4740_mmc_set_clock_rate(struct jz4740_mmc_host *host, int rate)
 	writew(div, host->base + JZ_REG_MMC_CLKRT);
 
 	if (real_rate > 25000000) {
-		if (host->version >= JZ_MMC_X1000) {
+		if (host->version >= JZ_MMC_JZ4780) {
 			writel(JZ_MMC_LPM_DRV_RISING_QTR_PHASE_DLY |
 				   JZ_MMC_LPM_SMP_RISING_QTR_OR_HALF_PHASE_DLY |
 				   JZ_MMC_LPM_LOW_POWER_MODE_EN,
@@ -959,6 +959,7 @@ static const struct of_device_id jz4740_mmc_of_match[] = {
 	{ .compatible = "ingenic,jz4740-mmc", .data = (void *) JZ_MMC_JZ4740 },
 	{ .compatible = "ingenic,jz4725b-mmc", .data = (void *)JZ_MMC_JZ4725B },
 	{ .compatible = "ingenic,jz4760-mmc", .data = (void *) JZ_MMC_JZ4760 },
+	{ .compatible = "ingenic,jz4775-mmc", .data = (void *) JZ_MMC_JZ4780 },
 	{ .compatible = "ingenic,jz4780-mmc", .data = (void *) JZ_MMC_JZ4780 },
 	{ .compatible = "ingenic,x1000-mmc", .data = (void *) JZ_MMC_X1000 },
 	{},
-- 
2.7.4


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

* Re: [PATCH v2 1/2] dt-bindings: mmc: JZ4740: Add bindings for JZ4775.
  2021-06-10 12:58 ` [PATCH v2 1/2] dt-bindings: mmc: JZ4740: Add bindings " 周琰杰 (Zhou Yanjie)
@ 2021-06-10 13:14   ` Paul Cercueil
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Cercueil @ 2021-06-10 13:14 UTC (permalink / raw)
  To: 周琰杰
  Cc: ulf.hansson, robh+dt, linux-mips, linux-kernel, linux-mmc,
	devicetree, dongsheng.qiu, aric.pzqi, rick.tyliu, sihui.liu,
	jun.jiang, sernia.zhou, zhenwenjin

Hi Zhou,

Le jeu., juin 10 2021 at 20:58:49 +0800, 周琰杰 (Zhou Yanjie) 
<zhouyanjie@wanyeetech.com> a écrit :
> Add the MMC bindings for the JZ4775 SoC from Ingenic.
> 
> Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>

Acked-by: Paul Cercueil <paul@crapouillou.net>

Cheers,
-Paul

> ---
> 
> Notes:
>     v1->v2:
>     No change.
> 
>  Documentation/devicetree/bindings/mmc/ingenic,mmc.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/ingenic,mmc.yaml 
> b/Documentation/devicetree/bindings/mmc/ingenic,mmc.yaml
> index 04ba8b7..546480f 100644
> --- a/Documentation/devicetree/bindings/mmc/ingenic,mmc.yaml
> +++ b/Documentation/devicetree/bindings/mmc/ingenic,mmc.yaml
> @@ -19,6 +19,7 @@ properties:
>            - ingenic,jz4740-mmc
>            - ingenic,jz4725b-mmc
>            - ingenic,jz4760-mmc
> +          - ingenic,jz4775-mmc
>            - ingenic,jz4780-mmc
>            - ingenic,x1000-mmc
>        - items:
> --
> 2.7.4
> 



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

* Re: [PATCH v2 2/2] mmc: JZ4740: Add support for JZ4775.
  2021-06-10 12:58 ` [PATCH v2 2/2] mmc: JZ4740: Add support " 周琰杰 (Zhou Yanjie)
@ 2021-06-10 13:15   ` Paul Cercueil
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Cercueil @ 2021-06-10 13:15 UTC (permalink / raw)
  To: 周琰杰
  Cc: ulf.hansson, robh+dt, linux-mips, linux-kernel, linux-mmc,
	devicetree, dongsheng.qiu, aric.pzqi, rick.tyliu, sihui.liu,
	jun.jiang, sernia.zhou, zhenwenjin

Hi Zhou,

Le jeu., juin 10 2021 at 20:58:50 +0800, 周琰杰 (Zhou Yanjie) 
<zhouyanjie@wanyeetech.com> a écrit :
> 1.Add support for probing mmc driver on the JZ4775 SoC from Ingenic.
> 2.The drive clock selection and sample clock selection have been
>   supported since JZ4775, not X1000. So support for these two
>   functions has been added for JZ4775 and JZ4780.
> 
> Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>

Acked-by: Paul Cercueil <paul@crapouillou.net>

Now that's a good-looking patch ;)
Thanks for working on it.

Cheers,
-Paul

> ---
> 
> Notes:
>     v1->v2:
>     1.Remove unnecessary renaming as Paul Cercueil's suggestion.
>     2.Reuse the ID of JZ4775 and JZ4780 to simplify the code.
>     3.Add support of drive clock selection and sample clock
>       selection for JZ4775 and JZ4780.
> 
>  drivers/mmc/host/jz4740_mmc.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/jz4740_mmc.c 
> b/drivers/mmc/host/jz4740_mmc.c
> index b3c636e..f3172e5 100644
> --- a/drivers/mmc/host/jz4740_mmc.c
> +++ b/drivers/mmc/host/jz4740_mmc.c
> @@ -674,7 +674,7 @@ static void jz4740_mmc_send_command(struct 
> jz4740_mmc_host *host,
>  			cmdat |= JZ_MMC_CMDAT_WRITE;
>  		if (host->use_dma) {
>  			/*
> -			 * The 4780's MMC controller has integrated DMA ability
> +			 * The JZ4780's MMC controller has integrated DMA ability
>  			 * in addition to being able to use the external DMA
>  			 * controller. It moves DMA control bits to a separate
>  			 * register. The DMA_SEL bit chooses the external
> @@ -866,7 +866,7 @@ static int jz4740_mmc_set_clock_rate(struct 
> jz4740_mmc_host *host, int rate)
>  	writew(div, host->base + JZ_REG_MMC_CLKRT);
> 
>  	if (real_rate > 25000000) {
> -		if (host->version >= JZ_MMC_X1000) {
> +		if (host->version >= JZ_MMC_JZ4780) {
>  			writel(JZ_MMC_LPM_DRV_RISING_QTR_PHASE_DLY |
>  				   JZ_MMC_LPM_SMP_RISING_QTR_OR_HALF_PHASE_DLY |
>  				   JZ_MMC_LPM_LOW_POWER_MODE_EN,
> @@ -959,6 +959,7 @@ static const struct of_device_id 
> jz4740_mmc_of_match[] = {
>  	{ .compatible = "ingenic,jz4740-mmc", .data = (void *) 
> JZ_MMC_JZ4740 },
>  	{ .compatible = "ingenic,jz4725b-mmc", .data = (void 
> *)JZ_MMC_JZ4725B },
>  	{ .compatible = "ingenic,jz4760-mmc", .data = (void *) 
> JZ_MMC_JZ4760 },
> +	{ .compatible = "ingenic,jz4775-mmc", .data = (void *) 
> JZ_MMC_JZ4780 },
>  	{ .compatible = "ingenic,jz4780-mmc", .data = (void *) 
> JZ_MMC_JZ4780 },
>  	{ .compatible = "ingenic,x1000-mmc", .data = (void *) JZ_MMC_X1000 
> },
>  	{},
> --
> 2.7.4
> 



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

* Re: [PATCH v2 0/2] Add support for JZ4775
  2021-06-10 12:58 [PATCH v2 0/2] Add support for JZ4775 周琰杰 (Zhou Yanjie)
  2021-06-10 12:58 ` [PATCH v2 1/2] dt-bindings: mmc: JZ4740: Add bindings " 周琰杰 (Zhou Yanjie)
  2021-06-10 12:58 ` [PATCH v2 2/2] mmc: JZ4740: Add support " 周琰杰 (Zhou Yanjie)
@ 2021-06-11  7:40 ` Ulf Hansson
  2 siblings, 0 replies; 6+ messages in thread
From: Ulf Hansson @ 2021-06-11  7:40 UTC (permalink / raw)
  To: 周琰杰 (Zhou Yanjie)
  Cc: Rob Herring, linux-mips, Linux Kernel Mailing List, linux-mmc,
	DTML, dongsheng.qiu, aric.pzqi, rick.tyliu, sihui.liu, jun.jiang,
	sernia.zhou, zhenwenjin, Paul Cercueil

On Thu, 10 Jun 2021 at 14:59, 周琰杰 (Zhou Yanjie)
<zhouyanjie@wanyeetech.com> wrote:
>
> v1->v2:
> 1.Add support for probing mmc driver on the JZ4775 SoC from Ingenic.
> 2.The drive clock selection and sample clock selection have been
>   supported since JZ4775, not X1000. So support for these two
>   functions has been added for JZ4775 and JZ4780.
>
> 周琰杰 (Zhou Yanjie) (2):
>   dt-bindings: mmc: JZ4740: Add bindings for JZ4775.
>   mmc: JZ4740: Add support for JZ4775.
>
>  Documentation/devicetree/bindings/mmc/ingenic,mmc.yaml | 1 +
>  drivers/mmc/host/jz4740_mmc.c                          | 5 +++--
>  2 files changed, 4 insertions(+), 2 deletions(-)
>

Applied for next, thanks!

Kind regards
Uffe

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

end of thread, other threads:[~2021-06-11  7:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10 12:58 [PATCH v2 0/2] Add support for JZ4775 周琰杰 (Zhou Yanjie)
2021-06-10 12:58 ` [PATCH v2 1/2] dt-bindings: mmc: JZ4740: Add bindings " 周琰杰 (Zhou Yanjie)
2021-06-10 13:14   ` Paul Cercueil
2021-06-10 12:58 ` [PATCH v2 2/2] mmc: JZ4740: Add support " 周琰杰 (Zhou Yanjie)
2021-06-10 13:15   ` Paul Cercueil
2021-06-11  7:40 ` [PATCH v2 0/2] " 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.