0001 # SPDX-License-Identifier: GPL-2.0-only
0002 # Copyright (C) 2020 Renesas Electronics Corp.
0003 %YAML 1.2
0004 ---
0005 $id: http://devicetree.org/schemas/thermal/rcar-gen3-thermal.yaml#
0006 $schema: http://devicetree.org/meta-schemas/core.yaml#
0007
0008 title: Renesas R-Car Gen3 Thermal Sensor
0009
0010 description:
0011 On most R-Car Gen3 and later SoCs, the thermal sensor controllers (TSC)
0012 control the thermal sensors (THS) which are the analog circuits for
0013 measuring temperature (Tj) inside the LSI.
0014
0015 maintainers:
0016 - Niklas Söderlund <niklas.soderlund@ragnatech.se>
0017
0018 properties:
0019 compatible:
0020 enum:
0021 - renesas,r8a774a1-thermal # RZ/G2M
0022 - renesas,r8a774b1-thermal # RZ/G2N
0023 - renesas,r8a774e1-thermal # RZ/G2H
0024 - renesas,r8a7795-thermal # R-Car H3
0025 - renesas,r8a7796-thermal # R-Car M3-W
0026 - renesas,r8a77961-thermal # R-Car M3-W+
0027 - renesas,r8a77965-thermal # R-Car M3-N
0028 - renesas,r8a77980-thermal # R-Car V3H
0029 - renesas,r8a779a0-thermal # R-Car V3U
0030 - renesas,r8a779f0-thermal # R-Car S4-8
0031
0032 reg: true
0033
0034 interrupts:
0035 items:
0036 - description: TEMP1 interrupt
0037 - description: TEMP2 interrupt
0038 - description: TEMP3 interrupt
0039
0040 clocks:
0041 maxItems: 1
0042
0043 power-domains:
0044 maxItems: 1
0045
0046 resets:
0047 maxItems: 1
0048
0049 "#thermal-sensor-cells":
0050 const: 1
0051
0052 required:
0053 - compatible
0054 - reg
0055 - clocks
0056 - power-domains
0057 - resets
0058 - "#thermal-sensor-cells"
0059
0060 if:
0061 properties:
0062 compatible:
0063 contains:
0064 enum:
0065 - renesas,r8a779a0-thermal
0066 then:
0067 properties:
0068 reg:
0069 items:
0070 - description: TSC0 registers
0071 - description: TSC1 registers
0072 - description: TSC2 registers
0073 - description: TSC3 registers
0074 - description: TSC4 registers
0075 else:
0076 properties:
0077 reg:
0078 minItems: 2
0079 items:
0080 - description: TSC1 registers
0081 - description: TSC2 registers
0082 - description: TSC3 registers
0083 if:
0084 not:
0085 properties:
0086 compatible:
0087 contains:
0088 enum:
0089 - renesas,r8a779f0-thermal
0090 then:
0091 required:
0092 - interrupts
0093
0094 additionalProperties: false
0095
0096 examples:
0097 - |
0098 #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
0099 #include <dt-bindings/interrupt-controller/arm-gic.h>
0100 #include <dt-bindings/power/r8a7795-sysc.h>
0101
0102 tsc: thermal@e6198000 {
0103 compatible = "renesas,r8a7795-thermal";
0104 reg = <0xe6198000 0x100>,
0105 <0xe61a0000 0x100>,
0106 <0xe61a8000 0x100>;
0107 interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
0108 <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
0109 <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
0110 clocks = <&cpg CPG_MOD 522>;
0111 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
0112 resets = <&cpg 522>;
0113 #thermal-sensor-cells = <1>;
0114 };
0115
0116 thermal-zones {
0117 sensor_thermal: sensor-thermal {
0118 polling-delay-passive = <250>;
0119 polling-delay = <1000>;
0120 thermal-sensors = <&tsc 0>;
0121
0122 trips {
0123 sensor1_crit: sensor1-crit {
0124 temperature = <90000>;
0125 hysteresis = <2000>;
0126 type = "critical";
0127 };
0128 };
0129 };
0130 };
0131 - |
0132 #include <dt-bindings/clock/r8a779a0-cpg-mssr.h>
0133 #include <dt-bindings/interrupt-controller/arm-gic.h>
0134 #include <dt-bindings/power/r8a779a0-sysc.h>
0135
0136 tsc_r8a779a0: thermal@e6190000 {
0137 compatible = "renesas,r8a779a0-thermal";
0138 reg = <0xe6190000 0x200>,
0139 <0xe6198000 0x200>,
0140 <0xe61a0000 0x200>,
0141 <0xe61a8000 0x200>,
0142 <0xe61b0000 0x200>;
0143 clocks = <&cpg CPG_MOD 919>;
0144 power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
0145 resets = <&cpg 919>;
0146 #thermal-sensor-cells = <1>;
0147 };