2023-06-16 10:27:22

by Claudiu Beznea

[permalink] [raw]
Subject: [PATCH v3 0/4] dt-bindings: power: reset: at91: convert to YAML

Hi,

Series convert AT91 shutdown controllers documentation to YAML.
Along with it device trees were updated and also entries to
MAINTAINERS with documentation files.

Thank you,
Claudiu

Changes in v3:
- do not define properties in allOf section
- used additionalProperties instead of unevaluatedProperties
- fixed compatible list of patch 3/4
- s/Atmel/Microchip AT91/g in title and description sections of YAML files
and in commit description
- collected tags

Changes in v2:
- use minimum, maximum on uint32 enums instead of all possible values
- change commit description for patch 3/4 to explain why there is a
syscon along with microchip,sama7g5-shdwc
- remove | near description entries

Claudiu Beznea (4):
ARM: dts: at91: use generic name for shutdown controller
dt-bindings: power: reset: atmel,at91sam9260-shdwc: convert to yaml
dt-bindings: power: reset: atmel,sama5d2-shdwc: convert to yaml
MAINTAINERS: add documentation file for Microchip SAMA5D2 shutdown
controller

.../devicetree/bindings/arm/atmel-sysregs.txt | 94 ---------------
.../power/reset/atmel,at91sam9260-shdwc.yaml | 82 +++++++++++++
.../power/reset/atmel,sama5d2-shdwc.yaml | 114 ++++++++++++++++++
MAINTAINERS | 1 +
arch/arm/boot/dts/at91-qil_a9260.dts | 2 +-
arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 2 +-
arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts | 2 +-
arch/arm/boot/dts/at91-sama5d2_xplained.dts | 2 +-
arch/arm/boot/dts/at91sam9260.dtsi | 2 +-
arch/arm/boot/dts/at91sam9260ek.dts | 2 +-
arch/arm/boot/dts/at91sam9261.dtsi | 2 +-
arch/arm/boot/dts/at91sam9263.dtsi | 2 +-
arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 2 +-
arch/arm/boot/dts/at91sam9g45.dtsi | 2 +-
arch/arm/boot/dts/at91sam9n12.dtsi | 2 +-
arch/arm/boot/dts/at91sam9rl.dtsi | 2 +-
arch/arm/boot/dts/at91sam9x5.dtsi | 2 +-
arch/arm/boot/dts/sam9x60.dtsi | 2 +-
arch/arm/boot/dts/sama5d2.dtsi | 2 +-
arch/arm/boot/dts/sama5d3.dtsi | 2 +-
arch/arm/boot/dts/sama5d4.dtsi | 2 +-
arch/arm/boot/dts/sama7g5.dtsi | 2 +-
arch/arm/boot/dts/usb_a9260.dts | 2 +-
arch/arm/boot/dts/usb_a9263.dts | 2 +-
24 files changed, 217 insertions(+), 114 deletions(-)
create mode 100644 Documentation/devicetree/bindings/power/reset/atmel,at91sam9260-shdwc.yaml
create mode 100644 Documentation/devicetree/bindings/power/reset/atmel,sama5d2-shdwc.yaml

--
2.34.1



2023-06-16 10:27:23

by Claudiu Beznea

[permalink] [raw]
Subject: [PATCH v3 2/4] dt-bindings: power: reset: atmel,at91sam9260-shdwc: convert to yaml

Convert Microchip AT91 shutdown controller to YAML.

Signed-off-by: Claudiu Beznea <[email protected]>
Reviewed-by: Conor Dooley <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
---
.../devicetree/bindings/arm/atmel-sysregs.txt | 31 -------
.../power/reset/atmel,at91sam9260-shdwc.yaml | 82 +++++++++++++++++++
2 files changed, 82 insertions(+), 31 deletions(-)
create mode 100644 Documentation/devicetree/bindings/power/reset/atmel,at91sam9260-shdwc.yaml

diff --git a/Documentation/devicetree/bindings/arm/atmel-sysregs.txt b/Documentation/devicetree/bindings/arm/atmel-sysregs.txt
index ab1b352344ae..e6b2fb291b45 100644
--- a/Documentation/devicetree/bindings/arm/atmel-sysregs.txt
+++ b/Documentation/devicetree/bindings/arm/atmel-sysregs.txt
@@ -52,37 +52,6 @@ Example:
reg = <0xe3804000 0x1000>;
};

-SHDWC Shutdown Controller
-
-required properties:
-- compatible: Should be "atmel,<chip>-shdwc".
- <chip> can be "at91sam9260", "at91sam9rl" or "at91sam9x5".
-- reg: Should contain registers location and length
-- clocks: phandle to input clock.
-
-optional properties:
-- atmel,wakeup-mode: String, operation mode of the wakeup mode.
- Supported values are: "none", "high", "low", "any".
-- atmel,wakeup-counter: Counter on Wake-up 0 (between 0x0 and 0xf).
-
-optional at91sam9260 properties:
-- atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up.
-
-optional at91sam9rl properties:
-- atmel,wakeup-rtc-timer: boolean to enable Real-time Clock Wake-up.
-- atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up.
-
-optional at91sam9x5 properties:
-- atmel,wakeup-rtc-timer: boolean to enable Real-time Clock Wake-up.
-
-Example:
-
- shdwc@fffffd10 {
- compatible = "atmel,at91sam9260-shdwc";
- reg = <0xfffffd10 0x10>;
- clocks = <&clk32k>;
- };
-
SHDWC SAMA5D2-Compatible Shutdown Controller

1) shdwc node
diff --git a/Documentation/devicetree/bindings/power/reset/atmel,at91sam9260-shdwc.yaml b/Documentation/devicetree/bindings/power/reset/atmel,at91sam9260-shdwc.yaml
new file mode 100644
index 000000000000..f559a2cfd82e
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/reset/atmel,at91sam9260-shdwc.yaml
@@ -0,0 +1,82 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/reset/atmel,at91sam9260-shdwc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip AT91 SHDWC Shutdown Controller
+
+maintainers:
+ - Claudiu Beznea <[email protected]>
+
+description: |
+ Microchip AT91 SHDWC shutdown controller controls the power supplies VDDIO
+ and VDDCORE and the wake-up detection on debounced input lines.
+
+properties:
+ compatible:
+ enum:
+ - atmel,at91sam9260-shdwc
+ - atmel,at91sam9rl-shdwc
+ - atmel,at91sam9x5-shdwc
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ atmel,wakeup-mode:
+ description: operation mode of the wakeup mode
+ $ref: /schemas/types.yaml#/definitions/string
+ enum: [ none, high, low, any ]
+
+ atmel,wakeup-counter:
+ description: counter on wake-up 0
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 15
+
+ atmel,wakeup-rtt-timer:
+ description: enable real-time timer wake-up
+ type: boolean
+
+ atmel,wakeup-rtc-timer:
+ description: enable real-time clock wake-up
+ type: boolean
+
+required:
+ - compatible
+ - reg
+ - clocks
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: atmel,at91sam9x5-shdwc
+ then:
+ properties:
+ atmel,wakeup-rtt-timer: false
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: atmel,at91sam9260-shdwc
+ then:
+ properties:
+ atmel,wakeup-rtc-timer: false
+
+additionalProperties: false
+
+examples:
+ - |
+ shdwc: poweroff@fffffd10 {
+ compatible = "atmel,at91sam9260-shdwc";
+ reg = <0xfffffd10 0x10>;
+ clocks = <&clk32k>;
+ };
+
+...
--
2.34.1


2023-06-19 22:30:44

by Sebastian Reichel

[permalink] [raw]
Subject: Re: [PATCH v3 2/4] dt-bindings: power: reset: atmel,at91sam9260-shdwc: convert to yaml

Hi,

On Fri, Jun 16, 2023 at 01:16:44PM +0300, Claudiu Beznea wrote:
> Convert Microchip AT91 shutdown controller to YAML.
>
> Signed-off-by: Claudiu Beznea <[email protected]>
> Reviewed-by: Conor Dooley <[email protected]>
> Acked-by: Nicolas Ferre <[email protected]>
> ---

Thanks, queued.

-- Sebastian

> .../devicetree/bindings/arm/atmel-sysregs.txt | 31 -------
> .../power/reset/atmel,at91sam9260-shdwc.yaml | 82 +++++++++++++++++++
> 2 files changed, 82 insertions(+), 31 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/power/reset/atmel,at91sam9260-shdwc.yaml
>
> diff --git a/Documentation/devicetree/bindings/arm/atmel-sysregs.txt b/Documentation/devicetree/bindings/arm/atmel-sysregs.txt
> index ab1b352344ae..e6b2fb291b45 100644
> --- a/Documentation/devicetree/bindings/arm/atmel-sysregs.txt
> +++ b/Documentation/devicetree/bindings/arm/atmel-sysregs.txt
> @@ -52,37 +52,6 @@ Example:
> reg = <0xe3804000 0x1000>;
> };
>
> -SHDWC Shutdown Controller
> -
> -required properties:
> -- compatible: Should be "atmel,<chip>-shdwc".
> - <chip> can be "at91sam9260", "at91sam9rl" or "at91sam9x5".
> -- reg: Should contain registers location and length
> -- clocks: phandle to input clock.
> -
> -optional properties:
> -- atmel,wakeup-mode: String, operation mode of the wakeup mode.
> - Supported values are: "none", "high", "low", "any".
> -- atmel,wakeup-counter: Counter on Wake-up 0 (between 0x0 and 0xf).
> -
> -optional at91sam9260 properties:
> -- atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up.
> -
> -optional at91sam9rl properties:
> -- atmel,wakeup-rtc-timer: boolean to enable Real-time Clock Wake-up.
> -- atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up.
> -
> -optional at91sam9x5 properties:
> -- atmel,wakeup-rtc-timer: boolean to enable Real-time Clock Wake-up.
> -
> -Example:
> -
> - shdwc@fffffd10 {
> - compatible = "atmel,at91sam9260-shdwc";
> - reg = <0xfffffd10 0x10>;
> - clocks = <&clk32k>;
> - };
> -
> SHDWC SAMA5D2-Compatible Shutdown Controller
>
> 1) shdwc node
> diff --git a/Documentation/devicetree/bindings/power/reset/atmel,at91sam9260-shdwc.yaml b/Documentation/devicetree/bindings/power/reset/atmel,at91sam9260-shdwc.yaml
> new file mode 100644
> index 000000000000..f559a2cfd82e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/reset/atmel,at91sam9260-shdwc.yaml
> @@ -0,0 +1,82 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/reset/atmel,at91sam9260-shdwc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Microchip AT91 SHDWC Shutdown Controller
> +
> +maintainers:
> + - Claudiu Beznea <[email protected]>
> +
> +description: |
> + Microchip AT91 SHDWC shutdown controller controls the power supplies VDDIO
> + and VDDCORE and the wake-up detection on debounced input lines.
> +
> +properties:
> + compatible:
> + enum:
> + - atmel,at91sam9260-shdwc
> + - atmel,at91sam9rl-shdwc
> + - atmel,at91sam9x5-shdwc
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> + atmel,wakeup-mode:
> + description: operation mode of the wakeup mode
> + $ref: /schemas/types.yaml#/definitions/string
> + enum: [ none, high, low, any ]
> +
> + atmel,wakeup-counter:
> + description: counter on wake-up 0
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 0
> + maximum: 15
> +
> + atmel,wakeup-rtt-timer:
> + description: enable real-time timer wake-up
> + type: boolean
> +
> + atmel,wakeup-rtc-timer:
> + description: enable real-time clock wake-up
> + type: boolean
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> +
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: atmel,at91sam9x5-shdwc
> + then:
> + properties:
> + atmel,wakeup-rtt-timer: false
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: atmel,at91sam9260-shdwc
> + then:
> + properties:
> + atmel,wakeup-rtc-timer: false
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + shdwc: poweroff@fffffd10 {
> + compatible = "atmel,at91sam9260-shdwc";
> + reg = <0xfffffd10 0x10>;
> + clocks = <&clk32k>;
> + };
> +
> +...
> --
> 2.34.1
>


Attachments:
(No filename) (4.51 kB)
signature.asc (849.00 B)
Download all attachments