18d13bc63SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 28d13bc63SEmmanuel Vadot%YAML 1.2 38d13bc63SEmmanuel Vadot--- 48d13bc63SEmmanuel Vadot$id: http://devicetree.org/schemas/thermal/mediatek,thermal.yaml# 58d13bc63SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 68d13bc63SEmmanuel Vadot 78d13bc63SEmmanuel Vadottitle: Mediatek thermal controller for on-SoC temperatures 88d13bc63SEmmanuel Vadot 98d13bc63SEmmanuel Vadotmaintainers: 108d13bc63SEmmanuel Vadot - Sascha Hauer <s.hauer@pengutronix.de> 118d13bc63SEmmanuel Vadot 128d13bc63SEmmanuel Vadotdescription: 138d13bc63SEmmanuel Vadot This device does not have its own ADC, instead it directly controls the AUXADC 148d13bc63SEmmanuel Vadot via AHB bus accesses. For this reason it needs phandles to the AUXADC. Also it 158d13bc63SEmmanuel Vadot controls a mux in the apmixedsys register space via AHB bus accesses, so a 168d13bc63SEmmanuel Vadot phandle to the APMIXEDSYS is also needed. 178d13bc63SEmmanuel Vadot 188d13bc63SEmmanuel VadotallOf: 198d13bc63SEmmanuel Vadot - $ref: thermal-sensor.yaml# 208d13bc63SEmmanuel Vadot 218d13bc63SEmmanuel Vadotproperties: 228d13bc63SEmmanuel Vadot compatible: 23*833e5d42SEmmanuel Vadot oneOf: 24*833e5d42SEmmanuel Vadot - enum: 258d13bc63SEmmanuel Vadot - mediatek,mt2701-thermal 268d13bc63SEmmanuel Vadot - mediatek,mt2712-thermal 278d13bc63SEmmanuel Vadot - mediatek,mt7622-thermal 288d13bc63SEmmanuel Vadot - mediatek,mt7986-thermal 298d13bc63SEmmanuel Vadot - mediatek,mt8173-thermal 308d13bc63SEmmanuel Vadot - mediatek,mt8183-thermal 318d13bc63SEmmanuel Vadot - mediatek,mt8365-thermal 32*833e5d42SEmmanuel Vadot - items: 33*833e5d42SEmmanuel Vadot - enum: 348d13bc63SEmmanuel Vadot - mediatek,mt8516-thermal 35*833e5d42SEmmanuel Vadot - const: mediatek,mt2701-thermal 36*833e5d42SEmmanuel Vadot - items: 37*833e5d42SEmmanuel Vadot - enum: 38*833e5d42SEmmanuel Vadot - mediatek,mt7981-thermal 39*833e5d42SEmmanuel Vadot - const: mediatek,mt7986-thermal 408d13bc63SEmmanuel Vadot 418d13bc63SEmmanuel Vadot reg: 428d13bc63SEmmanuel Vadot maxItems: 1 438d13bc63SEmmanuel Vadot 448d13bc63SEmmanuel Vadot interrupts: 458d13bc63SEmmanuel Vadot maxItems: 1 468d13bc63SEmmanuel Vadot 478d13bc63SEmmanuel Vadot clocks: 488d13bc63SEmmanuel Vadot items: 498d13bc63SEmmanuel Vadot - description: Main clock needed for register access 508d13bc63SEmmanuel Vadot - description: The AUXADC clock 518d13bc63SEmmanuel Vadot 528d13bc63SEmmanuel Vadot clock-names: 538d13bc63SEmmanuel Vadot items: 548d13bc63SEmmanuel Vadot - const: therm 558d13bc63SEmmanuel Vadot - const: auxadc 568d13bc63SEmmanuel Vadot 578d13bc63SEmmanuel Vadot mediatek,auxadc: 588d13bc63SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 598d13bc63SEmmanuel Vadot description: A phandle to the AUXADC which the thermal controller uses 608d13bc63SEmmanuel Vadot 618d13bc63SEmmanuel Vadot mediatek,apmixedsys: 628d13bc63SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 638d13bc63SEmmanuel Vadot description: A phandle to the APMIXEDSYS controller 648d13bc63SEmmanuel Vadot 658d13bc63SEmmanuel Vadot resets: 668d13bc63SEmmanuel Vadot description: Reset controller controlling the thermal controller 678d13bc63SEmmanuel Vadot 688d13bc63SEmmanuel Vadot nvmem-cells: 698d13bc63SEmmanuel Vadot items: 708d13bc63SEmmanuel Vadot - description: 718d13bc63SEmmanuel Vadot NVMEM cell with EEPROMA phandle to the calibration data provided by an 728d13bc63SEmmanuel Vadot NVMEM device. If unspecified default values shall be used. 738d13bc63SEmmanuel Vadot 748d13bc63SEmmanuel Vadot nvmem-cell-names: 758d13bc63SEmmanuel Vadot items: 768d13bc63SEmmanuel Vadot - const: calibration-data 778d13bc63SEmmanuel Vadot 788d13bc63SEmmanuel Vadotrequired: 798d13bc63SEmmanuel Vadot - reg 808d13bc63SEmmanuel Vadot - interrupts 818d13bc63SEmmanuel Vadot - clocks 828d13bc63SEmmanuel Vadot - clock-names 838d13bc63SEmmanuel Vadot - mediatek,auxadc 848d13bc63SEmmanuel Vadot - mediatek,apmixedsys 858d13bc63SEmmanuel Vadot 868d13bc63SEmmanuel VadotunevaluatedProperties: false 878d13bc63SEmmanuel Vadot 888d13bc63SEmmanuel Vadotexamples: 898d13bc63SEmmanuel Vadot - | 908d13bc63SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 918d13bc63SEmmanuel Vadot #include <dt-bindings/clock/mt8173-clk.h> 928d13bc63SEmmanuel Vadot #include <dt-bindings/reset/mt8173-resets.h> 938d13bc63SEmmanuel Vadot 948d13bc63SEmmanuel Vadot thermal@1100b000 { 958d13bc63SEmmanuel Vadot compatible = "mediatek,mt8173-thermal"; 968d13bc63SEmmanuel Vadot reg = <0x1100b000 0x1000>; 978d13bc63SEmmanuel Vadot interrupts = <0 70 IRQ_TYPE_LEVEL_LOW>; 988d13bc63SEmmanuel Vadot clocks = <&pericfg CLK_PERI_THERM>, <&pericfg CLK_PERI_AUXADC>; 998d13bc63SEmmanuel Vadot clock-names = "therm", "auxadc"; 1008d13bc63SEmmanuel Vadot resets = <&pericfg MT8173_PERI_THERM_SW_RST>; 1018d13bc63SEmmanuel Vadot mediatek,auxadc = <&auxadc>; 1028d13bc63SEmmanuel Vadot mediatek,apmixedsys = <&apmixedsys>; 1038d13bc63SEmmanuel Vadot nvmem-cells = <&thermal_calibration_data>; 1048d13bc63SEmmanuel Vadot nvmem-cell-names = "calibration-data"; 1058d13bc63SEmmanuel Vadot #thermal-sensor-cells = <1>; 1068d13bc63SEmmanuel Vadot }; 107