Message ID | 20240508144259.191843-3-jan.dakinevich@salutedevices.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | [APPROACH,2,1/2] arm64: dts: amlogic: list all slave clocks for audio clock controller | expand |
On Wed, May 08, 2024 at 05:42:58PM +0300, Jan Dakinevich wrote: > Signed-off-by: Jan Dakinevich <jan.dakinevich@salutedevices.com> > --- > arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 27 ++++++++++++++++++++-- > arch/arm64/boot/dts/amlogic/meson-g12.dtsi | 26 +++++++++++++++++++-- > arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 26 +++++++++++++++++++-- > 3 files changed, 73 insertions(+), 6 deletions(-) > > diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi > index 6d12b760b90f..28f4ec5f39b0 100644 > --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi > +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi > @@ -1342,7 +1342,9 @@ clkc_audio: clock-controller@0 { > <&clkc CLKID_HIFI_PLL>, > <&clkc CLKID_FCLK_DIV3>, > <&clkc CLKID_FCLK_DIV4>, > - <&clkc CLKID_GP0_PLL>; > + <&clkc CLKID_GP0_PLL>, > + <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, > + <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>; All 3 cases are just unused clocks on the end. I suppose that's not always the case. You could just set 'minItems' in the binding to avoid needing to pad the end and the dts changes. Rob
On 5/8/24 20:50, Rob Herring wrote: > On Wed, May 08, 2024 at 05:42:58PM +0300, Jan Dakinevich wrote: >> Signed-off-by: Jan Dakinevich <jan.dakinevich@salutedevices.com> >> --- >> arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 27 ++++++++++++++++++++-- >> arch/arm64/boot/dts/amlogic/meson-g12.dtsi | 26 +++++++++++++++++++-- >> arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 26 +++++++++++++++++++-- >> 3 files changed, 73 insertions(+), 6 deletions(-) >> >> diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi >> index 6d12b760b90f..28f4ec5f39b0 100644 >> --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi >> +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi >> @@ -1342,7 +1342,9 @@ clkc_audio: clock-controller@0 { >> <&clkc CLKID_HIFI_PLL>, >> <&clkc CLKID_FCLK_DIV3>, >> <&clkc CLKID_FCLK_DIV4>, >> - <&clkc CLKID_GP0_PLL>; >> + <&clkc CLKID_GP0_PLL>, >> + <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, >> + <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>; > > All 3 cases are just unused clocks on the end. I suppose that's not > always the case. You could just set 'minItems' in the binding to > avoid needing to pad the end and the dts changes. > You are right. I mistakenly thought that 'minItems' can not be redefined. But not, it is allowed to redefine it and it works. Thus, this patch is not needed for this approach. Anyway, what do you think about first approach? As for me, it is more simple and readable. > Rob
On Sun, May 12, 2024 at 10:06:23PM +0300, Jan Dakinevich wrote: > > > On 5/8/24 20:50, Rob Herring wrote: > > On Wed, May 08, 2024 at 05:42:58PM +0300, Jan Dakinevich wrote: > >> Signed-off-by: Jan Dakinevich <jan.dakinevich@salutedevices.com> > >> --- > >> arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 27 ++++++++++++++++++++-- > >> arch/arm64/boot/dts/amlogic/meson-g12.dtsi | 26 +++++++++++++++++++-- > >> arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 26 +++++++++++++++++++-- > >> 3 files changed, 73 insertions(+), 6 deletions(-) > >> > >> diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi > >> index 6d12b760b90f..28f4ec5f39b0 100644 > >> --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi > >> +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi > >> @@ -1342,7 +1342,9 @@ clkc_audio: clock-controller@0 { > >> <&clkc CLKID_HIFI_PLL>, > >> <&clkc CLKID_FCLK_DIV3>, > >> <&clkc CLKID_FCLK_DIV4>, > >> - <&clkc CLKID_GP0_PLL>; > >> + <&clkc CLKID_GP0_PLL>, > >> + <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, > >> + <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>; > > > > All 3 cases are just unused clocks on the end. I suppose that's not > > always the case. You could just set 'minItems' in the binding to > > avoid needing to pad the end and the dts changes. > > > > You are right. I mistakenly thought that 'minItems' can not be > redefined. But not, it is allowed to redefine it and it works. Thus, > this patch is not needed for this approach. > > Anyway, what do you think about first approach? As for me, it is more > simple and readable. I prefer this one as it enforces the order. Rob
diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi index 6d12b760b90f..28f4ec5f39b0 100644 --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi @@ -1342,7 +1342,9 @@ clkc_audio: clock-controller@0 { <&clkc CLKID_HIFI_PLL>, <&clkc CLKID_FCLK_DIV3>, <&clkc CLKID_FCLK_DIV4>, - <&clkc CLKID_GP0_PLL>; + <&clkc CLKID_GP0_PLL>, + <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, + <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>; clock-names = "pclk", "mst_in0", "mst_in1", @@ -1351,7 +1353,28 @@ clkc_audio: clock-controller@0 { "mst_in4", "mst_in5", "mst_in6", - "mst_in7"; + "mst_in7", + "slv_sclk0", + "slv_sclk1", + "slv_sclk2", + "slv_sclk3", + "slv_sclk4", + "slv_sclk5", + "slv_sclk6", + "slv_sclk7", + "slv_sclk8", + "slv_sclk9", + "slv_lrclk0", + "slv_lrclk1", + "slv_lrclk2", + "slv_lrclk3", + "slv_lrclk4", + "slv_lrclk5", + "slv_lrclk6", + "slv_lrclk7", + "slv_lrclk8", + "slv_lrclk9"; + resets = <&reset RESET_AUDIO>; }; diff --git a/arch/arm64/boot/dts/amlogic/meson-g12.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12.dtsi index e732df3f3114..af99781f3c4e 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-g12.dtsi @@ -82,7 +82,9 @@ clkc_audio: clock-controller@0 { <&clkc CLKID_HIFI_PLL>, <&clkc CLKID_FCLK_DIV3>, <&clkc CLKID_FCLK_DIV4>, - <&clkc CLKID_GP0_PLL>; + <&clkc CLKID_GP0_PLL>, + <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, + <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>; clock-names = "pclk", "mst_in0", "mst_in1", @@ -91,7 +93,27 @@ clkc_audio: clock-controller@0 { "mst_in4", "mst_in5", "mst_in6", - "mst_in7"; + "mst_in7", + "slv_sclk0", + "slv_sclk1", + "slv_sclk2", + "slv_sclk3", + "slv_sclk4", + "slv_sclk5", + "slv_sclk6", + "slv_sclk7", + "slv_sclk8", + "slv_sclk9", + "slv_lrclk0", + "slv_lrclk1", + "slv_lrclk2", + "slv_lrclk3", + "slv_lrclk4", + "slv_lrclk5", + "slv_lrclk6", + "slv_lrclk7", + "slv_lrclk8", + "slv_lrclk9"; resets = <&reset RESET_AUDIO>; }; diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi index 643f94d9d08e..24e520c3e2a6 100644 --- a/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi @@ -162,7 +162,9 @@ clkc_audio: clock-controller@0 { <&clkc CLKID_HIFI_PLL>, <&clkc CLKID_FCLK_DIV3>, <&clkc CLKID_FCLK_DIV4>, - <&clkc CLKID_FCLK_DIV5>; + <&clkc CLKID_FCLK_DIV5>, + <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, + <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>; clock-names = "pclk", "mst_in0", "mst_in1", @@ -171,7 +173,27 @@ clkc_audio: clock-controller@0 { "mst_in4", "mst_in5", "mst_in6", - "mst_in7"; + "mst_in7", + "slv_sclk0", + "slv_sclk1", + "slv_sclk2", + "slv_sclk3", + "slv_sclk4", + "slv_sclk5", + "slv_sclk6", + "slv_sclk7", + "slv_sclk8", + "slv_sclk9", + "slv_lrclk0", + "slv_lrclk1", + "slv_lrclk2", + "slv_lrclk3", + "slv_lrclk4", + "slv_lrclk5", + "slv_lrclk6", + "slv_lrclk7", + "slv_lrclk8", + "slv_lrclk9"; resets = <&reset RESET_AUDIO>; };
Signed-off-by: Jan Dakinevich <jan.dakinevich@salutedevices.com> --- arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 27 ++++++++++++++++++++-- arch/arm64/boot/dts/amlogic/meson-g12.dtsi | 26 +++++++++++++++++++-- arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 26 +++++++++++++++++++-- 3 files changed, 73 insertions(+), 6 deletions(-)