Various i.MXRT bug/typo fixes
cover Various i.MXRT bug/typo fixes
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(-)
Signature · 1 line
2.20.1
PATCH 1/4 imxrt1050-evk: README: fix dd command destination
Make "of=" the same for the 2 commands since we're writing to the same sd-card.
--- board/freescale/imxrt1050-evk/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/freescale/imxrt1050-evk/README +1 -1
@@ -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:
Signature · 1 line
2.20.1
PATCH 2/4 imxrt1020-evk: README: fix dd command destination
In reply to Giulio BenettiMake "of=" the same for the 2 commands since we're writing to the same sd-card.
--- board/freescale/imxrt1020-evk/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/freescale/imxrt1020-evk/README +1 -1
@@ -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:
Signature · 1 line
2.20.1
PATCH 3/4 video: mxsfb: add clk_enable()
In reply to Giulio BenettiBROM doesn't enable lcdif by default so add clk_enable() before clk_set_rate().
--- drivers/video/mxsfb.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/video/mxsfb.c +6 -0
@@ -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);
Signature · 1 line
2.20.1
Fabio Estevam
reviewerPATCH 3/4 video: mxsfb: add clk_enable()
Hi Giulio,
drivers/video/mxsfb.c static void mxs_lcd_init(struct udevice *dev, u32 fb_addr, · line 83
Quoted 9 lines · Giulio Benetti
drivers/video/mxsfb.c +6
-0+ 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?
PATCH 3/4 video: mxsfb: add clk_enable()
Hi Fabio,
Quoted 15 lines · Fabio Estevam
Hi Giulio,
drivers/video/mxsfb.c static void mxs_lcd_init(struct udevice *dev, u32 fb_addr, · line 83
Quoted 9 lines · Giulio Benetti
drivers/video/mxsfb.c +6
-0+ 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);
Quoted 4 lines
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()afterclk_set_rate()here?
Sure, I'm going to send it for V2.
Thanks for reviewing
Signature · 2 lines
Giulio Benetti Benetti Engineering sas
PATCH 4/4 clk: imx: clk-imxrt1050: fix lcdif clock gate
In reply to Giulio BenettiLCDIF clock gate was wrong so set it according to RM.
--- drivers/clk/imx/clk-imxrt1050.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/imx/clk-imxrt1050.c +1 -1
@@ -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;
Signature · 1 line
2.20.1
cover Various i.MXRT bug/typo fixes
In reply to Giulio BenettiQuoted 1 line · Giulio Benetti
Hi Anatolij, Stefano, Fabio, All,
forgotten Lukasz, sorry.
Signature · 2 lines
Giulio Benetti Benetti Engineering sas
Quoted 16 lines
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: addclk_enable()
clk: imx: clk-imxrt1050: fix lcdif clock gateboard/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(-)