linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] clk: at91: rework sckc bindings
@ 2019-02-19 17:01 Alexandre Belloni
  2019-02-19 17:01 ` [PATCH 1/7] dt-bindings: clock: at91: new " Alexandre Belloni
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Alexandre Belloni @ 2019-02-19 17:01 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: devicetree, Alexandre Belloni, linux-kernel, Michael Turquette,
	Claudiu Beznea, linux-clk, linux-arm-kernel

Hi,

This is a rework of the sckc DT bindings to avoid warnings with dtc.
DT backward compatibility is kept.

This series also fix a possible issue with the sama5d3 slow RC
oscillator.

The sckc driver changes and documetation can go through the clk tree and
we will handle th DT changes.

Alexandre Belloni (7):
  dt-bindings: clock: at91: new sckc bindings
  clk: at91: modernize sckc binding
  clk: at91: sckc: handle different RC startup time
  ARM: dts: at91: at91sam9x5: switch to new sckc bindings
  ARM: dts: at91: at91sam9g45: switch to new sckc bindings
  ARM: dts: at91: at91sam9rl: switch to new sckc bindings
  ARM: dts: at91: sama5d3: switch to new sckc bindings

 .../devicetree/bindings/clock/at91-clock.txt  |  30 ++--
 arch/arm/boot/dts/at91-wb50n.dtsi             |   2 +-
 arch/arm/boot/dts/at91sam9g45.dtsi            |  25 +---
 arch/arm/boot/dts/at91sam9rl.dtsi             |  25 +---
 arch/arm/boot/dts/at91sam9x5.dtsi             |  23 +--
 arch/arm/boot/dts/sama5d3.dtsi                |  27 +---
 drivers/clk/at91/sckc.c                       | 134 ++++++------------
 7 files changed, 73 insertions(+), 193 deletions(-)

-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 1/7] dt-bindings: clock: at91: new sckc bindings
  2019-02-19 17:01 [PATCH 0/7] clk: at91: rework sckc bindings Alexandre Belloni
@ 2019-02-19 17:01 ` Alexandre Belloni
  2019-03-25 21:49   ` Rob Herring
  2019-04-25 18:43   ` Stephen Boyd
  2019-02-19 17:01 ` [PATCH 2/7] clk: at91: modernize sckc binding Alexandre Belloni
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 12+ messages in thread
From: Alexandre Belloni @ 2019-02-19 17:01 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: devicetree, Alexandre Belloni, Rob Herring, linux-kernel,
	Michael Turquette, Claudiu Beznea, linux-clk, linux-arm-kernel

Remove the need for child nodes in the sckc binding to be able to remove
dtc warnings and have a more modern binding.

Also document optional properties.

Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 .../devicetree/bindings/clock/at91-clock.txt  | 30 ++++++++-----------
 1 file changed, 12 insertions(+), 18 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/at91-clock.txt b/Documentation/devicetree/bindings/clock/at91-clock.txt
index e9f70fcdfe80..cb838c1c4bdd 100644
--- a/Documentation/devicetree/bindings/clock/at91-clock.txt
+++ b/Documentation/devicetree/bindings/clock/at91-clock.txt
@@ -8,29 +8,23 @@ Slow Clock controller:
 
 Required properties:
 - compatible : shall be one of the following:
-	"atmel,at91sam9x5-sckc" or
+	"atmel,at91sam9x5-sckc",
+	"atmel,sama5d3-sckc" or
 	"atmel,sama5d4-sckc":
 		at91 SCKC (Slow Clock Controller)
-		This node contains the slow clock definitions.
-
-	"atmel,at91sam9x5-clk-slow-osc":
-		at91 slow oscillator
-
-	"atmel,at91sam9x5-clk-slow-rc-osc":
-		at91 internal slow RC oscillator
-- reg : defines the IO memory reserved for the SCKC.
-- #size-cells : shall be 0 (reg is used to encode clk id).
-- #address-cells : shall be 1 (reg is used to encode clk id).
+- #clock-cells : shall be 0.
+- clocks : shall be the input parent clock phandle for the clock.
 
+Optional properties:
+- atmel,osc-bypass : boolean property. Set this when a clock signal is directly
+  provided on XIN.
 
 For example:
-	sckc: sckc@fffffe50 {
-		compatible = "atmel,sama5d3-pmc";
-		reg = <0xfffffe50 0x4>
-		#size-cells = <0>;
-		#address-cells = <1>;
-
-		/* put at91 slow clocks here */
+	sckc@fffffe50 {
+		compatible = "atmel,at91sam9x5-sckc";
+		reg = <0xfffffe50 0x4>;
+		clocks = <&slow_xtal>;
+		#clock-cells = <0>;
 	};
 
 Power Management Controller (PMC):
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/7] clk: at91: modernize sckc binding
  2019-02-19 17:01 [PATCH 0/7] clk: at91: rework sckc bindings Alexandre Belloni
  2019-02-19 17:01 ` [PATCH 1/7] dt-bindings: clock: at91: new " Alexandre Belloni
@ 2019-02-19 17:01 ` Alexandre Belloni
  2019-04-25 18:43   ` Stephen Boyd
  2019-02-19 17:01 ` [PATCH 3/7] clk: at91: sckc: handle different RC startup time Alexandre Belloni
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: Alexandre Belloni @ 2019-02-19 17:01 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: devicetree, Alexandre Belloni, linux-kernel, Michael Turquette,
	Claudiu Beznea, linux-clk, linux-arm-kernel

Remove the need for child nodes in the sckc binding and register the whole
sckc tree (3 clocks in total) from the sckc node.

DT backward compatibility is kept by looking for properties in child nodes
when they are not present in the sckc node.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/clk/at91/sckc.c | 125 ++++++++++++----------------------------
 1 file changed, 36 insertions(+), 89 deletions(-)

diff --git a/drivers/clk/at91/sckc.c b/drivers/clk/at91/sckc.c
index ab6ecefc49ad..470aef586f57 100644
--- a/drivers/clk/at91/sckc.c
+++ b/drivers/clk/at91/sckc.c
@@ -152,28 +152,6 @@ at91_clk_register_slow_osc(void __iomem *sckcr,
 	return hw;
 }
 
-static void __init
-of_at91sam9x5_clk_slow_osc_setup(struct device_node *np, void __iomem *sckcr)
-{
-	struct clk_hw *hw;
-	const char *parent_name;
-	const char *name = np->name;
-	u32 startup;
-	bool bypass;
-
-	parent_name = of_clk_get_parent_name(np, 0);
-	of_property_read_string(np, "clock-output-names", &name);
-	of_property_read_u32(np, "atmel,startup-time-usec", &startup);
-	bypass = of_property_read_bool(np, "atmel,osc-bypass");
-
-	hw = at91_clk_register_slow_osc(sckcr, name, parent_name, startup,
-					 bypass);
-	if (IS_ERR(hw))
-		return;
-
-	of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw);
-}
-
 static unsigned long clk_slow_rc_osc_recalc_rate(struct clk_hw *hw,
 						 unsigned long parent_rate)
 {
@@ -266,28 +244,6 @@ at91_clk_register_slow_rc_osc(void __iomem *sckcr,
 	return hw;
 }
 
-static void __init
-of_at91sam9x5_clk_slow_rc_osc_setup(struct device_node *np, void __iomem *sckcr)
-{
-	struct clk_hw *hw;
-	u32 frequency = 0;
-	u32 accuracy = 0;
-	u32 startup = 0;
-	const char *name = np->name;
-
-	of_property_read_string(np, "clock-output-names", &name);
-	of_property_read_u32(np, "clock-frequency", &frequency);
-	of_property_read_u32(np, "clock-accuracy", &accuracy);
-	of_property_read_u32(np, "atmel,startup-time-usec", &startup);
-
-	hw = at91_clk_register_slow_rc_osc(sckcr, name, frequency, accuracy,
-					    startup);
-	if (IS_ERR(hw))
-		return;
-
-	of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw);
-}
-
 static int clk_sam9x5_slow_set_parent(struct clk_hw *hw, u8 index)
 {
 	struct clk_sam9x5_slow *slowck = to_clk_sam9x5_slow(hw);
@@ -365,64 +321,55 @@ at91_clk_register_sam9x5_slow(void __iomem *sckcr,
 	return hw;
 }
 
-static void __init
-of_at91sam9x5_clk_slow_setup(struct device_node *np, void __iomem *sckcr)
+static void __init of_at91sam9x5_sckc_setup(struct device_node *np)
 {
+	const char *parent_names[2] = { "slow_rc_osc", "slow_osc" };
+	void __iomem *regbase = of_iomap(np, 0);
+	struct device_node *child = NULL;
+	const char *xtal_name;
 	struct clk_hw *hw;
-	const char *parent_names[2];
-	unsigned int num_parents;
-	const char *name = np->name;
+	bool bypass;
 
-	num_parents = of_clk_get_parent_count(np);
-	if (num_parents == 0 || num_parents > 2)
+	if (!regbase)
 		return;
 
-	of_clk_parent_fill(np, parent_names, num_parents);
-
-	of_property_read_string(np, "clock-output-names", &name);
-
-	hw = at91_clk_register_sam9x5_slow(sckcr, name, parent_names,
-					    num_parents);
+	hw = at91_clk_register_slow_rc_osc(regbase, parent_names[0], 32768,
+					   50000000, 75);
 	if (IS_ERR(hw))
 		return;
 
-	of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw);
-}
+	xtal_name = of_clk_get_parent_name(np, 0);
+	if (!xtal_name) {
+		/* DT backward compatibility */
+		child = of_get_compatible_child(np, "atmel,at91sam9x5-clk-slow-osc");
+		if (!child)
+			return;
+
+		xtal_name = of_clk_get_parent_name(child, 0);
+		bypass = of_property_read_bool(child, "atmel,osc-bypass");
+
+		child =  of_get_compatible_child(np, "atmel,at91sam9x5-clk-slow");
+	} else {
+		bypass = of_property_read_bool(np, "atmel,osc-bypass");
+	}
 
-static const struct of_device_id sckc_clk_ids[] __initconst = {
-	/* Slow clock */
-	{
-		.compatible = "atmel,at91sam9x5-clk-slow-osc",
-		.data = of_at91sam9x5_clk_slow_osc_setup,
-	},
-	{
-		.compatible = "atmel,at91sam9x5-clk-slow-rc-osc",
-		.data = of_at91sam9x5_clk_slow_rc_osc_setup,
-	},
-	{
-		.compatible = "atmel,at91sam9x5-clk-slow",
-		.data = of_at91sam9x5_clk_slow_setup,
-	},
-	{ /*sentinel*/ }
-};
+	if (!xtal_name)
+		return;
 
-static void __init of_at91sam9x5_sckc_setup(struct device_node *np)
-{
-	struct device_node *childnp;
-	void (*clk_setup)(struct device_node *, void __iomem *);
-	const struct of_device_id *clk_id;
-	void __iomem *regbase = of_iomap(np, 0);
+	hw = at91_clk_register_slow_osc(regbase, parent_names[1], xtal_name,
+					1200000, bypass);
+	if (IS_ERR(hw))
+		return;
 
-	if (!regbase)
+	hw = at91_clk_register_sam9x5_slow(regbase, "slowck", parent_names, 2);
+	if (IS_ERR(hw))
 		return;
 
-	for_each_child_of_node(np, childnp) {
-		clk_id = of_match_node(sckc_clk_ids, childnp);
-		if (!clk_id)
-			continue;
-		clk_setup = clk_id->data;
-		clk_setup(childnp, regbase);
-	}
+	of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw);
+
+	/* DT backward compatibility */
+	if (child)
+		of_clk_add_hw_provider(child, of_clk_hw_simple_get, hw);
 }
 CLK_OF_DECLARE(at91sam9x5_clk_sckc, "atmel,at91sam9x5-sckc",
 	       of_at91sam9x5_sckc_setup);
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 3/7] clk: at91: sckc: handle different RC startup time
  2019-02-19 17:01 [PATCH 0/7] clk: at91: rework sckc bindings Alexandre Belloni
  2019-02-19 17:01 ` [PATCH 1/7] dt-bindings: clock: at91: new " Alexandre Belloni
  2019-02-19 17:01 ` [PATCH 2/7] clk: at91: modernize sckc binding Alexandre Belloni
@ 2019-02-19 17:01 ` Alexandre Belloni
  2019-04-25 18:43   ` Stephen Boyd
  2019-02-19 17:01 ` [PATCH 4/7] ARM: dts: at91: at91sam9x5: switch to new sckc bindings Alexandre Belloni
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: Alexandre Belloni @ 2019-02-19 17:01 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: devicetree, Alexandre Belloni, linux-kernel, Michael Turquette,
	Claudiu Beznea, linux-clk, linux-arm-kernel

The sama5d3 slow RC oscillator as a different startup time than all the
previous SoCs. Handle that using its own compatible.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/clk/at91/sckc.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/at91/sckc.c b/drivers/clk/at91/sckc.c
index 470aef586f57..e76b1d64e905 100644
--- a/drivers/clk/at91/sckc.c
+++ b/drivers/clk/at91/sckc.c
@@ -321,7 +321,8 @@ at91_clk_register_sam9x5_slow(void __iomem *sckcr,
 	return hw;
 }
 
-static void __init of_at91sam9x5_sckc_setup(struct device_node *np)
+static void __init at91sam9x5_sckc_register(struct device_node *np,
+					    unsigned int rc_osc_startup_us)
 {
 	const char *parent_names[2] = { "slow_rc_osc", "slow_osc" };
 	void __iomem *regbase = of_iomap(np, 0);
@@ -334,7 +335,7 @@ static void __init of_at91sam9x5_sckc_setup(struct device_node *np)
 		return;
 
 	hw = at91_clk_register_slow_rc_osc(regbase, parent_names[0], 32768,
-					   50000000, 75);
+					   50000000, rc_osc_startup_us);
 	if (IS_ERR(hw))
 		return;
 
@@ -371,9 +372,21 @@ static void __init of_at91sam9x5_sckc_setup(struct device_node *np)
 	if (child)
 		of_clk_add_hw_provider(child, of_clk_hw_simple_get, hw);
 }
+
+static void __init of_at91sam9x5_sckc_setup(struct device_node *np)
+{
+	at91sam9x5_sckc_register(np, 75);
+}
 CLK_OF_DECLARE(at91sam9x5_clk_sckc, "atmel,at91sam9x5-sckc",
 	       of_at91sam9x5_sckc_setup);
 
+static void __init of_sama5d3_sckc_setup(struct device_node *np)
+{
+	at91sam9x5_sckc_register(np, 500);
+}
+CLK_OF_DECLARE(sama5d3_clk_sckc, "atmel,sama5d3-sckc",
+	       of_sama5d3_sckc_setup);
+
 static int clk_sama5d4_slow_osc_prepare(struct clk_hw *hw)
 {
 	struct clk_sama5d4_slow_osc *osc = to_clk_sama5d4_slow_osc(hw);
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 4/7] ARM: dts: at91: at91sam9x5: switch to new sckc bindings
  2019-02-19 17:01 [PATCH 0/7] clk: at91: rework sckc bindings Alexandre Belloni
                   ` (2 preceding siblings ...)
  2019-02-19 17:01 ` [PATCH 3/7] clk: at91: sckc: handle different RC startup time Alexandre Belloni
@ 2019-02-19 17:01 ` Alexandre Belloni
  2019-02-19 17:01 ` [PATCH 5/7] ARM: dts: at91: at91sam9g45: " Alexandre Belloni
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Alexandre Belloni @ 2019-02-19 17:01 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: devicetree, Alexandre Belloni, linux-kernel, Michael Turquette,
	Claudiu Beznea, linux-clk, linux-arm-kernel

Remove the child nodes of the sckc as they are not necessary anymore.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 arch/arm/boot/dts/at91sam9x5.dtsi | 23 +++--------------------
 1 file changed, 3 insertions(+), 20 deletions(-)

diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
index 07443a387a8f..ff50f49842f4 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -148,28 +148,11 @@
 				clocks = <&pmc PMC_TYPE_CORE PMC_MCK>;
 			};
 
-			sckc@fffffe50 {
+			clk32k: sckc@fffffe50 {
 				compatible = "atmel,at91sam9x5-sckc";
 				reg = <0xfffffe50 0x4>;
-
-				slow_osc: slow_osc {
-					compatible = "atmel,at91sam9x5-clk-slow-osc";
-					#clock-cells = <0>;
-					clocks = <&slow_xtal>;
-				};
-
-				slow_rc_osc: slow_rc_osc {
-					compatible = "atmel,at91sam9x5-clk-slow-rc-osc";
-					#clock-cells = <0>;
-					clock-frequency = <32768>;
-					clock-accuracy = <50000000>;
-				};
-
-				clk32k: slck {
-					compatible = "atmel,at91sam9x5-clk-slow";
-					#clock-cells = <0>;
-					clocks = <&slow_rc_osc>, <&slow_osc>;
-				};
+				clocks = <&slow_xtal>;
+				#clock-cells = <0>;
 			};
 
 			tcb0: timer@f8008000 {
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 5/7] ARM: dts: at91: at91sam9g45: switch to new sckc bindings
  2019-02-19 17:01 [PATCH 0/7] clk: at91: rework sckc bindings Alexandre Belloni
                   ` (3 preceding siblings ...)
  2019-02-19 17:01 ` [PATCH 4/7] ARM: dts: at91: at91sam9x5: switch to new sckc bindings Alexandre Belloni
@ 2019-02-19 17:01 ` Alexandre Belloni
  2019-02-19 17:01 ` [PATCH 6/7] ARM: dts: at91: at91sam9rl: " Alexandre Belloni
  2019-02-19 17:02 ` [PATCH 7/7] ARM: dts: at91: sama5d3: " Alexandre Belloni
  6 siblings, 0 replies; 12+ messages in thread
From: Alexandre Belloni @ 2019-02-19 17:01 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: devicetree, Alexandre Belloni, linux-kernel, Michael Turquette,
	Claudiu Beznea, linux-clk, linux-arm-kernel

Remove the child nodes of the sckc as they are not necessary anymore.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 arch/arm/boot/dts/at91sam9g45.dtsi | 25 +++----------------------
 1 file changed, 3 insertions(+), 22 deletions(-)

diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index d16db1fa7e15..74a011077d54 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -1257,30 +1257,11 @@
 				};
 			};
 
-			sckc@fffffd50 {
+			clk32k: sckc@fffffd50 {
 				compatible = "atmel,at91sam9x5-sckc";
 				reg = <0xfffffd50 0x4>;
-
-				slow_osc: slow_osc {
-					compatible = "atmel,at91sam9x5-clk-slow-osc";
-					#clock-cells = <0>;
-					atmel,startup-time-usec = <1200000>;
-					clocks = <&slow_xtal>;
-				};
-
-				slow_rc_osc: slow_rc_osc {
-					compatible = "atmel,at91sam9x5-clk-slow-rc-osc";
-					#clock-cells = <0>;
-					atmel,startup-time-usec = <75>;
-					clock-frequency = <32768>;
-					clock-accuracy = <50000000>;
-				};
-
-				clk32k: slck {
-					compatible = "atmel,at91sam9x5-clk-slow";
-					#clock-cells = <0>;
-					clocks = <&slow_rc_osc &slow_osc>;
-				};
+				clocks = <&slow_xtal>;
+				#clock-cells = <0>;
 			};
 
 			rtc@fffffd20 {
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 6/7] ARM: dts: at91: at91sam9rl: switch to new sckc bindings
  2019-02-19 17:01 [PATCH 0/7] clk: at91: rework sckc bindings Alexandre Belloni
                   ` (4 preceding siblings ...)
  2019-02-19 17:01 ` [PATCH 5/7] ARM: dts: at91: at91sam9g45: " Alexandre Belloni
@ 2019-02-19 17:01 ` Alexandre Belloni
  2019-02-19 17:02 ` [PATCH 7/7] ARM: dts: at91: sama5d3: " Alexandre Belloni
  6 siblings, 0 replies; 12+ messages in thread
From: Alexandre Belloni @ 2019-02-19 17:01 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: devicetree, Alexandre Belloni, linux-kernel, Michael Turquette,
	Claudiu Beznea, linux-clk, linux-arm-kernel

Remove the child nodes of the sckc as they are not necessary anymore.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 arch/arm/boot/dts/at91sam9rl.dtsi | 25 +++----------------------
 1 file changed, 3 insertions(+), 22 deletions(-)

diff --git a/arch/arm/boot/dts/at91sam9rl.dtsi b/arch/arm/boot/dts/at91sam9rl.dtsi
index 3862ff2f26e0..f5f09a30dd3f 100644
--- a/arch/arm/boot/dts/at91sam9rl.dtsi
+++ b/arch/arm/boot/dts/at91sam9rl.dtsi
@@ -867,30 +867,11 @@
 				status = "disabled";
 			};
 
-			sckc@fffffd50 {
+			clk32k: sckc@fffffd50 {
 				compatible = "atmel,at91sam9x5-sckc";
 				reg = <0xfffffd50 0x4>;
-
-				slow_osc: slow_osc {
-					compatible = "atmel,at91sam9x5-clk-slow-osc";
-					#clock-cells = <0>;
-					atmel,startup-time-usec = <1200000>;
-					clocks = <&slow_xtal>;
-				};
-
-				slow_rc_osc: slow_rc_osc {
-					compatible = "atmel,at91sam9x5-clk-slow-rc-osc";
-					#clock-cells = <0>;
-					atmel,startup-time-usec = <75>;
-					clock-frequency = <32768>;
-					clock-accuracy = <50000000>;
-				};
-
-				clk32k: slck {
-					compatible = "atmel,at91sam9x5-clk-slow";
-					#clock-cells = <0>;
-					clocks = <&slow_rc_osc &slow_osc>;
-				};
+				clocks = <&slow_xtal>;
+				#clock-cells = <0>;
 			};
 
 			rtc@fffffd20 {
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 7/7] ARM: dts: at91: sama5d3: switch to new sckc bindings
  2019-02-19 17:01 [PATCH 0/7] clk: at91: rework sckc bindings Alexandre Belloni
                   ` (5 preceding siblings ...)
  2019-02-19 17:01 ` [PATCH 6/7] ARM: dts: at91: at91sam9rl: " Alexandre Belloni
@ 2019-02-19 17:02 ` Alexandre Belloni
  6 siblings, 0 replies; 12+ messages in thread
From: Alexandre Belloni @ 2019-02-19 17:02 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: devicetree, Alexandre Belloni, linux-kernel, Michael Turquette,
	Claudiu Beznea, linux-clk, linux-arm-kernel

Remove the child nodes of the sckc as they are not necessary anymore.

Also, switch to the new atmel,sama5d3-sckc compatible string to use the
proper startup time for the RC oscillator (500 µs instead of 75).

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 arch/arm/boot/dts/at91-wb50n.dtsi |  2 +-
 arch/arm/boot/dts/sama5d3.dtsi    | 27 ++++-----------------------
 2 files changed, 5 insertions(+), 24 deletions(-)

diff --git a/arch/arm/boot/dts/at91-wb50n.dtsi b/arch/arm/boot/dts/at91-wb50n.dtsi
index 85692c8ef2b1..4ed8500a5cb8 100644
--- a/arch/arm/boot/dts/at91-wb50n.dtsi
+++ b/arch/arm/boot/dts/at91-wb50n.dtsi
@@ -42,7 +42,7 @@
 	clock-frequency = <12000000>;
 };
 
-&slow_osc {
+&clk32k {
 	atmel,osc-bypass;
 };
 
diff --git a/arch/arm/boot/dts/sama5d3.dtsi b/arch/arm/boot/dts/sama5d3.dtsi
index 1408fa4a62e4..05f6554d4177 100644
--- a/arch/arm/boot/dts/sama5d3.dtsi
+++ b/arch/arm/boot/dts/sama5d3.dtsi
@@ -1370,30 +1370,11 @@
 				status = "disabled";
 			};
 
-			sckc@fffffe50 {
-				compatible = "atmel,at91sam9x5-sckc";
+			clk32k: sckc@fffffe50 {
+				compatible = "atmel,sama5d3-sckc";
 				reg = <0xfffffe50 0x4>;
-
-				slow_rc_osc: slow_rc_osc {
-					compatible = "atmel,at91sam9x5-clk-slow-rc-osc";
-					#clock-cells = <0>;
-					clock-frequency = <32768>;
-					clock-accuracy = <50000000>;
-					atmel,startup-time-usec = <75>;
-				};
-
-				slow_osc: slow_osc {
-					compatible = "atmel,at91sam9x5-clk-slow-osc";
-					#clock-cells = <0>;
-					clocks = <&slow_xtal>;
-					atmel,startup-time-usec = <1200000>;
-				};
-
-				clk32k: slowck {
-					compatible = "atmel,at91sam9x5-clk-slow";
-					#clock-cells = <0>;
-					clocks = <&slow_rc_osc &slow_osc>;
-				};
+				clocks = <&slow_xtal>;
+				#clock-cells = <0>;
 			};
 
 			rtc@fffffeb0 {
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/7] dt-bindings: clock: at91: new sckc bindings
  2019-02-19 17:01 ` [PATCH 1/7] dt-bindings: clock: at91: new " Alexandre Belloni
@ 2019-03-25 21:49   ` Rob Herring
  2019-04-25 18:43   ` Stephen Boyd
  1 sibling, 0 replies; 12+ messages in thread
From: Rob Herring @ 2019-03-25 21:49 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: devicetree, Alexandre Belloni, Stephen Boyd, Michael Turquette,
	linux-kernel, linux-clk, Claudiu Beznea, linux-arm-kernel

On Tue, 19 Feb 2019 18:01:54 +0100, Alexandre Belloni wrote:
> Remove the need for child nodes in the sckc binding to be able to remove
> dtc warnings and have a more modern binding.
> 
> Also document optional properties.
> 
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---
>  .../devicetree/bindings/clock/at91-clock.txt  | 30 ++++++++-----------
>  1 file changed, 12 insertions(+), 18 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/7] dt-bindings: clock: at91: new sckc bindings
  2019-02-19 17:01 ` [PATCH 1/7] dt-bindings: clock: at91: new " Alexandre Belloni
  2019-03-25 21:49   ` Rob Herring
@ 2019-04-25 18:43   ` Stephen Boyd
  1 sibling, 0 replies; 12+ messages in thread
From: Stephen Boyd @ 2019-04-25 18:43 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: devicetree, Alexandre Belloni, Rob Herring, linux-kernel,
	Michael Turquette, Claudiu Beznea, linux-clk, linux-arm-kernel

Quoting Alexandre Belloni (2019-02-19 09:01:54)
> Remove the need for child nodes in the sckc binding to be able to remove
> dtc warnings and have a more modern binding.
> 
> Also document optional properties.
> 
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---

Applied to clk-next


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/7] clk: at91: modernize sckc binding
  2019-02-19 17:01 ` [PATCH 2/7] clk: at91: modernize sckc binding Alexandre Belloni
@ 2019-04-25 18:43   ` Stephen Boyd
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Boyd @ 2019-04-25 18:43 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: devicetree, Alexandre Belloni, linux-kernel, Michael Turquette,
	Claudiu Beznea, linux-clk, linux-arm-kernel

Quoting Alexandre Belloni (2019-02-19 09:01:55)
> Remove the need for child nodes in the sckc binding and register the whole
> sckc tree (3 clocks in total) from the sckc node.
> 
> DT backward compatibility is kept by looking for properties in child nodes
> when they are not present in the sckc node.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---

Applied to clk-next


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 3/7] clk: at91: sckc: handle different RC startup time
  2019-02-19 17:01 ` [PATCH 3/7] clk: at91: sckc: handle different RC startup time Alexandre Belloni
@ 2019-04-25 18:43   ` Stephen Boyd
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Boyd @ 2019-04-25 18:43 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: devicetree, Alexandre Belloni, linux-kernel, Michael Turquette,
	Claudiu Beznea, linux-clk, linux-arm-kernel

Quoting Alexandre Belloni (2019-02-19 09:01:56)
> The sama5d3 slow RC oscillator as a different startup time than all the
> previous SoCs. Handle that using its own compatible.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---

Applied to clk-next


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-04-25 18:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-19 17:01 [PATCH 0/7] clk: at91: rework sckc bindings Alexandre Belloni
2019-02-19 17:01 ` [PATCH 1/7] dt-bindings: clock: at91: new " Alexandre Belloni
2019-03-25 21:49   ` Rob Herring
2019-04-25 18:43   ` Stephen Boyd
2019-02-19 17:01 ` [PATCH 2/7] clk: at91: modernize sckc binding Alexandre Belloni
2019-04-25 18:43   ` Stephen Boyd
2019-02-19 17:01 ` [PATCH 3/7] clk: at91: sckc: handle different RC startup time Alexandre Belloni
2019-04-25 18:43   ` Stephen Boyd
2019-02-19 17:01 ` [PATCH 4/7] ARM: dts: at91: at91sam9x5: switch to new sckc bindings Alexandre Belloni
2019-02-19 17:01 ` [PATCH 5/7] ARM: dts: at91: at91sam9g45: " Alexandre Belloni
2019-02-19 17:01 ` [PATCH 6/7] ARM: dts: at91: at91sam9rl: " Alexandre Belloni
2019-02-19 17:02 ` [PATCH 7/7] ARM: dts: at91: sama5d3: " Alexandre Belloni

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