diff mbox series

[v3,2/2] dt-bindings: thermal: rcar-gen3-thermal: Add r8a779f0 support

Message ID 20220610201701.7946-2-wsa+renesas@sang-engineering.com
State Accepted
Commit 83b4466b3f1b00da0cbc754e055e89a7b02b2034
Headers show
Series None | expand

Commit Message

Wolfram Sang June 10, 2022, 8:17 p.m. UTC
Add support for R-Car S4. The S4 IP differs a bit from its siblings in
such way that it has 3 out of 4 TSC nodes for Linux and the interrupts
are not routed to the INTC-AP but to the ECM.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

Change since V2:
* make interrupts not required for this SoC

Tested with:
make dtbs_check DT_SCHEMA_FILES=thermal/rcar-gen3-thermal.yaml

 .../bindings/thermal/rcar-gen3-thermal.yaml   | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

Comments

Wolfram Sang June 14, 2022, 7:12 p.m. UTC | #1
> What about splitting this in two separate checks at the top level:
>   - one for regs (R-Car V3U vs. the world), and
>   - a second for interrupts (R-Car V3U+S4-8 vs. the world)?

I'll try this and see how it looks, thanks for the suggestion!
Rob Herring June 14, 2022, 8:07 p.m. UTC | #2
On Fri, 10 Jun 2022 22:17:01 +0200, Wolfram Sang wrote:
> Add support for R-Car S4. The S4 IP differs a bit from its siblings in
> such way that it has 3 out of 4 TSC nodes for Linux and the interrupts
> are not routed to the INTC-AP but to the ECM.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> 
> Change since V2:
> * make interrupts not required for this SoC
> 
> Tested with:
> make dtbs_check DT_SCHEMA_FILES=thermal/rcar-gen3-thermal.yaml
> 
>  .../bindings/thermal/rcar-gen3-thermal.yaml   | 19 ++++++++++++++-----
>  1 file changed, 14 insertions(+), 5 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Geert Uytterhoeven June 14, 2022, 9:31 p.m. UTC | #3
Hi Wolfram,

On Tue, Jun 14, 2022 at 10:18 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> > What about splitting this in two separate checks at the top level:
> >   - one for regs (R-Car V3U vs. the world), and
> >   - a second for interrupts (R-Car V3U+S4-8 vs. the world)?
>
> This task seems too much for my YAML-foo :( I couldn't get it to work.
> Can we leave it as-is for now?

You just need an allOf with two if statements, cfr. e.g.
Documentation/devicetree/bindings/media/renesas,vin.yaml?

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
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml b/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml
index 72dc7eb27f8d..0f05f5c886c5 100644
--- a/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml
+++ b/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml
@@ -8,9 +8,9 @@  $schema: http://devicetree.org/meta-schemas/core.yaml#
 title: Renesas R-Car Gen3 Thermal Sensor
 
 description:
-  On R-Car Gen3 SoCs, the thermal sensor controllers (TSC) control the thermal
-  sensors (THS) which are the analog circuits for measuring temperature (Tj)
-  inside the LSI.
+  On most R-Car Gen3 and later SoCs, the thermal sensor controllers (TSC)
+  control the thermal sensors (THS) which are the analog circuits for
+  measuring temperature (Tj) inside the LSI.
 
 maintainers:
   - Niklas Söderlund <niklas.soderlund@ragnatech.se>
@@ -27,6 +27,7 @@  properties:
       - renesas,r8a77965-thermal # R-Car M3-N
       - renesas,r8a77980-thermal # R-Car V3H
       - renesas,r8a779a0-thermal # R-Car V3U
+      - renesas,r8a779f0-thermal # R-Car S4-8
 
   reg: true
 
@@ -79,8 +80,16 @@  else:
         - description: TSC1 registers
         - description: TSC2 registers
         - description: TSC3 registers
-  required:
-    - interrupts
+  if:
+    not:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - renesas,r8a779f0-thermal
+  then:
+    required:
+      - interrupts
 
 additionalProperties: false