Re: [PATCH v2 2/5] dt-bindings: rtc: abx80x: convert to yaml

From: Krzysztof Kozlowski
Date: Fri Jan 12 2024 - 12:19:12 EST


On 12/01/2024 18:12, Josua Mayer wrote:
> Convert the abracon abx80x rtc text bindings to dt-schema format.
>
> Additionally added "interrupts" property which was missing from text
> format, because abx80x and driver support them.
>
> Signed-off-by: Josua Mayer <josua@xxxxxxxxxxxxx>
> ---


> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/abracon,abx80x.yaml
> @@ -0,0 +1,56 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/rtc/abracon,abx80x.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Abracon ABX80X I2C ultra low power RTC/Alarm chip
> +
> +maintainers: []

You need a name here. If there is no driver maintainer or anyone
interested, put devicetree list.

> +
> +allOf:
> + - $ref: rtc.yaml#
> +
> +properties:
> + compatible:
> + anyOf:

Please do not invent your own solutions, but use existing code as
template. Just open example-schema or any other recent RTC binding.

> + - description: auto-detection from id register
> + const: abracon,abx80x
> + - const: abracon,,ab0801
> + - const: abracon,,ab0803
> + - const: abracon,,ab0804
> + - const: abracon,,ab0805
> + - const: abracon,,ab1801
> + - const: abracon,,ab1803
> + - const: abracon,,ab1804
> + - const: abracon,,ab1805
> + - const: microcrystal,rv1805
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + abracon,tc-diode:

Missing type - string.

> + description:
> + Trickle-charge diode type.
> + Required to enable charging backup battery.
> + anyOf:

Use enum and explain the meanings of the values in descruption.

> + - description: standard diode with 0.6V drop
> + const: standard
> + - description: schottky diode with 0.3V drop
> + const: schottky
> +
> + abracon,tc-resistor:
> + description:
> + Trickle-charge resistor value in kOhm.
> + Required to enable charging backup battery.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 3, 6, 11]
> +
> +required:
> + - compatible
> + - reg
> +
> +unevaluatedProperties: false

Provide example.

Best regards,
Krzysztof