2019-09-19 05:50:12

by Anson Huang

[permalink] [raw]
Subject: [PATCH 1/3] arm64: dts: imx8mq: Use correct clock for usdhc's ipg clk

On i.MX8MQ, usdhc's ipg clock is from IMX8MQ_CLK_IPG_ROOT,
assign it explicitly instead of using IMX8MQ_CLK_DUMMY.

Signed-off-by: Anson Huang <[email protected]>
---
arch/arm64/boot/dts/freescale/imx8mq.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
index fd42bee..e2c95ad 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
@@ -850,7 +850,7 @@
"fsl,imx7d-usdhc";
reg = <0x30b40000 0x10000>;
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&clk IMX8MQ_CLK_DUMMY>,
+ clocks = <&clk IMX8MQ_CLK_IPG_ROOT>,
<&clk IMX8MQ_CLK_NAND_USDHC_BUS>,
<&clk IMX8MQ_CLK_USDHC1_ROOT>;
clock-names = "ipg", "ahb", "per";
@@ -867,7 +867,7 @@
"fsl,imx7d-usdhc";
reg = <0x30b50000 0x10000>;
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&clk IMX8MQ_CLK_DUMMY>,
+ clocks = <&clk IMX8MQ_CLK_IPG_ROOT>,
<&clk IMX8MQ_CLK_NAND_USDHC_BUS>,
<&clk IMX8MQ_CLK_USDHC2_ROOT>;
clock-names = "ipg", "ahb", "per";
--
2.7.4


2019-09-19 05:51:09

by Anson Huang

[permalink] [raw]
Subject: [PATCH 2/3] arm64: dts: imx8mm: Use correct clock for usdhc's ipg clk

On i.MX8MM, usdhc's ipg clock is from IMX8MM_CLK_IPG_ROOT,
assign it explicitly instead of using IMX8MM_CLK_DUMMY.

Signed-off-by: Anson Huang <[email protected]>
---
arch/arm64/boot/dts/freescale/imx8mm.dtsi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
index 7c4dcce..8aafad2 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
@@ -694,7 +694,7 @@
compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
reg = <0x30b40000 0x10000>;
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&clk IMX8MM_CLK_DUMMY>,
+ clocks = <&clk IMX8MM_CLK_IPG_ROOT>,
<&clk IMX8MM_CLK_NAND_USDHC_BUS>,
<&clk IMX8MM_CLK_USDHC1_ROOT>;
clock-names = "ipg", "ahb", "per";
@@ -710,7 +710,7 @@
compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
reg = <0x30b50000 0x10000>;
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&clk IMX8MM_CLK_DUMMY>,
+ clocks = <&clk IMX8MM_CLK_IPG_ROOT>,
<&clk IMX8MM_CLK_NAND_USDHC_BUS>,
<&clk IMX8MM_CLK_USDHC2_ROOT>;
clock-names = "ipg", "ahb", "per";
@@ -724,7 +724,7 @@
compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
reg = <0x30b60000 0x10000>;
interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&clk IMX8MM_CLK_DUMMY>,
+ clocks = <&clk IMX8MM_CLK_IPG_ROOT>,
<&clk IMX8MM_CLK_NAND_USDHC_BUS>,
<&clk IMX8MM_CLK_USDHC3_ROOT>;
clock-names = "ipg", "ahb", "per";
--
2.7.4

2019-09-19 05:51:09

by Anson Huang

[permalink] [raw]
Subject: [PATCH 3/3] arm64: dts: imx8mn: Use correct clock for usdhc's ipg clk

On i.MX8MN, usdhc's ipg clock is from IMX8MN_CLK_IPG_ROOT,
assign it explicitly instead of using IMX8MN_CLK_DUMMY.

Signed-off-by: Anson Huang <[email protected]>
---
arch/arm64/boot/dts/freescale/imx8mn.dtsi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
index 6cb6c9c..725a3a3 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
@@ -594,7 +594,7 @@
compatible = "fsl,imx8mn-usdhc", "fsl,imx7d-usdhc";
reg = <0x30b40000 0x10000>;
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&clk IMX8MN_CLK_DUMMY>,
+ clocks = <&clk IMX8MN_CLK_IPG_ROOT>,
<&clk IMX8MN_CLK_NAND_USDHC_BUS>,
<&clk IMX8MN_CLK_USDHC1_ROOT>;
clock-names = "ipg", "ahb", "per";
@@ -610,7 +610,7 @@
compatible = "fsl,imx8mn-usdhc", "fsl,imx7d-usdhc";
reg = <0x30b50000 0x10000>;
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&clk IMX8MN_CLK_DUMMY>,
+ clocks = <&clk IMX8MN_CLK_IPG_ROOT>,
<&clk IMX8MN_CLK_NAND_USDHC_BUS>,
<&clk IMX8MN_CLK_USDHC2_ROOT>;
clock-names = "ipg", "ahb", "per";
@@ -624,7 +624,7 @@
compatible = "fsl,imx8mn-usdhc", "fsl,imx7d-usdhc";
reg = <0x30b60000 0x10000>;
interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&clk IMX8MN_CLK_DUMMY>,
+ clocks = <&clk IMX8MN_CLK_IPG_ROOT>,
<&clk IMX8MN_CLK_NAND_USDHC_BUS>,
<&clk IMX8MN_CLK_USDHC3_ROOT>;
clock-names = "ipg", "ahb", "per";
--
2.7.4

2019-09-19 07:40:49

by Frieder Schrempf

[permalink] [raw]
Subject: Re: [PATCH 2/3] arm64: dts: imx8mm: Use correct clock for usdhc's ipg clk

Hi Anson,

I have a question, that is not directly related to this patch.
I see that for the usdhc1 and usdhc3 nodes, there is an 'assigned-clock'
and 'assigned-clock-rates' property but not for usdhc2. The same applies
to the mx8mq and mx8mn dtsi file.

Is there any reason for this? If not can you fix it?

Thanks,
Frieder

On 19.09.19 07:05, Anson Huang wrote:
> On i.MX8MM, usdhc's ipg clock is from IMX8MM_CLK_IPG_ROOT,
> assign it explicitly instead of using IMX8MM_CLK_DUMMY.
>
> Signed-off-by: Anson Huang <[email protected]>
> ---
> arch/arm64/boot/dts/freescale/imx8mm.dtsi | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> index 7c4dcce..8aafad2 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> @@ -694,7 +694,7 @@
> compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
> reg = <0x30b40000 0x10000>;
> interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
> - clocks = <&clk IMX8MM_CLK_DUMMY>,
> + clocks = <&clk IMX8MM_CLK_IPG_ROOT>,
> <&clk IMX8MM_CLK_NAND_USDHC_BUS>,
> <&clk IMX8MM_CLK_USDHC1_ROOT>;
> clock-names = "ipg", "ahb", "per";
> @@ -710,7 +710,7 @@
> compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
> reg = <0x30b50000 0x10000>;
> interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
> - clocks = <&clk IMX8MM_CLK_DUMMY>,
> + clocks = <&clk IMX8MM_CLK_IPG_ROOT>,
> <&clk IMX8MM_CLK_NAND_USDHC_BUS>,
> <&clk IMX8MM_CLK_USDHC2_ROOT>;
> clock-names = "ipg", "ahb", "per";
> @@ -724,7 +724,7 @@
> compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
> reg = <0x30b60000 0x10000>;
> interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
> - clocks = <&clk IMX8MM_CLK_DUMMY>,
> + clocks = <&clk IMX8MM_CLK_IPG_ROOT>,
> <&clk IMX8MM_CLK_NAND_USDHC_BUS>,
> <&clk IMX8MM_CLK_USDHC3_ROOT>;
> clock-names = "ipg", "ahb", "per";
>

2019-09-19 09:35:14

by Anson Huang

[permalink] [raw]
Subject: RE: [PATCH 2/3] arm64: dts: imx8mm: Use correct clock for usdhc's ipg clk

Hi, Schrempf

> Hi Anson,
>
> I have a question, that is not directly related to this patch.
> I see that for the usdhc1 and usdhc3 nodes, there is an 'assigned-clock'
> and 'assigned-clock-rates' property but not for usdhc2. The same applies to
> the mx8mq and mx8mn dtsi file.
>
> Is there any reason for this? If not can you fix it?

This patch series is NOT related to 'assigned-clock' or 'assigned-clock-rates'
property, it is just for correcting clock source according to reference manual,
the 'ipg' clock is from system's IPG_ROOT clock according to reference manual CCM
chapter, using DUMMY clock is NOT a good option, the 'ipg' clock is supposed
to be the clock for accessing register, and it should NOT be DUMMY if we know
what exactly the clock source is used.

Thanks,
Anson



2019-09-19 10:10:14

by Frieder Schrempf

[permalink] [raw]
Subject: Re: [PATCH 2/3] arm64: dts: imx8mm: Use correct clock for usdhc's ipg clk

Hi Anson,

On 19.09.19 11:31, Anson Huang wrote:
> Hi, Schrempf
>
>> Hi Anson,
>>
>> I have a question, that is not directly related to this patch.
>> I see that for the usdhc1 and usdhc3 nodes, there is an 'assigned-clock'
>> and 'assigned-clock-rates' property but not for usdhc2. The same applies to
>> the mx8mq and mx8mn dtsi file.
>>
>> Is there any reason for this? If not can you fix it?
>
> This patch series is NOT related to 'assigned-clock' or 'assigned-clock-rates'
> property,

That's exactly what I'm saying. To not cause more confusion, I have sent
a message in a new thread:
http://lists.infradead.org/pipermail/linux-arm-kernel/2019-September/681426.html

> it is just for correcting clock source according to reference manual,
> the 'ipg' clock is from system's IPG_ROOT clock according to reference manual CCM
> chapter, using DUMMY clock is NOT a good option, the 'ipg' clock is supposed
> to be the clock for accessing register, and it should NOT be DUMMY if we know
> what exactly the clock source is used.

That's probably right and I didn't mean to question the patch at all.

Thanks,
Frieder

2019-10-07 12:15:16

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH 1/3] arm64: dts: imx8mq: Use correct clock for usdhc's ipg clk

On Thu, Sep 19, 2019 at 01:05:57PM +0800, Anson Huang wrote:
> On i.MX8MQ, usdhc's ipg clock is from IMX8MQ_CLK_IPG_ROOT,
> assign it explicitly instead of using IMX8MQ_CLK_DUMMY.
>
> Signed-off-by: Anson Huang <[email protected]>

Fixes tag?

Shawn

> ---
> arch/arm64/boot/dts/freescale/imx8mq.dtsi | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> index fd42bee..e2c95ad 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> @@ -850,7 +850,7 @@
> "fsl,imx7d-usdhc";
> reg = <0x30b40000 0x10000>;
> interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
> - clocks = <&clk IMX8MQ_CLK_DUMMY>,
> + clocks = <&clk IMX8MQ_CLK_IPG_ROOT>,
> <&clk IMX8MQ_CLK_NAND_USDHC_BUS>,
> <&clk IMX8MQ_CLK_USDHC1_ROOT>;
> clock-names = "ipg", "ahb", "per";
> @@ -867,7 +867,7 @@
> "fsl,imx7d-usdhc";
> reg = <0x30b50000 0x10000>;
> interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
> - clocks = <&clk IMX8MQ_CLK_DUMMY>,
> + clocks = <&clk IMX8MQ_CLK_IPG_ROOT>,
> <&clk IMX8MQ_CLK_NAND_USDHC_BUS>,
> <&clk IMX8MQ_CLK_USDHC2_ROOT>;
> clock-names = "ipg", "ahb", "per";
> --
> 2.7.4
>

2019-10-08 00:58:41

by Anson Huang

[permalink] [raw]
Subject: RE: [PATCH 1/3] arm64: dts: imx8mq: Use correct clock for usdhc's ipg clk

Hi, Shawn

> On Thu, Sep 19, 2019 at 01:05:57PM +0800, Anson Huang wrote:
> > On i.MX8MQ, usdhc's ipg clock is from IMX8MQ_CLK_IPG_ROOT, assign it
> > explicitly instead of using IMX8MQ_CLK_DUMMY.
> >
> > Signed-off-by: Anson Huang <[email protected]>
>
> Fixes tag?

OK, added them in V2.

Thanks,
Anson