1# SPDX-License-Identifier: GPL-2.0-only 2# Copyright (C) 2020 Renesas Electronics Corp. 3%YAML 1.2 4--- 5$id: http://devicetree.org/schemas/thermal/rcar-thermal.yaml# 6$schema: http://devicetree.org/meta-schemas/core.yaml# 7 8title: Renesas R-Car Thermal 9 10maintainers: 11 - Niklas Söderlund <niklas.soderlund@ragnatech.se> 12 13properties: 14 compatible: 15 oneOf: 16 - items: 17 - enum: 18 - renesas,thermal-r8a73a4 # R-Mobile APE6 19 - renesas,thermal-r8a7779 # R-Car H1 20 - const: renesas,rcar-thermal # Generic without thermal-zone 21 - items: 22 - enum: 23 - renesas,thermal-r8a7743 # RZ/G1M 24 - renesas,thermal-r8a7744 # RZ/G1N 25 - const: renesas,rcar-gen2-thermal # Generic thermal-zone 26 - items: 27 - enum: 28 - renesas,thermal-r8a7790 # R-Car H2 29 - renesas,thermal-r8a7791 # R-Car M2-W 30 - renesas,thermal-r8a7792 # R-Car V2H 31 - renesas,thermal-r8a7793 # R-Car M2-N 32 - const: renesas,rcar-gen2-thermal # Generic thermal-zone 33 - const: renesas,rcar-thermal # Generic without thermal-zone 34 - items: 35 - enum: 36 - renesas,thermal-r8a774c0 # RZ/G2E 37 - renesas,thermal-r8a77970 # R-Car V3M 38 - renesas,thermal-r8a77990 # R-Car E3 39 - renesas,thermal-r8a77995 # R-Car D3 40 reg: 41 description: 42 Address ranges of the thermal registers. If more then one range is given 43 the first one must be the common registers followed by each sensor 44 according the the datasheet. 45 minItems: 1 46 maxItems: 4 47 48 interrupts: 49 minItems: 1 50 maxItems: 3 51 52 clocks: 53 maxItems: 1 54 55 power-domains: 56 maxItems: 1 57 58 resets: 59 maxItems: 1 60 61if: 62 properties: 63 compatible: 64 contains: 65 enum: 66 - renesas,thermal-r8a73a4 # R-Mobile APE6 67 - renesas,thermal-r8a7779 # R-Car H1 68then: 69 required: 70 - compatible 71 - reg 72else: 73 required: 74 - compatible 75 - reg 76 - interrupts 77 - clocks 78 - power-domains 79 - resets 80 81examples: 82 # Example (non interrupt support) 83 - | 84 thermal@ffc48000 { 85 compatible = "renesas,thermal-r8a7779", "renesas,rcar-thermal"; 86 reg = <0xffc48000 0x38>; 87 }; 88 89 # Example (interrupt support) 90 - | 91 #include <dt-bindings/clock/r8a73a4-clock.h> 92 #include <dt-bindings/interrupt-controller/arm-gic.h> 93 #include <dt-bindings/interrupt-controller/irq.h> 94 95 thermal@e61f0000 { 96 compatible = "renesas,thermal-r8a73a4", "renesas,rcar-thermal"; 97 reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>, 98 <0 0xe61f0200 0 0x38>, <0 0xe61f0300 0 0x38>; 99 interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>; 100 clocks = <&mstp5_clks R8A73A4_CLK_THERMAL>; 101 power-domains = <&pd_c5>; 102 }; 103 104 # Example (with thermal-zone) 105 - | 106 #include <dt-bindings/clock/r8a7790-cpg-mssr.h> 107 #include <dt-bindings/interrupt-controller/arm-gic.h> 108 #include <dt-bindings/power/r8a7790-sysc.h> 109 110 thermal: thermal@e61f0000 { 111 compatible = "renesas,thermal-r8a7790", 112 "renesas,rcar-gen2-thermal", 113 "renesas,rcar-thermal"; 114 reg = <0 0xe61f0000 0 0x10>, <0 0xe61f0100 0 0x38>; 115 interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>; 116 clocks = <&cpg CPG_MOD 522>; 117 power-domains = <&sysc R8A7790_PD_ALWAYS_ON>; 118 resets = <&cpg 522>; 119 #thermal-sensor-cells = <0>; 120 }; 121 122 thermal-zones { 123 cpu_thermal: cpu-thermal { 124 polling-delay-passive = <1000>; 125 polling-delay = <5000>; 126 127 thermal-sensors = <&thermal>; 128 129 trips { 130 cpu-crit { 131 temperature = <115000>; 132 hysteresis = <0>; 133 type = "critical"; 134 }; 135 }; 136 cooling-maps { 137 }; 138 }; 139 }; 140