18c2ecf20Sopenharmony_ci* Mediatek Thermal
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThis describes the device tree binding for the Mediatek thermal controller
48c2ecf20Sopenharmony_ciwhich measures the on-SoC temperatures. This device does not have its own ADC,
58c2ecf20Sopenharmony_ciinstead it directly controls the AUXADC via AHB bus accesses. For this reason
68c2ecf20Sopenharmony_cithis device needs phandles to the AUXADC. Also it controls a mux in the
78c2ecf20Sopenharmony_ciapmixedsys register space via AHB bus accesses, so a phandle to the APMIXEDSYS
88c2ecf20Sopenharmony_ciis also needed.
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciRequired properties:
118c2ecf20Sopenharmony_ci- compatible:
128c2ecf20Sopenharmony_ci  - "mediatek,mt8173-thermal" : For MT8173 family of SoCs
138c2ecf20Sopenharmony_ci  - "mediatek,mt2701-thermal" : For MT2701 family of SoCs
148c2ecf20Sopenharmony_ci  - "mediatek,mt2712-thermal" : For MT2712 family of SoCs
158c2ecf20Sopenharmony_ci  - "mediatek,mt7622-thermal" : For MT7622 SoC
168c2ecf20Sopenharmony_ci  - "mediatek,mt8183-thermal" : For MT8183 family of SoCs
178c2ecf20Sopenharmony_ci- reg: Address range of the thermal controller
188c2ecf20Sopenharmony_ci- interrupts: IRQ for the thermal controller
198c2ecf20Sopenharmony_ci- clocks, clock-names: Clocks needed for the thermal controller. required
208c2ecf20Sopenharmony_ci                       clocks are:
218c2ecf20Sopenharmony_ci		       "therm":	 Main clock needed for register access
228c2ecf20Sopenharmony_ci		       "auxadc": The AUXADC clock
238c2ecf20Sopenharmony_ci- resets: Reference to the reset controller controlling the thermal controller.
248c2ecf20Sopenharmony_ci- mediatek,auxadc: A phandle to the AUXADC which the thermal controller uses
258c2ecf20Sopenharmony_ci- mediatek,apmixedsys: A phandle to the APMIXEDSYS controller.
268c2ecf20Sopenharmony_ci- #thermal-sensor-cells : Should be 0. See Documentation/devicetree/bindings/thermal/thermal-sensor.yaml for a description.
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ciOptional properties:
298c2ecf20Sopenharmony_ci- nvmem-cells: A phandle to the calibration data provided by a nvmem device. If
308c2ecf20Sopenharmony_ci               unspecified default values shall be used.
318c2ecf20Sopenharmony_ci- nvmem-cell-names: Should be "calibration-data"
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ciExample:
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci	thermal: thermal@1100b000 {
368c2ecf20Sopenharmony_ci		#thermal-sensor-cells = <1>;
378c2ecf20Sopenharmony_ci		compatible = "mediatek,mt8173-thermal";
388c2ecf20Sopenharmony_ci		reg = <0 0x1100b000 0 0x1000>;
398c2ecf20Sopenharmony_ci		interrupts = <0 70 IRQ_TYPE_LEVEL_LOW>;
408c2ecf20Sopenharmony_ci		clocks = <&pericfg CLK_PERI_THERM>, <&pericfg CLK_PERI_AUXADC>;
418c2ecf20Sopenharmony_ci		clock-names = "therm", "auxadc";
428c2ecf20Sopenharmony_ci		resets = <&pericfg MT8173_PERI_THERM_SW_RST>;
438c2ecf20Sopenharmony_ci		reset-names = "therm";
448c2ecf20Sopenharmony_ci		mediatek,auxadc = <&auxadc>;
458c2ecf20Sopenharmony_ci		mediatek,apmixedsys = <&apmixedsys>;
468c2ecf20Sopenharmony_ci		nvmem-cells = <&thermal_calibration_data>;
478c2ecf20Sopenharmony_ci		nvmem-cell-names = "calibration-data";
488c2ecf20Sopenharmony_ci	};
49