* [PATCH v2 0/2] dt-bindings: renesas,tpu: Improve and json-schema conversion
@ 2021-05-10 12:18 Geert Uytterhoeven
2021-05-10 12:18 ` [PATCH v2 1/2] dt-bindings: pwm: renesas,tpu-pwm: Improve json-schema Geert Uytterhoeven
2021-05-10 12:18 ` [PATCH v2 2/2] dt-bindings: timer: renesas,tpu: Convert to json-schema Geert Uytterhoeven
0 siblings, 2 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2021-05-10 12:18 UTC (permalink / raw
To: Rob Herring, Thierry Reding, Uwe Kleine-König, Lee Jones,
Daniel Lezcano, Thomas Gleixner, Laurent Pinchart, Yoshinori Sato
Cc: devicetree, linux-pwm, linux-renesas-soc, linux-kernel,
Geert Uytterhoeven
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
--
2.25.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/2] dt-bindings: pwm: renesas,tpu-pwm: Improve json-schema
2021-05-10 12:18 [PATCH v2 0/2] dt-bindings: renesas,tpu: Improve and json-schema conversion Geert Uytterhoeven
@ 2021-05-10 12:18 ` Geert Uytterhoeven
2021-05-12 10:00 ` Yoshinori Sato
2021-05-13 2:33 ` Rob Herring
2021-05-10 12:18 ` [PATCH v2 2/2] dt-bindings: timer: renesas,tpu: Convert to json-schema Geert Uytterhoeven
1 sibling, 2 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2021-05-10 12:18 UTC (permalink / raw
To: Rob Herring, Thierry Reding, Uwe Kleine-König, Lee Jones,
Daniel Lezcano, Thomas Gleixner, Laurent Pinchart, Yoshinori Sato
Cc: devicetree, linux-pwm, linux-renesas-soc, linux-kernel,
Geert Uytterhoeven
- 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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] dt-bindings: timer: renesas,tpu: Convert to json-schema
2021-05-10 12:18 [PATCH v2 0/2] dt-bindings: renesas,tpu: Improve and json-schema conversion Geert Uytterhoeven
2021-05-10 12:18 ` [PATCH v2 1/2] dt-bindings: pwm: renesas,tpu-pwm: Improve json-schema Geert Uytterhoeven
@ 2021-05-10 12:18 ` Geert Uytterhoeven
2021-05-12 10:00 ` Yoshinori Sato
2021-05-13 2:35 ` Rob Herring
1 sibling, 2 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2021-05-10 12:18 UTC (permalink / raw
To: Rob Herring, Thierry Reding, Uwe Kleine-König, Lee Jones,
Daniel Lezcano, Thomas Gleixner, Laurent Pinchart, Yoshinori Sato
Cc: devicetree, linux-pwm, linux-renesas-soc, linux-kernel,
Geert Uytterhoeven, Rob Herring
Convert the Renesas H8/300 Timer Pulse Unit Device Tree binding
documentation to json-schema.
Correct clock-names, as "peripheral_clk" is the name of the supplier,
and all users use "fck".
Note that there are two different bindings for the TPU, both using
"renesas,tpu": this one for using the TPU as a clock source (used on
H8/300), and a second use for using the TPU as a PWM controller (used on
ARM). To avoid conflicts, both bindings are marked with the appropriate
"select" logic, to check for the absence respectively presence of the
"#pwm-cells" property.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Rob Herring <robh@kernel.org>
---
v2:
- Drop unneeded "'#pwm-cells': true" from "select" section in
renesas,tpu-pwm.yaml,
- Add Reviewed-by.
I have listed Sato-san as the maintainer, as he wrote the original
driver and bindings.
Sato-san: Please scream if this is inappropriate ;-)
---
.../bindings/pwm/renesas,tpu-pwm.yaml | 9 +++
.../devicetree/bindings/timer/renesas,tpu.txt | 21 -------
.../bindings/timer/renesas,tpu.yaml | 56 +++++++++++++++++++
3 files changed, 65 insertions(+), 21 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/timer/renesas,tpu.txt
create mode 100644 Documentation/devicetree/bindings/timer/renesas,tpu.yaml
diff --git a/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml b/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml
index 7c99e42ad780c2cd..81ccb2110162c3eb 100644
--- a/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml
+++ b/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml
@@ -9,6 +9,15 @@ title: Renesas R-Car Timer Pulse Unit PWM Controller
maintainers:
- Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
+select:
+ properties:
+ compatible:
+ contains:
+ const: renesas,tpu
+ required:
+ - compatible
+ - '#pwm-cells'
+
properties:
compatible:
items:
diff --git a/Documentation/devicetree/bindings/timer/renesas,tpu.txt b/Documentation/devicetree/bindings/timer/renesas,tpu.txt
deleted file mode 100644
index 1d46f9de4feb8a84..0000000000000000
--- a/Documentation/devicetree/bindings/timer/renesas,tpu.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-* Renesas H8/300 Timer Pulse Unit
-
-The TPU is a 16bit timer/counter with configurable clock inputs and
-programmable compare match.
-This implementation support only cascade mode.
-
-Required Properties:
-
- - compatible: must contain "renesas,tpu"
- - reg: base address and length of the registers block in 2 channel.
- - clocks: a list of phandle, one for each entry in clock-names.
- - clock-names: must contain "peripheral_clk" for the functional clock.
-
-
-Example:
- tpu: tpu@ffffe0 {
- compatible = "renesas,tpu";
- reg = <0xffffe0 16>, <0xfffff0 12>;
- clocks = <&pclk>;
- clock-names = "peripheral_clk";
- };
diff --git a/Documentation/devicetree/bindings/timer/renesas,tpu.yaml b/Documentation/devicetree/bindings/timer/renesas,tpu.yaml
new file mode 100644
index 0000000000000000..01554dff23d8a954
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/renesas,tpu.yaml
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/timer/renesas,tpu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas H8/300 Timer Pulse Unit
+
+maintainers:
+ - Yoshinori Sato <ysato@users.sourceforge.jp>
+
+description:
+ The TPU is a 16bit timer/counter with configurable clock inputs and
+ programmable compare match.
+ This implementation supports only cascade mode.
+
+select:
+ properties:
+ compatible:
+ contains:
+ const: renesas,tpu
+ '#pwm-cells': false
+ required:
+ - compatible
+
+properties:
+ compatible:
+ const: renesas,tpu
+
+ reg:
+ items:
+ - description: First channel
+ - description: Second channel
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ const: fck
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+
+additionalProperties: false
+
+examples:
+ - |
+ tpu: tpu@ffffe0 {
+ compatible = "renesas,tpu";
+ reg = <0xffffe0 16>, <0xfffff0 12>;
+ clocks = <&pclk>;
+ clock-names = "fck";
+ };
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] dt-bindings: timer: renesas,tpu: Convert to json-schema
2021-05-10 12:18 ` [PATCH v2 2/2] dt-bindings: timer: renesas,tpu: Convert to json-schema Geert Uytterhoeven
@ 2021-05-12 10:00 ` Yoshinori Sato
2021-05-13 2:35 ` Rob Herring
1 sibling, 0 replies; 7+ messages in thread
From: Yoshinori Sato @ 2021-05-12 10:00 UTC (permalink / raw
To: Geert Uytterhoeven
Cc: Rob Herring, Thierry Reding, Uwe Kleine-König, Lee Jones,
Daniel Lezcano, Thomas Gleixner, Laurent Pinchart, devicetree,
linux-pwm, linux-renesas-soc, linux-kernel, Rob Herring
On Mon, 10 May 2021 21:18:35 +0900,
Geert Uytterhoeven wrote:
>
> Convert the Renesas H8/300 Timer Pulse Unit Device Tree binding
> documentation to json-schema.
>
> Correct clock-names, as "peripheral_clk" is the name of the supplier,
> and all users use "fck".
>
> Note that there are two different bindings for the TPU, both using
> "renesas,tpu": this one for using the TPU as a clock source (used on
> H8/300), and a second use for using the TPU as a PWM controller (used on
> ARM). To avoid conflicts, both bindings are marked with the appropriate
> "select" logic, to check for the absence respectively presence of the
> "#pwm-cells" property.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Reviewed-by: Rob Herring <robh@kernel.org>
> ---
> v2:
> - Drop unneeded "'#pwm-cells': true" from "select" section in
> renesas,tpu-pwm.yaml,
> - Add Reviewed-by.
>
> I have listed Sato-san as the maintainer, as he wrote the original
> driver and bindings.
> Sato-san: Please scream if this is inappropriate ;-)
> ---
> .../bindings/pwm/renesas,tpu-pwm.yaml | 9 +++
> .../devicetree/bindings/timer/renesas,tpu.txt | 21 -------
> .../bindings/timer/renesas,tpu.yaml | 56 +++++++++++++++++++
> 3 files changed, 65 insertions(+), 21 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/timer/renesas,tpu.txt
> create mode 100644 Documentation/devicetree/bindings/timer/renesas,tpu.yaml
>
> diff --git a/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml b/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml
> index 7c99e42ad780c2cd..81ccb2110162c3eb 100644
> --- a/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml
> +++ b/Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml
> @@ -9,6 +9,15 @@ title: Renesas R-Car Timer Pulse Unit PWM Controller
> maintainers:
> - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
>
> +select:
> + properties:
> + compatible:
> + contains:
> + const: renesas,tpu
> + required:
> + - compatible
> + - '#pwm-cells'
> +
> properties:
> compatible:
> items:
> diff --git a/Documentation/devicetree/bindings/timer/renesas,tpu.txt b/Documentation/devicetree/bindings/timer/renesas,tpu.txt
> deleted file mode 100644
> index 1d46f9de4feb8a84..0000000000000000
> --- a/Documentation/devicetree/bindings/timer/renesas,tpu.txt
> +++ /dev/null
> @@ -1,21 +0,0 @@
> -* Renesas H8/300 Timer Pulse Unit
> -
> -The TPU is a 16bit timer/counter with configurable clock inputs and
> -programmable compare match.
> -This implementation support only cascade mode.
> -
> -Required Properties:
> -
> - - compatible: must contain "renesas,tpu"
> - - reg: base address and length of the registers block in 2 channel.
> - - clocks: a list of phandle, one for each entry in clock-names.
> - - clock-names: must contain "peripheral_clk" for the functional clock.
> -
> -
> -Example:
> - tpu: tpu@ffffe0 {
> - compatible = "renesas,tpu";
> - reg = <0xffffe0 16>, <0xfffff0 12>;
> - clocks = <&pclk>;
> - clock-names = "peripheral_clk";
> - };
> diff --git a/Documentation/devicetree/bindings/timer/renesas,tpu.yaml b/Documentation/devicetree/bindings/timer/renesas,tpu.yaml
> new file mode 100644
> index 0000000000000000..01554dff23d8a954
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/timer/renesas,tpu.yaml
> @@ -0,0 +1,56 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/timer/renesas,tpu.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas H8/300 Timer Pulse Unit
> +
> +maintainers:
> + - Yoshinori Sato <ysato@users.sourceforge.jp>
> +
> +description:
> + The TPU is a 16bit timer/counter with configurable clock inputs and
> + programmable compare match.
> + This implementation supports only cascade mode.
> +
> +select:
> + properties:
> + compatible:
> + contains:
> + const: renesas,tpu
> + '#pwm-cells': false
> + required:
> + - compatible
> +
> +properties:
> + compatible:
> + const: renesas,tpu
> +
> + reg:
> + items:
> + - description: First channel
> + - description: Second channel
> +
> + clocks:
> + maxItems: 1
> +
> + clock-names:
> + const: fck
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> + - clock-names
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + tpu: tpu@ffffe0 {
> + compatible = "renesas,tpu";
> + reg = <0xffffe0 16>, <0xfffff0 12>;
> + clocks = <&pclk>;
> + clock-names = "fck";
> + };
> --
> 2.25.1
>
Acked-by: Yoshinori Sato <ysato@users.sourceforge.jp>
--
Yosinori Sato
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: pwm: renesas,tpu-pwm: Improve json-schema
2021-05-10 12:18 ` [PATCH v2 1/2] dt-bindings: pwm: renesas,tpu-pwm: Improve json-schema Geert Uytterhoeven
@ 2021-05-12 10:00 ` Yoshinori Sato
2021-05-13 2:33 ` Rob Herring
1 sibling, 0 replies; 7+ messages in thread
From: Yoshinori Sato @ 2021-05-12 10:00 UTC (permalink / raw
To: Geert Uytterhoeven
Cc: Rob Herring, Thierry Reding, Uwe Kleine-König, Lee Jones,
Daniel Lezcano, Thomas Gleixner, Laurent Pinchart, devicetree,
linux-pwm, linux-renesas-soc, linux-kernel
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: pwm: renesas,tpu-pwm: Improve json-schema
2021-05-10 12:18 ` [PATCH v2 1/2] dt-bindings: pwm: renesas,tpu-pwm: Improve json-schema Geert Uytterhoeven
2021-05-12 10:00 ` Yoshinori Sato
@ 2021-05-13 2:33 ` Rob Herring
1 sibling, 0 replies; 7+ messages in thread
From: Rob Herring @ 2021-05-13 2:33 UTC (permalink / raw
To: Geert Uytterhoeven
Cc: linux-kernel, linux-pwm, Daniel Lezcano, Uwe Kleine-König,
Rob Herring, Yoshinori Sato, Laurent Pinchart, Thomas Gleixner,
linux-renesas-soc, Thierry Reding, Lee Jones, devicetree
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!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] dt-bindings: timer: renesas,tpu: Convert to json-schema
2021-05-10 12:18 ` [PATCH v2 2/2] dt-bindings: timer: renesas,tpu: Convert to json-schema Geert Uytterhoeven
2021-05-12 10:00 ` Yoshinori Sato
@ 2021-05-13 2:35 ` Rob Herring
1 sibling, 0 replies; 7+ messages in thread
From: Rob Herring @ 2021-05-13 2:35 UTC (permalink / raw
To: Geert Uytterhoeven
Cc: devicetree, Uwe Kleine-König, Thierry Reding,
linux-renesas-soc, Yoshinori Sato, linux-kernel, Thomas Gleixner,
linux-pwm, Laurent Pinchart, Rob Herring, Daniel Lezcano,
Lee Jones
On Mon, 10 May 2021 14:18:35 +0200, Geert Uytterhoeven wrote:
> Convert the Renesas H8/300 Timer Pulse Unit Device Tree binding
> documentation to json-schema.
>
> Correct clock-names, as "peripheral_clk" is the name of the supplier,
> and all users use "fck".
>
> Note that there are two different bindings for the TPU, both using
> "renesas,tpu": this one for using the TPU as a clock source (used on
> H8/300), and a second use for using the TPU as a PWM controller (used on
> ARM). To avoid conflicts, both bindings are marked with the appropriate
> "select" logic, to check for the absence respectively presence of the
> "#pwm-cells" property.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Reviewed-by: Rob Herring <robh@kernel.org>
> ---
> v2:
> - Drop unneeded "'#pwm-cells': true" from "select" section in
> renesas,tpu-pwm.yaml,
> - Add Reviewed-by.
>
> I have listed Sato-san as the maintainer, as he wrote the original
> driver and bindings.
> Sato-san: Please scream if this is inappropriate ;-)
> ---
> .../bindings/pwm/renesas,tpu-pwm.yaml | 9 +++
> .../devicetree/bindings/timer/renesas,tpu.txt | 21 -------
> .../bindings/timer/renesas,tpu.yaml | 56 +++++++++++++++++++
> 3 files changed, 65 insertions(+), 21 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/timer/renesas,tpu.txt
> create mode 100644 Documentation/devicetree/bindings/timer/renesas,tpu.yaml
>
Applied, thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-05-13 2:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-10 12:18 [PATCH v2 0/2] dt-bindings: renesas,tpu: Improve and json-schema conversion Geert Uytterhoeven
2021-05-10 12:18 ` [PATCH v2 1/2] dt-bindings: pwm: renesas,tpu-pwm: Improve json-schema Geert Uytterhoeven
2021-05-12 10:00 ` Yoshinori Sato
2021-05-13 2:33 ` Rob Herring
2021-05-10 12:18 ` [PATCH v2 2/2] dt-bindings: timer: renesas,tpu: Convert to json-schema Geert Uytterhoeven
2021-05-12 10:00 ` Yoshinori Sato
2021-05-13 2:35 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).