[PATCH v2 04/16] dt-bindings: mfd: mediatek: mt6397: add mt6323 PMIC thermal
Roman Vivchar via B4 Relay
devnull+rva333.protonmail.com at kernel.org
Mon May 11 22:18:18 PDT 2026
From: Roman Vivchar <rva333 at protonmail.com>
The MediaTek mt6323 PMIC temperature can be read using AUXADC channel.
Add the devicetree binding documentation for the MediaTek mt6323 thermal.
While mt6323 exposes only a single thermal sensor, newer PMICs like
mt6358 provide more than one sensor. Therefore define #thermal-sensor-cells
as 1 to avoid breaking devicetree ABI in the future.
Signed-off-by: Roman Vivchar <rva333 at protonmail.com>
---
.../devicetree/bindings/mfd/mediatek,mt6397.yaml | 44 ++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
index beaa67bf0df2..2c826737189e 100644
--- a/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
+++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
@@ -242,6 +242,31 @@ properties:
description:
Pin controller
+ thermal:
+ type: object
+ unevaluatedProperties: false
+ description:
+ PMIC thermal monitoring
+
+ properties:
+ compatible:
+ const: mediatek,mt6323-thermal
+
+ io-channels:
+ description:
+ IIO channel for the AUXADC to read raw data from.
+ maxItems: 1
+
+ nvmem-cells:
+ maxItems: 1
+
+ "#thermal-sensor-cells":
+ const: 1
+ required:
+ - compatible
+ - io-channels
+ - "#thermal-sensor-cells"
+
required:
- compatible
- regulators
@@ -250,6 +275,7 @@ additionalProperties: false
examples:
- |
+ #include <dt-bindings/iio/adc/mediatek,mt6323-auxadc.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/leds/common.h>
@@ -262,6 +288,16 @@ examples:
efuse {
compatible = "mediatek,mt6323-efuse";
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ mt6323_thermal_calibration_data: thermal-data at 14 {
+ reg = <0x14 0x4>;
+ };
+ };
};
leds {
@@ -511,6 +547,14 @@ examples:
rtc {
compatible = "mediatek,mt6323-rtc";
};
+
+ thermal {
+ compatible = "mediatek,mt6323-thermal";
+ nvmem-cells = <&mt6323_thermal_calibration_data>;
+
+ io-channels = <&mt6323_adc MT6323_AUXADC_CHIP_TEMP>;
+ #thermal-sensor-cells = <1>;
+ };
};
- |
--
2.54.0
More information about the Linux-mediatek
mailing list