* [PATCH v3 0/5] dt-bindings: rtc: convert at91sam9 bindings to
@ 2022-03-04 14:27 Sergiu Moga
2022-03-04 14:27 ` [PATCH v3 1/5] ARM: dts: at91: Add the required `atmel,rtt-rtc-time-reg` property Sergiu Moga
` (4 more replies)
0 siblings, 5 replies; 12+ messages in thread
From: Sergiu Moga @ 2022-03-04 14:27 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 adding the `atmel,rtt-rtc-time-reg` required
property to the board files that were missing it.
Changes since v2:
- Removed patch that would move the `atmel,rtt-rtc-time-reg` property
from the board file to the SoC file.
- Modified the patch that adds the `atmel,rtt-rtc-time-reg` property
to add it in the board file instead of the SoC file.
- Replaced `start-year` and `additionalProperties` from the DT binding
with `unevaluatedProperties`.
- Modified the `atmel,rtt-rtc-time-reg` property described in the DT
binding to use items with description.
- Used macro for the IRQ type of the example node's interrupt property
of the DT binding.
Sergiu Moga (5):
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: Use macros for the IRQ type
dt-bindings: rtc: at91: Add SAMA7G5 compatible strings list
.../bindings/rtc/atmel,at91sam9-rtc.txt | 25 -------
.../bindings/rtc/atmel,at91sam9-rtc.yaml | 69 +++++++++++++++++++
arch/arm/boot/dts/at91sam9261ek.dts | 4 ++
arch/arm/boot/dts/at91sam9263ek.dts | 8 +++
arch/arm/boot/dts/at91sam9rlek.dts | 4 ++
arch/arm/boot/dts/sam9x60.dtsi | 2 +-
arch/arm/boot/dts/sama7g5.dtsi | 2 +-
7 files changed, 87 insertions(+), 27 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] 12+ messages in thread
* [PATCH v3 1/5] ARM: dts: at91: Add the required `atmel,rtt-rtc-time-reg` property
2022-03-04 14:27 [PATCH v3 0/5] dt-bindings: rtc: convert at91sam9 bindings to Sergiu Moga
@ 2022-03-04 14:27 ` Sergiu Moga
2022-03-04 14:53 ` Alexandre Belloni
2022-03-04 14:27 ` [PATCH v3 2/5] ARM: dts: at91: Use the generic "rtc" node name for the rtt IPs Sergiu Moga
` (3 subsequent siblings)
4 siblings, 1 reply; 12+ messages in thread
From: Sergiu Moga @ 2022-03-04 14:27 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 board files that were missing it.
Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
---
arch/arm/boot/dts/at91sam9261ek.dts | 4 ++++
arch/arm/boot/dts/at91sam9263ek.dts | 8 ++++++++
arch/arm/boot/dts/at91sam9rlek.dts | 4 ++++
3 files changed, 16 insertions(+)
diff --git a/arch/arm/boot/dts/at91sam9261ek.dts b/arch/arm/boot/dts/at91sam9261ek.dts
index beed819609e8..3c1f40b4a13e 100644
--- a/arch/arm/boot/dts/at91sam9261ek.dts
+++ b/arch/arm/boot/dts/at91sam9261ek.dts
@@ -178,6 +178,10 @@ dbgu: serial@fffff200 {
status = "okay";
};
+ rtc@fffffd20 {
+ atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
+ };
+
watchdog@fffffd40 {
status = "okay";
};
diff --git a/arch/arm/boot/dts/at91sam9263ek.dts b/arch/arm/boot/dts/at91sam9263ek.dts
index 71f60576761a..1208bb580d14 100644
--- a/arch/arm/boot/dts/at91sam9263ek.dts
+++ b/arch/arm/boot/dts/at91sam9263ek.dts
@@ -102,6 +102,14 @@ mtd_dataflash@0 {
};
};
+ rtc@fffffd20 {
+ atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
+ };
+
+ rtc@fffffd50 {
+ atmel,rtt-rtc-time-reg = <&gpbr 0x4>;
+ };
+
watchdog@fffffd40 {
status = "okay";
};
diff --git a/arch/arm/boot/dts/at91sam9rlek.dts b/arch/arm/boot/dts/at91sam9rlek.dts
index 62981b39c815..a26f9f70b6b2 100644
--- a/arch/arm/boot/dts/at91sam9rlek.dts
+++ b/arch/arm/boot/dts/at91sam9rlek.dts
@@ -212,6 +212,10 @@ watchdog@fffffd40 {
status = "okay";
};
+ rtc@fffffd20 {
+ atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
+ };
+
rtc@fffffe00 {
status = "okay";
};
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 2/5] ARM: dts: at91: Use the generic "rtc" node name for the rtt IPs
2022-03-04 14:27 [PATCH v3 0/5] dt-bindings: rtc: convert at91sam9 bindings to Sergiu Moga
2022-03-04 14:27 ` [PATCH v3 1/5] ARM: dts: at91: Add the required `atmel,rtt-rtc-time-reg` property Sergiu Moga
@ 2022-03-04 14:27 ` Sergiu Moga
2022-03-04 14:27 ` [PATCH v3 3/5] dt-bindings: rtc: convert at91sam9 bindings to json-schema Sergiu Moga
` (2 subsequent siblings)
4 siblings, 0 replies; 12+ messages in thread
From: Sergiu Moga @ 2022-03-04 14:27 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, Tudor Ambarus
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: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.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 998629a3c34f..c328b67bea0c 100644
--- a/arch/arm/boot/dts/sam9x60.dtsi
+++ b/arch/arm/boot/dts/sam9x60.dtsi
@@ -684,7 +684,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 e6d0c90cf710..5d8841d0831a 100644
--- a/arch/arm/boot/dts/sama7g5.dtsi
+++ b/arch/arm/boot/dts/sama7g5.dtsi
@@ -170,7 +170,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] 12+ messages in thread
* [PATCH v3 3/5] dt-bindings: rtc: convert at91sam9 bindings to json-schema
2022-03-04 14:27 [PATCH v3 0/5] dt-bindings: rtc: convert at91sam9 bindings to Sergiu Moga
2022-03-04 14:27 ` [PATCH v3 1/5] ARM: dts: at91: Add the required `atmel,rtt-rtc-time-reg` property Sergiu Moga
2022-03-04 14:27 ` [PATCH v3 2/5] ARM: dts: at91: Use the generic "rtc" node name for the rtt IPs Sergiu Moga
@ 2022-03-04 14:27 ` Sergiu Moga
2022-03-04 14:42 ` Krzysztof Kozlowski
2022-03-04 14:27 ` [PATCH v3 4/5] dt-bindings: rtc: at91: Use macros for the IRQ type Sergiu Moga
2022-03-04 14:27 ` [PATCH v3 5/5] dt-bindings: rtc: at91: Add SAMA7G5 compatible strings list Sergiu Moga
4 siblings, 1 reply; 12+ messages in thread
From: Sergiu Moga @ 2022-03-04 14:27 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 | 63 +++++++++++++++++++
2 files changed, 63 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..af25cc275356
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
@@ -0,0 +1,63 @@
+# 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
+ items:
+ - items:
+ - description: Phandle to the GPBR node.
+ - description: Offset within the GPBR block.
+ 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).
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - atmel,rtt-rtc-time-reg
+
+unevaluatedProperties: 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] 12+ messages in thread
* [PATCH v3 4/5] dt-bindings: rtc: at91: Use macros for the IRQ type
2022-03-04 14:27 [PATCH v3 0/5] dt-bindings: rtc: convert at91sam9 bindings to Sergiu Moga
` (2 preceding siblings ...)
2022-03-04 14:27 ` [PATCH v3 3/5] dt-bindings: rtc: convert at91sam9 bindings to json-schema Sergiu Moga
@ 2022-03-04 14:27 ` Sergiu Moga
2022-03-04 14:44 ` Krzysztof Kozlowski
2022-03-04 14:27 ` [PATCH v3 5/5] dt-bindings: rtc: at91: Add SAMA7G5 compatible strings list Sergiu Moga
4 siblings, 1 reply; 12+ messages in thread
From: Sergiu Moga @ 2022-03-04 14:27 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
Prefer using macros for the IRQ type of the example node's
interrupt property.
Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
---
Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
index af25cc275356..d2452067bfe4 100644
--- a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
+++ b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
@@ -54,10 +54,12 @@ unevaluatedProperties: false
examples:
- |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
rtc@fffffd20 {
compatible = "atmel,at91sam9260-rtt";
reg = <0xfffffd20 0x10>;
- interrupts = <1 4 7>;
+ interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
clocks = <&clk32k>;
atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
};
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 5/5] dt-bindings: rtc: at91: Add SAMA7G5 compatible strings list
2022-03-04 14:27 [PATCH v3 0/5] dt-bindings: rtc: convert at91sam9 bindings to Sergiu Moga
` (3 preceding siblings ...)
2022-03-04 14:27 ` [PATCH v3 4/5] dt-bindings: rtc: at91: Use macros for the IRQ type Sergiu Moga
@ 2022-03-04 14:27 ` Sergiu Moga
4 siblings, 0 replies; 12+ messages in thread
From: Sergiu Moga @ 2022-03-04 14:27 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>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.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 d2452067bfe4..e5c3c384e172 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] 12+ messages in thread
* Re: [PATCH v3 3/5] dt-bindings: rtc: convert at91sam9 bindings to json-schema
2022-03-04 14:27 ` [PATCH v3 3/5] dt-bindings: rtc: convert at91sam9 bindings to json-schema Sergiu Moga
@ 2022-03-04 14:42 ` Krzysztof Kozlowski
0 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-04 14:42 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 04/03/2022 15:27, 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 | 63 +++++++++++++++++++
> 2 files changed, 63 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..af25cc275356
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
> @@ -0,0 +1,63 @@
> +# 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
> + items:
> + - items:
> + - description: Phandle to the GPBR node.
> + - description: Offset within the GPBR block.
> + 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).
Don't duplicate in description what is already before, so entire part
from "The first cell" is not needed. I mentioned it last time - Instead
of describing cells here, use items. You have items, good, but you still
have description.
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> + - atmel,rtt-rtc-time-reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + rtc@fffffd20 {
> + compatible = "atmel,at91sam9260-rtt";
> + reg = <0xfffffd20 0x10>;
> + interrupts = <1 4 7>;
Could you start acknowledging comments instead of ignoring them?
> + clocks = <&clk32k>;
> + atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
> + };
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 4/5] dt-bindings: rtc: at91: Use macros for the IRQ type
2022-03-04 14:27 ` [PATCH v3 4/5] dt-bindings: rtc: at91: Use macros for the IRQ type Sergiu Moga
@ 2022-03-04 14:44 ` Krzysztof Kozlowski
2022-03-04 15:52 ` Sergiu.Moga
0 siblings, 1 reply; 12+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-04 14:44 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 04/03/2022 15:27, Sergiu Moga wrote:
> Prefer using macros for the IRQ type of the example node's
> interrupt property.
>
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
> ---
> Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
> index af25cc275356..d2452067bfe4 100644
> --- a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
> +++ b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
> @@ -54,10 +54,12 @@ unevaluatedProperties: false
>
> examples:
> - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> rtc@fffffd20 {
> compatible = "atmel,at91sam9260-rtt";
> reg = <0xfffffd20 0x10>;
> - interrupts = <1 4 7>;
> + interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
Ah, I see the change now. This should be squashed with previous patch.
There is no point to add imperfect DTS code which is being changed a
commit later. Example is not bindings.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 1/5] ARM: dts: at91: Add the required `atmel,rtt-rtc-time-reg` property
2022-03-04 14:27 ` [PATCH v3 1/5] ARM: dts: at91: Add the required `atmel,rtt-rtc-time-reg` property Sergiu Moga
@ 2022-03-04 14:53 ` Alexandre Belloni
2022-03-04 15:29 ` Sergiu.Moga
0 siblings, 1 reply; 12+ messages in thread
From: Alexandre Belloni @ 2022-03-04 14:53 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 04/03/2022 16:27:42+0200, Sergiu Moga wrote:
> Add the required `atmel,rtt-rtc-time-reg` property to the `rtt` nodes
> of the board files that were missing it.
>
> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
> ---
> arch/arm/boot/dts/at91sam9261ek.dts | 4 ++++
> arch/arm/boot/dts/at91sam9263ek.dts | 8 ++++++++
> arch/arm/boot/dts/at91sam9rlek.dts | 4 ++++
> 3 files changed, 16 insertions(+)
>
> diff --git a/arch/arm/boot/dts/at91sam9261ek.dts b/arch/arm/boot/dts/at91sam9261ek.dts
> index beed819609e8..3c1f40b4a13e 100644
> --- a/arch/arm/boot/dts/at91sam9261ek.dts
> +++ b/arch/arm/boot/dts/at91sam9261ek.dts
> @@ -178,6 +178,10 @@ dbgu: serial@fffff200 {
> status = "okay";
> };
>
> + rtc@fffffd20 {
> + atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
> + };
> +
> watchdog@fffffd40 {
> status = "okay";
> };
> diff --git a/arch/arm/boot/dts/at91sam9263ek.dts b/arch/arm/boot/dts/at91sam9263ek.dts
> index 71f60576761a..1208bb580d14 100644
> --- a/arch/arm/boot/dts/at91sam9263ek.dts
> +++ b/arch/arm/boot/dts/at91sam9263ek.dts
> @@ -102,6 +102,14 @@ mtd_dataflash@0 {
> };
> };
>
> + rtc@fffffd20 {
> + atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
> + };
> +
> + rtc@fffffd50 {
> + atmel,rtt-rtc-time-reg = <&gpbr 0x4>;
> + };
Do we really need two RTCs with the exact same features on that board?
Is there a check failure hen the property is not there and the node is
disabled?
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 1/5] ARM: dts: at91: Add the required `atmel,rtt-rtc-time-reg` property
2022-03-04 14:53 ` Alexandre Belloni
@ 2022-03-04 15:29 ` Sergiu.Moga
2022-03-04 15:43 ` Alexandre Belloni
0 siblings, 1 reply; 12+ messages in thread
From: Sergiu.Moga @ 2022-03-04 15:29 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 04.03.2022 16:53, Alexandre Belloni wrote:
> On 04/03/2022 16:27:42+0200, Sergiu Moga wrote:
>> Add the required `atmel,rtt-rtc-time-reg` property to the `rtt` nodes
>> of the board files that were missing it.
>>
>> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
>> ---
>> arch/arm/boot/dts/at91sam9261ek.dts | 4 ++++
>> arch/arm/boot/dts/at91sam9263ek.dts | 8 ++++++++
>> arch/arm/boot/dts/at91sam9rlek.dts | 4 ++++
>> 3 files changed, 16 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/at91sam9261ek.dts b/arch/arm/boot/dts/at91sam9261ek.dts
>> index beed819609e8..3c1f40b4a13e 100644
>> --- a/arch/arm/boot/dts/at91sam9261ek.dts
>> +++ b/arch/arm/boot/dts/at91sam9261ek.dts
>> @@ -178,6 +178,10 @@ dbgu: serial@fffff200 {
>> status = "okay";
>> };
>>
>> + rtc@fffffd20 {
>> + atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>> + };
>> +
>> watchdog@fffffd40 {
>> status = "okay";
>> };
>> diff --git a/arch/arm/boot/dts/at91sam9263ek.dts b/arch/arm/boot/dts/at91sam9263ek.dts
>> index 71f60576761a..1208bb580d14 100644
>> --- a/arch/arm/boot/dts/at91sam9263ek.dts
>> +++ b/arch/arm/boot/dts/at91sam9263ek.dts
>> @@ -102,6 +102,14 @@ mtd_dataflash@0 {
>> };
>> };
>>
>> + rtc@fffffd20 {
>> + atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
>> + };
>> +
>> + rtc@fffffd50 {
>> + atmel,rtt-rtc-time-reg = <&gpbr 0x4>;
>> + };
> Do we really need two RTCs with the exact same features on that board?
> Is there a check failure hen the property is not there and the node is
> disabled?
>
I can understand your point here. No, it is indeed not really needed
since, from what I can see, they are both disabled in the SoC file. The
reason why I added both was that I thought it would have been more
consistent. Do you think I should remove both in this file and keep the
changes in the other 2 files only?
> --
> 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] 12+ messages in thread
* Re: [PATCH v3 1/5] ARM: dts: at91: Add the required `atmel,rtt-rtc-time-reg` property
2022-03-04 15:29 ` Sergiu.Moga
@ 2022-03-04 15:43 ` Alexandre Belloni
0 siblings, 0 replies; 12+ messages in thread
From: Alexandre Belloni @ 2022-03-04 15:43 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 04/03/2022 15:29:45+0000, Sergiu.Moga@microchip.com wrote:
> On 04.03.2022 16:53, Alexandre Belloni wrote:
> > On 04/03/2022 16:27:42+0200, Sergiu Moga wrote:
> >> Add the required `atmel,rtt-rtc-time-reg` property to the `rtt` nodes
> >> of the board files that were missing it.
> >>
> >> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
> >> ---
> >> arch/arm/boot/dts/at91sam9261ek.dts | 4 ++++
> >> arch/arm/boot/dts/at91sam9263ek.dts | 8 ++++++++
> >> arch/arm/boot/dts/at91sam9rlek.dts | 4 ++++
> >> 3 files changed, 16 insertions(+)
> >>
> >> diff --git a/arch/arm/boot/dts/at91sam9261ek.dts b/arch/arm/boot/dts/at91sam9261ek.dts
> >> index beed819609e8..3c1f40b4a13e 100644
> >> --- a/arch/arm/boot/dts/at91sam9261ek.dts
> >> +++ b/arch/arm/boot/dts/at91sam9261ek.dts
> >> @@ -178,6 +178,10 @@ dbgu: serial@fffff200 {
> >> status = "okay";
> >> };
> >>
> >> + rtc@fffffd20 {
> >> + atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
> >> + };
> >> +
> >> watchdog@fffffd40 {
> >> status = "okay";
> >> };
> >> diff --git a/arch/arm/boot/dts/at91sam9263ek.dts b/arch/arm/boot/dts/at91sam9263ek.dts
> >> index 71f60576761a..1208bb580d14 100644
> >> --- a/arch/arm/boot/dts/at91sam9263ek.dts
> >> +++ b/arch/arm/boot/dts/at91sam9263ek.dts
> >> @@ -102,6 +102,14 @@ mtd_dataflash@0 {
> >> };
> >> };
> >>
> >> + rtc@fffffd20 {
> >> + atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
> >> + };
> >> +
> >> + rtc@fffffd50 {
> >> + atmel,rtt-rtc-time-reg = <&gpbr 0x4>;
> >> + };
> > Do we really need two RTCs with the exact same features on that board?
> > Is there a check failure hen the property is not there and the node is
> > disabled?
> >
> I can understand your point here. No, it is indeed not really needed
> since, from what I can see, they are both disabled in the SoC file. The
> reason why I added both was that I thought it would have been more
> consistent. Do you think I should remove both in this file and keep the
> changes in the other 2 files only?
>
Well, I would keep the first node but not the second so that you have a
good example, ready to be enabled.
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 4/5] dt-bindings: rtc: at91: Use macros for the IRQ type
2022-03-04 14:44 ` Krzysztof Kozlowski
@ 2022-03-04 15:52 ` Sergiu.Moga
0 siblings, 0 replies; 12+ messages in thread
From: Sergiu.Moga @ 2022-03-04 15:52 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 04.03.2022 16:44, Krzysztof Kozlowski wrote:
> On 04/03/2022 15:27, Sergiu Moga wrote:
>> Prefer using macros for the IRQ type of the example node's
>> interrupt property.
>>
>> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
>> ---
>> Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
>> index af25cc275356..d2452067bfe4 100644
>> --- a/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
>> +++ b/Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.yaml
>> @@ -54,10 +54,12 @@ unevaluatedProperties: false
>>
>> examples:
>> - |
>> + #include <dt-bindings/interrupt-controller/irq.h>
>> +
>> rtc@fffffd20 {
>> compatible = "atmel,at91sam9260-rtt";
>> reg = <0xfffffd20 0x10>;
>> - interrupts = <1 4 7>;
>> + interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
> Ah, I see the change now. This should be squashed with previous patch.
> There is no point to add imperfect DTS code which is being changed a
> commit later. Example is not bindings.
>
> Best regards,
> Krzysztof
Understood, I will make the squash for the next version. Thank you very
much for the feedback.
Sergiu
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-03-04 15:52 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 14:27 [PATCH v3 0/5] dt-bindings: rtc: convert at91sam9 bindings to Sergiu Moga
2022-03-04 14:27 ` [PATCH v3 1/5] ARM: dts: at91: Add the required `atmel,rtt-rtc-time-reg` property Sergiu Moga
2022-03-04 14:53 ` Alexandre Belloni
2022-03-04 15:29 ` Sergiu.Moga
2022-03-04 15:43 ` Alexandre Belloni
2022-03-04 14:27 ` [PATCH v3 2/5] ARM: dts: at91: Use the generic "rtc" node name for the rtt IPs Sergiu Moga
2022-03-04 14:27 ` [PATCH v3 3/5] dt-bindings: rtc: convert at91sam9 bindings to json-schema Sergiu Moga
2022-03-04 14:42 ` Krzysztof Kozlowski
2022-03-04 14:27 ` [PATCH v3 4/5] dt-bindings: rtc: at91: Use macros for the IRQ type Sergiu Moga
2022-03-04 14:44 ` Krzysztof Kozlowski
2022-03-04 15:52 ` Sergiu.Moga
2022-03-04 14:27 ` [PATCH v3 5/5] dt-bindings: rtc: at91: Add SAMA7G5 compatible strings list Sergiu Moga
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).