1* Temperature Sensor ADC (TSADC) on rockchip SoCs 2 3Required properties: 4- compatible : should be "rockchip,<name>-tsadc" 5 "rockchip,px30-tsadc": found on PX30 SoCs 6 "rockchip,rv1108-tsadc": found on RV1108 SoCs 7 "rockchip,rv1126-tsadc": found on RV1126 SoCs 8 "rockchip,rk1808-tsadc": found on RK1808 SoCs 9 "rockchip,rk3228-tsadc": found on RK3228 SoCs 10 "rockchip,rk3288-tsadc": found on RK3288 SoCs 11 "rockchip,rk3308-tsadc": found on RK3308 SoCs 12 "rockchip,rk3328-tsadc": found on RK3328 SoCs 13 "rockchip,rk3368-tsadc": found on RK3368 SoCs 14 "rockchip,rk3399-tsadc": found on RK3399 SoCs 15 "rockchip,rk3568-tsadc": found on RK3568 SoCs 16 "rockchip,rk3588-tsadc": found on RK3588 SoCs 17- reg : physical base address of the controller and length of memory mapped 18 region. 19- interrupts : The interrupt number to the cpu. The interrupt specifier format 20 depends on the interrupt controller. 21- clocks : Must contain an entry for each entry in clock-names. 22- clock-names : Shall be "tsadc" for the converter-clock, and "apb_pclk" for 23 the peripheral clock. 24- resets : Must contain an entry for each entry in reset-names. 25 See ../reset/reset.txt for details. 26- reset-names : Must include the name "tsadc-apb". 27- pinctrl-names : The pin control state names; 28- pinctrl-0 : The "gpio" pinctrl state, it will be set if tsadc via reset 29 CRU when tshut. 30- pinctrl-1 : The "otpout" pinctrl state, it will be set if tsadc via set 31 otpout_gpio when tshut. 32- #thermal-sensor-cells : Should be 1. See Documentation/devicetree/bindings/thermal/thermal-sensor.yaml for a description. 33 34Optional properties: 35- rockchip,hw-tshut-temp : The hardware-controlled shutdown temperature value. 36- rockchip,hw-tshut-mode : The hardware-controlled shutdown mode 0:CRU 1:GPIO. 37- rockchip,hw-tshut-polarity : The hardware-controlled active polarity 0:LOW 38 1:HIGH. 39- rockchip,grf : The phandle of the syscon node for the general register file. 40 41Exiample: 42tsadc: tsadc@ff280000 { 43 compatible = "rockchip,rk3288-tsadc"; 44 reg = <0xff280000 0x100>; 45 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; 46 clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>; 47 clock-names = "tsadc", "apb_pclk"; 48 resets = <&cru SRST_TSADC>; 49 reset-names = "tsadc-apb"; 50 pinctrl-names = "gpio", "otpout"; 51 pinctrl-0 = <&otp_pin>; 52 pinctrl-1 = <&otp_out>; 53 #thermal-sensor-cells = <1>; 54 rockchip,hw-tshut-temp = <95000>; 55 rockchip,hw-tshut-mode = <0>; 56 rockchip,hw-tshut-polarity = <0>; 57}; 58 59Example: referring to thermal sensors: 60thermal-zones { 61 cpu_thermal: cpu_thermal { 62 polling-delay-passive = <1000>; /* milliseconds */ 63 polling-delay = <5000>; /* milliseconds */ 64 65 /* sensor ID */ 66 thermal-sensors = <&tsadc 1>; 67 68 trips { 69 cpu_alert0: cpu_alert { 70 temperature = <70000>; /* millicelsius */ 71 hysteresis = <2000>; /* millicelsius */ 72 type = "passive"; 73 }; 74 cpu_crit: cpu_crit { 75 temperature = <90000>; /* millicelsius */ 76 hysteresis = <2000>; /* millicelsius */ 77 type = "critical"; 78 }; 79 }; 80 81 cooling-maps { 82 map0 { 83 trip = <&cpu_alert0>; 84 cooling-device = 85 <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; 86 }; 87 }; 88 }; 89}; 90