Re: [PATCH 1/1] dt-bindings: timer: mediatek: Convert binding to YAML
From: Krzysztof Kozlowski
Date: Sun Apr 24 2022 - 10:51:15 EST
On 22/04/2022 15:13, Allen-KH Cheng wrote:
You should also fix the DTSes to match the new schema.
> +$id: http://devicetree.org/schemas/timer/mediatek,mtk-timer.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MediaTek SoCs timers bindings
> +
> +description:
> + MediaTek SoCs have two different timers on different platforms,
> + - GPT (General Purpose Timer)
> + - SYST (System Timer)
> +
> +maintainers:
> + - Fengquan Chen <fengquan.chen@xxxxxxxxxxxx>
> + - Allen-KH Cheng <allen-kh.cheng@xxxxxxxxxxxx>
> +
> +properties:
> + $nodename:
> + pattern: '^timer@[a-f0-9]+$'
> +
> + compatible:
> + oneOf:
> + - const: mediatek,mt6577-timer
> + - const: mediatek,mt6765-timer
These two entries should be an enum.
> + - items:
> + - enum:
> + - mediatek,mt2701-timer
> + - mediatek,mt6580-timer
> + - mediatek,mt6582-timer
> + - mediatek,mt6589-timer
> + - mediatek,mt7623-timer
> + - mediatek,mt8127-timer
> + - mediatek,mt8135-timer
> + - mediatek,mt8173-timer
> + - mediatek,mt8516-timer
> + - const: mediatek,mt6577-timer
> + - items:
> + - enum:
> + - mediatek,mt7629-timer
> + - mediatek,mt8183-timer
> + - mediatek,mt8186-timer
> + - mediatek,mt8192-timer
> + - mediatek,mt8195-timer
> + - const: mediatek,mt6765-timer
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + minItems: 1
> + maxItems: 2
> +
> + clock-names:
> + minItems: 1
> + items:
> + - const: clk13m
> + - const: bus
When is the bus clock optional?
> +
> +required:
> + - compatible
> + - reg
clocks are required in the old bindings
> + - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + timer@10008000 {
> + compatible = "mediatek,mt6577-timer";
> + reg = <0xd4014000 0x100>;
reg does not match unit address.
> + interrupts = <13>;
> + clocks = <&coreclk 2>;
> + };
> +
> +...
Best regards,
Krzysztof