mbox series

[v2,0/2] dt-bindings: renesas,tpu: Improve and json-schema conversion

Message ID cover.1620648868.git.geert+renesas@glider.be
Headers show
Series dt-bindings: renesas,tpu: Improve and json-schema conversion | expand

Message

Geert Uytterhoeven May 10, 2021, 12:18 p.m. UTC
Hi all,

There are two different device tree bindings defined for the Renesas
Timer Pulse Unit:
  - one for using the TPU as a PWM controller (used on ARM), already
    using json-schema, and
  - a second one for using the TPU as a clock source (used on H8/300).
The first has already been converted to json-schema.

This series improves the former, and converts the latter to json-schema.
As both bindings using "renesas,tpu", both bindings are marked with the
appropriate "select" logic, to check for the presence respectively
absence of the "#pwm-cells" property.

Changes compared to v1:
  - Keep additionalProperties, as pwm.yaml doesn't add any other
    properties,
  - Drop unneeded "'#pwm-cells': true" from "select" section in
    renesas,tpu-pwm.yaml,
  - Add Reviewed-by.

Thanks for your comments!

Geert Uytterhoeven (2):
  dt-bindings: pwm: renesas,tpu-pwm: Improve json-schema
  dt-bindings: timer: renesas,tpu: Convert to json-schema

 .../bindings/pwm/renesas,tpu-pwm.yaml         | 26 +++++++++
 .../devicetree/bindings/timer/renesas,tpu.txt | 21 -------
 .../bindings/timer/renesas,tpu.yaml           | 56 +++++++++++++++++++
 3 files changed, 82 insertions(+), 21 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/renesas,tpu.txt
 create mode 100644 Documentation/devicetree/bindings/timer/renesas,tpu.yaml

Comments

Yoshinori Sato May 12, 2021, 10 a.m. UTC | #1
On Mon, 10 May 2021 21:18:34 +0900,
Geert Uytterhoeven wrote:
> 

>   - Include the general PWM controller schema,

>   - Make clocks, power-domains, and resets properties required.

> 

> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

> ---

> v2:

>   - Keep additionalProperties, as pwm.yaml doesn't add any other

>     properties.

> ---

>  .../bindings/pwm/renesas,tpu-pwm.yaml           | 17 +++++++++++++++++

>  1 file changed, 17 insertions(+)

> 

> diff --git a/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml b/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml

> index aa9a4570c9068226..7c99e42ad780c2cd 100644

> --- a/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml

> +++ b/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml

> @@ -58,6 +58,23 @@ required:

>    - compatible

>    - reg

>    - '#pwm-cells'

> +  - clocks

> +  - power-domains

> +

> +allOf:

> +  - $ref: pwm.yaml#

> +

> +  - if:

> +      not:

> +        properties:

> +          compatible:

> +            contains:

> +              enum:

> +                - renesas,tpu-r8a73a4

> +                - renesas,tpu-r8a7740

> +    then:

> +      required:

> +        - resets

>  

>  additionalProperties: false

>  

> -- 

> 2.25.1

> 


Acked-by: Yoshinori Sato <ysato@users.sourceforge.jp>


-- 
Yosinori Sato
Rob Herring May 13, 2021, 2:33 a.m. UTC | #2
On Mon, 10 May 2021 14:18:34 +0200, Geert Uytterhoeven wrote:
>   - Include the general PWM controller schema,

>   - Make clocks, power-domains, and resets properties required.

> 

> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

> ---

> v2:

>   - Keep additionalProperties, as pwm.yaml doesn't add any other

>     properties.

> ---

>  .../bindings/pwm/renesas,tpu-pwm.yaml           | 17 +++++++++++++++++

>  1 file changed, 17 insertions(+)

> 


Applied, thanks!