2022-10-18 00:11:31

by Giulio Benetti

[permalink] [raw]
Subject: [PATCH 1/5] clk: imx: imxrt1050: fix IMXRT1050_CLK_LCDIF_APB offsets

Signed-off-by: Giulio Benetti <[email protected]>
---
drivers/clk/imx/clk-imxrt1050.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/imx/clk-imxrt1050.c b/drivers/clk/imx/clk-imxrt1050.c
index 9539d35588ee..26108e9f7e67 100644
--- a/drivers/clk/imx/clk-imxrt1050.c
+++ b/drivers/clk/imx/clk-imxrt1050.c
@@ -140,7 +140,7 @@ static int imxrt1050_clocks_probe(struct platform_device *pdev)
hws[IMXRT1050_CLK_USDHC1] = imx_clk_hw_gate2("usdhc1", "usdhc1_podf", ccm_base + 0x80, 2);
hws[IMXRT1050_CLK_USDHC2] = imx_clk_hw_gate2("usdhc2", "usdhc2_podf", ccm_base + 0x80, 4);
hws[IMXRT1050_CLK_LPUART1] = imx_clk_hw_gate2("lpuart1", "lpuart_podf", ccm_base + 0x7c, 24);
- hws[IMXRT1050_CLK_LCDIF_APB] = imx_clk_hw_gate2("lcdif", "lcdif_podf", ccm_base + 0x74, 10);
+ hws[IMXRT1050_CLK_LCDIF_APB] = imx_clk_hw_gate2("lcdif", "lcdif_podf", ccm_base + 0x70, 28);
hws[IMXRT1050_CLK_DMA] = imx_clk_hw_gate("dma", "ipg", ccm_base + 0x7C, 6);
hws[IMXRT1050_CLK_DMA_MUX] = imx_clk_hw_gate("dmamux0", "ipg", ccm_base + 0x7C, 7);
imx_check_clk_hws(hws, IMXRT1050_CLK_END);
--
2.34.1


2022-10-18 00:25:45

by Giulio Benetti

[permalink] [raw]
Subject: [PATCH 2/5] clk: imx: imxrt1050: add IMXRT1050_CLK_LCDIF_PIX clock gate

Signed-off-by: Giulio Benetti <[email protected]>
---
drivers/clk/imx/clk-imxrt1050.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/imx/clk-imxrt1050.c b/drivers/clk/imx/clk-imxrt1050.c
index 26108e9f7e67..39f77c03b892 100644
--- a/drivers/clk/imx/clk-imxrt1050.c
+++ b/drivers/clk/imx/clk-imxrt1050.c
@@ -141,6 +141,7 @@ static int imxrt1050_clocks_probe(struct platform_device *pdev)
hws[IMXRT1050_CLK_USDHC2] = imx_clk_hw_gate2("usdhc2", "usdhc2_podf", ccm_base + 0x80, 4);
hws[IMXRT1050_CLK_LPUART1] = imx_clk_hw_gate2("lpuart1", "lpuart_podf", ccm_base + 0x7c, 24);
hws[IMXRT1050_CLK_LCDIF_APB] = imx_clk_hw_gate2("lcdif", "lcdif_podf", ccm_base + 0x70, 28);
+ hws[IMXRT1050_CLK_LCDIF_PIX] = imx_clk_hw_gate2("lcdif_pix", "lcdif", ccm_base + 0x74, 10);
hws[IMXRT1050_CLK_DMA] = imx_clk_hw_gate("dma", "ipg", ccm_base + 0x7C, 6);
hws[IMXRT1050_CLK_DMA_MUX] = imx_clk_hw_gate("dmamux0", "ipg", ccm_base + 0x7C, 7);
imx_check_clk_hws(hws, IMXRT1050_CLK_END);
--
2.34.1

2022-10-18 00:52:32

by Giulio Benetti

[permalink] [raw]
Subject: [PATCH 3/5] mmc: sdhci-esdhc-imx: improve imxrt1050 data

i.MXRT1050 usdhc is not affected by ESDHC_FLAG_ERR004536 so let's remove
it. It supports ESDHC_FLAG_STD_TUNING and ESDHC_FLAG_HAVE_CAP1 so let's add
them.

Signed-off-by: Giulio Benetti <[email protected]>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 55981b0f0b10..4bc0a2914a95 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -306,7 +306,8 @@ static struct esdhc_soc_data usdhc_imx7ulp_data = {
| ESDHC_FLAG_STATE_LOST_IN_LPMODE,
};
static struct esdhc_soc_data usdhc_imxrt1050_data = {
- .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_HS200 | ESDHC_FLAG_ERR004536,
+ .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
+ | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200,
};

static struct esdhc_soc_data usdhc_imx8qxp_data = {
--
2.34.1

2022-10-18 00:54:09

by Giulio Benetti

[permalink] [raw]
Subject: [PATCH 5/5] ARM: dts: imx: prepend a 0 in the memory address to make it clear it's 32MB

Signed-off-by: Giulio Benetti <[email protected]>
---
arch/arm/boot/dts/imxrt1050-evk.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imxrt1050-evk.dts b/arch/arm/boot/dts/imxrt1050-evk.dts
index 1d339f48899f..3de392d014fe 100644
--- a/arch/arm/boot/dts/imxrt1050-evk.dts
+++ b/arch/arm/boot/dts/imxrt1050-evk.dts
@@ -28,7 +28,7 @@ aliases {

memory@80000000 {
device_type = "memory";
- reg = <0x80000000 0x2000000>;
+ reg = <0x80000000 0x02000000>;
};

panel {
--
2.34.1

2022-10-18 03:09:16

by Bough Chen

[permalink] [raw]
Subject: RE: [PATCH 3/5] mmc: sdhci-esdhc-imx: improve imxrt1050 data

> -----Original Message-----
> From: Giulio Benetti <[email protected]>
> Sent: 2022??10??18?? 7:56
> To: [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]
> Cc: Stephen Boyd <[email protected]>; Bough Chen <[email protected]>;
> Adrian Hunter <[email protected]>; Ulf Hansson
> <[email protected]>; Giulio Benetti
> <[email protected]>
> Subject: [PATCH 3/5] mmc: sdhci-esdhc-imx: improve imxrt1050 data
>
> i.MXRT1050 usdhc is not affected by ESDHC_FLAG_ERR004536 so let's remove it.
> It supports ESDHC_FLAG_STD_TUNING and ESDHC_FLAG_HAVE_CAP1 so let's
> add them.
>
> Signed-off-by: Giulio Benetti <[email protected]>

Reviewed-by: Haibo Chen <[email protected]>

> ---
> drivers/mmc/host/sdhci-esdhc-imx.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c
> b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 55981b0f0b10..4bc0a2914a95 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -306,7 +306,8 @@ static struct esdhc_soc_data usdhc_imx7ulp_data = {
> | ESDHC_FLAG_STATE_LOST_IN_LPMODE,
> };
> static struct esdhc_soc_data usdhc_imxrt1050_data = {
> - .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_HS200 |
> ESDHC_FLAG_ERR004536,
> + .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
> + | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200,
> };
>
> static struct esdhc_soc_data usdhc_imx8qxp_data = {
> --
> 2.34.1

2022-10-18 23:05:01

by Giulio Benetti

[permalink] [raw]
Subject: Re: [PATCH 1/5] clk: imx: imxrt1050: fix IMXRT1050_CLK_LCDIF_APB offsets

Hi Jesse,

On 18/10/22 01:55, Giulio Benetti wrote:
> Signed-off-by: Giulio Benetti <[email protected]>
> ---
> drivers/clk/imx/clk-imxrt1050.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/imx/clk-imxrt1050.c b/drivers/clk/imx/clk-imxrt1050.c
> index 9539d35588ee..26108e9f7e67 100644
> --- a/drivers/clk/imx/clk-imxrt1050.c
> +++ b/drivers/clk/imx/clk-imxrt1050.c
> @@ -140,7 +140,7 @@ static int imxrt1050_clocks_probe(struct platform_device *pdev)
> hws[IMXRT1050_CLK_USDHC1] = imx_clk_hw_gate2("usdhc1", "usdhc1_podf", ccm_base + 0x80, 2);
> hws[IMXRT1050_CLK_USDHC2] = imx_clk_hw_gate2("usdhc2", "usdhc2_podf", ccm_base + 0x80, 4);
> hws[IMXRT1050_CLK_LPUART1] = imx_clk_hw_gate2("lpuart1", "lpuart_podf", ccm_base + 0x7c, 24);
> - hws[IMXRT1050_CLK_LCDIF_APB] = imx_clk_hw_gate2("lcdif", "lcdif_podf", ccm_base + 0x74, 10);
> + hws[IMXRT1050_CLK_LCDIF_APB] = imx_clk_hw_gate2("lcdif", "lcdif_podf", ccm_base + 0x70, 28);
> hws[IMXRT1050_CLK_DMA] = imx_clk_hw_gate("dma", "ipg", ccm_base + 0x7C, 6);
> hws[IMXRT1050_CLK_DMA_MUX] = imx_clk_hw_gate("dmamux0", "ipg", ccm_base + 0x7C, 7);
> imx_check_clk_hws(hws, IMXRT1050_CLK_END);

I've forgotten to add you in Cc, can you please take a look at it?
You've written the driver so you maybe can give me a feedback.
Same for patch 2/5

Thank you very much!

Best regards
--
Giulio Benetti
CEO/CTO@Benetti Engineering sas

2022-10-26 11:32:37

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH 3/5] mmc: sdhci-esdhc-imx: improve imxrt1050 data

On Tue, 18 Oct 2022 at 01:56, Giulio Benetti
<[email protected]> wrote:
>
> i.MXRT1050 usdhc is not affected by ESDHC_FLAG_ERR004536 so let's remove
> it. It supports ESDHC_FLAG_STD_TUNING and ESDHC_FLAG_HAVE_CAP1 so let's add
> them.
>
> Signed-off-by: Giulio Benetti <[email protected]>

Applied for next, thanks!

Kind regards
Uffe


> ---
> drivers/mmc/host/sdhci-esdhc-imx.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 55981b0f0b10..4bc0a2914a95 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -306,7 +306,8 @@ static struct esdhc_soc_data usdhc_imx7ulp_data = {
> | ESDHC_FLAG_STATE_LOST_IN_LPMODE,
> };
> static struct esdhc_soc_data usdhc_imxrt1050_data = {
> - .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_HS200 | ESDHC_FLAG_ERR004536,
> + .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
> + | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200,
> };
>
> static struct esdhc_soc_data usdhc_imx8qxp_data = {
> --
> 2.34.1
>