1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only 2c66ec88fSEmmanuel Vadot# Copyright (C) 2020 Renesas Electronics Corp. 3c66ec88fSEmmanuel Vadot%YAML 1.2 4c66ec88fSEmmanuel Vadot--- 5c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/thermal/rcar-gen3-thermal.yaml# 6c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 7c66ec88fSEmmanuel Vadot 8c66ec88fSEmmanuel Vadottitle: Renesas R-Car Gen3 Thermal Sensor 9c66ec88fSEmmanuel Vadot 10c66ec88fSEmmanuel Vadotdescription: 11b97ee269SEmmanuel Vadot On most R-Car Gen3 and later SoCs, the thermal sensor controllers (TSC) 12b97ee269SEmmanuel Vadot control the thermal sensors (THS) which are the analog circuits for 13b97ee269SEmmanuel Vadot measuring temperature (Tj) inside the LSI. 14c66ec88fSEmmanuel Vadot 15c66ec88fSEmmanuel Vadotmaintainers: 16c66ec88fSEmmanuel Vadot - Niklas Söderlund <niklas.soderlund@ragnatech.se> 17c66ec88fSEmmanuel Vadot 18*0e8011faSEmmanuel Vadot$ref: thermal-sensor.yaml# 19*0e8011faSEmmanuel Vadot 20c66ec88fSEmmanuel Vadotproperties: 21c66ec88fSEmmanuel Vadot compatible: 22c66ec88fSEmmanuel Vadot enum: 23c66ec88fSEmmanuel Vadot - renesas,r8a774a1-thermal # RZ/G2M 24c66ec88fSEmmanuel Vadot - renesas,r8a774b1-thermal # RZ/G2N 256be33864SEmmanuel Vadot - renesas,r8a774e1-thermal # RZ/G2H 26c66ec88fSEmmanuel Vadot - renesas,r8a7795-thermal # R-Car H3 27c66ec88fSEmmanuel Vadot - renesas,r8a7796-thermal # R-Car M3-W 28c66ec88fSEmmanuel Vadot - renesas,r8a77961-thermal # R-Car M3-W+ 29c66ec88fSEmmanuel Vadot - renesas,r8a77965-thermal # R-Car M3-N 30c66ec88fSEmmanuel Vadot - renesas,r8a77980-thermal # R-Car V3H 315def4c47SEmmanuel Vadot - renesas,r8a779a0-thermal # R-Car V3U 32b97ee269SEmmanuel Vadot - renesas,r8a779f0-thermal # R-Car S4-8 33cb7aa33aSEmmanuel Vadot - renesas,r8a779g0-thermal # R-Car V4H 3401950c46SEmmanuel Vadot - renesas,r8a779h0-thermal # R-Car V4M 355def4c47SEmmanuel Vadot 362eb4d8dcSEmmanuel Vadot reg: true 37c66ec88fSEmmanuel Vadot 38c66ec88fSEmmanuel Vadot interrupts: 39c66ec88fSEmmanuel Vadot items: 40c66ec88fSEmmanuel Vadot - description: TEMP1 interrupt 41c66ec88fSEmmanuel Vadot - description: TEMP2 interrupt 42c66ec88fSEmmanuel Vadot - description: TEMP3 interrupt 43c66ec88fSEmmanuel Vadot 44c66ec88fSEmmanuel Vadot clocks: 45c66ec88fSEmmanuel Vadot maxItems: 1 46c66ec88fSEmmanuel Vadot 47c66ec88fSEmmanuel Vadot power-domains: 48c66ec88fSEmmanuel Vadot maxItems: 1 49c66ec88fSEmmanuel Vadot 50c66ec88fSEmmanuel Vadot resets: 51c66ec88fSEmmanuel Vadot maxItems: 1 52c66ec88fSEmmanuel Vadot 53c66ec88fSEmmanuel Vadot "#thermal-sensor-cells": 54c66ec88fSEmmanuel Vadot const: 1 55c66ec88fSEmmanuel Vadot 56c66ec88fSEmmanuel Vadotrequired: 57c66ec88fSEmmanuel Vadot - compatible 58c66ec88fSEmmanuel Vadot - reg 59c66ec88fSEmmanuel Vadot - clocks 60c66ec88fSEmmanuel Vadot - power-domains 61c66ec88fSEmmanuel Vadot - resets 62c66ec88fSEmmanuel Vadot 635def4c47SEmmanuel Vadotif: 645def4c47SEmmanuel Vadot properties: 655def4c47SEmmanuel Vadot compatible: 665def4c47SEmmanuel Vadot contains: 675def4c47SEmmanuel Vadot enum: 685def4c47SEmmanuel Vadot - renesas,r8a779a0-thermal 695def4c47SEmmanuel Vadotthen: 702eb4d8dcSEmmanuel Vadot properties: 712eb4d8dcSEmmanuel Vadot reg: 722eb4d8dcSEmmanuel Vadot items: 732eb4d8dcSEmmanuel Vadot - description: TSC0 registers 742eb4d8dcSEmmanuel Vadot - description: TSC1 registers 752eb4d8dcSEmmanuel Vadot - description: TSC2 registers 762eb4d8dcSEmmanuel Vadot - description: TSC3 registers 772eb4d8dcSEmmanuel Vadot - description: TSC4 registers 78b97ee269SEmmanuel Vadotelse: 79b97ee269SEmmanuel Vadot properties: 80b97ee269SEmmanuel Vadot reg: 81b97ee269SEmmanuel Vadot minItems: 2 82b97ee269SEmmanuel Vadot items: 83b97ee269SEmmanuel Vadot - description: TSC1 registers 84b97ee269SEmmanuel Vadot - description: TSC2 registers 85b97ee269SEmmanuel Vadot - description: TSC3 registers 86cb7aa33aSEmmanuel Vadot - description: TSC4 registers 87b97ee269SEmmanuel Vadot if: 88b97ee269SEmmanuel Vadot not: 89b97ee269SEmmanuel Vadot properties: 90b97ee269SEmmanuel Vadot compatible: 91b97ee269SEmmanuel Vadot contains: 92b97ee269SEmmanuel Vadot enum: 93b97ee269SEmmanuel Vadot - renesas,r8a779f0-thermal 94cb7aa33aSEmmanuel Vadot - renesas,r8a779g0-thermal 9501950c46SEmmanuel Vadot - renesas,r8a779h0-thermal 96b97ee269SEmmanuel Vadot then: 97b97ee269SEmmanuel Vadot required: 98b97ee269SEmmanuel Vadot - interrupts 995def4c47SEmmanuel Vadot 100*0e8011faSEmmanuel VadotunevaluatedProperties: false 101c66ec88fSEmmanuel Vadot 102c66ec88fSEmmanuel Vadotexamples: 103c66ec88fSEmmanuel Vadot - | 104c66ec88fSEmmanuel Vadot #include <dt-bindings/clock/r8a7795-cpg-mssr.h> 105c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 106c66ec88fSEmmanuel Vadot #include <dt-bindings/power/r8a7795-sysc.h> 107c66ec88fSEmmanuel Vadot 108c66ec88fSEmmanuel Vadot tsc: thermal@e6198000 { 109c66ec88fSEmmanuel Vadot compatible = "renesas,r8a7795-thermal"; 110c66ec88fSEmmanuel Vadot reg = <0xe6198000 0x100>, 111c66ec88fSEmmanuel Vadot <0xe61a0000 0x100>, 112c66ec88fSEmmanuel Vadot <0xe61a8000 0x100>; 113c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>, 114c66ec88fSEmmanuel Vadot <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>, 115c66ec88fSEmmanuel Vadot <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>; 116c66ec88fSEmmanuel Vadot clocks = <&cpg CPG_MOD 522>; 117c66ec88fSEmmanuel Vadot power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 118c66ec88fSEmmanuel Vadot resets = <&cpg 522>; 119c66ec88fSEmmanuel Vadot #thermal-sensor-cells = <1>; 120c66ec88fSEmmanuel Vadot }; 121c66ec88fSEmmanuel Vadot 122c66ec88fSEmmanuel Vadot thermal-zones { 123c66ec88fSEmmanuel Vadot sensor_thermal: sensor-thermal { 124c66ec88fSEmmanuel Vadot polling-delay-passive = <250>; 125c66ec88fSEmmanuel Vadot polling-delay = <1000>; 126c66ec88fSEmmanuel Vadot thermal-sensors = <&tsc 0>; 127c66ec88fSEmmanuel Vadot 128c66ec88fSEmmanuel Vadot trips { 129c66ec88fSEmmanuel Vadot sensor1_crit: sensor1-crit { 130c66ec88fSEmmanuel Vadot temperature = <90000>; 131c66ec88fSEmmanuel Vadot hysteresis = <2000>; 132c66ec88fSEmmanuel Vadot type = "critical"; 133c66ec88fSEmmanuel Vadot }; 134c66ec88fSEmmanuel Vadot }; 135c66ec88fSEmmanuel Vadot }; 136c66ec88fSEmmanuel Vadot }; 1372eb4d8dcSEmmanuel Vadot - | 1382eb4d8dcSEmmanuel Vadot #include <dt-bindings/clock/r8a779a0-cpg-mssr.h> 1392eb4d8dcSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 1402eb4d8dcSEmmanuel Vadot #include <dt-bindings/power/r8a779a0-sysc.h> 1412eb4d8dcSEmmanuel Vadot 1422eb4d8dcSEmmanuel Vadot tsc_r8a779a0: thermal@e6190000 { 1432eb4d8dcSEmmanuel Vadot compatible = "renesas,r8a779a0-thermal"; 1442eb4d8dcSEmmanuel Vadot reg = <0xe6190000 0x200>, 1452eb4d8dcSEmmanuel Vadot <0xe6198000 0x200>, 1462eb4d8dcSEmmanuel Vadot <0xe61a0000 0x200>, 1472eb4d8dcSEmmanuel Vadot <0xe61a8000 0x200>, 1482eb4d8dcSEmmanuel Vadot <0xe61b0000 0x200>; 1492eb4d8dcSEmmanuel Vadot clocks = <&cpg CPG_MOD 919>; 1502eb4d8dcSEmmanuel Vadot power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; 1512eb4d8dcSEmmanuel Vadot resets = <&cpg 919>; 1522eb4d8dcSEmmanuel Vadot #thermal-sensor-cells = <1>; 1532eb4d8dcSEmmanuel Vadot }; 154