All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Various i.MXRT bug/typo fixes
@ 2020-04-26 23:42 Giulio Benetti
  2020-04-26 23:42 ` [PATCH 1/4] imxrt1050-evk: README: fix dd command destination Giulio Benetti
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Giulio Benetti @ 2020-04-26 23:42 UTC (permalink / raw)
  To: u-boot

Hi Anatolij, Stefano, Fabio, All,

this patchset fix 2 bugs preventing from LCDIF to work when booting from
sd-card. There are also 2 little typo fixes for boards READMEs.

Giulio Benetti (4):
  imxrt1050-evk: README: fix dd command destination
  imxrt1020-evk: README: fix dd command destination
  video: mxsfb: add clk_enable()
  clk: imx: clk-imxrt1050: fix lcdif clock gate

 board/freescale/imxrt1020-evk/README | 2 +-
 board/freescale/imxrt1050-evk/README | 2 +-
 drivers/clk/imx/clk-imxrt1050.c      | 2 +-
 drivers/video/mxsfb.c                | 6 ++++++
 4 files changed, 9 insertions(+), 3 deletions(-)

-- 
2.20.1

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

* [PATCH 1/4] imxrt1050-evk: README: fix dd command destination
  2020-04-26 23:42 [PATCH 0/4] Various i.MXRT bug/typo fixes Giulio Benetti
@ 2020-04-26 23:42 ` Giulio Benetti
  2020-04-26 23:42 ` [PATCH 2/4] imxrt1020-evk: " Giulio Benetti
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Giulio Benetti @ 2020-04-26 23:42 UTC (permalink / raw)
  To: u-boot

Make "of=" the same for the 2 commands since we're writing to the same
sd-card.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 board/freescale/imxrt1050-evk/README | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/freescale/imxrt1050-evk/README b/board/freescale/imxrt1050-evk/README
index f7e2894025..55b6a0877a 100644
--- a/board/freescale/imxrt1050-evk/README
+++ b/board/freescale/imxrt1050-evk/README
@@ -11,7 +11,7 @@ This will generate the SPL image called SPL and the u-boot.img.
 
 - Flash the SPL image into the micro SD card:
 
-sudo dd if=SPL of=/dev/mmcblk0 bs=1k seek=1; sync
+sudo dd if=SPL of=/dev/sdb bs=1k seek=1; sync
 
 - Flash the u-boot.img image into the micro SD card:
 
-- 
2.20.1

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

* [PATCH 2/4] imxrt1020-evk: README: fix dd command destination
  2020-04-26 23:42 [PATCH 0/4] Various i.MXRT bug/typo fixes Giulio Benetti
  2020-04-26 23:42 ` [PATCH 1/4] imxrt1050-evk: README: fix dd command destination Giulio Benetti
@ 2020-04-26 23:42 ` Giulio Benetti
  2020-04-26 23:43 ` [PATCH 3/4] video: mxsfb: add clk_enable() Giulio Benetti
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Giulio Benetti @ 2020-04-26 23:42 UTC (permalink / raw)
  To: u-boot

Make "of=" the same for the 2 commands since we're writing to the
same sd-card.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 board/freescale/imxrt1020-evk/README | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/freescale/imxrt1020-evk/README b/board/freescale/imxrt1020-evk/README
index 3da72fdad2..bcb3683163 100644
--- a/board/freescale/imxrt1020-evk/README
+++ b/board/freescale/imxrt1020-evk/README
@@ -11,7 +11,7 @@ This will generate the SPL image called SPL and the u-boot.img.
 
 - Flash the SPL image into the micro SD card:
 
-sudo dd if=SPL of=/dev/mmcblk0 bs=1k seek=1; sync
+sudo dd if=SPL of=/dev/sdb bs=1k seek=1; sync
 
 - Flash the u-boot.img image into the micro SD card:
 
-- 
2.20.1

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

* [PATCH 3/4] video: mxsfb: add clk_enable()
  2020-04-26 23:42 [PATCH 0/4] Various i.MXRT bug/typo fixes Giulio Benetti
  2020-04-26 23:42 ` [PATCH 1/4] imxrt1050-evk: README: fix dd command destination Giulio Benetti
  2020-04-26 23:42 ` [PATCH 2/4] imxrt1020-evk: " Giulio Benetti
@ 2020-04-26 23:43 ` Giulio Benetti
  2020-04-26 23:48   ` Fabio Estevam
  2020-04-26 23:43 ` [PATCH 4/4] clk: imx: clk-imxrt1050: fix lcdif clock gate Giulio Benetti
  2020-04-26 23:45 ` [PATCH 0/4] Various i.MXRT bug/typo fixes Giulio Benetti
  4 siblings, 1 reply; 8+ messages in thread
From: Giulio Benetti @ 2020-04-26 23:43 UTC (permalink / raw)
  To: u-boot

BROM doesn't enable lcdif by default so add clk_enable() before
clk_set_rate().

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 drivers/video/mxsfb.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 8a5a61c9fb..7eab8835b0 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -72,6 +72,12 @@ static void mxs_lcd_init(struct udevice *dev, u32 fb_addr,
 		return;
 	}
 
+	ret = clk_enable(&per_clk);
+	if (ret < 0) {
+		dev_err(dev, "Failed to enable mxs clk: %d\n", ret);
+		return;
+	}
+
 	ret = clk_set_rate(&per_clk, timings->pixelclock.typ);
 	if (ret < 0) {
 		dev_err(dev, "Failed to set mxs clk: %d\n", ret);
-- 
2.20.1

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

* [PATCH 4/4] clk: imx: clk-imxrt1050: fix lcdif clock gate
  2020-04-26 23:42 [PATCH 0/4] Various i.MXRT bug/typo fixes Giulio Benetti
                   ` (2 preceding siblings ...)
  2020-04-26 23:43 ` [PATCH 3/4] video: mxsfb: add clk_enable() Giulio Benetti
@ 2020-04-26 23:43 ` Giulio Benetti
  2020-04-26 23:45 ` [PATCH 0/4] Various i.MXRT bug/typo fixes Giulio Benetti
  4 siblings, 0 replies; 8+ messages in thread
From: Giulio Benetti @ 2020-04-26 23:43 UTC (permalink / raw)
  To: u-boot

LCDIF clock gate was wrong so set it according to RM.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 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 329f4580c5..8279e784fe 100644
--- a/drivers/clk/imx/clk-imxrt1050.c
+++ b/drivers/clk/imx/clk-imxrt1050.c
@@ -255,7 +255,7 @@ static int imxrt1050_clk_probe(struct udevice *dev)
 	clk_dm(IMXRT1050_CLK_SEMC,
 	       imx_clk_gate2("semc", "semc_podf", base + 0x74, 4));
 	clk_dm(IMXRT1050_CLK_LCDIF,
-	       imx_clk_gate2("lcdif", "lcdif_podf", base + 0x70, 28));
+	       imx_clk_gate2("lcdif", "lcdif_podf", base + 0x74, 10));
 
 	struct clk *clk, *clk1;
 
-- 
2.20.1

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

* [PATCH 0/4] Various i.MXRT bug/typo fixes
  2020-04-26 23:42 [PATCH 0/4] Various i.MXRT bug/typo fixes Giulio Benetti
                   ` (3 preceding siblings ...)
  2020-04-26 23:43 ` [PATCH 4/4] clk: imx: clk-imxrt1050: fix lcdif clock gate Giulio Benetti
@ 2020-04-26 23:45 ` Giulio Benetti
  4 siblings, 0 replies; 8+ messages in thread
From: Giulio Benetti @ 2020-04-26 23:45 UTC (permalink / raw)
  To: u-boot

On 4/27/20 1:42 AM, Giulio Benetti wrote:
> Hi Anatolij, Stefano, Fabio, All,

forgotten Lukasz, sorry.
-- 
Giulio Benetti
Benetti Engineering sas

> 
> this patchset fix 2 bugs preventing from LCDIF to work when booting from
> sd-card. There are also 2 little typo fixes for boards READMEs.
> 
> Giulio Benetti (4):
>    imxrt1050-evk: README: fix dd command destination
>    imxrt1020-evk: README: fix dd command destination
>    video: mxsfb: add clk_enable()
>    clk: imx: clk-imxrt1050: fix lcdif clock gate
> 
>   board/freescale/imxrt1020-evk/README | 2 +-
>   board/freescale/imxrt1050-evk/README | 2 +-
>   drivers/clk/imx/clk-imxrt1050.c      | 2 +-
>   drivers/video/mxsfb.c                | 6 ++++++
>   4 files changed, 9 insertions(+), 3 deletions(-)
> 

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

* [PATCH 3/4] video: mxsfb: add clk_enable()
  2020-04-26 23:43 ` [PATCH 3/4] video: mxsfb: add clk_enable() Giulio Benetti
@ 2020-04-26 23:48   ` Fabio Estevam
  2020-04-27 15:04     ` Giulio Benetti
  0 siblings, 1 reply; 8+ messages in thread
From: Fabio Estevam @ 2020-04-26 23:48 UTC (permalink / raw)
  To: u-boot

Hi Giulio,

On Sun, Apr 26, 2020 at 8:43 PM Giulio Benetti
<giulio.benetti@benettiengineering.com> wrote:

> +       ret = clk_enable(&per_clk);
> +       if (ret < 0) {
> +               dev_err(dev, "Failed to enable mxs clk: %d\n", ret);
> +               return;
> +       }
> +
>         ret = clk_set_rate(&per_clk, timings->pixelclock.typ);
>         if (ret < 0) {
>                 dev_err(dev, "Failed to set mxs clk: %d\n", ret);

Usually it is safer to configure the clock rate first and then enable
the clock to avoid glitches.

Could you try to call clk_enable() after clk_set_rate() here?

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

* [PATCH 3/4] video: mxsfb: add clk_enable()
  2020-04-26 23:48   ` Fabio Estevam
@ 2020-04-27 15:04     ` Giulio Benetti
  0 siblings, 0 replies; 8+ messages in thread
From: Giulio Benetti @ 2020-04-27 15:04 UTC (permalink / raw)
  To: u-boot

Hi Fabio,

On 4/27/20 1:48 AM, Fabio Estevam wrote:
> Hi Giulio,
> 
> On Sun, Apr 26, 2020 at 8:43 PM Giulio Benetti
> <giulio.benetti@benettiengineering.com> wrote:
> 
>> +       ret = clk_enable(&per_clk);
>> +       if (ret < 0) {
>> +               dev_err(dev, "Failed to enable mxs clk: %d\n", ret);
>> +               return;
>> +       }
>> +
>>          ret = clk_set_rate(&per_clk, timings->pixelclock.typ);
>>          if (ret < 0) {
>>                  dev_err(dev, "Failed to set mxs clk: %d\n", ret);
> 
> Usually it is safer to configure the clock rate first and then enable
> the clock to avoid glitches.
> 
> Could you try to call clk_enable() after clk_set_rate() here?

Sure, I'm going to send it for V2.

Thanks for reviewing
-- 
Giulio Benetti
Benetti Engineering sas

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

end of thread, other threads:[~2020-04-27 15:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-26 23:42 [PATCH 0/4] Various i.MXRT bug/typo fixes Giulio Benetti
2020-04-26 23:42 ` [PATCH 1/4] imxrt1050-evk: README: fix dd command destination Giulio Benetti
2020-04-26 23:42 ` [PATCH 2/4] imxrt1020-evk: " Giulio Benetti
2020-04-26 23:43 ` [PATCH 3/4] video: mxsfb: add clk_enable() Giulio Benetti
2020-04-26 23:48   ` Fabio Estevam
2020-04-27 15:04     ` Giulio Benetti
2020-04-26 23:43 ` [PATCH 4/4] clk: imx: clk-imxrt1050: fix lcdif clock gate Giulio Benetti
2020-04-26 23:45 ` [PATCH 0/4] Various i.MXRT bug/typo fixes Giulio Benetti

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.