Skip to contentSkip to conversation

clk: imx: imxrt1050: fix IMXRT1050_CLK_LCDIF_APB offsets

PATCH Superseded Giulio Benetti 3 participants 9 messages Nov 15, 2022 – Nov 21, 2022

Subsystems (4)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/4 clk: imx: imxrt1050: fix IMXRT1050_CLK_LCDIF_APB offsets

---
V1->V2:
* nothing done

---
 drivers/clk/imx/clk-imxrt1050.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/imx/clk-imxrt1050.c +1 -1
index 9539d35588ee..26108e9f7e67 100644
@@ -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);
Signature · 1 line
2.34.1
#1 lore raw

PATCH v2 2/4 clk: imx: imxrt1050: add IMXRT1050_CLK_LCDIF_PIX clock gate

---
V1->V2:
* nothing done

---
 drivers/clk/imx/clk-imxrt1050.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/imx/clk-imxrt1050.c +1 -0
index 26108e9f7e67..39f77c03b892 100644
@@ -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);
Signature · 1 line
2.34.1
Acked-by on v2 2/4
#2 lore raw

Re: [PATCH v2 2/4] clk: imx: imxrt1050: add IMXRT1050_CLK_LCDIF_PIX clock gate

Quoted 14 lines · Giulio Benetti

---
V1->V2:
* nothing done

---
  drivers/clk/imx/clk-imxrt1050.c | 1 +
  1 file changed, 1 insertion(+)
drivers/clk/imx/clk-imxrt1050.c +0 -0
index 26108e9f7e67..39f77c03b892 100644

drivers/clk/imx/clk-imxrt1050.c static int imxrt1050_clocks_probe(struct platform_device *pdev) · line 144

Quoted 4 lines
drivers/clk/imx/clk-imxrt1050.c +1 -0
@@ -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);

I think it makes sense to squash this with PATCH1 because it changes the same file. It also will make the change more understandable as I swapped the offsets for PIX clock and APB clock accidentally. I'm not sure if this is necessary but I think there should be a commit description. Otherwise

Thanks,
Jesse Taube

Quoted 3 lines
drivers/clk/imx/clk-imxrt1050.c +0 -0
  	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);
#3 lore raw

Re: [PATCH v2 2/4] clk: imx: imxrt1050: add IMXRT1050_CLK_LCDIF_PIX clock gate

Hi Jesse,

Quoted 12 lines · Jesse Taube
Quoted 9 lines · Giulio Benetti

---
V1->V2:
* nothing done
---
  drivers/clk/imx/clk-imxrt1050.c | 1 +

  1 file changed, 1 insertion(+)
Quoted 12 lines

drivers/clk/imx/clk-imxrt1050.c static int imxrt1050_clocks_probe(struct · line 146

Quoted 11 lines
drivers/clk/imx/clk-imxrt1050.c +1 -0
index 26108e9f7e67..39f77c03b892 100644
@@ -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);

I think it makes sense to squash this with PATCH1 because it changes the same file. It also will make the change more understandable as I swapped the offsets for PIX clock and APB clock accidentally.

I would not squash them since on "Patch 1/4" fixes something, while "Patch 2/4" adds something.

Quoted 1 line

I'm not sure if this is necessary but I think there should be a commit description.

You're right and same goes for all patches, I keep forgetting.

Sorry for the noise.

Thank you
Best regards

Signature · 2 lines
Giulio Benetti
CEO/CTO@Benetti Engineering sas
Quoted 9 lines

Otherwise

Thanks,
Jesse Taube

Quoted 4 lines

      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);

#4 lore raw

PATCH v2 3/4 ARM: dts: imxrt1050: increase mmc max-frequency property

In reply to Giulio Benetti

According to i.MXRT1050 Datasheet usdhc supports up to 200Mhz clock so let's increase max-frequency property to 200Mhz.

---
V1->V2:
* set max-frequency to 200Mhz instead of removing it as suggested by Bough Chen

---
 arch/arm/boot/dts/imxrt1050.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imxrt1050.dtsi +1 -1
index 114465e4dde6..5b1991c32748 100644
@@ -93,7 +93,7 @@ usdhc1: mmc@402c0000 {
 			bus-width = <4>;
 			fsl,wp-controller;
 			no-1-8-v;
-			max-frequency = <4000000>;
+			max-frequency = <200000000>;
 			fsl,tuning-start-tap = <20>;
 			fsl,tuning-step = <2>;
 			status = "disabled";
Signature · 1 line
2.34.1
Acked-by on v2 3/4
#5 lore raw

Re: [PATCH v2 3/4] ARM: dts: imxrt1050: increase mmc max-frequency property

Quoted 18 lines · Giulio Benetti

According to i.MXRT1050 Datasheet usdhc supports up to 200Mhz clock so let's increase max-frequency property to 200Mhz.

---
V1->V2:
* set max-frequency to 200Mhz instead of removing it as suggested by Bough Chen

---
  arch/arm/boot/dts/imxrt1050.dtsi | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imxrt1050.dtsi +0 -0
index 114465e4dde6..5b1991c32748 100644

arch/arm/boot/dts/imxrt1050.dtsi usdhc1: mmc@402c0000 { · line 99

Quoted 8 lines
arch/arm/boot/dts/imxrt1050.dtsi +1 -1
@@ -93,7 +93,7 @@ usdhc1: mmc@402c0000 {
  			bus-width = <4>;
  			fsl,wp-controller;
  			no-1-8-v;
-			max-frequency = <4000000>;
+			max-frequency = <200000000>;
  			fsl,tuning-start-tap = <20>;
  			fsl,tuning-step = <2>;
  			status = "disabled";
#6 lore raw

PATCH v2 4/4 ARM: dts: imx: prepend a 0 in the memory address to make it clear it's 32MB

In reply to Giulio Benetti

---
V1->V2:
* nothing done

---
 arch/arm/boot/dts/imxrt1050-evk.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imxrt1050-evk.dts +1 -1
index 1d339f48899f..3de392d014fe 100644
@@ -28,7 +28,7 @@ aliases {
 
 	memory@80000000 {
 		device_type = "memory";
-		reg = <0x80000000 0x2000000>;
+		reg = <0x80000000 0x02000000>;
 	};
 
 	panel {
Signature · 1 line
2.34.1
Acked-by on v2 4/4
#7 lore raw

Re: [PATCH v2 4/4] ARM: dts: imx: prepend a 0 in the memory address to make it clear it's 32MB

Quoted 2 lines · Giulio Benetti

Again I'm not sure if this is necessary but I think there should be a commit description. Otherwise

Quoted 20 lines

---
V1->V2:
* nothing done

---
  arch/arm/boot/dts/imxrt1050-evk.dts | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imxrt1050-evk.dts +1 -1
index 1d339f48899f..3de392d014fe 100644
@@ -28,7 +28,7 @@ aliases {
 
  	memory@80000000 {
  		device_type = "memory";
-		reg = <0x80000000 0x2000000>;
+		reg = <0x80000000 0x02000000>;
  	};
 
  	panel {
#8 lore raw
In reply to Giulio Benetti
Quoted 2 lines · Giulio Benetti

Missing commit message. Same for patch #2 and #4.

Quoted 23 lines

---
V1->V2:
* nothing done

---
 drivers/clk/imx/clk-imxrt1050.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/imx/clk-imxrt1050.c +1 -1
index 9539d35588ee..26108e9f7e67 100644
@@ -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);
Signature · 1 line
2.34.1