162306a36Sopenharmony_ci* Mediatek Thermal 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciThis describes the device tree binding for the Mediatek thermal controller 462306a36Sopenharmony_ciwhich measures the on-SoC temperatures. This device does not have its own ADC, 562306a36Sopenharmony_ciinstead it directly controls the AUXADC via AHB bus accesses. For this reason 662306a36Sopenharmony_cithis device needs phandles to the AUXADC. Also it controls a mux in the 762306a36Sopenharmony_ciapmixedsys register space via AHB bus accesses, so a phandle to the APMIXEDSYS 862306a36Sopenharmony_ciis also needed. 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ciRequired properties: 1162306a36Sopenharmony_ci- compatible: 1262306a36Sopenharmony_ci - "mediatek,mt8173-thermal" : For MT8173 family of SoCs 1362306a36Sopenharmony_ci - "mediatek,mt2701-thermal" : For MT2701 family of SoCs 1462306a36Sopenharmony_ci - "mediatek,mt2712-thermal" : For MT2712 family of SoCs 1562306a36Sopenharmony_ci - "mediatek,mt7622-thermal" : For MT7622 SoC 1662306a36Sopenharmony_ci - "mediatek,mt7981-thermal", "mediatek,mt7986-thermal" : For MT7981 SoC 1762306a36Sopenharmony_ci - "mediatek,mt7986-thermal" : For MT7986 SoC 1862306a36Sopenharmony_ci - "mediatek,mt8183-thermal" : For MT8183 family of SoCs 1962306a36Sopenharmony_ci - "mediatek,mt8365-thermal" : For MT8365 family of SoCs 2062306a36Sopenharmony_ci - "mediatek,mt8516-thermal", "mediatek,mt2701-thermal : For MT8516 family of SoCs 2162306a36Sopenharmony_ci- reg: Address range of the thermal controller 2262306a36Sopenharmony_ci- interrupts: IRQ for the thermal controller 2362306a36Sopenharmony_ci- clocks, clock-names: Clocks needed for the thermal controller. required 2462306a36Sopenharmony_ci clocks are: 2562306a36Sopenharmony_ci "therm": Main clock needed for register access 2662306a36Sopenharmony_ci "auxadc": The AUXADC clock 2762306a36Sopenharmony_ci- mediatek,auxadc: A phandle to the AUXADC which the thermal controller uses 2862306a36Sopenharmony_ci- mediatek,apmixedsys: A phandle to the APMIXEDSYS controller. 2962306a36Sopenharmony_ci- #thermal-sensor-cells : Should be 0. See Documentation/devicetree/bindings/thermal/thermal-sensor.yaml for a description. 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ciOptional properties: 3262306a36Sopenharmony_ci- resets: Reference to the reset controller controlling the thermal controller. 3362306a36Sopenharmony_ci- nvmem-cells: A phandle to the calibration data provided by a nvmem device. If 3462306a36Sopenharmony_ci unspecified default values shall be used. 3562306a36Sopenharmony_ci- nvmem-cell-names: Should be "calibration-data" 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ciExample: 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci thermal: thermal@1100b000 { 4062306a36Sopenharmony_ci #thermal-sensor-cells = <1>; 4162306a36Sopenharmony_ci compatible = "mediatek,mt8173-thermal"; 4262306a36Sopenharmony_ci reg = <0 0x1100b000 0 0x1000>; 4362306a36Sopenharmony_ci interrupts = <0 70 IRQ_TYPE_LEVEL_LOW>; 4462306a36Sopenharmony_ci clocks = <&pericfg CLK_PERI_THERM>, <&pericfg CLK_PERI_AUXADC>; 4562306a36Sopenharmony_ci clock-names = "therm", "auxadc"; 4662306a36Sopenharmony_ci resets = <&pericfg MT8173_PERI_THERM_SW_RST>; 4762306a36Sopenharmony_ci reset-names = "therm"; 4862306a36Sopenharmony_ci mediatek,auxadc = <&auxadc>; 4962306a36Sopenharmony_ci mediatek,apmixedsys = <&apmixedsys>; 5062306a36Sopenharmony_ci nvmem-cells = <&thermal_calibration_data>; 5162306a36Sopenharmony_ci nvmem-cell-names = "calibration-data"; 5262306a36Sopenharmony_ci }; 53