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.
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 | 29 +++++++++-
.../devicetree/bindings/timer/renesas,tpu.txt | 21 -------
.../bindings/timer/renesas,tpu.yaml | 56 +++++++++++++++++++
3 files changed, 84 insertions(+), 22 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/timer/renesas,tpu.txt
create mode 100644 Documentation/devicetree/bindings/timer/renesas,tpu.yaml
--
2.25.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
- Include the general PWM controller schema,
- Make clocks, power-domains, and resets properties required.
Signed-off-by: Geert Uytterhoeven <[email protected]>
---
.../bindings/pwm/renesas,tpu-pwm.yaml | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml b/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml
index aa9a4570c9068226..3a072ee29815c695 100644
--- a/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml
+++ b/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml
@@ -58,8 +58,25 @@ required:
- compatible
- reg
- '#pwm-cells'
+ - clocks
+ - power-domains
-additionalProperties: false
+allOf:
+ - $ref: pwm.yaml#
+
+ - if:
+ not:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - renesas,tpu-r8a73a4
+ - renesas,tpu-r8a7740
+ then:
+ required:
+ - resets
+
+unevaluatedProperties: false
examples:
- |
--
2.25.1
On Fri, May 07, 2021 at 10:25:12AM +0200, Geert Uytterhoeven wrote:
> - Include the general PWM controller schema,
> - Make clocks, power-domains, and resets properties required.
>
> Signed-off-by: Geert Uytterhoeven <[email protected]>
> ---
> .../bindings/pwm/renesas,tpu-pwm.yaml | 19 ++++++++++++++++++-
> 1 file changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml b/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml
> index aa9a4570c9068226..3a072ee29815c695 100644
> --- a/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml
> +++ b/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml
> @@ -58,8 +58,25 @@ required:
> - compatible
> - reg
> - '#pwm-cells'
> + - clocks
> + - power-domains
>
> -additionalProperties: false
> +allOf:
> + - $ref: pwm.yaml#
This doesn't add any other properties, so you can keep
'additionalProperties: false'.
> +
> + - if:
> + not:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - renesas,tpu-r8a73a4
> + - renesas,tpu-r8a7740
> + then:
> + required:
> + - resets
> +
> +unevaluatedProperties: false
>
> examples:
> - |
> --
> 2.25.1
>