Re: [PATCH 3/4] dt-bindings: power: reset: atmel,sama5d2-shdwc: convert to yaml

Conor Dooley
2023-05-23T18:49:41Z

[-- Attachment #1.1: Type: text/plain, Size: 2909 bytes --]

Hey Claudiu,

On Tue, May 23, 2023 at 09:15:11AM +0300, Claudiu Beznea wrote:
> Convert Atmel SAMA5D2 shutdown controller to YAML.
>
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> ---
> .../devicetree/bindings/arm/atmel-sysregs.txt | 63 ----------
> .../power/reset/atmel,sama5d2-shdwc.yaml | 114 ++++++++++++++++++
> 2 files changed, 114 insertions(+), 63 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/power/reset/atmel,sama5d2-shdwc.yaml
>
> diff --git a/Documentation/devicetree/bindings/power/reset/atmel,sama5d2-shdwc.yaml b/Documentation/devicetree/bindings/power/reset/atmel,sama5d2-shdwc.yaml
> new file mode 100644
> index 000000000000..613668d6099b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/reset/atmel,sama5d2-shdwc.yaml
> @@ -0,0 +1,114 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Same comment on the license here. Figure you need a Rob Ack.

> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/reset/atmel,sama5d2-shdwc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Atmel SAMA5D2 SHDWC Shutdown Controller
> +
> +maintainers:
> + - Claudiu Beznea <claudiu.beznea@microchip.com>
> +
> +description: |

Also, you don't need the | if you do not need to preserve formatting.

> + Atmel SHDWC shutdown controller controls the power supplies VDDIO and VDDCORE
> + and the wake-up detection on debounced input lines.
> +
> +properties:
> + compatible:
> + oneOf:
> + - items:
> + - const: microchip,sama7g5-shdwc
> + - const: syscon

^ you should probably mention in the commit message where the syscon
came from, as it doesn't appear in the txt binding AFAICT.

> + - items:
> + enum:
> + - atmel,sama5d2-shdwc
> + - microchip,sam9x60-shdwc
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> + "#address-cells":
> + const: 1
> +
> + "#size-cells":
> + const: 0
> +
> + debounce-delay-us:
> + description: |
> + Minimum wake-up inputs debouncer period in microseconds. It is usually a
> + board-related property.
> +
> + atmel,wakeup-rtc-timer:
> + description: enable real-time clock wake-up
> + type: boolean
> +
> +patternProperties:
> + "^input@[0-15]$":
> + description: |
> + Wake-up input nodes. These are usually described in the "board" part of
> + the Device Tree. Note also that input 0 is linked to the wake-up pin and
> + is frequently used.
> + type: object
> + properties:
> + reg:
> + description: contains the wake-up input index
> + enum: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ]

Same here with minimum & maximum, no?

Otherwise, this seems fine to me...

Cheers,
Conor.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]