* [PATCH v3 0/3] Add thermal sensors support for MT7981
@ 2025-07-08 22:04 Aleksander Jan Bajkowski
2025-07-08 22:04 ` [PATCH v3 1/3] dt-bindings: iio: adc: Add " Aleksander Jan Bajkowski
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Aleksander Jan Bajkowski @ 2025-07-08 22:04 UTC (permalink / raw)
To: rafael, daniel.lezcano, rui.zhang, lukasz.luba, jic23, dlechner,
nuno.sa, andy, robh, krzk+dt, conor+dt, matthias.bgg,
angelogioacchino.delregno, s.hauer, olek2, zhiyong.tao, linux-pm,
linux-iio, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
This patch adds support for the temperature sensor in the MT7981 SoC.
This sensor is exactly the same as the one in the MT7986.
CHanges in v3:
- added fallback in bindings
Changes in v2:
- added fallback to an existing compatible string
- removed second patch as obsolete
Aleksander Jan Bajkowski (3):
dt-bindings: iio: adc: Add support for MT7981
dt-bindings: thermal: mediatek: add falback compatible string for
MT7981 and MT8516
arm64: dts: mediatek: add thermal sensor support on mt7981
.../iio/adc/mediatek,mt2701-auxadc.yaml | 4 +++
.../bindings/thermal/mediatek,thermal.yaml | 27 ++++++++++------
arch/arm64/boot/dts/mediatek/mt7981b.dtsi | 31 ++++++++++++++++++-
3 files changed, 51 insertions(+), 11 deletions(-)
--
2.39.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 1/3] dt-bindings: iio: adc: Add support for MT7981
2025-07-08 22:04 [PATCH v3 0/3] Add thermal sensors support for MT7981 Aleksander Jan Bajkowski
@ 2025-07-08 22:04 ` Aleksander Jan Bajkowski
2025-07-09 8:27 ` Krzysztof Kozlowski
2025-07-08 22:04 ` [PATCH v3 2/3] dt-bindings: thermal: mediatek: add falback compatible string for MT7981 and MT8516 Aleksander Jan Bajkowski
2025-07-08 22:04 ` [PATCH v3 3/3] arm64: dts: mediatek: add thermal sensor support on mt7981 Aleksander Jan Bajkowski
2 siblings, 1 reply; 7+ messages in thread
From: Aleksander Jan Bajkowski @ 2025-07-08 22:04 UTC (permalink / raw)
To: rafael, daniel.lezcano, rui.zhang, lukasz.luba, jic23, dlechner,
nuno.sa, andy, robh, krzk+dt, conor+dt, matthias.bgg,
angelogioacchino.delregno, s.hauer, olek2, zhiyong.tao, linux-pm,
linux-iio, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
The temperature sensor in the MT7981 is same as in the MT7986.
Add compatible string for mt7981.
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
---
.../devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml b/Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml
index b489c984c1bb..14363389f30a 100644
--- a/Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml
@@ -32,6 +32,10 @@ properties:
- enum:
- mediatek,mt7623-auxadc
- const: mediatek,mt2701-auxadc
+ - items:
+ - enum:
+ - mediatek,mt7981-auxadc
+ - const: mediatek,mt7986-auxadc
- items:
- enum:
- mediatek,mt6893-auxadc
--
2.39.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 2/3] dt-bindings: thermal: mediatek: add falback compatible string for MT7981 and MT8516
2025-07-08 22:04 [PATCH v3 0/3] Add thermal sensors support for MT7981 Aleksander Jan Bajkowski
2025-07-08 22:04 ` [PATCH v3 1/3] dt-bindings: iio: adc: Add " Aleksander Jan Bajkowski
@ 2025-07-08 22:04 ` Aleksander Jan Bajkowski
2025-07-09 8:31 ` Krzysztof Kozlowski
2025-07-08 22:04 ` [PATCH v3 3/3] arm64: dts: mediatek: add thermal sensor support on mt7981 Aleksander Jan Bajkowski
2 siblings, 1 reply; 7+ messages in thread
From: Aleksander Jan Bajkowski @ 2025-07-08 22:04 UTC (permalink / raw)
To: rafael, daniel.lezcano, rui.zhang, lukasz.luba, jic23, dlechner,
nuno.sa, andy, robh, krzk+dt, conor+dt, matthias.bgg,
angelogioacchino.delregno, s.hauer, olek2, zhiyong.tao, linux-pm,
linux-iio, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
The ‘mediatek,mt7981-thermal’ and ‘mediatek,mt8516-thermal’ strings
aren't definied in the driver. Both should have fallback compatible
strings. This commit fixes this issue.
Fixes: 788494ba0999 ("dt-bindings: thermal: convert Mediatek Thermal to the json-schema")
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
---
.../bindings/thermal/mediatek,thermal.yaml | 27 ++++++++++++-------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml b/Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml
index d96a2e32bd8f..1c10d7adc77a 100644
--- a/Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml
+++ b/Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml
@@ -20,16 +20,23 @@ allOf:
properties:
compatible:
- enum:
- - mediatek,mt2701-thermal
- - mediatek,mt2712-thermal
- - mediatek,mt7622-thermal
- - mediatek,mt7981-thermal
- - mediatek,mt7986-thermal
- - mediatek,mt8173-thermal
- - mediatek,mt8183-thermal
- - mediatek,mt8365-thermal
- - mediatek,mt8516-thermal
+ oneOf:
+ - enum:
+ - mediatek,mt2701-thermal
+ - mediatek,mt2712-thermal
+ - mediatek,mt7622-thermal
+ - mediatek,mt7986-thermal
+ - mediatek,mt8173-thermal
+ - mediatek,mt8183-thermal
+ - mediatek,mt8365-thermal
+ - items:
+ - enum:
+ - mediatek,mt7981-thermal
+ - const: mediatek,mt7986-thermal
+ - items:
+ - enum:
+ - mediatek,mt8516-thermal
+ - const: mediatek,mt2701-thermal
reg:
maxItems: 1
--
2.39.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 3/3] arm64: dts: mediatek: add thermal sensor support on mt7981
2025-07-08 22:04 [PATCH v3 0/3] Add thermal sensors support for MT7981 Aleksander Jan Bajkowski
2025-07-08 22:04 ` [PATCH v3 1/3] dt-bindings: iio: adc: Add " Aleksander Jan Bajkowski
2025-07-08 22:04 ` [PATCH v3 2/3] dt-bindings: thermal: mediatek: add falback compatible string for MT7981 and MT8516 Aleksander Jan Bajkowski
@ 2025-07-08 22:04 ` Aleksander Jan Bajkowski
2 siblings, 0 replies; 7+ messages in thread
From: Aleksander Jan Bajkowski @ 2025-07-08 22:04 UTC (permalink / raw)
To: rafael, daniel.lezcano, rui.zhang, lukasz.luba, jic23, dlechner,
nuno.sa, andy, robh, krzk+dt, conor+dt, matthias.bgg,
angelogioacchino.delregno, s.hauer, olek2, zhiyong.tao, linux-pm,
linux-iio, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
The temperature sensor in the MT7981 is same as in the MT7986.
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
---
arch/arm64/boot/dts/mediatek/mt7981b.dtsi | 31 ++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
index 5cbea9cd411f..277c11247c13 100644
--- a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
@@ -76,7 +76,7 @@ watchdog: watchdog@1001c000 {
#reset-cells = <1>;
};
- clock-controller@1001e000 {
+ apmixedsys: clock-controller@1001e000 {
compatible = "mediatek,mt7981-apmixedsys";
reg = <0 0x1001e000 0 0x1000>;
#clock-cells = <1>;
@@ -184,6 +184,31 @@ spi@1100b000 {
status = "disabled";
};
+ thermal@1100c800 {
+ compatible = "mediatek,mt7981-thermal",
+ "mediatek,mt7986-thermal";
+ reg = <0 0x1100c800 0 0x800>;
+ interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&infracfg CLK_INFRA_THERM_CK>,
+ <&infracfg CLK_INFRA_ADC_26M_CK>;
+ clock-names = "therm", "auxadc";
+ nvmem-cells = <&thermal_calibration>;
+ nvmem-cell-names = "calibration-data";
+ #thermal-sensor-cells = <1>;
+ mediatek,auxadc = <&auxadc>;
+ mediatek,apmixedsys = <&apmixedsys>;
+ };
+
+ auxadc: adc@1100d000 {
+ compatible = "mediatek,mt7981-auxadc",
+ "mediatek,mt7986-auxadc";
+ reg = <0 0x1100d000 0 0x1000>;
+ clocks = <&infracfg CLK_INFRA_ADC_26M_CK>;
+ clock-names = "main";
+ #io-channel-cells = <1>;
+ status = "disabled";
+ };
+
pio: pinctrl@11d00000 {
compatible = "mediatek,mt7981-pinctrl";
reg = <0 0x11d00000 0 0x1000>,
@@ -211,6 +236,10 @@ efuse@11f20000 {
reg = <0 0x11f20000 0 0x1000>;
#address-cells = <1>;
#size-cells = <1>;
+
+ thermal_calibration: thermal-calib@274 {
+ reg = <0x274 0xc>;
+ };
};
clock-controller@15000000 {
--
2.39.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: iio: adc: Add support for MT7981
2025-07-08 22:04 ` [PATCH v3 1/3] dt-bindings: iio: adc: Add " Aleksander Jan Bajkowski
@ 2025-07-09 8:27 ` Krzysztof Kozlowski
2025-07-09 15:56 ` Jonathan Cameron
0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-09 8:27 UTC (permalink / raw)
To: Aleksander Jan Bajkowski
Cc: rafael, daniel.lezcano, rui.zhang, lukasz.luba, jic23, dlechner,
nuno.sa, andy, robh, krzk+dt, conor+dt, matthias.bgg,
angelogioacchino.delregno, s.hauer, zhiyong.tao, linux-pm,
linux-iio, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
On Wed, Jul 09, 2025 at 12:04:03AM +0200, Aleksander Jan Bajkowski wrote:
> The temperature sensor in the MT7981 is same as in the MT7986.
> Add compatible string for mt7981.
>
> Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
> ---
> .../devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml | 4 ++++
> 1 file changed, 4 insertions(+)
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
<form letter>
This is an automated instruction, just in case, because many review
tags are being ignored. If you know the process, just skip it entirely
(please do not feel offended by me posting it here - no bad intentions
intended, no patronizing, I just want to avoid wasted efforts). If you
do not know the process, here is a short explanation:
Please add Acked-by/Reviewed-by/Tested-by tags when posting new
versions of patchset, under or above your Signed-off-by tag, unless
patch changed significantly (e.g. new properties added to the DT
bindings). Tag is "received", when provided in a message replied to you
on the mailing list. Tools like b4 can help here ('b4 trailers -u ...').
However, there's no need to repost patches *only* to add the tags. The
upstream maintainer will do that for tags received on the version they
apply.
https://elixir.bootlin.com/linux/v6.15/source/Documentation/process/submitting-patches.rst#L591
</form letter>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 2/3] dt-bindings: thermal: mediatek: add falback compatible string for MT7981 and MT8516
2025-07-08 22:04 ` [PATCH v3 2/3] dt-bindings: thermal: mediatek: add falback compatible string for MT7981 and MT8516 Aleksander Jan Bajkowski
@ 2025-07-09 8:31 ` Krzysztof Kozlowski
0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-09 8:31 UTC (permalink / raw)
To: Aleksander Jan Bajkowski
Cc: rafael, daniel.lezcano, rui.zhang, lukasz.luba, jic23, dlechner,
nuno.sa, andy, robh, krzk+dt, conor+dt, matthias.bgg,
angelogioacchino.delregno, s.hauer, zhiyong.tao, linux-pm,
linux-iio, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
On Wed, Jul 09, 2025 at 12:04:04AM +0200, Aleksander Jan Bajkowski wrote:
> + - items:
> + - enum:
> + - mediatek,mt7981-thermal
> + - const: mediatek,mt7986-thermal
> + - items:
> + - enum:
> + - mediatek,mt8516-thermal
> + - const: mediatek,mt2701-thermal
Groups of lists usually we order by fallback, so first goes items with
mediatek,mt2701-thermal fallback and then items with
mediatek,mt7986-thermal fallback.
Anyway:
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: iio: adc: Add support for MT7981
2025-07-09 8:27 ` Krzysztof Kozlowski
@ 2025-07-09 15:56 ` Jonathan Cameron
0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2025-07-09 15:56 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Aleksander Jan Bajkowski, rafael, daniel.lezcano, rui.zhang,
lukasz.luba, dlechner, nuno.sa, andy, robh, krzk+dt, conor+dt,
matthias.bgg, angelogioacchino.delregno, s.hauer, zhiyong.tao,
linux-pm, linux-iio, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
On Wed, 9 Jul 2025 10:27:50 +0200
Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Wed, Jul 09, 2025 at 12:04:03AM +0200, Aleksander Jan Bajkowski wrote:
> > The temperature sensor in the MT7981 is same as in the MT7986.
> > Add compatible string for mt7981.
> >
> > Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
> > ---
> > .../devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml | 4 ++++
> > 1 file changed, 4 insertions(+)
>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
Picked up this patch for the togreg branch of iio.git. Initially pushed out
as testing as other stuff on there needs some test build coverage.
>
> <form letter>
> This is an automated instruction, just in case, because many review
> tags are being ignored. If you know the process, just skip it entirely
> (please do not feel offended by me posting it here - no bad intentions
> intended, no patronizing, I just want to avoid wasted efforts). If you
> do not know the process, here is a short explanation:
>
> Please add Acked-by/Reviewed-by/Tested-by tags when posting new
> versions of patchset, under or above your Signed-off-by tag, unless
> patch changed significantly (e.g. new properties added to the DT
> bindings). Tag is "received", when provided in a message replied to you
> on the mailing list. Tools like b4 can help here ('b4 trailers -u ...').
> However, there's no need to repost patches *only* to add the tags. The
> upstream maintainer will do that for tags received on the version they
> apply.
>
> https://elixir.bootlin.com/linux/v6.15/source/Documentation/process/submitting-patches.rst#L591
> </form letter>
>
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-07-09 15:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-08 22:04 [PATCH v3 0/3] Add thermal sensors support for MT7981 Aleksander Jan Bajkowski
2025-07-08 22:04 ` [PATCH v3 1/3] dt-bindings: iio: adc: Add " Aleksander Jan Bajkowski
2025-07-09 8:27 ` Krzysztof Kozlowski
2025-07-09 15:56 ` Jonathan Cameron
2025-07-08 22:04 ` [PATCH v3 2/3] dt-bindings: thermal: mediatek: add falback compatible string for MT7981 and MT8516 Aleksander Jan Bajkowski
2025-07-09 8:31 ` Krzysztof Kozlowski
2025-07-08 22:04 ` [PATCH v3 3/3] arm64: dts: mediatek: add thermal sensor support on mt7981 Aleksander Jan Bajkowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).