[PATCH] dt-bindings: thermal: convert Mediatek Thermal to the json-schema

Krzysztof Kozlowski krzysztof.kozlowski at linaro.org
Thu Nov 16 06:38:35 PST 2023


On 16/11/2023 13:02, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal at milecki.pl>
> 
> This helps validating DTS files.
> 

...

mal.yaml b/Documentation/devicetree/bindings/thermal/mediatek-thermal.yaml
> new file mode 100644
> index 000000000000..0e036b22b82b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/thermal/mediatek-thermal.yaml

mediatek,thermal.yaml

> @@ -0,0 +1,98 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/thermal/mediatek-thermal.yaml#

mediatek,thermal.yaml

> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Mediatek Thermal

SoC? PMIC?

> +
> +description: >

Drop >

> +  This describes the device tree binding for the Mediatek thermal controller

Drop redundant part. Describe hardware, not the binding. There is no
point to say that a binding describes a binding.

> +  which measures the on-SoC temperatures. This device does not have its own ADC,
> +  instead it directly controls the AUXADC via AHB bus accesses. For this reason
> +  this device needs phandles to the AUXADC. Also it controls a mux in the
> +  apmixedsys register space via AHB bus accesses, so a phandle to the APMIXEDSYS
> +  is also needed.
> +
> +allOf:

...

> +  mediatek,auxadc:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description: A phandle to the AUXADC which the thermal controller uses
> +
> +  mediatek,apmixedsys:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description: A phandle to the APMIXEDSYS controller
> +
> +  resets: Reference to the reset controller controlling the thermal controller.
> +

Not tested. You miss constraints. Drop totally redundant description.

> +
> +unevaluatedProperties: false
> +
> +required:
> +  - reg
> +  - interrupts
> +  - clocks
> +  - clock-names
> +  - mediatek,auxadc
> +  - mediatek,apmixedsys

unevaluatedProperties go here.

Best regards,
Krzysztof




More information about the linux-arm-kernel mailing list