* [PATCH] arm64: dts: imx8mp: assign parent clock and rate for audio clocks
@ 2023-09-19 7:32 Shengjiu Wang
2023-09-19 8:19 ` Lucas Stach
0 siblings, 1 reply; 4+ messages in thread
From: Shengjiu Wang @ 2023-09-19 7:32 UTC (permalink / raw)
To: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
kernel, festevam, linux-imx, marex, peng.fan, alexander.stein,
laurent.pinchart, aford173, l.stach, Frank.Li, devicetree,
linux-arm-kernel, linux-kernel, shengjiu.wang
Assign parent clock for audio AHB and AXI clocks, and assign
clock rate for audio PLL1 and PLL2.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
arch/arm64/boot/dts/freescale/imx8mp.dtsi | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index 6f2f50e1639c..8a8a2c4aff9f 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -734,16 +734,26 @@ clk: clock-controller@30380000 {
<&clk IMX8MP_CLK_A53_CORE>,
<&clk IMX8MP_CLK_NOC>,
<&clk IMX8MP_CLK_NOC_IO>,
- <&clk IMX8MP_CLK_GIC>;
+ <&clk IMX8MP_CLK_GIC>,
+ <&clk IMX8MP_CLK_AUDIO_AHB>,
+ <&clk IMX8MP_CLK_AUDIO_AXI_SRC>,
+ <&clk IMX8MP_AUDIO_PLL1>,
+ <&clk IMX8MP_AUDIO_PLL2>;
assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>,
<&clk IMX8MP_ARM_PLL_OUT>,
<&clk IMX8MP_SYS_PLL2_1000M>,
<&clk IMX8MP_SYS_PLL1_800M>,
- <&clk IMX8MP_SYS_PLL2_500M>;
+ <&clk IMX8MP_SYS_PLL2_500M>,
+ <&clk IMX8MP_SYS_PLL1_800M>,
+ <&clk IMX8MP_SYS_PLL1_800M>;
assigned-clock-rates = <0>, <0>,
<1000000000>,
<800000000>,
- <500000000>;
+ <500000000>,
+ <400000000>,
+ <800000000>,
+ <393216000>,
+ <361267200>;
};
src: reset-controller@30390000 {
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] arm64: dts: imx8mp: assign parent clock and rate for audio clocks
2023-09-19 7:32 [PATCH] arm64: dts: imx8mp: assign parent clock and rate for audio clocks Shengjiu Wang
@ 2023-09-19 8:19 ` Lucas Stach
2023-09-19 9:59 ` Shengjiu Wang
0 siblings, 1 reply; 4+ messages in thread
From: Lucas Stach @ 2023-09-19 8:19 UTC (permalink / raw)
To: Shengjiu Wang, robh+dt, krzysztof.kozlowski+dt, conor+dt,
shawnguo, s.hauer, kernel, festevam, linux-imx, marex, peng.fan,
alexander.stein, laurent.pinchart, aford173, Frank.Li, devicetree,
linux-arm-kernel, linux-kernel, shengjiu.wang
Hi Shengjiu,
Am Dienstag, dem 19.09.2023 um 15:32 +0800 schrieb Shengjiu Wang:
> Assign parent clock for audio AHB and AXI clocks, and assign
> clock rate for audio PLL1 and PLL2.
>
Please don't do this. Configuring all those clocks in the clock
controller is a pain to override if the board uses the PLLs in any
other way than the reference design.
The audio AXI and AHB clocks are already properly configured with Adams
patch [1], so there is no need for the changes in this patch.
Please set up the audio PLLs in the board DT in peripheral nodes that
are actually using those clocks.
Regards,
Lucas
[1] https://lore.kernel.org/all/20230819105002.132750-1-aford173@gmail.com/
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
> arch/arm64/boot/dts/freescale/imx8mp.dtsi | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> index 6f2f50e1639c..8a8a2c4aff9f 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> @@ -734,16 +734,26 @@ clk: clock-controller@30380000 {
> <&clk IMX8MP_CLK_A53_CORE>,
> <&clk IMX8MP_CLK_NOC>,
> <&clk IMX8MP_CLK_NOC_IO>,
> - <&clk IMX8MP_CLK_GIC>;
> + <&clk IMX8MP_CLK_GIC>,
> + <&clk IMX8MP_CLK_AUDIO_AHB>,
> + <&clk IMX8MP_CLK_AUDIO_AXI_SRC>,
> + <&clk IMX8MP_AUDIO_PLL1>,
> + <&clk IMX8MP_AUDIO_PLL2>;
> assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>,
> <&clk IMX8MP_ARM_PLL_OUT>,
> <&clk IMX8MP_SYS_PLL2_1000M>,
> <&clk IMX8MP_SYS_PLL1_800M>,
> - <&clk IMX8MP_SYS_PLL2_500M>;
> + <&clk IMX8MP_SYS_PLL2_500M>,
> + <&clk IMX8MP_SYS_PLL1_800M>,
> + <&clk IMX8MP_SYS_PLL1_800M>;
> assigned-clock-rates = <0>, <0>,
> <1000000000>,
> <800000000>,
> - <500000000>;
> + <500000000>,
> + <400000000>,
> + <800000000>,
> + <393216000>,
> + <361267200>;
> };
>
> src: reset-controller@30390000 {
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] arm64: dts: imx8mp: assign parent clock and rate for audio clocks
2023-09-19 8:19 ` Lucas Stach
@ 2023-09-19 9:59 ` Shengjiu Wang
2023-09-19 10:22 ` Lucas Stach
0 siblings, 1 reply; 4+ messages in thread
From: Shengjiu Wang @ 2023-09-19 9:59 UTC (permalink / raw)
To: Lucas Stach
Cc: Shengjiu Wang, robh+dt, krzysztof.kozlowski+dt, conor+dt,
shawnguo, s.hauer, kernel, festevam, linux-imx, marex, peng.fan,
alexander.stein, laurent.pinchart, aford173, Frank.Li, devicetree,
linux-arm-kernel, linux-kernel
On Tue, Sep 19, 2023 at 4:20 PM Lucas Stach <l.stach@pengutronix.de> wrote:
>
> Hi Shengjiu,
>
> Am Dienstag, dem 19.09.2023 um 15:32 +0800 schrieb Shengjiu Wang:
> > Assign parent clock for audio AHB and AXI clocks, and assign
> > clock rate for audio PLL1 and PLL2.
> >
> Please don't do this. Configuring all those clocks in the clock
> controller is a pain to override if the board uses the PLLs in any
> other way than the reference design.
>
> The audio AXI and AHB clocks are already properly configured with Adams
> patch [1], so there is no need for the changes in this patch.
>
> Please set up the audio PLLs in the board DT in peripheral nodes that
> are actually using those clocks.
>
> Regards,
> Lucas
>
> [1] https://lore.kernel.org/all/20230819105002.132750-1-aford173@gmail.com/
For this patch, it changes the AXI clock to 600M. But the parent clock
is 800M, so the result AXI clock is 400M actually, the 800M can't be divided
to 600MHz.
Best regards
Wang shengjiu
>
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> > ---
> > arch/arm64/boot/dts/freescale/imx8mp.dtsi | 16 +++++++++++++---
> > 1 file changed, 13 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > index 6f2f50e1639c..8a8a2c4aff9f 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > @@ -734,16 +734,26 @@ clk: clock-controller@30380000 {
> > <&clk IMX8MP_CLK_A53_CORE>,
> > <&clk IMX8MP_CLK_NOC>,
> > <&clk IMX8MP_CLK_NOC_IO>,
> > - <&clk IMX8MP_CLK_GIC>;
> > + <&clk IMX8MP_CLK_GIC>,
> > + <&clk IMX8MP_CLK_AUDIO_AHB>,
> > + <&clk IMX8MP_CLK_AUDIO_AXI_SRC>,
> > + <&clk IMX8MP_AUDIO_PLL1>,
> > + <&clk IMX8MP_AUDIO_PLL2>;
> > assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>,
> > <&clk IMX8MP_ARM_PLL_OUT>,
> > <&clk IMX8MP_SYS_PLL2_1000M>,
> > <&clk IMX8MP_SYS_PLL1_800M>,
> > - <&clk IMX8MP_SYS_PLL2_500M>;
> > + <&clk IMX8MP_SYS_PLL2_500M>,
> > + <&clk IMX8MP_SYS_PLL1_800M>,
> > + <&clk IMX8MP_SYS_PLL1_800M>;
> > assigned-clock-rates = <0>, <0>,
> > <1000000000>,
> > <800000000>,
> > - <500000000>;
> > + <500000000>,
> > + <400000000>,
> > + <800000000>,
> > + <393216000>,
> > + <361267200>;
> > };
> >
> > src: reset-controller@30390000 {
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] arm64: dts: imx8mp: assign parent clock and rate for audio clocks
2023-09-19 9:59 ` Shengjiu Wang
@ 2023-09-19 10:22 ` Lucas Stach
0 siblings, 0 replies; 4+ messages in thread
From: Lucas Stach @ 2023-09-19 10:22 UTC (permalink / raw)
To: Shengjiu Wang
Cc: marex, devicetree, conor+dt, kernel, alexander.stein, festevam,
Shengjiu Wang, Frank.Li, peng.fan, linux-kernel, robh+dt,
linux-imx, krzysztof.kozlowski+dt, aford173, shawnguo, s.hauer,
linux-arm-kernel, laurent.pinchart
Am Dienstag, dem 19.09.2023 um 17:59 +0800 schrieb Shengjiu Wang:
> On Tue, Sep 19, 2023 at 4:20 PM Lucas Stach <l.stach@pengutronix.de> wrote:
> >
> > Hi Shengjiu,
> >
> > Am Dienstag, dem 19.09.2023 um 15:32 +0800 schrieb Shengjiu Wang:
> > > Assign parent clock for audio AHB and AXI clocks, and assign
> > > clock rate for audio PLL1 and PLL2.
> > >
> > Please don't do this. Configuring all those clocks in the clock
> > controller is a pain to override if the board uses the PLLs in any
> > other way than the reference design.
> >
> > The audio AXI and AHB clocks are already properly configured with Adams
> > patch [1], so there is no need for the changes in this patch.
> >
> > Please set up the audio PLLs in the board DT in peripheral nodes that
> > are actually using those clocks.
> >
> > Regards,
> > Lucas
> >
> > [1] https://lore.kernel.org/all/20230819105002.132750-1-aford173@gmail.com/
>
> For this patch, it changes the AXI clock to 600M. But the parent clock
> is 800M, so the result AXI clock is 400M actually, the 800M can't be divided
> to 600MHz.
>
That's right. Please review that patch and suggest changes if you see a
better option. Adding another conflicting clock setup in the clk
controller node isn't the solution to this.
One possible solution would be to promote the VPU PLL to be the system
PLL running at 600MHz, as there are quite a few peripherals which seem
to need a 600MHz clock for nominal drive mode and we don't need any
other specific VPU clocks, which couldn't be sourced from the system
PLLs + VPU PLL running at 600MHz.
Regards,
Lucas
> Best regards
> Wang shengjiu
>
>
>
> >
> > > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> > > ---
> > > arch/arm64/boot/dts/freescale/imx8mp.dtsi | 16 +++++++++++++---
> > > 1 file changed, 13 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > > index 6f2f50e1639c..8a8a2c4aff9f 100644
> > > --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > > +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > > @@ -734,16 +734,26 @@ clk: clock-controller@30380000 {
> > > <&clk IMX8MP_CLK_A53_CORE>,
> > > <&clk IMX8MP_CLK_NOC>,
> > > <&clk IMX8MP_CLK_NOC_IO>,
> > > - <&clk IMX8MP_CLK_GIC>;
> > > + <&clk IMX8MP_CLK_GIC>,
> > > + <&clk IMX8MP_CLK_AUDIO_AHB>,
> > > + <&clk IMX8MP_CLK_AUDIO_AXI_SRC>,
> > > + <&clk IMX8MP_AUDIO_PLL1>,
> > > + <&clk IMX8MP_AUDIO_PLL2>;
> > > assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>,
> > > <&clk IMX8MP_ARM_PLL_OUT>,
> > > <&clk IMX8MP_SYS_PLL2_1000M>,
> > > <&clk IMX8MP_SYS_PLL1_800M>,
> > > - <&clk IMX8MP_SYS_PLL2_500M>;
> > > + <&clk IMX8MP_SYS_PLL2_500M>,
> > > + <&clk IMX8MP_SYS_PLL1_800M>,
> > > + <&clk IMX8MP_SYS_PLL1_800M>;
> > > assigned-clock-rates = <0>, <0>,
> > > <1000000000>,
> > > <800000000>,
> > > - <500000000>;
> > > + <500000000>,
> > > + <400000000>,
> > > + <800000000>,
> > > + <393216000>,
> > > + <361267200>;
> > > };
> > >
> > > src: reset-controller@30390000 {
> >
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-19 10:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-19 7:32 [PATCH] arm64: dts: imx8mp: assign parent clock and rate for audio clocks Shengjiu Wang
2023-09-19 8:19 ` Lucas Stach
2023-09-19 9:59 ` Shengjiu Wang
2023-09-19 10:22 ` Lucas Stach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).