* [PATCH v1] arm64: dts: ti: k3-am62p: Enable AUDIO_REFCLKx @ 2025-02-06 15:39 Francesco Dolcini 2025-02-07 1:42 ` Nishanth Menon 2025-03-02 13:19 ` Vignesh Raghavendra 0 siblings, 2 replies; 6+ messages in thread From: Francesco Dolcini @ 2025-02-06 15:39 UTC (permalink / raw) To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring, Krzysztof Kozlowski, Conor Dooley Cc: Francesco Dolcini, linux-arm-kernel, devicetree, linux-kernel From: Francesco Dolcini <francesco.dolcini@toradex.com> On AM62P-based SoCs the AUDIO_REFCLKx clocks can be used as an input to external peripherals when configured through CTRL_MMR, so add the clock nodes. Link: http://downloads.ti.com/tisci/esd/latest/5_soc_doc/am62px/clocks.html Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> --- arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi index 420c77c8e9e5..4b47b0774330 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi @@ -42,6 +42,26 @@ &inta_main_dmss { ti,interrupt-ranges = <5 69 35>; }; +&main_conf { + audio_refclk0: clock-controller@82e0 { + compatible = "ti,am62-audio-refclk"; + reg = <0x82e0 0x4>; + clocks = <&k3_clks 157 0>; + assigned-clocks = <&k3_clks 157 0>; + assigned-clock-parents = <&k3_clks 157 16>; + #clock-cells = <0>; + }; + + audio_refclk1: clock-controller@82e4 { + compatible = "ti,am62-audio-refclk"; + reg = <0x82e4 0x4>; + clocks = <&k3_clks 157 18>; + assigned-clocks = <&k3_clks 157 18>; + assigned-clock-parents = <&k3_clks 157 34>; + #clock-cells = <0>; + }; +}; + &main_pmx0 { pinctrl-single,gpio-range = <&main_pmx0_range 0 32 PIN_GPIO_RANGE_IOPAD>, -- 2.39.5 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v1] arm64: dts: ti: k3-am62p: Enable AUDIO_REFCLKx 2025-02-06 15:39 [PATCH v1] arm64: dts: ti: k3-am62p: Enable AUDIO_REFCLKx Francesco Dolcini @ 2025-02-07 1:42 ` Nishanth Menon 2025-02-07 8:33 ` Francesco Dolcini 2025-03-02 13:19 ` Vignesh Raghavendra 1 sibling, 1 reply; 6+ messages in thread From: Nishanth Menon @ 2025-02-07 1:42 UTC (permalink / raw) To: Francesco Dolcini Cc: Vignesh Raghavendra, Tero Kristo, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Francesco Dolcini, linux-arm-kernel, devicetree, linux-kernel On 16:39-20250206, Francesco Dolcini wrote: > From: Francesco Dolcini <francesco.dolcini@toradex.com> > > On AM62P-based SoCs the AUDIO_REFCLKx clocks can be used as an input to > external peripherals when configured through CTRL_MMR, so add the > clock nodes. > > Link: http://downloads.ti.com/tisci/esd/latest/5_soc_doc/am62px/clocks.html > Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> > --- > arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi > index 420c77c8e9e5..4b47b0774330 100644 > --- a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi > +++ b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi > @@ -42,6 +42,26 @@ &inta_main_dmss { > ti,interrupt-ranges = <5 69 35>; > }; > > +&main_conf { Why not add it to main_conf section it self in the file? > + audio_refclk0: clock-controller@82e0 { > + compatible = "ti,am62-audio-refclk"; > + reg = <0x82e0 0x4>; > + clocks = <&k3_clks 157 0>; > + assigned-clocks = <&k3_clks 157 0>; > + assigned-clock-parents = <&k3_clks 157 16>; > + #clock-cells = <0>; > + }; > + > + audio_refclk1: clock-controller@82e4 { > + compatible = "ti,am62-audio-refclk"; > + reg = <0x82e4 0x4>; > + clocks = <&k3_clks 157 18>; > + assigned-clocks = <&k3_clks 157 18>; > + assigned-clock-parents = <&k3_clks 157 34>; > + #clock-cells = <0>; > + }; > +}; > + > &main_pmx0 { > pinctrl-single,gpio-range = > <&main_pmx0_range 0 32 PIN_GPIO_RANGE_IOPAD>, > -- > 2.39.5 > -- Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] arm64: dts: ti: k3-am62p: Enable AUDIO_REFCLKx 2025-02-07 1:42 ` Nishanth Menon @ 2025-02-07 8:33 ` Francesco Dolcini 2025-02-28 12:43 ` Francesco Dolcini 0 siblings, 1 reply; 6+ messages in thread From: Francesco Dolcini @ 2025-02-07 8:33 UTC (permalink / raw) To: Nishanth Menon, Jayesh Choudhary Cc: Francesco Dolcini, Vignesh Raghavendra, Tero Kristo, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Francesco Dolcini, linux-arm-kernel, devicetree, linux-kernel Hello Nishanth, On Thu, Feb 06, 2025 at 07:42:39PM -0600, Nishanth Menon wrote: > On 16:39-20250206, Francesco Dolcini wrote: > > From: Francesco Dolcini <francesco.dolcini@toradex.com> > > > > On AM62P-based SoCs the AUDIO_REFCLKx clocks can be used as an input to > > external peripherals when configured through CTRL_MMR, so add the > > clock nodes. > > > > Link: http://downloads.ti.com/tisci/esd/latest/5_soc_doc/am62px/clocks.html > > Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> > > --- > > arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 20 ++++++++++++++++++++ > > 1 file changed, 20 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi > > index 420c77c8e9e5..4b47b0774330 100644 > > --- a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi > > +++ b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi > > @@ -42,6 +42,26 @@ &inta_main_dmss { > > ti,interrupt-ranges = <5 69 35>; > > }; > > > > +&main_conf { > > Why not add it to main_conf section it self in the file? The reason is that main_conf is defined in k3-am62p-j722s-common-main.dtsi, that is shared between am62p and j722s. On j722s the audio refclk is added in k3-j722s-main.dtsi the same way as I did here, so I cannot move this to k3-am62p-j722s-common-main.dtsi without updating also k3-j722s-main.dtsi. I looked into the differences of j722s and am62p, and from my understanding, from the audio refclk point of view, they are identical (same IP, same reg, same clocks and same IDs), so this should naturally be moved to k3-am62p-j722s-common-main.dtsi as you are suggesting. ... however, for some reason I am not aware of, on k3-j722s-main.dtsi a different parent clock is used, and I cannot understand the reason. The actual parent clocks in this patch are just the same we already have everywhere apart on j722s. I tried to look at the history of this and it seems that on the TI downstream kernel branch this is defined in the board dts file (!) and this confused me even more. So, not wanting to break stuff I was not able to understand I came up with this proposal. An alternative could be to override the "unexpected" clocks from k3-j722s-main.dtsi to the board dts file, and have the "standard" clocks, as proposed in this patch and already used on all the other AM62 variants, in k3-am62p-j722s-common-main.dtsi. +Jayesh that is the author of this specific change in k3-j722s-main.dtsi. Francesco > > + audio_refclk0: clock-controller@82e0 { > > + compatible = "ti,am62-audio-refclk"; > > + reg = <0x82e0 0x4>; > > + clocks = <&k3_clks 157 0>; > > + assigned-clocks = <&k3_clks 157 0>; > > + assigned-clock-parents = <&k3_clks 157 16>; > > + #clock-cells = <0>; > > + }; > > + > > + audio_refclk1: clock-controller@82e4 { > > + compatible = "ti,am62-audio-refclk"; > > + reg = <0x82e4 0x4>; > > + clocks = <&k3_clks 157 18>; > > + assigned-clocks = <&k3_clks 157 18>; > > + assigned-clock-parents = <&k3_clks 157 34>; > > + #clock-cells = <0>; > > + }; > > +}; > > + ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] arm64: dts: ti: k3-am62p: Enable AUDIO_REFCLKx 2025-02-07 8:33 ` Francesco Dolcini @ 2025-02-28 12:43 ` Francesco Dolcini 2025-02-28 13:53 ` Nishanth Menon 0 siblings, 1 reply; 6+ messages in thread From: Francesco Dolcini @ 2025-02-28 12:43 UTC (permalink / raw) To: Nishanth Menon, Jayesh Choudhary, Francesco Dolcini Cc: Vignesh Raghavendra, Tero Kristo, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Francesco Dolcini, linux-arm-kernel, devicetree, linux-kernel On Fri, Feb 07, 2025 at 09:33:01AM +0100, Francesco Dolcini wrote: > On Thu, Feb 06, 2025 at 07:42:39PM -0600, Nishanth Menon wrote: > > On 16:39-20250206, Francesco Dolcini wrote: > > > From: Francesco Dolcini <francesco.dolcini@toradex.com> > > > > > > On AM62P-based SoCs the AUDIO_REFCLKx clocks can be used as an input to > > > external peripherals when configured through CTRL_MMR, so add the > > > clock nodes. > > > > > > Link: http://downloads.ti.com/tisci/esd/latest/5_soc_doc/am62px/clocks.html > > > Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> > > > --- > > > arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 20 ++++++++++++++++++++ > > > 1 file changed, 20 insertions(+) > > > > > > diff --git a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi > > > index 420c77c8e9e5..4b47b0774330 100644 > > > --- a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi > > > +++ b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi > > > @@ -42,6 +42,26 @@ &inta_main_dmss { > > > ti,interrupt-ranges = <5 69 35>; > > > }; > > > > > > +&main_conf { > > > > Why not add it to main_conf section it self in the file? > > The reason is that main_conf is defined in k3-am62p-j722s-common-main.dtsi, > that is shared between am62p and j722s. > > On j722s the audio refclk is added in k3-j722s-main.dtsi the same way as I did > here, so I cannot move this to k3-am62p-j722s-common-main.dtsi without updating > also k3-j722s-main.dtsi. > > I looked into the differences of j722s and am62p, and from my understanding, > from the audio refclk point of view, they are identical (same IP, same reg, same > clocks and same IDs), so this should naturally be moved to > k3-am62p-j722s-common-main.dtsi as you are suggesting. > > ... however, for some reason I am not aware of, on k3-j722s-main.dtsi a different > parent clock is used, and I cannot understand the reason. The actual parent clocks > in this patch are just the same we already have everywhere apart on j722s. I tried > to look at the history of this and it seems that on the TI downstream kernel branch > this is defined in the board dts file (!) and this confused me even more. > > So, not wanting to break stuff I was not able to understand I came up with this > proposal. > > An alternative could be to override the "unexpected" clocks from > k3-j722s-main.dtsi to the board dts file, and have the "standard" clocks, as > proposed in this patch and already used on all the other AM62 variants, in > k3-am62p-j722s-common-main.dtsi. > > +Jayesh that is the author of this specific change in k3-j722s-main.dtsi. Jayesh, Nishanth, any comment on this? Should I proceed with this last option ? An alternative could be to override the "unexpected" clocks from k3-j722s-main.dtsi to the board dts file, and have the "standard" clocks, as proposed in this patch and already used on all the other AM62 variants, in k3-am62p-j722s-common-main.dtsi. Francesco ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] arm64: dts: ti: k3-am62p: Enable AUDIO_REFCLKx 2025-02-28 12:43 ` Francesco Dolcini @ 2025-02-28 13:53 ` Nishanth Menon 0 siblings, 0 replies; 6+ messages in thread From: Nishanth Menon @ 2025-02-28 13:53 UTC (permalink / raw) To: Francesco Dolcini Cc: Jayesh Choudhary, Vignesh Raghavendra, Tero Kristo, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Francesco Dolcini, linux-arm-kernel, devicetree, linux-kernel On 13:43-20250228, Francesco Dolcini wrote: > On Fri, Feb 07, 2025 at 09:33:01AM +0100, Francesco Dolcini wrote: > > On Thu, Feb 06, 2025 at 07:42:39PM -0600, Nishanth Menon wrote: > > > On 16:39-20250206, Francesco Dolcini wrote: > > > > From: Francesco Dolcini <francesco.dolcini@toradex.com> > > > > > > > > On AM62P-based SoCs the AUDIO_REFCLKx clocks can be used as an input to > > > > external peripherals when configured through CTRL_MMR, so add the > > > > clock nodes. > > > > > > > > Link: http://downloads.ti.com/tisci/esd/latest/5_soc_doc/am62px/clocks.html > > > > Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> > > > > --- > > > > arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 20 ++++++++++++++++++++ > > > > 1 file changed, 20 insertions(+) > > > > > > > > diff --git a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi > > > > index 420c77c8e9e5..4b47b0774330 100644 > > > > --- a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi > > > > +++ b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi > > > > @@ -42,6 +42,26 @@ &inta_main_dmss { > > > > ti,interrupt-ranges = <5 69 35>; > > > > }; > > > > > > > > +&main_conf { > > > > > > Why not add it to main_conf section it self in the file? > > > > The reason is that main_conf is defined in k3-am62p-j722s-common-main.dtsi, > > that is shared between am62p and j722s. > > > > On j722s the audio refclk is added in k3-j722s-main.dtsi the same way as I did > > here, so I cannot move this to k3-am62p-j722s-common-main.dtsi without updating > > also k3-j722s-main.dtsi. > > > > I looked into the differences of j722s and am62p, and from my understanding, > > from the audio refclk point of view, they are identical (same IP, same reg, same > > clocks and same IDs), so this should naturally be moved to > > k3-am62p-j722s-common-main.dtsi as you are suggesting. > > > > ... however, for some reason I am not aware of, on k3-j722s-main.dtsi a different > > parent clock is used, and I cannot understand the reason. The actual parent clocks > > in this patch are just the same we already have everywhere apart on j722s. I tried > > to look at the history of this and it seems that on the TI downstream kernel branch > > this is defined in the board dts file (!) and this confused me even more. > > > > So, not wanting to break stuff I was not able to understand I came up with this > > proposal. > > > > An alternative could be to override the "unexpected" clocks from > > k3-j722s-main.dtsi to the board dts file, and have the "standard" clocks, as > > proposed in this patch and already used on all the other AM62 variants, in > > k3-am62p-j722s-common-main.dtsi. > > > > +Jayesh that is the author of this specific change in k3-j722s-main.dtsi. > > Jayesh, Nishanth, any comment on this? > > Should I proceed with this last option ? > > An alternative could be to override the "unexpected" clocks from > k3-j722s-main.dtsi to the board dts file, and have the "standard" clocks, as > proposed in this patch and already used on all the other AM62 variants, in > k3-am62p-j722s-common-main.dtsi. > no, with your explanation it is clear that your patch matches with the strategy we are using currently. -- Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] arm64: dts: ti: k3-am62p: Enable AUDIO_REFCLKx 2025-02-06 15:39 [PATCH v1] arm64: dts: ti: k3-am62p: Enable AUDIO_REFCLKx Francesco Dolcini 2025-02-07 1:42 ` Nishanth Menon @ 2025-03-02 13:19 ` Vignesh Raghavendra 1 sibling, 0 replies; 6+ messages in thread From: Vignesh Raghavendra @ 2025-03-02 13:19 UTC (permalink / raw) To: Nishanth Menon, Tero Kristo, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Francesco Dolcini Cc: Vignesh Raghavendra, Francesco Dolcini, linux-arm-kernel, devicetree, linux-kernel Hi Francesco Dolcini, On Thu, 06 Feb 2025 16:39:11 +0100, Francesco Dolcini wrote: > On AM62P-based SoCs the AUDIO_REFCLKx clocks can be used as an input to > external peripherals when configured through CTRL_MMR, so add the > clock nodes. > > I have applied the following to branch ti-next on [1]. Thank you! [1/1] arm64: dts: ti: k3-am62p: Enable AUDIO_REFCLKx commit: a5a7b2be9506d4483ddc9b4bd20e8948c456a8cb All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. [1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git -- Vignesh ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-03-02 13:20 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-02-06 15:39 [PATCH v1] arm64: dts: ti: k3-am62p: Enable AUDIO_REFCLKx Francesco Dolcini 2025-02-07 1:42 ` Nishanth Menon 2025-02-07 8:33 ` Francesco Dolcini 2025-02-28 12:43 ` Francesco Dolcini 2025-02-28 13:53 ` Nishanth Menon 2025-03-02 13:19 ` Vignesh Raghavendra
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox