All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] dt-bindings: rtc: convert at91sam9 bindings to
@ 2022-03-03 14:06 ` Sergiu Moga
  0 siblings, 0 replies; 28+ messages in thread
From: Sergiu Moga @ 2022-03-03 14:06 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni, robh+dt, krzysztof.kozlowski,
	nicolas.ferre, claudiu.beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel, Sergiu Moga

This patch series addresses the conversion of the RTC binding for
Atmel/Microchip SoCs to Device Tree Schema format. It also changes
the node names from some of the "dtsi" files from "rtt" to the more
generic "rtc", while moving some of the specific properties from the
"dts" files to the "dtsi" files as well as adding this required property to
the "dtsi" files that were missing it.

Changes since v1:
- Add the "start-year" property as suggested by Alexandre Belloni
- Fix the errors generated from not using the more generic "rtc" node
name for the example of the binding, as suggested by Krzysztof Kozlowski
- Replace the "uint32-array" type of the "atmel,rtt-rtc-time-reg"
  property with "syscon", as suggested by Krzysztof Kozlowski
- Move the "atmel,rtt-rtc-time-reg" property from some of the
Atmel/Microchip board files to the SoC files
- Add the "atmel,rtt-rtc-time-reg" required property to the
Atmel/Microchip SoC files that were missing it
- Use the more generic "rtc" node name inside the Atmel/Microchip SoC
files that were using "rtt" instead
- Add SAMA7G5 compatible strings list to the DT binding


Sergiu Moga (5):
  ARM: dts: at91: Move rtt node properties from "dts" file to "dtsi"
    file
  ARM: dts: at91: Add the required `atmel,rtt-rtc-time-reg` property
  ARM: dts: at91: Use the generic "rtc" node name for the rtt IPs
  dt-bindings: rtc: convert at91sam9 bindings to json-schema
  dt-bindings: rtc: at91: Add SAMA7G5 compatible strings list

 .../bindings/rtc/atmel,at91sam9-rtc.txt       | 25 -------
 .../bindings/rtc/atmel,at91sam9-rtc.yaml      | 65 +++++++++++++++++++
 arch/arm/boot/dts/at91-sam9x60ek.dts          |  5 --
 arch/arm/boot/dts/at91-sama7g5ek.dts          |  4 --
 arch/arm/boot/dts/at91sam9260.dtsi            |  1 +
 arch/arm/boot/dts/at91sam9260ek.dts           |  1 -
 arch/arm/boot/dts/at91sam9261.dtsi            |  1 +
 arch/arm/boot/dts/at91sam9263.dtsi            |  2 +
 arch/arm/boot/dts/at91sam9g45.dtsi            |  1 +
 arch/arm/boot/dts/at91sam9m10g45ek.dts        |  1 -
 arch/arm/boot/dts/at91sam9rl.dtsi             |  1 +
 arch/arm/boot/dts/sam9x60.dtsi                |  3 +-
 arch/arm/boot/dts/sama7g5.dtsi                |  3 +-
 13 files changed, 75 insertions(+), 38 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
 create mode 100644 Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml

-- 
2.25.1


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

* [PATCH v2 0/5] dt-bindings: rtc: convert at91sam9 bindings to
@ 2022-03-03 14:06 ` Sergiu Moga
  0 siblings, 0 replies; 28+ messages in thread
From: Sergiu Moga @ 2022-03-03 14:06 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni, robh+dt, krzysztof.kozlowski,
	nicolas.ferre, claudiu.beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel, Sergiu Moga

This patch series addresses the conversion of the RTC binding for
Atmel/Microchip SoCs to Device Tree Schema format. It also changes
the node names from some of the "dtsi" files from "rtt" to the more
generic "rtc", while moving some of the specific properties from the
"dts" files to the "dtsi" files as well as adding this required property to
the "dtsi" files that were missing it.

Changes since v1:
- Add the "start-year" property as suggested by Alexandre Belloni
- Fix the errors generated from not using the more generic "rtc" node
name for the example of the binding, as suggested by Krzysztof Kozlowski
- Replace the "uint32-array" type of the "atmel,rtt-rtc-time-reg"
  property with "syscon", as suggested by Krzysztof Kozlowski
- Move the "atmel,rtt-rtc-time-reg" property from some of the
Atmel/Microchip board files to the SoC files
- Add the "atmel,rtt-rtc-time-reg" required property to the
Atmel/Microchip SoC files that were missing it
- Use the more generic "rtc" node name inside the Atmel/Microchip SoC
files that were using "rtt" instead
- Add SAMA7G5 compatible strings list to the DT binding


Sergiu Moga (5):
  ARM: dts: at91: Move rtt node properties from "dts" file to "dtsi"
    file
  ARM: dts: at91: Add the required `atmel,rtt-rtc-time-reg` property
  ARM: dts: at91: Use the generic "rtc" node name for the rtt IPs
  dt-bindings: rtc: convert at91sam9 bindings to json-schema
  dt-bindings: rtc: at91: Add SAMA7G5 compatible strings list

 .../bindings/rtc/atmel,at91sam9-rtc.txt       | 25 -------
 .../bindings/rtc/atmel,at91sam9-rtc.yaml      | 65 +++++++++++++++++++
 arch/arm/boot/dts/at91-sam9x60ek.dts          |  5 --
 arch/arm/boot/dts/at91-sama7g5ek.dts          |  4 --
 arch/arm/boot/dts/at91sam9260.dtsi            |  1 +
 arch/arm/boot/dts/at91sam9260ek.dts           |  1 -
 arch/arm/boot/dts/at91sam9261.dtsi            |  1 +
 arch/arm/boot/dts/at91sam9263.dtsi            |  2 +
 arch/arm/boot/dts/at91sam9g45.dtsi            |  1 +
 arch/arm/boot/dts/at91sam9m10g45ek.dts        |  1 -
 arch/arm/boot/dts/at91sam9rl.dtsi             |  1 +
 arch/arm/boot/dts/sam9x60.dtsi                |  3 +-
 arch/arm/boot/dts/sama7g5.dtsi                |  3 +-
 13 files changed, 75 insertions(+), 38 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
 create mode 100644 Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml

-- 
2.25.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] 28+ messages in thread

* [PATCH v2 1/5] ARM: dts: at91: Move rtt node properties from "dts" file to "dtsi" file
  2022-03-03 14:06 ` Sergiu Moga
@ 2022-03-03 14:06   ` Sergiu Moga
  -1 siblings, 0 replies; 28+ messages in thread
From: Sergiu Moga @ 2022-03-03 14:06 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni, robh+dt, krzysztof.kozlowski,
	nicolas.ferre, claudiu.beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel, Sergiu Moga

Move the properties of the rtt node of RTT IPs from the "dts" file to the
"dtsi" file, since it is more IP specific than it is board specific.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
---
 arch/arm/boot/dts/at91-sam9x60ek.dts   | 5 -----
 arch/arm/boot/dts/at91-sama7g5ek.dts   | 4 ----
 arch/arm/boot/dts/at91sam9260.dtsi     | 1 +
 arch/arm/boot/dts/at91sam9260ek.dts    | 1 -
 arch/arm/boot/dts/at91sam9g45.dtsi     | 1 +
 arch/arm/boot/dts/at91sam9m10g45ek.dts | 1 -
 arch/arm/boot/dts/sam9x60.dtsi         | 1 +
 arch/arm/boot/dts/sama7g5.dtsi         | 1 +
 8 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/arch/arm/boot/dts/at91-sam9x60ek.dts b/arch/arm/boot/dts/at91-sam9x60ek.dts
index b1068cca4228..97ff91346cb4 100644
--- a/arch/arm/boot/dts/at91-sam9x60ek.dts
+++ b/arch/arm/boot/dts/at91-sam9x60ek.dts
@@ -656,11 +656,6 @@ kernel@200000 {
 	};
 };
 
-&rtt {
-	atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
-	status = "okay";
-};
-
 &shutdown_controller {
 	debounce-delay-us = <976>;
 	status = "okay";
diff --git a/arch/arm/boot/dts/at91-sama7g5ek.dts b/arch/arm/boot/dts/at91-sama7g5ek.dts
index ccf9e224da78..b7416d9469e3 100644
--- a/arch/arm/boot/dts/at91-sama7g5ek.dts
+++ b/arch/arm/boot/dts/at91-sama7g5ek.dts
@@ -708,10 +708,6 @@ &pwm {
 	status = "disabled"; /* Conflict with leds. */
 };
 
-&rtt {
-	atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
-};
-
 &sdmmc0 {
 	bus-width = <8>;
 	non-removable;
diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi
index 7368347c9357..66d11c8f1a9b 100644
--- a/arch/arm/boot/dts/at91sam9260.dtsi
+++ b/arch/arm/boot/dts/at91sam9260.dtsi
@@ -713,6 +713,7 @@ rtc@fffffd20 {
 				reg = <0xfffffd20 0x10>;
 				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
 				clocks = <&pmc PMC_TYPE_CORE PMC_SLOW>;
+				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
 				status = "disabled";
 			};
 
diff --git a/arch/arm/boot/dts/at91sam9260ek.dts b/arch/arm/boot/dts/at91sam9260ek.dts
index ce96345d28a3..6932dab42f2e 100644
--- a/arch/arm/boot/dts/at91sam9260ek.dts
+++ b/arch/arm/boot/dts/at91sam9260ek.dts
@@ -118,7 +118,6 @@ shdwc@fffffd10 {
 			};
 
 			rtc@fffffd20 {
-				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
 				status = "okay";
 			};
 
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index 2ab730fd6472..fd308e2c15e8 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -929,6 +929,7 @@ rtc@fffffd20 {
 				reg = <0xfffffd20 0x10>;
 				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
 				clocks = <&clk32k>;
+				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
 				status = "disabled";
 			};
 
diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
index b6256a20fbc7..07bfa8ef715d 100644
--- a/arch/arm/boot/dts/at91sam9m10g45ek.dts
+++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
@@ -220,7 +220,6 @@ pwm0: pwm@fffb8000 {
 			};
 
 			rtc@fffffd20 {
-				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
 				status = "okay";
 			};
 
diff --git a/arch/arm/boot/dts/sam9x60.dtsi b/arch/arm/boot/dts/sam9x60.dtsi
index ec45ced3cde6..57ba47c54043 100644
--- a/arch/arm/boot/dts/sam9x60.dtsi
+++ b/arch/arm/boot/dts/sam9x60.dtsi
@@ -693,6 +693,7 @@ rtt: rtt@fffffe20 {
 				reg = <0xfffffe20 0x20>;
 				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
 				clocks = <&clk32k 0>;
+				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
 			};
 
 			pit: timer@fffffe40 {
diff --git a/arch/arm/boot/dts/sama7g5.dtsi b/arch/arm/boot/dts/sama7g5.dtsi
index eddcfbf4d223..1530d88ce80f 100644
--- a/arch/arm/boot/dts/sama7g5.dtsi
+++ b/arch/arm/boot/dts/sama7g5.dtsi
@@ -138,6 +138,7 @@ rtt: rtt@e001d020 {
 			reg = <0xe001d020 0x30>;
 			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clk32k 0>;
+			atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
 		};
 
 		clk32k: clock-controller@e001d050 {
-- 
2.25.1


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

* [PATCH v2 1/5] ARM: dts: at91: Move rtt node properties from "dts" file to "dtsi" file
@ 2022-03-03 14:06   ` Sergiu Moga
  0 siblings, 0 replies; 28+ messages in thread
From: Sergiu Moga @ 2022-03-03 14:06 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni, robh+dt, krzysztof.kozlowski,
	nicolas.ferre, claudiu.beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel, Sergiu Moga

Move the properties of the rtt node of RTT IPs from the "dts" file to the
"dtsi" file, since it is more IP specific than it is board specific.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
---
 arch/arm/boot/dts/at91-sam9x60ek.dts   | 5 -----
 arch/arm/boot/dts/at91-sama7g5ek.dts   | 4 ----
 arch/arm/boot/dts/at91sam9260.dtsi     | 1 +
 arch/arm/boot/dts/at91sam9260ek.dts    | 1 -
 arch/arm/boot/dts/at91sam9g45.dtsi     | 1 +
 arch/arm/boot/dts/at91sam9m10g45ek.dts | 1 -
 arch/arm/boot/dts/sam9x60.dtsi         | 1 +
 arch/arm/boot/dts/sama7g5.dtsi         | 1 +
 8 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/arch/arm/boot/dts/at91-sam9x60ek.dts b/arch/arm/boot/dts/at91-sam9x60ek.dts
index b1068cca4228..97ff91346cb4 100644
--- a/arch/arm/boot/dts/at91-sam9x60ek.dts
+++ b/arch/arm/boot/dts/at91-sam9x60ek.dts
@@ -656,11 +656,6 @@ kernel@200000 {
 	};
 };
 
-&rtt {
-	atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
-	status = "okay";
-};
-
 &shutdown_controller {
 	debounce-delay-us = <976>;
 	status = "okay";
diff --git a/arch/arm/boot/dts/at91-sama7g5ek.dts b/arch/arm/boot/dts/at91-sama7g5ek.dts
index ccf9e224da78..b7416d9469e3 100644
--- a/arch/arm/boot/dts/at91-sama7g5ek.dts
+++ b/arch/arm/boot/dts/at91-sama7g5ek.dts
@@ -708,10 +708,6 @@ &pwm {
 	status = "disabled"; /* Conflict with leds. */
 };
 
-&rtt {
-	atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
-};
-
 &sdmmc0 {
 	bus-width = <8>;
 	non-removable;
diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi
index 7368347c9357..66d11c8f1a9b 100644
--- a/arch/arm/boot/dts/at91sam9260.dtsi
+++ b/arch/arm/boot/dts/at91sam9260.dtsi
@@ -713,6 +713,7 @@ rtc@fffffd20 {
 				reg = <0xfffffd20 0x10>;
 				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
 				clocks = <&pmc PMC_TYPE_CORE PMC_SLOW>;
+				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
 				status = "disabled";
 			};
 
diff --git a/arch/arm/boot/dts/at91sam9260ek.dts b/arch/arm/boot/dts/at91sam9260ek.dts
index ce96345d28a3..6932dab42f2e 100644
--- a/arch/arm/boot/dts/at91sam9260ek.dts
+++ b/arch/arm/boot/dts/at91sam9260ek.dts
@@ -118,7 +118,6 @@ shdwc@fffffd10 {
 			};
 
 			rtc@fffffd20 {
-				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
 				status = "okay";
 			};
 
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index 2ab730fd6472..fd308e2c15e8 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -929,6 +929,7 @@ rtc@fffffd20 {
 				reg = <0xfffffd20 0x10>;
 				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
 				clocks = <&clk32k>;
+				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
 				status = "disabled";
 			};
 
diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
index b6256a20fbc7..07bfa8ef715d 100644
--- a/arch/arm/boot/dts/at91sam9m10g45ek.dts
+++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
@@ -220,7 +220,6 @@ pwm0: pwm@fffb8000 {
 			};
 
 			rtc@fffffd20 {
-				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
 				status = "okay";
 			};
 
diff --git a/arch/arm/boot/dts/sam9x60.dtsi b/arch/arm/boot/dts/sam9x60.dtsi
index ec45ced3cde6..57ba47c54043 100644
--- a/arch/arm/boot/dts/sam9x60.dtsi
+++ b/arch/arm/boot/dts/sam9x60.dtsi
@@ -693,6 +693,7 @@ rtt: rtt@fffffe20 {
 				reg = <0xfffffe20 0x20>;
 				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
 				clocks = <&clk32k 0>;
+				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
 			};
 
 			pit: timer@fffffe40 {
diff --git a/arch/arm/boot/dts/sama7g5.dtsi b/arch/arm/boot/dts/sama7g5.dtsi
index eddcfbf4d223..1530d88ce80f 100644
--- a/arch/arm/boot/dts/sama7g5.dtsi
+++ b/arch/arm/boot/dts/sama7g5.dtsi
@@ -138,6 +138,7 @@ rtt: rtt@e001d020 {
 			reg = <0xe001d020 0x30>;
 			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clk32k 0>;
+			atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
 		};
 
 		clk32k: clock-controller@e001d050 {
-- 
2.25.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] 28+ messages in thread

* [PATCH v2 2/5] ARM: dts: at91: Add the required `atmel,rtt-rtc-time-reg` property
  2022-03-03 14:06 ` Sergiu Moga
@ 2022-03-03 14:06   ` Sergiu Moga
  -1 siblings, 0 replies; 28+ messages in thread
From: Sergiu Moga @ 2022-03-03 14:06 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni, robh+dt, krzysztof.kozlowski,
	nicolas.ferre, claudiu.beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel, Sergiu Moga

Add the required `atmel,rtt-rtc-time-reg` property to the `rtt` nodes
of the RTT IPs.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
---
 arch/arm/boot/dts/at91sam9261.dtsi | 1 +
 arch/arm/boot/dts/at91sam9263.dtsi | 2 ++
 arch/arm/boot/dts/at91sam9rl.dtsi  | 1 +
 3 files changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/at91sam9261.dtsi b/arch/arm/boot/dts/at91sam9261.dtsi
index 7adc36ca8a46..ac50b164138a 100644
--- a/arch/arm/boot/dts/at91sam9261.dtsi
+++ b/arch/arm/boot/dts/at91sam9261.dtsi
@@ -627,6 +627,7 @@ rtc@fffffd20 {
 				reg = <0xfffffd20 0x10>;
 				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
 				clocks = <&slow_xtal>;
+				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
 				status = "disabled";
 			};
 
diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi
index fe45d96239c9..6be91df2a8b1 100644
--- a/arch/arm/boot/dts/at91sam9263.dtsi
+++ b/arch/arm/boot/dts/at91sam9263.dtsi
@@ -734,6 +734,7 @@ rtc@fffffd20 {
 				reg = <0xfffffd20 0x10>;
 				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
 				clocks = <&slow_xtal>;
+				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
 				status = "disabled";
 			};
 
@@ -742,6 +743,7 @@ rtc@fffffd50 {
 				reg = <0xfffffd50 0x10>;
 				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
 				clocks = <&slow_xtal>;
+				atmel,rtt-rtc-time-reg = <&gpbr 0x4>;
 				status = "disabled";
 			};
 
diff --git a/arch/arm/boot/dts/at91sam9rl.dtsi b/arch/arm/boot/dts/at91sam9rl.dtsi
index 730d1182c73e..80e41f115216 100644
--- a/arch/arm/boot/dts/at91sam9rl.dtsi
+++ b/arch/arm/boot/dts/at91sam9rl.dtsi
@@ -805,6 +805,7 @@ rtc@fffffd20 {
 				reg = <0xfffffd20 0x10>;
 				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
 				clocks = <&clk32k>;
+				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
 				status = "disabled";
 			};
 
-- 
2.25.1


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

* [PATCH v2 2/5] ARM: dts: at91: Add the required `atmel, rtt-rtc-time-reg` property
@ 2022-03-03 14:06   ` Sergiu Moga
  0 siblings, 0 replies; 28+ messages in thread
From: Sergiu Moga @ 2022-03-03 14:06 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni, robh+dt, krzysztof.kozlowski,
	nicolas.ferre, claudiu.beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel, Sergiu Moga

Add the required `atmel,rtt-rtc-time-reg` property to the `rtt` nodes
of the RTT IPs.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
---
 arch/arm/boot/dts/at91sam9261.dtsi | 1 +
 arch/arm/boot/dts/at91sam9263.dtsi | 2 ++
 arch/arm/boot/dts/at91sam9rl.dtsi  | 1 +
 3 files changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/at91sam9261.dtsi b/arch/arm/boot/dts/at91sam9261.dtsi
index 7adc36ca8a46..ac50b164138a 100644
--- a/arch/arm/boot/dts/at91sam9261.dtsi
+++ b/arch/arm/boot/dts/at91sam9261.dtsi
@@ -627,6 +627,7 @@ rtc@fffffd20 {
 				reg = <0xfffffd20 0x10>;
 				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
 				clocks = <&slow_xtal>;
+				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
 				status = "disabled";
 			};
 
diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi
index fe45d96239c9..6be91df2a8b1 100644
--- a/arch/arm/boot/dts/at91sam9263.dtsi
+++ b/arch/arm/boot/dts/at91sam9263.dtsi
@@ -734,6 +734,7 @@ rtc@fffffd20 {
 				reg = <0xfffffd20 0x10>;
 				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
 				clocks = <&slow_xtal>;
+				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
 				status = "disabled";
 			};
 
@@ -742,6 +743,7 @@ rtc@fffffd50 {
 				reg = <0xfffffd50 0x10>;
 				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
 				clocks = <&slow_xtal>;
+				atmel,rtt-rtc-time-reg = <&gpbr 0x4>;
 				status = "disabled";
 			};
 
diff --git a/arch/arm/boot/dts/at91sam9rl.dtsi b/arch/arm/boot/dts/at91sam9rl.dtsi
index 730d1182c73e..80e41f115216 100644
--- a/arch/arm/boot/dts/at91sam9rl.dtsi
+++ b/arch/arm/boot/dts/at91sam9rl.dtsi
@@ -805,6 +805,7 @@ rtc@fffffd20 {
 				reg = <0xfffffd20 0x10>;
 				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
 				clocks = <&clk32k>;
+				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
 				status = "disabled";
 			};
 
-- 
2.25.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] 28+ messages in thread

* [PATCH v2 3/5] ARM: dts: at91: Use the generic "rtc" node name for the rtt IPs
  2022-03-03 14:06 ` Sergiu Moga
@ 2022-03-03 14:06   ` Sergiu Moga
  -1 siblings, 0 replies; 28+ messages in thread
From: Sergiu Moga @ 2022-03-03 14:06 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni, robh+dt, krzysztof.kozlowski,
	nicolas.ferre, claudiu.beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel, Sergiu Moga

As the DT specification recommends, the node names should be of a
generic nature. Thus, the most appropriate generic node name for
the at91 rtt IPs is the "rtc" node name.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
---
 arch/arm/boot/dts/sam9x60.dtsi | 2 +-
 arch/arm/boot/dts/sama7g5.dtsi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/sam9x60.dtsi b/arch/arm/boot/dts/sam9x60.dtsi
index 57ba47c54043..af7602cb65f7 100644
--- a/arch/arm/boot/dts/sam9x60.dtsi
+++ b/arch/arm/boot/dts/sam9x60.dtsi
@@ -688,7 +688,7 @@ shutdown_controller: shdwc@fffffe10 {
 				status = "disabled";
 			};
 
-			rtt: rtt@fffffe20 {
+			rtt: rtc@fffffe20 {
 				compatible = "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt";
 				reg = <0xfffffe20 0x20>;
 				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
diff --git a/arch/arm/boot/dts/sama7g5.dtsi b/arch/arm/boot/dts/sama7g5.dtsi
index 1530d88ce80f..87af6c680322 100644
--- a/arch/arm/boot/dts/sama7g5.dtsi
+++ b/arch/arm/boot/dts/sama7g5.dtsi
@@ -133,7 +133,7 @@ shdwc: shdwc@e001d010 {
 			status = "disabled";
 		};
 
-		rtt: rtt@e001d020 {
+		rtt: rtc@e001d020 {
 			compatible = "microchip,sama7g5-rtt", "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt";
 			reg = <0xe001d020 0x30>;
 			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
-- 
2.25.1


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

* [PATCH v2 3/5] ARM: dts: at91: Use the generic "rtc" node name for the rtt IPs
@ 2022-03-03 14:06   ` Sergiu Moga
  0 siblings, 0 replies; 28+ messages in thread
From: Sergiu Moga @ 2022-03-03 14:06 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni, robh+dt, krzysztof.kozlowski,
	nicolas.ferre, claudiu.beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel, Sergiu Moga

As the DT specification recommends, the node names should be of a
generic nature. Thus, the most appropriate generic node name for
the at91 rtt IPs is the "rtc" node name.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
---
 arch/arm/boot/dts/sam9x60.dtsi | 2 +-
 arch/arm/boot/dts/sama7g5.dtsi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/sam9x60.dtsi b/arch/arm/boot/dts/sam9x60.dtsi
index 57ba47c54043..af7602cb65f7 100644
--- a/arch/arm/boot/dts/sam9x60.dtsi
+++ b/arch/arm/boot/dts/sam9x60.dtsi
@@ -688,7 +688,7 @@ shutdown_controller: shdwc@fffffe10 {
 				status = "disabled";
 			};
 
-			rtt: rtt@fffffe20 {
+			rtt: rtc@fffffe20 {
 				compatible = "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt";
 				reg = <0xfffffe20 0x20>;
 				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
diff --git a/arch/arm/boot/dts/sama7g5.dtsi b/arch/arm/boot/dts/sama7g5.dtsi
index 1530d88ce80f..87af6c680322 100644
--- a/arch/arm/boot/dts/sama7g5.dtsi
+++ b/arch/arm/boot/dts/sama7g5.dtsi
@@ -133,7 +133,7 @@ shdwc: shdwc@e001d010 {
 			status = "disabled";
 		};
 
-		rtt: rtt@e001d020 {
+		rtt: rtc@e001d020 {
 			compatible = "microchip,sama7g5-rtt", "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt";
 			reg = <0xe001d020 0x30>;
 			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
-- 
2.25.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] 28+ messages in thread

* [PATCH v2 4/5] dt-bindings: rtc: convert at91sam9 bindings to json-schema
  2022-03-03 14:06 ` Sergiu Moga
@ 2022-03-03 14:06   ` Sergiu Moga
  -1 siblings, 0 replies; 28+ messages in thread
From: Sergiu Moga @ 2022-03-03 14:06 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni, robh+dt, krzysztof.kozlowski,
	nicolas.ferre, claudiu.beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel, Sergiu Moga

Convert RTC binding for Atmel/Microchip SoCs to Device Tree Schema
format.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
---
 .../bindings/rtc/atmel,at91sam9-rtc.txt       | 25 --------
 .../bindings/rtc/atmel,at91sam9-rtc.yaml      | 61 +++++++++++++++++++
 2 files changed, 61 insertions(+), 25 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
 create mode 100644 Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml

diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
deleted file mode 100644
index 3f0e2a5950eb..000000000000
--- a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-Atmel AT91SAM9260 Real Time Timer
-
-Required properties:
-- compatible: should be one of the following:
-	- "atmel,at91sam9260-rtt"
-	- "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt"
-- reg: should encode the memory region of the RTT controller
-- interrupts: rtt alarm/event interrupt
-- clocks: should contain the 32 KHz slow clk that will drive the RTT block.
-- atmel,rtt-rtc-time-reg: should encode the GPBR register used to store
-	the time base when the RTT is used as an RTC.
-	The first cell should point to the GPBR node and the second one
-	encode the offset within the GPBR block (or in other words, the
-	GPBR register used to store the time base).
-
-
-Example:
-
-rtt@fffffd20 {
-	compatible = "atmel,at91sam9260-rtt";
-	reg = <0xfffffd20 0x10>;
-	interrupts = <1 4 7>;
-	clocks = <&clk32k>;
-	atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
-};
diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
new file mode 100644
index 000000000000..5a639c0ec2c0
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/atmel,at91sam9-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Atmel AT91 RTT Device Tree Bindings
+
+allOf:
+  - $ref: "rtc.yaml#"
+
+maintainers:
+  - Alexandre Belloni <alexandre.belloni@bootlin.com>
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - const: atmel,at91sam9260-rtt
+      - items:
+          - const: microchip,sam9x60-rtt
+          - const: atmel,at91sam9260-rtt
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  atmel,rtt-rtc-time-reg:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    description: |
+      Should encode the GPBR register used to store the time base when the
+      RTT is used as an RTC. The first cell should point to the GPBR node
+      and the second one encodes the offset within the GPBR block (or in
+      other words, the GPBR register used to store the time base).
+
+  start-year: true
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - atmel,rtt-rtc-time-reg
+
+additionalProperties: false
+
+examples:
+  - |
+    rtc@fffffd20 {
+        compatible = "atmel,at91sam9260-rtt";
+        reg = <0xfffffd20 0x10>;
+        interrupts = <1 4 7>;
+        clocks = <&clk32k>;
+        atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
+    };
-- 
2.25.1


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

* [PATCH v2 4/5] dt-bindings: rtc: convert at91sam9 bindings to json-schema
@ 2022-03-03 14:06   ` Sergiu Moga
  0 siblings, 0 replies; 28+ messages in thread
From: Sergiu Moga @ 2022-03-03 14:06 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni, robh+dt, krzysztof.kozlowski,
	nicolas.ferre, claudiu.beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel, Sergiu Moga

Convert RTC binding for Atmel/Microchip SoCs to Device Tree Schema
format.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
---
 .../bindings/rtc/atmel,at91sam9-rtc.txt       | 25 --------
 .../bindings/rtc/atmel,at91sam9-rtc.yaml      | 61 +++++++++++++++++++
 2 files changed, 61 insertions(+), 25 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
 create mode 100644 Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml

diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
deleted file mode 100644
index 3f0e2a5950eb..000000000000
--- a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-Atmel AT91SAM9260 Real Time Timer
-
-Required properties:
-- compatible: should be one of the following:
-	- "atmel,at91sam9260-rtt"
-	- "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt"
-- reg: should encode the memory region of the RTT controller
-- interrupts: rtt alarm/event interrupt
-- clocks: should contain the 32 KHz slow clk that will drive the RTT block.
-- atmel,rtt-rtc-time-reg: should encode the GPBR register used to store
-	the time base when the RTT is used as an RTC.
-	The first cell should point to the GPBR node and the second one
-	encode the offset within the GPBR block (or in other words, the
-	GPBR register used to store the time base).
-
-
-Example:
-
-rtt@fffffd20 {
-	compatible = "atmel,at91sam9260-rtt";
-	reg = <0xfffffd20 0x10>;
-	interrupts = <1 4 7>;
-	clocks = <&clk32k>;
-	atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
-};
diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
new file mode 100644
index 000000000000..5a639c0ec2c0
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/atmel,at91sam9-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Atmel AT91 RTT Device Tree Bindings
+
+allOf:
+  - $ref: "rtc.yaml#"
+
+maintainers:
+  - Alexandre Belloni <alexandre.belloni@bootlin.com>
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - const: atmel,at91sam9260-rtt
+      - items:
+          - const: microchip,sam9x60-rtt
+          - const: atmel,at91sam9260-rtt
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  atmel,rtt-rtc-time-reg:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    description: |
+      Should encode the GPBR register used to store the time base when the
+      RTT is used as an RTC. The first cell should point to the GPBR node
+      and the second one encodes the offset within the GPBR block (or in
+      other words, the GPBR register used to store the time base).
+
+  start-year: true
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - atmel,rtt-rtc-time-reg
+
+additionalProperties: false
+
+examples:
+  - |
+    rtc@fffffd20 {
+        compatible = "atmel,at91sam9260-rtt";
+        reg = <0xfffffd20 0x10>;
+        interrupts = <1 4 7>;
+        clocks = <&clk32k>;
+        atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
+    };
-- 
2.25.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] 28+ messages in thread

* [PATCH v2 5/5] dt-bindings: rtc: at91: Add SAMA7G5 compatible strings list
  2022-03-03 14:06 ` Sergiu Moga
@ 2022-03-03 14:06   ` Sergiu Moga
  -1 siblings, 0 replies; 28+ messages in thread
From: Sergiu Moga @ 2022-03-03 14:06 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni, robh+dt, krzysztof.kozlowski,
	nicolas.ferre, claudiu.beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel, Sergiu Moga

Add compatible strings list for SAMA7G5.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
---
 Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
index 5a639c0ec2c0..d87aa67b442f 100644
--- a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
+++ b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
@@ -21,6 +21,10 @@ properties:
       - items:
           - const: microchip,sam9x60-rtt
           - const: atmel,at91sam9260-rtt
+      - items:
+          - const: microchip,sama7g5-rtt
+          - const: microchip,sam9x60-rtt
+          - const: atmel,at91sam9260-rtt
 
   reg:
     maxItems: 1
-- 
2.25.1


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

* [PATCH v2 5/5] dt-bindings: rtc: at91: Add SAMA7G5 compatible strings list
@ 2022-03-03 14:06   ` Sergiu Moga
  0 siblings, 0 replies; 28+ messages in thread
From: Sergiu Moga @ 2022-03-03 14:06 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni, robh+dt, krzysztof.kozlowski,
	nicolas.ferre, claudiu.beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel, Sergiu Moga

Add compatible strings list for SAMA7G5.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
---
 Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
index 5a639c0ec2c0..d87aa67b442f 100644
--- a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
+++ b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
@@ -21,6 +21,10 @@ properties:
       - items:
           - const: microchip,sam9x60-rtt
           - const: atmel,at91sam9260-rtt
+      - items:
+          - const: microchip,sama7g5-rtt
+          - const: microchip,sam9x60-rtt
+          - const: atmel,at91sam9260-rtt
 
   reg:
     maxItems: 1
-- 
2.25.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] 28+ messages in thread

* Re: [PATCH v2 4/5] dt-bindings: rtc: convert at91sam9 bindings to json-schema
  2022-03-03 14:06   ` Sergiu Moga
@ 2022-03-03 14:21     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 28+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-03 14:21 UTC (permalink / raw)
  To: Sergiu Moga, a.zummo, alexandre.belloni, robh+dt, nicolas.ferre,
	claudiu.beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel

On 03/03/2022 15:06, Sergiu Moga wrote:
> Convert RTC binding for Atmel/Microchip SoCs to Device Tree Schema
> format.
> 
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
> ---
>  .../bindings/rtc/atmel,at91sam9-rtc.txt       | 25 --------
>  .../bindings/rtc/atmel,at91sam9-rtc.yaml      | 61 +++++++++++++++++++
>  2 files changed, 61 insertions(+), 25 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
>  create mode 100644 Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
> 
> diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
> deleted file mode 100644
> index 3f0e2a5950eb..000000000000
> --- a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -Atmel AT91SAM9260 Real Time Timer
> -
> -Required properties:
> -- compatible: should be one of the following:
> -	- "atmel,at91sam9260-rtt"
> -	- "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt"
> -- reg: should encode the memory region of the RTT controller
> -- interrupts: rtt alarm/event interrupt
> -- clocks: should contain the 32 KHz slow clk that will drive the RTT block.
> -- atmel,rtt-rtc-time-reg: should encode the GPBR register used to store
> -	the time base when the RTT is used as an RTC.
> -	The first cell should point to the GPBR node and the second one
> -	encode the offset within the GPBR block (or in other words, the
> -	GPBR register used to store the time base).
> -
> -
> -Example:
> -
> -rtt@fffffd20 {
> -	compatible = "atmel,at91sam9260-rtt";
> -	reg = <0xfffffd20 0x10>;
> -	interrupts = <1 4 7>;
> -	clocks = <&clk32k>;
> -	atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
> -};
> diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
> new file mode 100644
> index 000000000000..5a639c0ec2c0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
> @@ -0,0 +1,61 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/rtc/atmel,at91sam9-rtc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Atmel AT91 RTT Device Tree Bindings
> +
> +allOf:
> +  - $ref: "rtc.yaml#"
> +
> +maintainers:
> +  - Alexandre Belloni <alexandre.belloni@bootlin.com>
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - const: atmel,at91sam9260-rtt
> +      - items:
> +          - const: microchip,sam9x60-rtt
> +          - const: atmel,at91sam9260-rtt
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  atmel,rtt-rtc-time-reg:
> +    $ref: /schemas/types.yaml#/definitions/phandle-array
> +    description: |
> +      Should encode the GPBR register used to store the time base when the
> +      RTT is used as an RTC. The first cell should point to the GPBR node
> +      and the second one encodes the offset within the GPBR block (or in
> +      other words, the GPBR register used to store the time base).

Instead of describing cells here, you need items with description. I
gave you the example last time, so instead of ignoring it, please
implement it.

> +
> +  start-year: true
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - atmel,rtt-rtc-time-reg
> +
> +additionalProperties: false

This will disallow any other properties mentioned in rtc.yaml, e.g.
popular wakeup-source. Is it really intended? If core schema is
extended, the driver would need to be updated to support new features.
Any reason to choose such approach? The other way is to remove
start-year and have here unevaluatedProperties.

> +
> +examples:
> +  - |
> +    rtc@fffffd20 {
> +        compatible = "atmel,at91sam9260-rtt";
> +        reg = <0xfffffd20 0x10>;
> +        interrupts = <1 4 7>;

At least one number above looks like known macro, so use it.

> +        clocks = <&clk32k>;
> +        atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
> +    };


Best regards,
Krzysztof

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

* Re: [PATCH v2 4/5] dt-bindings: rtc: convert at91sam9 bindings to json-schema
@ 2022-03-03 14:21     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 28+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-03 14:21 UTC (permalink / raw)
  To: Sergiu Moga, a.zummo, alexandre.belloni, robh+dt, nicolas.ferre,
	claudiu.beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel

On 03/03/2022 15:06, Sergiu Moga wrote:
> Convert RTC binding for Atmel/Microchip SoCs to Device Tree Schema
> format.
> 
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
> ---
>  .../bindings/rtc/atmel,at91sam9-rtc.txt       | 25 --------
>  .../bindings/rtc/atmel,at91sam9-rtc.yaml      | 61 +++++++++++++++++++
>  2 files changed, 61 insertions(+), 25 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
>  create mode 100644 Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
> 
> diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
> deleted file mode 100644
> index 3f0e2a5950eb..000000000000
> --- a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -Atmel AT91SAM9260 Real Time Timer
> -
> -Required properties:
> -- compatible: should be one of the following:
> -	- "atmel,at91sam9260-rtt"
> -	- "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt"
> -- reg: should encode the memory region of the RTT controller
> -- interrupts: rtt alarm/event interrupt
> -- clocks: should contain the 32 KHz slow clk that will drive the RTT block.
> -- atmel,rtt-rtc-time-reg: should encode the GPBR register used to store
> -	the time base when the RTT is used as an RTC.
> -	The first cell should point to the GPBR node and the second one
> -	encode the offset within the GPBR block (or in other words, the
> -	GPBR register used to store the time base).
> -
> -
> -Example:
> -
> -rtt@fffffd20 {
> -	compatible = "atmel,at91sam9260-rtt";
> -	reg = <0xfffffd20 0x10>;
> -	interrupts = <1 4 7>;
> -	clocks = <&clk32k>;
> -	atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
> -};
> diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
> new file mode 100644
> index 000000000000..5a639c0ec2c0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
> @@ -0,0 +1,61 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/rtc/atmel,at91sam9-rtc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Atmel AT91 RTT Device Tree Bindings
> +
> +allOf:
> +  - $ref: "rtc.yaml#"
> +
> +maintainers:
> +  - Alexandre Belloni <alexandre.belloni@bootlin.com>
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - const: atmel,at91sam9260-rtt
> +      - items:
> +          - const: microchip,sam9x60-rtt
> +          - const: atmel,at91sam9260-rtt
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  atmel,rtt-rtc-time-reg:
> +    $ref: /schemas/types.yaml#/definitions/phandle-array
> +    description: |
> +      Should encode the GPBR register used to store the time base when the
> +      RTT is used as an RTC. The first cell should point to the GPBR node
> +      and the second one encodes the offset within the GPBR block (or in
> +      other words, the GPBR register used to store the time base).

Instead of describing cells here, you need items with description. I
gave you the example last time, so instead of ignoring it, please
implement it.

> +
> +  start-year: true
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - atmel,rtt-rtc-time-reg
> +
> +additionalProperties: false

This will disallow any other properties mentioned in rtc.yaml, e.g.
popular wakeup-source. Is it really intended? If core schema is
extended, the driver would need to be updated to support new features.
Any reason to choose such approach? The other way is to remove
start-year and have here unevaluatedProperties.

> +
> +examples:
> +  - |
> +    rtc@fffffd20 {
> +        compatible = "atmel,at91sam9260-rtt";
> +        reg = <0xfffffd20 0x10>;
> +        interrupts = <1 4 7>;

At least one number above looks like known macro, so use it.

> +        clocks = <&clk32k>;
> +        atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
> +    };


Best regards,
Krzysztof

_______________________________________________
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] 28+ messages in thread

* Re: [PATCH v2 3/5] ARM: dts: at91: Use the generic "rtc" node name for the rtt IPs
  2022-03-03 14:06   ` Sergiu Moga
@ 2022-03-03 14:47     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 28+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-03 14:47 UTC (permalink / raw)
  To: Sergiu Moga, a.zummo, alexandre.belloni, robh+dt, nicolas.ferre,
	claudiu.beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel

On 03/03/2022 15:06, Sergiu Moga wrote:
> As the DT specification recommends, the node names should be of a
> generic nature. Thus, the most appropriate generic node name for
> the at91 rtt IPs is the "rtc" node name.
> 
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
> ---
>  arch/arm/boot/dts/sam9x60.dtsi | 2 +-
>  arch/arm/boot/dts/sama7g5.dtsi | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof

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

* Re: [PATCH v2 3/5] ARM: dts: at91: Use the generic "rtc" node name for the rtt IPs
@ 2022-03-03 14:47     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 28+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-03 14:47 UTC (permalink / raw)
  To: Sergiu Moga, a.zummo, alexandre.belloni, robh+dt, nicolas.ferre,
	claudiu.beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel

On 03/03/2022 15:06, Sergiu Moga wrote:
> As the DT specification recommends, the node names should be of a
> generic nature. Thus, the most appropriate generic node name for
> the at91 rtt IPs is the "rtc" node name.
> 
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
> ---
>  arch/arm/boot/dts/sam9x60.dtsi | 2 +-
>  arch/arm/boot/dts/sama7g5.dtsi | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof

_______________________________________________
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] 28+ messages in thread

* Re: [PATCH v2 5/5] dt-bindings: rtc: at91: Add SAMA7G5 compatible strings list
  2022-03-03 14:06   ` Sergiu Moga
@ 2022-03-03 14:48     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 28+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-03 14:48 UTC (permalink / raw)
  To: Sergiu Moga, a.zummo, alexandre.belloni, robh+dt, nicolas.ferre,
	claudiu.beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel

On 03/03/2022 15:06, Sergiu Moga wrote:
> Add compatible strings list for SAMA7G5.
> 
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
> ---
>  Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/d


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof

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

* Re: [PATCH v2 5/5] dt-bindings: rtc: at91: Add SAMA7G5 compatible strings list
@ 2022-03-03 14:48     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 28+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-03 14:48 UTC (permalink / raw)
  To: Sergiu Moga, a.zummo, alexandre.belloni, robh+dt, nicolas.ferre,
	claudiu.beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel

On 03/03/2022 15:06, Sergiu Moga wrote:
> Add compatible strings list for SAMA7G5.
> 
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
> ---
>  Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/d


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof

_______________________________________________
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] 28+ messages in thread

* Re: [PATCH v2 1/5] ARM: dts: at91: Move rtt node properties from "dts" file to "dtsi" file
  2022-03-03 14:06   ` Sergiu Moga
@ 2022-03-03 16:07     ` Alexandre Belloni
  -1 siblings, 0 replies; 28+ messages in thread
From: Alexandre Belloni @ 2022-03-03 16:07 UTC (permalink / raw)
  To: Sergiu Moga
  Cc: a.zummo, robh+dt, krzysztof.kozlowski, nicolas.ferre,
	claudiu.beznea, linux-rtc, devicetree, linux-arm-kernel,
	linux-kernel

On 03/03/2022 16:06:22+0200, Sergiu Moga wrote:
> Move the properties of the rtt node of RTT IPs from the "dts" file to the
> "dtsi" file, since it is more IP specific than it is board specific.
> 

The fact that it uses a specific GPBR register makes it board specific
so I don't really agree with this patch.

> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
> ---
>  arch/arm/boot/dts/at91-sam9x60ek.dts   | 5 -----
>  arch/arm/boot/dts/at91-sama7g5ek.dts   | 4 ----
>  arch/arm/boot/dts/at91sam9260.dtsi     | 1 +
>  arch/arm/boot/dts/at91sam9260ek.dts    | 1 -
>  arch/arm/boot/dts/at91sam9g45.dtsi     | 1 +
>  arch/arm/boot/dts/at91sam9m10g45ek.dts | 1 -
>  arch/arm/boot/dts/sam9x60.dtsi         | 1 +
>  arch/arm/boot/dts/sama7g5.dtsi         | 1 +
>  8 files changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/at91-sam9x60ek.dts b/arch/arm/boot/dts/at91-sam9x60ek.dts
> index b1068cca4228..97ff91346cb4 100644
> --- a/arch/arm/boot/dts/at91-sam9x60ek.dts
> +++ b/arch/arm/boot/dts/at91-sam9x60ek.dts
> @@ -656,11 +656,6 @@ kernel@200000 {
>  	};
>  };
>  
> -&rtt {
> -	atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
> -	status = "okay";
> -};
> -
>  &shutdown_controller {
>  	debounce-delay-us = <976>;
>  	status = "okay";
> diff --git a/arch/arm/boot/dts/at91-sama7g5ek.dts b/arch/arm/boot/dts/at91-sama7g5ek.dts
> index ccf9e224da78..b7416d9469e3 100644
> --- a/arch/arm/boot/dts/at91-sama7g5ek.dts
> +++ b/arch/arm/boot/dts/at91-sama7g5ek.dts
> @@ -708,10 +708,6 @@ &pwm {
>  	status = "disabled"; /* Conflict with leds. */
>  };
>  
> -&rtt {
> -	atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
> -};
> -
>  &sdmmc0 {
>  	bus-width = <8>;
>  	non-removable;
> diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi
> index 7368347c9357..66d11c8f1a9b 100644
> --- a/arch/arm/boot/dts/at91sam9260.dtsi
> +++ b/arch/arm/boot/dts/at91sam9260.dtsi
> @@ -713,6 +713,7 @@ rtc@fffffd20 {
>  				reg = <0xfffffd20 0x10>;
>  				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
>  				clocks = <&pmc PMC_TYPE_CORE PMC_SLOW>;
> +				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>  				status = "disabled";
>  			};
>  
> diff --git a/arch/arm/boot/dts/at91sam9260ek.dts b/arch/arm/boot/dts/at91sam9260ek.dts
> index ce96345d28a3..6932dab42f2e 100644
> --- a/arch/arm/boot/dts/at91sam9260ek.dts
> +++ b/arch/arm/boot/dts/at91sam9260ek.dts
> @@ -118,7 +118,6 @@ shdwc@fffffd10 {
>  			};
>  
>  			rtc@fffffd20 {
> -				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>  				status = "okay";
>  			};
>  
> diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
> index 2ab730fd6472..fd308e2c15e8 100644
> --- a/arch/arm/boot/dts/at91sam9g45.dtsi
> +++ b/arch/arm/boot/dts/at91sam9g45.dtsi
> @@ -929,6 +929,7 @@ rtc@fffffd20 {
>  				reg = <0xfffffd20 0x10>;
>  				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
>  				clocks = <&clk32k>;
> +				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>  				status = "disabled";
>  			};
>  
> diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
> index b6256a20fbc7..07bfa8ef715d 100644
> --- a/arch/arm/boot/dts/at91sam9m10g45ek.dts
> +++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
> @@ -220,7 +220,6 @@ pwm0: pwm@fffb8000 {
>  			};
>  
>  			rtc@fffffd20 {
> -				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>  				status = "okay";
>  			};
>  
> diff --git a/arch/arm/boot/dts/sam9x60.dtsi b/arch/arm/boot/dts/sam9x60.dtsi
> index ec45ced3cde6..57ba47c54043 100644
> --- a/arch/arm/boot/dts/sam9x60.dtsi
> +++ b/arch/arm/boot/dts/sam9x60.dtsi
> @@ -693,6 +693,7 @@ rtt: rtt@fffffe20 {
>  				reg = <0xfffffe20 0x20>;
>  				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
>  				clocks = <&clk32k 0>;
> +				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>  			};
>  
>  			pit: timer@fffffe40 {
> diff --git a/arch/arm/boot/dts/sama7g5.dtsi b/arch/arm/boot/dts/sama7g5.dtsi
> index eddcfbf4d223..1530d88ce80f 100644
> --- a/arch/arm/boot/dts/sama7g5.dtsi
> +++ b/arch/arm/boot/dts/sama7g5.dtsi
> @@ -138,6 +138,7 @@ rtt: rtt@e001d020 {
>  			reg = <0xe001d020 0x30>;
>  			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
>  			clocks = <&clk32k 0>;
> +			atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>  		};
>  
>  		clk32k: clock-controller@e001d050 {
> -- 
> 2.25.1
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* Re: [PATCH v2 1/5] ARM: dts: at91: Move rtt node properties from "dts" file to "dtsi" file
@ 2022-03-03 16:07     ` Alexandre Belloni
  0 siblings, 0 replies; 28+ messages in thread
From: Alexandre Belloni @ 2022-03-03 16:07 UTC (permalink / raw)
  To: Sergiu Moga
  Cc: linux-rtc, a.zummo, krzysztof.kozlowski, linux-kernel,
	devicetree, robh+dt, claudiu.beznea, linux-arm-kernel

On 03/03/2022 16:06:22+0200, Sergiu Moga wrote:
> Move the properties of the rtt node of RTT IPs from the "dts" file to the
> "dtsi" file, since it is more IP specific than it is board specific.
> 

The fact that it uses a specific GPBR register makes it board specific
so I don't really agree with this patch.

> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
> ---
>  arch/arm/boot/dts/at91-sam9x60ek.dts   | 5 -----
>  arch/arm/boot/dts/at91-sama7g5ek.dts   | 4 ----
>  arch/arm/boot/dts/at91sam9260.dtsi     | 1 +
>  arch/arm/boot/dts/at91sam9260ek.dts    | 1 -
>  arch/arm/boot/dts/at91sam9g45.dtsi     | 1 +
>  arch/arm/boot/dts/at91sam9m10g45ek.dts | 1 -
>  arch/arm/boot/dts/sam9x60.dtsi         | 1 +
>  arch/arm/boot/dts/sama7g5.dtsi         | 1 +
>  8 files changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/at91-sam9x60ek.dts b/arch/arm/boot/dts/at91-sam9x60ek.dts
> index b1068cca4228..97ff91346cb4 100644
> --- a/arch/arm/boot/dts/at91-sam9x60ek.dts
> +++ b/arch/arm/boot/dts/at91-sam9x60ek.dts
> @@ -656,11 +656,6 @@ kernel@200000 {
>  	};
>  };
>  
> -&rtt {
> -	atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
> -	status = "okay";
> -};
> -
>  &shutdown_controller {
>  	debounce-delay-us = <976>;
>  	status = "okay";
> diff --git a/arch/arm/boot/dts/at91-sama7g5ek.dts b/arch/arm/boot/dts/at91-sama7g5ek.dts
> index ccf9e224da78..b7416d9469e3 100644
> --- a/arch/arm/boot/dts/at91-sama7g5ek.dts
> +++ b/arch/arm/boot/dts/at91-sama7g5ek.dts
> @@ -708,10 +708,6 @@ &pwm {
>  	status = "disabled"; /* Conflict with leds. */
>  };
>  
> -&rtt {
> -	atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
> -};
> -
>  &sdmmc0 {
>  	bus-width = <8>;
>  	non-removable;
> diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi
> index 7368347c9357..66d11c8f1a9b 100644
> --- a/arch/arm/boot/dts/at91sam9260.dtsi
> +++ b/arch/arm/boot/dts/at91sam9260.dtsi
> @@ -713,6 +713,7 @@ rtc@fffffd20 {
>  				reg = <0xfffffd20 0x10>;
>  				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
>  				clocks = <&pmc PMC_TYPE_CORE PMC_SLOW>;
> +				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>  				status = "disabled";
>  			};
>  
> diff --git a/arch/arm/boot/dts/at91sam9260ek.dts b/arch/arm/boot/dts/at91sam9260ek.dts
> index ce96345d28a3..6932dab42f2e 100644
> --- a/arch/arm/boot/dts/at91sam9260ek.dts
> +++ b/arch/arm/boot/dts/at91sam9260ek.dts
> @@ -118,7 +118,6 @@ shdwc@fffffd10 {
>  			};
>  
>  			rtc@fffffd20 {
> -				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>  				status = "okay";
>  			};
>  
> diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
> index 2ab730fd6472..fd308e2c15e8 100644
> --- a/arch/arm/boot/dts/at91sam9g45.dtsi
> +++ b/arch/arm/boot/dts/at91sam9g45.dtsi
> @@ -929,6 +929,7 @@ rtc@fffffd20 {
>  				reg = <0xfffffd20 0x10>;
>  				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
>  				clocks = <&clk32k>;
> +				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>  				status = "disabled";
>  			};
>  
> diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
> index b6256a20fbc7..07bfa8ef715d 100644
> --- a/arch/arm/boot/dts/at91sam9m10g45ek.dts
> +++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
> @@ -220,7 +220,6 @@ pwm0: pwm@fffb8000 {
>  			};
>  
>  			rtc@fffffd20 {
> -				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>  				status = "okay";
>  			};
>  
> diff --git a/arch/arm/boot/dts/sam9x60.dtsi b/arch/arm/boot/dts/sam9x60.dtsi
> index ec45ced3cde6..57ba47c54043 100644
> --- a/arch/arm/boot/dts/sam9x60.dtsi
> +++ b/arch/arm/boot/dts/sam9x60.dtsi
> @@ -693,6 +693,7 @@ rtt: rtt@fffffe20 {
>  				reg = <0xfffffe20 0x20>;
>  				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
>  				clocks = <&clk32k 0>;
> +				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>  			};
>  
>  			pit: timer@fffffe40 {
> diff --git a/arch/arm/boot/dts/sama7g5.dtsi b/arch/arm/boot/dts/sama7g5.dtsi
> index eddcfbf4d223..1530d88ce80f 100644
> --- a/arch/arm/boot/dts/sama7g5.dtsi
> +++ b/arch/arm/boot/dts/sama7g5.dtsi
> @@ -138,6 +138,7 @@ rtt: rtt@e001d020 {
>  			reg = <0xe001d020 0x30>;
>  			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
>  			clocks = <&clk32k 0>;
> +			atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>  		};
>  
>  		clk32k: clock-controller@e001d050 {
> -- 
> 2.25.1
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
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] 28+ messages in thread

* Re: [PATCH v2 2/5] ARM: dts: at91: Add the required `atmel, rtt-rtc-time-reg` property
  2022-03-03 14:06   ` [PATCH v2 2/5] ARM: dts: at91: Add the required `atmel, rtt-rtc-time-reg` property Sergiu Moga
@ 2022-03-04 11:06     ` Tudor.Ambarus
  -1 siblings, 0 replies; 28+ messages in thread
From: Tudor.Ambarus @ 2022-03-04 11:06 UTC (permalink / raw)
  To: Sergiu.Moga, a.zummo, alexandre.belloni, robh+dt,
	krzysztof.kozlowski, Nicolas.Ferre, Claudiu.Beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel

On 3/3/22 16:06, Sergiu Moga wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Add the required `atmel,rtt-rtc-time-reg` property to the `rtt` nodes
> of the RTT IPs.
> 
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
> ---
>  arch/arm/boot/dts/at91sam9261.dtsi | 1 +
>  arch/arm/boot/dts/at91sam9263.dtsi | 2 ++
>  arch/arm/boot/dts/at91sam9rl.dtsi  | 1 +
>  3 files changed, 4 insertions(+)

Now with Alexandre's feedback from patch 1/5, you should probably move the
atmel,rtt-rtc-time-reg prop to each of the board files that uses these SoCs.

cheers,
ta

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

* Re: [PATCH v2 2/5] ARM: dts: at91: Add the required `atmel, rtt-rtc-time-reg` property
@ 2022-03-04 11:06     ` Tudor.Ambarus
  0 siblings, 0 replies; 28+ messages in thread
From: Tudor.Ambarus @ 2022-03-04 11:06 UTC (permalink / raw)
  To: Sergiu.Moga, a.zummo, alexandre.belloni, robh+dt,
	krzysztof.kozlowski, Nicolas.Ferre, Claudiu.Beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel

On 3/3/22 16:06, Sergiu Moga wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Add the required `atmel,rtt-rtc-time-reg` property to the `rtt` nodes
> of the RTT IPs.
> 
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
> ---
>  arch/arm/boot/dts/at91sam9261.dtsi | 1 +
>  arch/arm/boot/dts/at91sam9263.dtsi | 2 ++
>  arch/arm/boot/dts/at91sam9rl.dtsi  | 1 +
>  3 files changed, 4 insertions(+)

Now with Alexandre's feedback from patch 1/5, you should probably move the
atmel,rtt-rtc-time-reg prop to each of the board files that uses these SoCs.

cheers,
ta
_______________________________________________
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] 28+ messages in thread

* Re: [PATCH v2 3/5] ARM: dts: at91: Use the generic "rtc" node name for the rtt IPs
  2022-03-03 14:06   ` Sergiu Moga
@ 2022-03-04 11:13     ` Tudor.Ambarus
  -1 siblings, 0 replies; 28+ messages in thread
From: Tudor.Ambarus @ 2022-03-04 11:13 UTC (permalink / raw)
  To: Sergiu.Moga, a.zummo, alexandre.belloni, robh+dt,
	krzysztof.kozlowski, Nicolas.Ferre, Claudiu.Beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel

On 3/3/22 16:06, Sergiu Moga wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> As the DT specification recommends, the node names should be of a
> generic nature. Thus, the most appropriate generic node name for
> the at91 rtt IPs is the "rtc" node name.
> 
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>

Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>

> ---
>  arch/arm/boot/dts/sam9x60.dtsi | 2 +-
>  arch/arm/boot/dts/sama7g5.dtsi | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/sam9x60.dtsi b/arch/arm/boot/dts/sam9x60.dtsi
> index 57ba47c54043..af7602cb65f7 100644
> --- a/arch/arm/boot/dts/sam9x60.dtsi
> +++ b/arch/arm/boot/dts/sam9x60.dtsi
> @@ -688,7 +688,7 @@ shutdown_controller: shdwc@fffffe10 {
>                                 status = "disabled";
>                         };
> 
> -                       rtt: rtt@fffffe20 {
> +                       rtt: rtc@fffffe20 {
>                                 compatible = "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt";
>                                 reg = <0xfffffe20 0x20>;
>                                 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
> diff --git a/arch/arm/boot/dts/sama7g5.dtsi b/arch/arm/boot/dts/sama7g5.dtsi
> index 1530d88ce80f..87af6c680322 100644
> --- a/arch/arm/boot/dts/sama7g5.dtsi
> +++ b/arch/arm/boot/dts/sama7g5.dtsi
> @@ -133,7 +133,7 @@ shdwc: shdwc@e001d010 {
>                         status = "disabled";
>                 };
> 
> -               rtt: rtt@e001d020 {
> +               rtt: rtc@e001d020 {
>                         compatible = "microchip,sama7g5-rtt", "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt";
>                         reg = <0xe001d020 0x30>;
>                         interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
> --
> 2.25.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] 28+ messages in thread

* Re: [PATCH v2 3/5] ARM: dts: at91: Use the generic "rtc" node name for the rtt IPs
@ 2022-03-04 11:13     ` Tudor.Ambarus
  0 siblings, 0 replies; 28+ messages in thread
From: Tudor.Ambarus @ 2022-03-04 11:13 UTC (permalink / raw)
  To: Sergiu.Moga, a.zummo, alexandre.belloni, robh+dt,
	krzysztof.kozlowski, Nicolas.Ferre, Claudiu.Beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel

On 3/3/22 16:06, Sergiu Moga wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> As the DT specification recommends, the node names should be of a
> generic nature. Thus, the most appropriate generic node name for
> the at91 rtt IPs is the "rtc" node name.
> 
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>

Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>

> ---
>  arch/arm/boot/dts/sam9x60.dtsi | 2 +-
>  arch/arm/boot/dts/sama7g5.dtsi | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/sam9x60.dtsi b/arch/arm/boot/dts/sam9x60.dtsi
> index 57ba47c54043..af7602cb65f7 100644
> --- a/arch/arm/boot/dts/sam9x60.dtsi
> +++ b/arch/arm/boot/dts/sam9x60.dtsi
> @@ -688,7 +688,7 @@ shutdown_controller: shdwc@fffffe10 {
>                                 status = "disabled";
>                         };
> 
> -                       rtt: rtt@fffffe20 {
> +                       rtt: rtc@fffffe20 {
>                                 compatible = "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt";
>                                 reg = <0xfffffe20 0x20>;
>                                 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
> diff --git a/arch/arm/boot/dts/sama7g5.dtsi b/arch/arm/boot/dts/sama7g5.dtsi
> index 1530d88ce80f..87af6c680322 100644
> --- a/arch/arm/boot/dts/sama7g5.dtsi
> +++ b/arch/arm/boot/dts/sama7g5.dtsi
> @@ -133,7 +133,7 @@ shdwc: shdwc@e001d010 {
>                         status = "disabled";
>                 };
> 
> -               rtt: rtt@e001d020 {
> +               rtt: rtc@e001d020 {
>                         compatible = "microchip,sama7g5-rtt", "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt";
>                         reg = <0xe001d020 0x30>;
>                         interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
> --
> 2.25.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

_______________________________________________
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] 28+ messages in thread

* Re: [PATCH v2 1/5] ARM: dts: at91: Move rtt node properties from "dts" file to "dtsi" file
  2022-03-03 16:07     ` Alexandre Belloni
@ 2022-03-04 13:10       ` Sergiu.Moga
  -1 siblings, 0 replies; 28+ messages in thread
From: Sergiu.Moga @ 2022-03-04 13:10 UTC (permalink / raw)
  To: alexandre.belloni
  Cc: a.zummo, robh+dt, krzysztof.kozlowski, Nicolas.Ferre,
	Claudiu.Beznea, linux-rtc, devicetree, linux-arm-kernel,
	linux-kernel

On 03.03.2022 18:07, Alexandre Belloni wrote:
> On 03/03/2022 16:06:22+0200, Sergiu Moga wrote:
>> Move the properties of the rtt node of RTT IPs from the "dts" file to the
>> "dtsi" file, since it is more IP specific than it is board specific.
>>
> The fact that it uses a specific GPBR register makes it board specific
> so I don't really agree with this patch.
>
Ah, I see. I will remove this patch from the series then.

>> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
>> ---
>>   arch/arm/boot/dts/at91-sam9x60ek.dts   | 5 -----
>>   arch/arm/boot/dts/at91-sama7g5ek.dts   | 4 ----
>>   arch/arm/boot/dts/at91sam9260.dtsi     | 1 +
>>   arch/arm/boot/dts/at91sam9260ek.dts    | 1 -
>>   arch/arm/boot/dts/at91sam9g45.dtsi     | 1 +
>>   arch/arm/boot/dts/at91sam9m10g45ek.dts | 1 -
>>   arch/arm/boot/dts/sam9x60.dtsi         | 1 +
>>   arch/arm/boot/dts/sama7g5.dtsi         | 1 +
>>   8 files changed, 4 insertions(+), 11 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/at91-sam9x60ek.dts b/arch/arm/boot/dts/at91-sam9x60ek.dts
>> index b1068cca4228..97ff91346cb4 100644
>> --- a/arch/arm/boot/dts/at91-sam9x60ek.dts
>> +++ b/arch/arm/boot/dts/at91-sam9x60ek.dts
>> @@ -656,11 +656,6 @@ kernel@200000 {
>>        };
>>   };
>>
>> -&rtt {
>> -     atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>> -     status = "okay";
>> -};
>> -
>>   &shutdown_controller {
>>        debounce-delay-us = <976>;
>>        status = "okay";
>> diff --git a/arch/arm/boot/dts/at91-sama7g5ek.dts b/arch/arm/boot/dts/at91-sama7g5ek.dts
>> index ccf9e224da78..b7416d9469e3 100644
>> --- a/arch/arm/boot/dts/at91-sama7g5ek.dts
>> +++ b/arch/arm/boot/dts/at91-sama7g5ek.dts
>> @@ -708,10 +708,6 @@ &pwm {
>>        status = "disabled"; /* Conflict with leds. */
>>   };
>>
>> -&rtt {
>> -     atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>> -};
>> -
>>   &sdmmc0 {
>>        bus-width = <8>;
>>        non-removable;
>> diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi
>> index 7368347c9357..66d11c8f1a9b 100644
>> --- a/arch/arm/boot/dts/at91sam9260.dtsi
>> +++ b/arch/arm/boot/dts/at91sam9260.dtsi
>> @@ -713,6 +713,7 @@ rtc@fffffd20 {
>>                                reg = <0xfffffd20 0x10>;
>>                                interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
>>                                clocks = <&pmc PMC_TYPE_CORE PMC_SLOW>;
>> +                             atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>>                                status = "disabled";
>>                        };
>>
>> diff --git a/arch/arm/boot/dts/at91sam9260ek.dts b/arch/arm/boot/dts/at91sam9260ek.dts
>> index ce96345d28a3..6932dab42f2e 100644
>> --- a/arch/arm/boot/dts/at91sam9260ek.dts
>> +++ b/arch/arm/boot/dts/at91sam9260ek.dts
>> @@ -118,7 +118,6 @@ shdwc@fffffd10 {
>>                        };
>>
>>                        rtc@fffffd20 {
>> -                             atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>>                                status = "okay";
>>                        };
>>
>> diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
>> index 2ab730fd6472..fd308e2c15e8 100644
>> --- a/arch/arm/boot/dts/at91sam9g45.dtsi
>> +++ b/arch/arm/boot/dts/at91sam9g45.dtsi
>> @@ -929,6 +929,7 @@ rtc@fffffd20 {
>>                                reg = <0xfffffd20 0x10>;
>>                                interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
>>                                clocks = <&clk32k>;
>> +                             atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>>                                status = "disabled";
>>                        };
>>
>> diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
>> index b6256a20fbc7..07bfa8ef715d 100644
>> --- a/arch/arm/boot/dts/at91sam9m10g45ek.dts
>> +++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
>> @@ -220,7 +220,6 @@ pwm0: pwm@fffb8000 {
>>                        };
>>
>>                        rtc@fffffd20 {
>> -                             atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>>                                status = "okay";
>>                        };
>>
>> diff --git a/arch/arm/boot/dts/sam9x60.dtsi b/arch/arm/boot/dts/sam9x60.dtsi
>> index ec45ced3cde6..57ba47c54043 100644
>> --- a/arch/arm/boot/dts/sam9x60.dtsi
>> +++ b/arch/arm/boot/dts/sam9x60.dtsi
>> @@ -693,6 +693,7 @@ rtt: rtt@fffffe20 {
>>                                reg = <0xfffffe20 0x20>;
>>                                interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
>>                                clocks = <&clk32k 0>;
>> +                             atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>>                        };
>>
>>                        pit: timer@fffffe40 {
>> diff --git a/arch/arm/boot/dts/sama7g5.dtsi b/arch/arm/boot/dts/sama7g5.dtsi
>> index eddcfbf4d223..1530d88ce80f 100644
>> --- a/arch/arm/boot/dts/sama7g5.dtsi
>> +++ b/arch/arm/boot/dts/sama7g5.dtsi
>> @@ -138,6 +138,7 @@ rtt: rtt@e001d020 {
>>                        reg = <0xe001d020 0x30>;
>>                        interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
>>                        clocks = <&clk32k 0>;
>> +                     atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>>                };
>>
>>                clk32k: clock-controller@e001d050 {
>> --
>> 2.25.1
>>
> --
> Alexandre Belloni, co-owner and COO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

Thank you for the feedback.

Sergiu


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

* Re: [PATCH v2 1/5] ARM: dts: at91: Move rtt node properties from "dts" file to "dtsi" file
@ 2022-03-04 13:10       ` Sergiu.Moga
  0 siblings, 0 replies; 28+ messages in thread
From: Sergiu.Moga @ 2022-03-04 13:10 UTC (permalink / raw)
  To: alexandre.belloni
  Cc: linux-rtc, a.zummo, krzysztof.kozlowski, linux-kernel,
	devicetree, robh+dt, Claudiu.Beznea, linux-arm-kernel

On 03.03.2022 18:07, Alexandre Belloni wrote:
> On 03/03/2022 16:06:22+0200, Sergiu Moga wrote:
>> Move the properties of the rtt node of RTT IPs from the "dts" file to the
>> "dtsi" file, since it is more IP specific than it is board specific.
>>
> The fact that it uses a specific GPBR register makes it board specific
> so I don't really agree with this patch.
>
Ah, I see. I will remove this patch from the series then.

>> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
>> ---
>>   arch/arm/boot/dts/at91-sam9x60ek.dts   | 5 -----
>>   arch/arm/boot/dts/at91-sama7g5ek.dts   | 4 ----
>>   arch/arm/boot/dts/at91sam9260.dtsi     | 1 +
>>   arch/arm/boot/dts/at91sam9260ek.dts    | 1 -
>>   arch/arm/boot/dts/at91sam9g45.dtsi     | 1 +
>>   arch/arm/boot/dts/at91sam9m10g45ek.dts | 1 -
>>   arch/arm/boot/dts/sam9x60.dtsi         | 1 +
>>   arch/arm/boot/dts/sama7g5.dtsi         | 1 +
>>   8 files changed, 4 insertions(+), 11 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/at91-sam9x60ek.dts b/arch/arm/boot/dts/at91-sam9x60ek.dts
>> index b1068cca4228..97ff91346cb4 100644
>> --- a/arch/arm/boot/dts/at91-sam9x60ek.dts
>> +++ b/arch/arm/boot/dts/at91-sam9x60ek.dts
>> @@ -656,11 +656,6 @@ kernel@200000 {
>>        };
>>   };
>>
>> -&rtt {
>> -     atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>> -     status = "okay";
>> -};
>> -
>>   &shutdown_controller {
>>        debounce-delay-us = <976>;
>>        status = "okay";
>> diff --git a/arch/arm/boot/dts/at91-sama7g5ek.dts b/arch/arm/boot/dts/at91-sama7g5ek.dts
>> index ccf9e224da78..b7416d9469e3 100644
>> --- a/arch/arm/boot/dts/at91-sama7g5ek.dts
>> +++ b/arch/arm/boot/dts/at91-sama7g5ek.dts
>> @@ -708,10 +708,6 @@ &pwm {
>>        status = "disabled"; /* Conflict with leds. */
>>   };
>>
>> -&rtt {
>> -     atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>> -};
>> -
>>   &sdmmc0 {
>>        bus-width = <8>;
>>        non-removable;
>> diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi
>> index 7368347c9357..66d11c8f1a9b 100644
>> --- a/arch/arm/boot/dts/at91sam9260.dtsi
>> +++ b/arch/arm/boot/dts/at91sam9260.dtsi
>> @@ -713,6 +713,7 @@ rtc@fffffd20 {
>>                                reg = <0xfffffd20 0x10>;
>>                                interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
>>                                clocks = <&pmc PMC_TYPE_CORE PMC_SLOW>;
>> +                             atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>>                                status = "disabled";
>>                        };
>>
>> diff --git a/arch/arm/boot/dts/at91sam9260ek.dts b/arch/arm/boot/dts/at91sam9260ek.dts
>> index ce96345d28a3..6932dab42f2e 100644
>> --- a/arch/arm/boot/dts/at91sam9260ek.dts
>> +++ b/arch/arm/boot/dts/at91sam9260ek.dts
>> @@ -118,7 +118,6 @@ shdwc@fffffd10 {
>>                        };
>>
>>                        rtc@fffffd20 {
>> -                             atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>>                                status = "okay";
>>                        };
>>
>> diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
>> index 2ab730fd6472..fd308e2c15e8 100644
>> --- a/arch/arm/boot/dts/at91sam9g45.dtsi
>> +++ b/arch/arm/boot/dts/at91sam9g45.dtsi
>> @@ -929,6 +929,7 @@ rtc@fffffd20 {
>>                                reg = <0xfffffd20 0x10>;
>>                                interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
>>                                clocks = <&clk32k>;
>> +                             atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>>                                status = "disabled";
>>                        };
>>
>> diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
>> index b6256a20fbc7..07bfa8ef715d 100644
>> --- a/arch/arm/boot/dts/at91sam9m10g45ek.dts
>> +++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
>> @@ -220,7 +220,6 @@ pwm0: pwm@fffb8000 {
>>                        };
>>
>>                        rtc@fffffd20 {
>> -                             atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>>                                status = "okay";
>>                        };
>>
>> diff --git a/arch/arm/boot/dts/sam9x60.dtsi b/arch/arm/boot/dts/sam9x60.dtsi
>> index ec45ced3cde6..57ba47c54043 100644
>> --- a/arch/arm/boot/dts/sam9x60.dtsi
>> +++ b/arch/arm/boot/dts/sam9x60.dtsi
>> @@ -693,6 +693,7 @@ rtt: rtt@fffffe20 {
>>                                reg = <0xfffffe20 0x20>;
>>                                interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
>>                                clocks = <&clk32k 0>;
>> +                             atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>>                        };
>>
>>                        pit: timer@fffffe40 {
>> diff --git a/arch/arm/boot/dts/sama7g5.dtsi b/arch/arm/boot/dts/sama7g5.dtsi
>> index eddcfbf4d223..1530d88ce80f 100644
>> --- a/arch/arm/boot/dts/sama7g5.dtsi
>> +++ b/arch/arm/boot/dts/sama7g5.dtsi
>> @@ -138,6 +138,7 @@ rtt: rtt@e001d020 {
>>                        reg = <0xe001d020 0x30>;
>>                        interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
>>                        clocks = <&clk32k 0>;
>> +                     atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>>                };
>>
>>                clk32k: clock-controller@e001d050 {
>> --
>> 2.25.1
>>
> --
> Alexandre Belloni, co-owner and COO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

Thank you for the feedback.

Sergiu

_______________________________________________
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] 28+ messages in thread

* Re: [PATCH v2 4/5] dt-bindings: rtc: convert at91sam9 bindings to json-schema
  2022-03-03 14:21     ` Krzysztof Kozlowski
@ 2022-03-04 13:17       ` Sergiu.Moga
  -1 siblings, 0 replies; 28+ messages in thread
From: Sergiu.Moga @ 2022-03-04 13:17 UTC (permalink / raw)
  To: krzysztof.kozlowski, a.zummo, alexandre.belloni, robh+dt,
	Nicolas.Ferre, Claudiu.Beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel

On 03.03.2022 16:21, Krzysztof Kozlowski wrote:
> On 03/03/2022 15:06, Sergiu Moga wrote:
>> Convert RTC binding for Atmel/Microchip SoCs to Device Tree Schema
>> format.
>>
>> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
>> ---
>>   .../bindings/rtc/atmel,at91sam9-rtc.txt       | 25 --------
>>   .../bindings/rtc/atmel,at91sam9-rtc.yaml      | 61 +++++++++++++++++++
>>   2 files changed, 61 insertions(+), 25 deletions(-)
>>   delete mode 100644 Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
>>   create mode 100644 Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
>> deleted file mode 100644
>> index 3f0e2a5950eb..000000000000
>> --- a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
>> +++ /dev/null
>> @@ -1,25 +0,0 @@
>> -Atmel AT91SAM9260 Real Time Timer
>> -
>> -Required properties:
>> -- compatible: should be one of the following:
>> -     - "atmel,at91sam9260-rtt"
>> -     - "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt"
>> -- reg: should encode the memory region of the RTT controller
>> -- interrupts: rtt alarm/event interrupt
>> -- clocks: should contain the 32 KHz slow clk that will drive the RTT block.
>> -- atmel,rtt-rtc-time-reg: should encode the GPBR register used to store
>> -     the time base when the RTT is used as an RTC.
>> -     The first cell should point to the GPBR node and the second one
>> -     encode the offset within the GPBR block (or in other words, the
>> -     GPBR register used to store the time base).
>> -
>> -
>> -Example:
>> -
>> -rtt@fffffd20 {
>> -     compatible = "atmel,at91sam9260-rtt";
>> -     reg = <0xfffffd20 0x10>;
>> -     interrupts = <1 4 7>;
>> -     clocks = <&clk32k>;
>> -     atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>> -};
>> diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
>> new file mode 100644
>> index 000000000000..5a639c0ec2c0
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
>> @@ -0,0 +1,61 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/rtc/atmel,at91sam9-rtc.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Atmel AT91 RTT Device Tree Bindings
>> +
>> +allOf:
>> +  - $ref: "rtc.yaml#"
>> +
>> +maintainers:
>> +  - Alexandre Belloni <alexandre.belloni@bootlin.com>
>> +
>> +properties:
>> +  compatible:
>> +    oneOf:
>> +      - items:
>> +          - const: atmel,at91sam9260-rtt
>> +      - items:
>> +          - const: microchip,sam9x60-rtt
>> +          - const: atmel,at91sam9260-rtt
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  interrupts:
>> +    maxItems: 1
>> +
>> +  clocks:
>> +    maxItems: 1
>> +
>> +  atmel,rtt-rtc-time-reg:
>> +    $ref: /schemas/types.yaml#/definitions/phandle-array
>> +    description: |
>> +      Should encode the GPBR register used to store the time base when the
>> +      RTT is used as an RTC. The first cell should point to the GPBR node
>> +      and the second one encodes the offset within the GPBR block (or in
>> +      other words, the GPBR register used to store the time base).
> Instead of describing cells here, you need items with description. I
> gave you the example last time, so instead of ignoring it, please
> implement it.
>
Noted.

>> +
>> +  start-year: true
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - interrupts
>> +  - clocks
>> +  - atmel,rtt-rtc-time-reg
>> +
>> +additionalProperties: false
> This will disallow any other properties mentioned in rtc.yaml, e.g.
> popular wakeup-source. Is it really intended? If core schema is
> extended, the driver would need to be updated to support new features.
> Any reason to choose such approach? The other way is to remove
> start-year and have here unevaluatedProperties.
>
Ah, I see. Removing start-year and using "unevaluatedProperties: false" 
here is better indeed.

>> +
>> +examples:
>> +  - |
>> +    rtc@fffffd20 {
>> +        compatible = "atmel,at91sam9260-rtt";
>> +        reg = <0xfffffd20 0x10>;
>> +        interrupts = <1 4 7>;
> At least one number above looks like known macro, so use it.
>
Noted. Will add another patch to the series for this.

>> +        clocks = <&clk32k>;
>> +        atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>> +    };
>
> Best regards,
> Krzysztof

Thank you for the feedback.

Sergiu


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

* Re: [PATCH v2 4/5] dt-bindings: rtc: convert at91sam9 bindings to json-schema
@ 2022-03-04 13:17       ` Sergiu.Moga
  0 siblings, 0 replies; 28+ messages in thread
From: Sergiu.Moga @ 2022-03-04 13:17 UTC (permalink / raw)
  To: krzysztof.kozlowski, a.zummo, alexandre.belloni, robh+dt,
	Nicolas.Ferre, Claudiu.Beznea
  Cc: linux-rtc, devicetree, linux-arm-kernel, linux-kernel

On 03.03.2022 16:21, Krzysztof Kozlowski wrote:
> On 03/03/2022 15:06, Sergiu Moga wrote:
>> Convert RTC binding for Atmel/Microchip SoCs to Device Tree Schema
>> format.
>>
>> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
>> ---
>>   .../bindings/rtc/atmel,at91sam9-rtc.txt       | 25 --------
>>   .../bindings/rtc/atmel,at91sam9-rtc.yaml      | 61 +++++++++++++++++++
>>   2 files changed, 61 insertions(+), 25 deletions(-)
>>   delete mode 100644 Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
>>   create mode 100644 Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
>> deleted file mode 100644
>> index 3f0e2a5950eb..000000000000
>> --- a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt
>> +++ /dev/null
>> @@ -1,25 +0,0 @@
>> -Atmel AT91SAM9260 Real Time Timer
>> -
>> -Required properties:
>> -- compatible: should be one of the following:
>> -     - "atmel,at91sam9260-rtt"
>> -     - "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt"
>> -- reg: should encode the memory region of the RTT controller
>> -- interrupts: rtt alarm/event interrupt
>> -- clocks: should contain the 32 KHz slow clk that will drive the RTT block.
>> -- atmel,rtt-rtc-time-reg: should encode the GPBR register used to store
>> -     the time base when the RTT is used as an RTC.
>> -     The first cell should point to the GPBR node and the second one
>> -     encode the offset within the GPBR block (or in other words, the
>> -     GPBR register used to store the time base).
>> -
>> -
>> -Example:
>> -
>> -rtt@fffffd20 {
>> -     compatible = "atmel,at91sam9260-rtt";
>> -     reg = <0xfffffd20 0x10>;
>> -     interrupts = <1 4 7>;
>> -     clocks = <&clk32k>;
>> -     atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>> -};
>> diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
>> new file mode 100644
>> index 000000000000..5a639c0ec2c0
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
>> @@ -0,0 +1,61 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/rtc/atmel,at91sam9-rtc.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Atmel AT91 RTT Device Tree Bindings
>> +
>> +allOf:
>> +  - $ref: "rtc.yaml#"
>> +
>> +maintainers:
>> +  - Alexandre Belloni <alexandre.belloni@bootlin.com>
>> +
>> +properties:
>> +  compatible:
>> +    oneOf:
>> +      - items:
>> +          - const: atmel,at91sam9260-rtt
>> +      - items:
>> +          - const: microchip,sam9x60-rtt
>> +          - const: atmel,at91sam9260-rtt
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  interrupts:
>> +    maxItems: 1
>> +
>> +  clocks:
>> +    maxItems: 1
>> +
>> +  atmel,rtt-rtc-time-reg:
>> +    $ref: /schemas/types.yaml#/definitions/phandle-array
>> +    description: |
>> +      Should encode the GPBR register used to store the time base when the
>> +      RTT is used as an RTC. The first cell should point to the GPBR node
>> +      and the second one encodes the offset within the GPBR block (or in
>> +      other words, the GPBR register used to store the time base).
> Instead of describing cells here, you need items with description. I
> gave you the example last time, so instead of ignoring it, please
> implement it.
>
Noted.

>> +
>> +  start-year: true
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - interrupts
>> +  - clocks
>> +  - atmel,rtt-rtc-time-reg
>> +
>> +additionalProperties: false
> This will disallow any other properties mentioned in rtc.yaml, e.g.
> popular wakeup-source. Is it really intended? If core schema is
> extended, the driver would need to be updated to support new features.
> Any reason to choose such approach? The other way is to remove
> start-year and have here unevaluatedProperties.
>
Ah, I see. Removing start-year and using "unevaluatedProperties: false" 
here is better indeed.

>> +
>> +examples:
>> +  - |
>> +    rtc@fffffd20 {
>> +        compatible = "atmel,at91sam9260-rtt";
>> +        reg = <0xfffffd20 0x10>;
>> +        interrupts = <1 4 7>;
> At least one number above looks like known macro, so use it.
>
Noted. Will add another patch to the series for this.

>> +        clocks = <&clk32k>;
>> +        atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>> +    };
>
> Best regards,
> Krzysztof

Thank you for the feedback.

Sergiu

_______________________________________________
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] 28+ messages in thread

end of thread, other threads:[~2022-03-04 13:19 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03 14:06 [PATCH v2 0/5] dt-bindings: rtc: convert at91sam9 bindings to Sergiu Moga
2022-03-03 14:06 ` Sergiu Moga
2022-03-03 14:06 ` [PATCH v2 1/5] ARM: dts: at91: Move rtt node properties from "dts" file to "dtsi" file Sergiu Moga
2022-03-03 14:06   ` Sergiu Moga
2022-03-03 16:07   ` Alexandre Belloni
2022-03-03 16:07     ` Alexandre Belloni
2022-03-04 13:10     ` Sergiu.Moga
2022-03-04 13:10       ` Sergiu.Moga
2022-03-03 14:06 ` [PATCH v2 2/5] ARM: dts: at91: Add the required `atmel,rtt-rtc-time-reg` property Sergiu Moga
2022-03-03 14:06   ` [PATCH v2 2/5] ARM: dts: at91: Add the required `atmel, rtt-rtc-time-reg` property Sergiu Moga
2022-03-04 11:06   ` Tudor.Ambarus
2022-03-04 11:06     ` Tudor.Ambarus
2022-03-03 14:06 ` [PATCH v2 3/5] ARM: dts: at91: Use the generic "rtc" node name for the rtt IPs Sergiu Moga
2022-03-03 14:06   ` Sergiu Moga
2022-03-03 14:47   ` Krzysztof Kozlowski
2022-03-03 14:47     ` Krzysztof Kozlowski
2022-03-04 11:13   ` Tudor.Ambarus
2022-03-04 11:13     ` Tudor.Ambarus
2022-03-03 14:06 ` [PATCH v2 4/5] dt-bindings: rtc: convert at91sam9 bindings to json-schema Sergiu Moga
2022-03-03 14:06   ` Sergiu Moga
2022-03-03 14:21   ` Krzysztof Kozlowski
2022-03-03 14:21     ` Krzysztof Kozlowski
2022-03-04 13:17     ` Sergiu.Moga
2022-03-04 13:17       ` Sergiu.Moga
2022-03-03 14:06 ` [PATCH v2 5/5] dt-bindings: rtc: at91: Add SAMA7G5 compatible strings list Sergiu Moga
2022-03-03 14:06   ` Sergiu Moga
2022-03-03 14:48   ` Krzysztof Kozlowski
2022-03-03 14:48     ` Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.