Skip to contentSkip to conversation

Various i.MXRT bug/typo fixes

PATCH Superseded Giulio Benetti 3 participants 11 messages Apr 27, 2020

Subsystems (4)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Various i.MXRT bug/typo fixes

Hi Anatolij, Lukasz, 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.

V1->V2:
* modify mxfsb.c patch as suggested by Fabio

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
#1 lore raw

PATCH v2 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
index f7e2894025..55b6a0877a 100644
@@ -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
reviewer
#2 lore raw

PATCH v2 1/4 imxrt1050-evk: README: fix dd command destination

Hi Giulio,

Quoted 14 lines · Giulio Benetti

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 +0 -0
index f7e2894025..55b6a0877a 100644

board/freescale/imxrt1050-evk/README This will generate the SPL image called SPL and the u-boot.img. · line 14

Quoted 5 lines
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

I usually prefer to write /dev/sdX instead because someone may follow the instructions as is and inadvertently kill their hard disk or another device that may appear at /dev/sdb.

#3 lore raw

PATCH v2 1/4 imxrt1050-evk: README: fix dd command destination

Quoted 19 lines · Fabio Estevam

Hi Giulio,

Quoted 15 lines · Giulio Benetti

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 +0 -0
index f7e2894025..55b6a0877a 100644
@@ -11,7 +11,7 @@ This will generate the SPL image called SPL and the u-boot.img.
 
Quoted 8 lines

board/freescale/imxrt1050-evk/README This will generate the SPL image called SPL and the u-boot.img. · line 14

Quoted 4 lines
board/freescale/imxrt1050-evk/README +1 -1
  - 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

I usually prefer to write /dev/sdX instead because someone may follow the instructions as is and inadvertently kill their hard disk or another device that may appear at /dev/sdb.

Oh, that's right.

I send V3 with that corrected.

Thank you

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
#4 lore raw

PATCH v2 2/4 imxrt1020-evk: README: fix dd command destination

In reply to Giulio Benetti

Make "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
index 3da72fdad2..bcb3683163 100644
@@ -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
#5 lore raw

PATCH v2 3/4 video: mxsfb: add clk_enable()

In reply to Giulio Benetti

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

---
V1->V2:
* call clk_enable() after clk_set_rate() as suggested by Fabio

---
 drivers/video/mxsfb.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/video/mxsfb.c +6 -0
index 8a5a61c9fb..12d00b4689 100644
@@ -77,6 +77,12 @@ static void mxs_lcd_init(struct udevice *dev, u32 fb_addr,
 		dev_err(dev, "Failed to set mxs clk: %d\n", ret);
 		return;
 	}
+
+	ret = clk_enable(&per_clk);
+	if (ret < 0) {
+		dev_err(dev, "Failed to enable mxs clk: %d\n", ret);
+		return;
+	}
 #else
 	/* Kick in the LCDIF clock */
 	mxs_set_lcdclk(MXS_LCDIF_BASE, timings->pixelclock.typ / 1000);
Signature · 1 line
2.20.1
#8 lore raw

PATCH v2 4/4 clk: imx: clk-imxrt1050: fix lcdif clock gate

In reply to Giulio Benetti

LCDIF 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
index 329f4580c5..8279e784fe 100644
@@ -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