linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] dts: meson: add clock controllers input clocks
@ 2018-12-03 17:16 Jerome Brunet
  2018-12-03 17:16 ` [PATCH v3 1/3] dt-bindings: clk: meson: add ao controller clock inputs Jerome Brunet
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jerome Brunet @ 2018-12-03 17:16 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 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

Changes since v2: [1]
- add more inputs for the gx family external 32k references

[0]: https://lkml.kernel.org/r/20181129164524.18670-1-jbrunet@baylibre.com
[1]: https://lkml.kernel.org/r/20181203131850.31388-1-jbrunet@baylibre.com

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  | 10 +++++++++-
 .../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, 26 insertions(+), 1 deletion(-)

-- 
2.19.1


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

* [PATCH v3 1/3] dt-bindings: clk: meson: add ao controller clock inputs
  2018-12-03 17:16 [PATCH v3 0/3] dts: meson: add clock controllers input clocks Jerome Brunet
@ 2018-12-03 17:16 ` Jerome Brunet
  2018-12-03 17:56   ` Stephen Boyd
  2018-12-03 17:16 ` [PATCH v3 2/3] dt-bindings: clk: meson: add main controller clock input Jerome Brunet
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Jerome Brunet @ 2018-12-03 17:16 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>
---

Stephen,

Since I made some changes here, I did not pick your previous
Reviewed-by tag, in case you did not agree with this version.

Cheers
Jerome

 .../devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt  | 10 +++++++++-
 1 file changed, 9 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..79511d7bb321 100644
--- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
+++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
@@ -11,6 +11,13 @@ 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-0"  : external 32kHz reference #0 if any (optional)
+  * "ext-32k-1"  : external 32kHz reference #1 if any (optional - gx only)
+  * "ext-32k-2"  : external 32kHz reference #2 if any (optional - gx only)
 
 - #clock-cells: should be 1.
 
@@ -40,8 +47,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 v3 2/3] dt-bindings: clk: meson: add main controller clock input
  2018-12-03 17:16 [PATCH v3 0/3] dts: meson: add clock controllers input clocks Jerome Brunet
  2018-12-03 17:16 ` [PATCH v3 1/3] dt-bindings: clk: meson: add ao controller clock inputs Jerome Brunet
@ 2018-12-03 17:16 ` Jerome Brunet
  2018-12-03 17:56   ` Stephen Boyd
  2018-12-03 17:16 ` [PATCH v3 3/3] arm64: dts: meson: add clock controller clock inputs Jerome Brunet
  2018-12-05  1:07 ` [PATCH v3 0/3] dts: meson: add clock controllers input clocks Kevin Hilman
  3 siblings, 1 reply; 7+ messages in thread
From: Jerome Brunet @ 2018-12-03 17:16 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>
---
 .../devicetree/bindings/clock/amlogic,gxbb-clkc.txt          | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt
index e950599566a9..a6871953bf04 100644
--- a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt
+++ b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt
@@ -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";
 	};
 };
 
-- 
2.19.1


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

* [PATCH v3 3/3] arm64: dts: meson: add clock controller clock inputs
  2018-12-03 17:16 [PATCH v3 0/3] dts: meson: add clock controllers input clocks Jerome Brunet
  2018-12-03 17:16 ` [PATCH v3 1/3] dt-bindings: clk: meson: add ao controller clock inputs Jerome Brunet
  2018-12-03 17:16 ` [PATCH v3 2/3] dt-bindings: clk: meson: add main controller clock input Jerome Brunet
@ 2018-12-03 17:16 ` Jerome Brunet
  2018-12-05  1:07 ` [PATCH v3 0/3] dts: meson: add clock controllers input clocks Kevin Hilman
  3 siblings, 0 replies; 7+ messages in thread
From: Jerome Brunet @ 2018-12-03 17:16 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  | 4 ++++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 4 ++++
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi  | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
index 5f512c91471e..5f3ac275f1ab 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
@@ -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";
 				};
 			};
 
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 6796d250985a..a7b883ced0a8 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,8 @@
 	clkc: clock-controller {
 		compatible = "amlogic,gxbb-clkc";
 		#clock-cells = <1>;
+		clocks = <&xtal>;
+		clock-names = "xtal";
 	};
 };
 
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
index ed278097825b..d5c3d78aafeb 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,8 @@
 	clkc: clock-controller {
 		compatible = "amlogic,gxl-clkc";
 		#clock-cells = <1>;
+		clocks = <&xtal>;
+		clock-names = "xtal";
 	};
 };
 
-- 
2.19.1


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

* Re: [PATCH v3 1/3] dt-bindings: clk: meson: add ao controller clock inputs
  2018-12-03 17:16 ` [PATCH v3 1/3] dt-bindings: clk: meson: add ao controller clock inputs Jerome Brunet
@ 2018-12-03 17:56   ` Stephen Boyd
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Boyd @ 2018-12-03 17:56 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-12-03 09:16:38)
> 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 v3 2/3] dt-bindings: clk: meson: add main controller clock input
  2018-12-03 17:16 ` [PATCH v3 2/3] dt-bindings: clk: meson: add main controller clock input Jerome Brunet
@ 2018-12-03 17:56   ` Stephen Boyd
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Boyd @ 2018-12-03 17:56 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-12-03 09:16:39)
> Add the clock input of the main 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 v3 0/3] dts: meson: add clock controllers input clocks
  2018-12-03 17:16 [PATCH v3 0/3] dts: meson: add clock controllers input clocks Jerome Brunet
                   ` (2 preceding siblings ...)
  2018-12-03 17:16 ` [PATCH v3 3/3] arm64: dts: meson: add clock controller clock inputs Jerome Brunet
@ 2018-12-05  1:07 ` Kevin Hilman
  3 siblings, 0 replies; 7+ messages in thread
From: Kevin Hilman @ 2018-12-05  1:07 UTC (permalink / raw)
  To: Jerome Brunet, Neil Armstrong, Carlo Caione
  Cc: Jerome Brunet, linux-amlogic, linux-clk, devicetree, linux-kernel

Jerome Brunet <jbrunet@baylibre.com> writes:

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

Queued for v4.21 (branch: v4.21/dt64) with Stephen's tags.

nit: $SUBJECT on this cover letter is missing arm64 prefix (v2 had it)
and, some lazy maintainenrs like me are starting to rely on the new new
patchwork-bot which will auto-superseed series when a new version is
posted, but that relies on matching subjects.

Kevin

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

end of thread, other threads:[~2018-12-05  1:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-03 17:16 [PATCH v3 0/3] dts: meson: add clock controllers input clocks Jerome Brunet
2018-12-03 17:16 ` [PATCH v3 1/3] dt-bindings: clk: meson: add ao controller clock inputs Jerome Brunet
2018-12-03 17:56   ` Stephen Boyd
2018-12-03 17:16 ` [PATCH v3 2/3] dt-bindings: clk: meson: add main controller clock input Jerome Brunet
2018-12-03 17:56   ` Stephen Boyd
2018-12-03 17:16 ` [PATCH v3 3/3] arm64: dts: meson: add clock controller clock inputs Jerome Brunet
2018-12-05  1:07 ` [PATCH v3 0/3] dts: meson: add clock controllers input clocks Kevin Hilman

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