arm64: dts: meson: add clock controllers input clocks
Subsystems (4)
Jerome Brunet
maintainerv2 cover arm64: dts: meson: add clock controllers input clocks
This patchset is the first step that needs to be done so the amlogic clock controllers properly claim their input clocks through DT instead of relying on fixed names.
I'll be waiting for this hit mainline before sending the related driver changes.
Changes since v1: [0]
- add clock-names for the main clock controller
[0]: https://lkml.kernel.org/r/[email protected]
Jerome Brunet (3):
dt-bindings: clk: meson: add ao controller clock inputs
dt-bindings: clk: meson: add main controller clock input
arm64: dts: meson: add clock controller clock inputs
.../devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt | 8 +++++++- .../devicetree/bindings/clock/amlogic,gxbb-clkc.txt | 5 +++++ arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 4 ++++ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 4 ++++ arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 4 ++++ 5 files changed, 24 insertions(+), 1 deletion(-)
Signature · 1 line
2.19.1
Jerome Brunet
maintainerPATCH v2 1/3 dt-bindings: clk: meson: add ao controller clock inputs
Add the clock inputs of amlogic AO clock controller
--- .../devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt +7 -1
@@ -11,6 +11,11 @@ Required Properties: - GXM (S912) : "amlogic,meson-gxm-aoclkc" - AXG (A113D, A113X) : "amlogic,meson-axg-aoclkc" followed by the common "amlogic,meson-gx-aoclkc" +- clocks: list of clock phandle, one for each entry clock-names. +- clock-names: should contain the following: + * "xtal" : the platform xtal + * "mpeg-clk" : the main clock controller mother clock (aka clk81) + * "ext-32k" : external 32kHz reference if any (optional) - #clock-cells: should be 1.
@@ -40,8 +45,9 @@ ao_sysctrl: sys-ctrl@0 { compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc"; #clock-cells = <1>; #reset-cells = <1>; + clocks = <&xtal>, <&clkc CLKID_CLK81>; + clock-names = "xtal", "mpeg-clk"; }; -}; Example: UART controller node that consumes the clock and reset generated by the clock controller:
Signature · 1 line
2.19.1
Jerome Brunet
maintainerRe: [PATCH v2 1/3] dt-bindings: clk: meson: add ao controller clock inputs
Quoted 14 lines · Jerome Brunet
Add the clock inputs of amlogic AO clock controller
Reviewed-by Stephen Boyd <[email protected]>Signed-off-by Jerome Brunet <[email protected]>--- .../devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt +0
-0
Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt Required Properties: · line 18
Quoted 8 lines
Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt +5
-0@@ -11,6 +11,11 @@ Required Properties: - GXM (S912) : "amlogic,meson-gxm-aoclkc" - AXG (A113D, A113X) : "amlogic,meson-axg-aoclkc" followed by the common "amlogic,meson-gx-aoclkc" +- clocks: list of clock phandle, one for each entry clock-names. +- clock-names: should contain the following: + * "xtal" : the platform xtal + * "mpeg-clk" : the main clock controller mother clock (aka clk81) + * "ext-32k" : external 32kHz reference if any (optional)
While chip like the AXG have only 1 external 32k input, the gx family appears to have 3 :( I missed that detail when preparing this patchset. Please hold on, I'll send a v3
Quoted 15 lines
Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt +2
-1- #clock-cells: should be 1.@@ -40,8 +45,9 @@ ao_sysctrl: sys-ctrl@0 { compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx- aoclkc"; #clock-cells = <1>; #reset-cells = <1>; + clocks = <&xtal>, <&clkc CLKID_CLK81>; + clock-names = "xtal", "mpeg-clk"; }; -}; Example: UART controller node that consumes the clock and reset generatedby the clock controller:
Jerome Brunet
maintainerPATCH v2 2/3 dt-bindings: clk: meson: add main controller clock input
In reply to Jerome BrunetAdd the clock input of the main clock controller
--- .../devicetree/bindings/clock/amlogic,gxbb-clkc.txt | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt +5 -0
@@ -9,6 +9,9 @@ Required Properties: "amlogic,gxbb-clkc" for GXBB SoC, "amlogic,gxl-clkc" for GXL and GXM SoC, "amlogic,axg-clkc" for AXG SoC. +- clocks : list of clock phandle, one for each entry clock-names. +- clock-names : should contain the following: + * "xtal": the platform xtal - #clock-cells: should be 1.
@@ -31,6 +34,8 @@ sysctrl: system-controller@0 { clkc: clock-controller { #clock-cells = <1>; compatible = "amlogic,gxbb-clkc"; + clocks = <&xtal>; + clock-names = "xtal"; }; };
Signature · 1 line
2.19.1
Jerome Brunet
maintainerPATCH v2 3/3 arm64: dts: meson: add clock controller clock inputs
In reply to Jerome BrunetAdd the clock inputs of the clock controllers
--- arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 4 ++++ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 4 ++++ arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 4 ++++ 3 files changed, 12 insertions(+)
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +4 -0
@@ -1089,6 +1089,8 @@ clkc: clock-controller { compatible = "amlogic,axg-clkc"; #clock-cells = <1>; + clocks = <&xtal>; + clock-names = "xtal"; }; }; };
@@ -1334,6 +1336,8 @@ compatible = "amlogic,meson-axg-aoclkc"; #clock-cells = <1>; #reset-cells = <1>; + clocks = <&xtal>, <&clkc CLKID_CLK81>; + clock-names = "xtal", "mpeg-clk"; }; };
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +4 -0
@@ -299,6 +299,8 @@ &clkc_AO { compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc"; + clocks = <&xtal>, <&clkc CLKID_CLK81>; + clock-names = "xtal", "mpeg-clk"; }; &efuse {
@@ -334,6 +336,8 @@ clkc: clock-controller { compatible = "amlogic,gxbb-clkc"; #clock-cells = <1>; + clocks = <&xtal>; + clock-names = "xtal"; }; };
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi +4 -0
@@ -260,6 +260,8 @@ &clkc_AO { compatible = "amlogic,meson-gxl-aoclkc", "amlogic,meson-gx-aoclkc"; + clocks = <&xtal>, <&clkc CLKID_CLK81>; + clock-names = "xtal", "mpeg-clk"; }; &gpio_intc {
@@ -284,6 +286,8 @@ clkc: clock-controller { compatible = "amlogic,gxl-clkc"; #clock-cells = <1>; + clocks = <&xtal>; + clock-names = "xtal"; }; };
Signature · 1 line
2.19.1