linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] arm64: dts: meson: add clock controllers input clocks
@ 2018-11-29 16:45 Jerome Brunet
  2018-11-29 16:45 ` [PATCH 1/3] dt-bindings: clk: meson: add ao controller clock inputs Jerome Brunet
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jerome Brunet @ 2018-11-29 16:45 UTC (permalink / raw)
  To: Neil Armstrong, Carlo Caione, Kevin Hilman
  Cc: Jerome Brunet, linux-amlogic, linux-clk, devicetree, linux-kernel

This patchset is the first step that needs to be done so the
amlogic clock controllers properly claim their input clocks
through instead of relying on fixed names.

I'll be waiting for this hit mainline before sending the related
driver changes.

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       | 3 +++
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi                | 3 +++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi               | 3 +++
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi                | 3 +++
 5 files changed, 19 insertions(+), 1 deletion(-)

-- 
2.19.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] dt-bindings: clk: meson: add ao controller clock inputs
  2018-11-29 16:45 [PATCH 0/3] arm64: dts: meson: add clock controllers input clocks Jerome Brunet
@ 2018-11-29 16:45 ` Jerome Brunet
  2018-11-29 23:43   ` Stephen Boyd
  2018-11-29 16:45 ` [PATCH 2/3] dt-bindings: clk: meson: add main controller clock input Jerome Brunet
  2018-11-29 16:45 ` [PATCH 3/3] arm64: dts: meson: add clock controller clock inputs Jerome Brunet
  2 siblings, 1 reply; 7+ messages in thread
From: Jerome Brunet @ 2018-11-29 16:45 UTC (permalink / raw)
  To: Neil Armstrong, Carlo Caione, Kevin Hilman
  Cc: Jerome Brunet, linux-amlogic, linux-clk, devicetree, linux-kernel

Add the clock inputs of amlogic AO clock controller

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 .../devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt     | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
index 3a880528030e..c480db8f4793 100644
--- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
+++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
@@ -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:
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] dt-bindings: clk: meson: add main controller clock input
  2018-11-29 16:45 [PATCH 0/3] arm64: dts: meson: add clock controllers input clocks Jerome Brunet
  2018-11-29 16:45 ` [PATCH 1/3] dt-bindings: clk: meson: add ao controller clock inputs Jerome Brunet
@ 2018-11-29 16:45 ` Jerome Brunet
  2018-11-29 23:43   ` Stephen Boyd
  2018-11-29 16:45 ` [PATCH 3/3] arm64: dts: meson: add clock controller clock inputs Jerome Brunet
  2 siblings, 1 reply; 7+ messages in thread
From: Jerome Brunet @ 2018-11-29 16:45 UTC (permalink / raw)
  To: Neil Armstrong, Carlo Caione, Kevin Hilman
  Cc: Jerome Brunet, linux-amlogic, linux-clk, devicetree, linux-kernel

Add the clock input of the main clock controller

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt
index e950599566a9..79454869f96d 100644
--- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt
+++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt
@@ -9,6 +9,8 @@ Required Properties:
 		"amlogic,gxbb-clkc" for GXBB SoC,
 		"amlogic,gxl-clkc" for GXL and GXM SoC,
 		"amlogic,axg-clkc" for AXG SoC.
+- clocks: phandle to the input clock of the controller, presumably the
+	  platform xtal.
 
 - #clock-cells: should be 1.
 
@@ -31,6 +33,7 @@ sysctrl: system-controller@0 {
 	clkc: clock-controller {
 		#clock-cells = <1>;
 		compatible = "amlogic,gxbb-clkc";
+		clocks = <&xtal>
 	};
 };
 
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] arm64: dts: meson: add clock controller clock inputs
  2018-11-29 16:45 [PATCH 0/3] arm64: dts: meson: add clock controllers input clocks Jerome Brunet
  2018-11-29 16:45 ` [PATCH 1/3] dt-bindings: clk: meson: add ao controller clock inputs Jerome Brunet
  2018-11-29 16:45 ` [PATCH 2/3] dt-bindings: clk: meson: add main controller clock input Jerome Brunet
@ 2018-11-29 16:45 ` Jerome Brunet
  2 siblings, 0 replies; 7+ messages in thread
From: Jerome Brunet @ 2018-11-29 16:45 UTC (permalink / raw)
  To: Neil Armstrong, Carlo Caione, Kevin Hilman
  Cc: Jerome Brunet, linux-amlogic, linux-clk, devicetree, linux-kernel

Add the clock inputs of the clock controllers

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi  | 3 +++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 3 +++
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi  | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
index 5f512c91471e..f2e9fbfff4ea 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
@@ -1089,6 +1089,7 @@
 				clkc: clock-controller {
 					compatible = "amlogic,axg-clkc";
 					#clock-cells = <1>;
+					clocks = <&xtal>;
 				};
 			};
 		};
@@ -1334,6 +1335,8 @@
 					compatible = "amlogic,meson-axg-aoclkc";
 					#clock-cells = <1>;
 					#reset-cells = <1>;
+					clocks = <&xtal>, <&clkc CLKID_CLK81>;
+					clock-names = "xtal", "mpeg-clk";
 				};
 			};
 
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 6796d250985a..3322da6da962 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -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,7 @@
 	clkc: clock-controller {
 		compatible = "amlogic,gxbb-clkc";
 		#clock-cells = <1>;
+		clocks = <&xtal>;
 	};
 };
 
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
index ed278097825b..223f34959844 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
@@ -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,7 @@
 	clkc: clock-controller {
 		compatible = "amlogic,gxl-clkc";
 		#clock-cells = <1>;
+		clocks = <&xtal>;
 	};
 };
 
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] dt-bindings: clk: meson: add main controller clock input
  2018-11-29 16:45 ` [PATCH 2/3] dt-bindings: clk: meson: add main controller clock input Jerome Brunet
@ 2018-11-29 23:43   ` Stephen Boyd
  2018-11-30  8:21     ` Jerome Brunet
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Boyd @ 2018-11-29 23:43 UTC (permalink / raw)
  To: Carlo Caione, Jerome Brunet, Kevin Hilman, Neil Armstrong
  Cc: Jerome Brunet, linux-amlogic, linux-clk, devicetree, linux-kernel

Quoting Jerome Brunet (2018-11-29 08:45:23)
> Add the clock input of the main clock controller
> 
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
>  Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt
> index e950599566a9..79454869f96d 100644
> --- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt
> +++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt
> @@ -9,6 +9,8 @@ Required Properties:
>                 "amlogic,gxbb-clkc" for GXBB SoC,
>                 "amlogic,gxl-clkc" for GXL and GXM SoC,
>                 "amlogic,axg-clkc" for AXG SoC.
> +- clocks: phandle to the input clock of the controller, presumably the
> +         platform xtal.

Any reason to not have clock-names? I'd prefer to have them because then
we can easily hook up providers with their parents based on strings. I
suppose we'll have to support both modes of strings and numbers for
connections, but that may be more for legacy reasons that could be
avoided here if a clock-names property existed.

>  
>  - #clock-cells: should be 1.
>  

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] dt-bindings: clk: meson: add ao controller clock inputs
  2018-11-29 16:45 ` [PATCH 1/3] dt-bindings: clk: meson: add ao controller clock inputs Jerome Brunet
@ 2018-11-29 23:43   ` Stephen Boyd
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Boyd @ 2018-11-29 23:43 UTC (permalink / raw)
  To: Carlo Caione, Jerome Brunet, Kevin Hilman, Neil Armstrong
  Cc: Jerome Brunet, linux-amlogic, linux-clk, devicetree, linux-kernel

Quoting Jerome Brunet (2018-11-29 08:45:22)
> Add the clock inputs of amlogic AO clock controller
> 
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---

Reviewed-by: Stephen Boyd <sboyd@kernel.org>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] dt-bindings: clk: meson: add main controller clock input
  2018-11-29 23:43   ` Stephen Boyd
@ 2018-11-30  8:21     ` Jerome Brunet
  0 siblings, 0 replies; 7+ messages in thread
From: Jerome Brunet @ 2018-11-30  8:21 UTC (permalink / raw)
  To: Stephen Boyd, Carlo Caione, Kevin Hilman, Neil Armstrong
  Cc: linux-amlogic, linux-clk, devicetree, linux-kernel

On Thu, 2018-11-29 at 15:43 -0800, Stephen Boyd wrote:
> Quoting Jerome Brunet (2018-11-29 08:45:23)
> > Add the clock input of the main clock controller
> > 
> > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> > ---
> >  Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt 
> > b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt
> > index e950599566a9..79454869f96d 100644
> > --- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt
> > +++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt
> > @@ -9,6 +9,8 @@ Required Properties:
> >                 "amlogic,gxbb-clkc" for GXBB SoC,
> >                 "amlogic,gxl-clkc" for GXL and GXM SoC,
> >                 "amlogic,axg-clkc" for AXG SoC.
> > +- clocks: phandle to the input clock of the controller, presumably the
> > +         platform xtal.
> 
> Any reason to not have clock-names? 

Not really, I did not bother because there was only one input clock.
I can easily fix this

> I'd prefer to have them because then
> we can easily hook up providers with their parents based on strings. I
> suppose we'll have to support both modes of strings and numbers for
> connections, but that may be more for legacy reasons that could be
> avoided here if a clock-names property existed.
> 
> >  
> >  - #clock-cells: should be 1.
> >  



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-11-30  8:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-29 16:45 [PATCH 0/3] arm64: dts: meson: add clock controllers input clocks Jerome Brunet
2018-11-29 16:45 ` [PATCH 1/3] dt-bindings: clk: meson: add ao controller clock inputs Jerome Brunet
2018-11-29 23:43   ` Stephen Boyd
2018-11-29 16:45 ` [PATCH 2/3] dt-bindings: clk: meson: add main controller clock input Jerome Brunet
2018-11-29 23:43   ` Stephen Boyd
2018-11-30  8:21     ` Jerome Brunet
2018-11-29 16:45 ` [PATCH 3/3] arm64: dts: meson: add clock controller clock inputs Jerome Brunet

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).