From: Rob Herring <robh@kernel.org>
To: Simon Horman <horms+renesas@verge.net.au>
Cc: "Zhang Rui" <rui.zhang@intel.com>,
"Eduardo Valentin" <edubezval@gmail.com>,
"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Daniel Lezcano" <daniel.lezcano@linaro.org>,
"Mark Rutland" <mark.rutland@arm.com>,
"Magnus Damm" <magnus.damm@gmail.com>,
"Yoshihiro Kaneko" <ykaneko0929@gmail.com>,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v2] dt-bindings: thermal: rcar-thermal: convert bindings to json-schema
Date: Thu, 10 Oct 2019 16:38:35 -0500 [thread overview]
Message-ID: <20191010213835.GA12055@bogus> (raw)
In-Reply-To: <20190923120348.2908-1-horms+renesas@verge.net.au>
On Mon, Sep 23, 2019 at 02:03:48PM +0200, Simon Horman wrote:
> Convert Renesas R-Car Thermal bindings documentation to json-schema.
> Also name bindings documentation file according to the compat string
> being documented.
>
> As a side effect of this change all currently supported/used compat
> strings are listed while no while card compat string is documented.
> This, in my opinion, is desirable as only supported hardware should
> be documented.
>
> A possible follow-up is to deprecate renesas,rcar-thermal
> after describing thermal zones in the DT for R-Mobile APE6 and R-Car H1.
>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> Based on v5.3
> Tested using:
> ARCH=arm make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/thermal/renesas,rcar-thermal.yaml
>
> v2
> * Update compat strings to reflect that:
> - RZ/G1M and RZ/G1N are not compatible with renesas,rcar-gen2-thermal
> - R-Car V3M, E3 and D3, and RZ/G2E are not compatible with
> renesas,rcar-thermal
> * Update reg property
> - Drop uninformative comment
> - Do not limit to a maximum of one item
> * Add SPDX tag
> ---
> .../devicetree/bindings/thermal/rcar-thermal.txt | 78 --------------
> .../bindings/thermal/renesas,rcar-thermal.yaml | 116 +++++++++++++++++++++
> 2 files changed, 116 insertions(+), 78 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/thermal/rcar-thermal.txt
> create mode 100644 Documentation/devicetree/bindings/thermal/renesas,rcar-thermal.yaml
> diff --git a/Documentation/devicetree/bindings/thermal/renesas,rcar-thermal.yaml b/Documentation/devicetree/bindings/thermal/renesas,rcar-thermal.yaml
> new file mode 100644
> index 000000000000..a55c018a3a1f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/thermal/renesas,rcar-thermal.yaml
> @@ -0,0 +1,116 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/thermal/renesas,rcar-thermal.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas R-Car Thermal
> +
> +maintainers:
> + - Niklas Söderlund <niklas.soderlund@ragnatech.se>
> + - Geert Uytterhoeven <geert+renesas@glider.be>
> +
> +properties:
> + compatible:
> + oneOf:
> + - items:
> + - enum:
> + - renesas,thermal-r8a73a4 # R-Mobile APE6
> + - renesas,thermal-r8a7779 # R-Car H1
> + - const: renesas,rcar-thermal # Without thermal-zone
> +
> + - items:
> + - enum:
> + - renesas,thermal-r8a7790 # R-Car H2
> + - renesas,thermal-r8a7791 # R-Car M2-W
> + - renesas,thermal-r8a7792 # R-Car V2H
> + - renesas,thermal-r8a7793 # R-Car M2-N
> + - const: renesas,rcar-gen2-thermal # With thermal-zone
> + - const: renesas,rcar-thermal # Without thermal-zone
> +
> + - items:
> + - enum:
> + - renesas,thermal-r8a7743 # RZ/G1M
> + - renesas,thermal-r8a7744 # RZ/G1N
> + - const: renesas,rcar-gen2-thermal # With thermal-zone
> +
> + - items:
> + - enum:
> + - renesas,thermal-r8a774c0 # RZ/G2E
> + - renesas,thermal-r8a77970 # R-Car V3M
> + - renesas,thermal-r8a77990 # R-Car E3
> + - renesas,thermal-r8a77995 # R-Car D3
> +
> + reg: true
> + # The 1st reg will be recognized as common register if it has "interrupts".
reg:
minItems: 1
maxItems: 4 (or ?, I assume there is some known max)
additionalItems: true
items:
- description: common register if it has "interrupts" or ...
- description: ...
> +
> + interrupts:
> + # If present should contain 3 interrupts for R-Car V3M/E3/D3 and RZ/G2E,
> + # otherwise 1 interrupt.
> + minItems: 1
> + maxItems: 3
> +
> + clocks:
> + maxItems: 1
> +
> + power-domains:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> +
> +examples :
> + - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> + #include <dt-bindings/clock/r8a7790-clock.h>
> +
> + # Example (non interrupt support):
> + - |
> + thermal@ffc48000 {
> + compatible = "renesas,thermal-r8a7779", "renesas,rcar-thermal";
> + reg = <0xffc48000 0x38>;
> + };
> +
> + # Example (interrupt support):
> + - |
> + thermal@e61f0000 {
> + compatible = "renesas,thermal-r8a73a4", "renesas,rcar-thermal";
> + reg = <0xe61f0000 0x14
> + 0xe61f0100 0x38
> + 0xe61f0200 0x38
> + 0xe61f0300 0x38>;
This should be bracketed for each item or the schema thinks this is 1
item instead of 4.
> + interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>;
> + };
> +
> + # Example (with thermal-zone):
> + - |
> + thermal-zones {
> + cpu_thermal: cpu-thermal {
> + polling-delay-passive = <1000>;
> + polling-delay = <5000>;
> +
> + thermal-sensors = <&thermal>;
> +
> + trips {
> + cpu-crit {
> + temperature = <115000>;
> + hysteresis = <0>;
> + type = "critical";
> + };
> + };
> + cooling-maps {
> + };
> + };
> + };
> +
> + thermal: thermal@e61f0000 {
> + compatible = "renesas,thermal-r8a7790",
> + "renesas,rcar-gen2-thermal",
> + "renesas,rcar-thermal";
> + reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>;
> + interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&mstp5_clks R8A7790_CLK_THERMAL>;
> + power-domains = <&cpg_clocks>;
> + #thermal-sensor-cells = <0>;
> + };
> --
> 2.11.0
>
prev parent reply other threads:[~2019-10-10 21:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-23 12:03 [PATCH v2] dt-bindings: thermal: rcar-thermal: convert bindings to json-schema Simon Horman
2019-10-10 21:38 ` Rob Herring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191010213835.GA12055@bogus \
--to=robh@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=edubezval@gmail.com \
--cc=geert+renesas@glider.be \
--cc=horms+renesas@verge.net.au \
--cc=linux-pm@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mark.rutland@arm.com \
--cc=niklas.soderlund@ragnatech.se \
--cc=rui.zhang@intel.com \
--cc=ykaneko0929@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.