From nobody Wed Oct 8 12:36:07 2025 Received: from mx4.wp.pl (mx4.wp.pl [212.77.101.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A2041F417E for ; Sat, 28 Jun 2025 22:38:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.77.101.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751150332; cv=none; b=h+kNmrmGwjo5mDxKTOtA90oE8L7+kN1t3bkKxsKj/zex60OoPJJXGft7rEke4RfpOrYARu3hX0BHTeMMM0WPDDbssc4I6VSH06gQpqaqZPZb3ymKqOelIXqYWjBqcepnRC1If/NxNsE62X1gksLnGXFh8s3BhIJokagqZZr6rH0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751150332; c=relaxed/simple; bh=HOxtaYcGwe1Dr4Y1WuLiliZlybxYUzGV4lfY449z6QQ=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=j73nevi8VO2UFNzINSAJIO4bNy7E8PfYIb8Pzp8gk7B6Rho/cVCE8IYrDKSmkMETbpEYPGbA251YGGvixG+oRr/TwboaemU26gGKKunYqpRGMb1wkGPpMz3mH31EGrUEmwJiyDMtmvmyD/9avC2V7Wx6sRPhZUTpFoN+/Ga0ank= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=wp.pl; spf=pass smtp.mailfrom=wp.pl; dkim=pass (2048-bit key) header.d=wp.pl header.i=@wp.pl header.b=ho9MfSrp; arc=none smtp.client-ip=212.77.101.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=wp.pl Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wp.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wp.pl header.i=@wp.pl header.b="ho9MfSrp" Received: (wp-smtpd smtp.wp.pl 30245 invoked from network); 29 Jun 2025 00:38:42 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=20241105; t=1751150322; bh=4x6ilKt5iJmJ+aTcOPfoqYo5nK7rJ62lmNxO5mvvtEE=; h=From:To:Subject; b=ho9MfSrpJm1Tq1q9xQG60cHTcoy0xqWNNQBRf6smEjqkmqmh03r+oaznAE3MCLXOR 1qmy0TMgKCuhybMqGIlXeZBQ4CASBq01cG3czT44FWA/Y6m35b76pXrSPaCwK1imE3 OPvx2SwKrJ+WM9bM1Q3Cozk6ODfGfqDVQKl/3PfXk6DxySRgmgG7zYToHcZi53QT1u 0bIB4CBBOmkeMREbzCB8MqpFwDs1Ze+ICiYHeMXSodAFjnS2uXrgkc3HQwfVP6eiPs 2mP4PQeF4JNRBiSiqfehwu4XYKC1FBZh3e8zowxC5xba1btCrdZ9qeZIz2VCew+37I /QktqBuN1dCBw== Received: from 83.24.145.121.ipv4.supernova.orange.pl (HELO laptop-olek.lan) (olek2@wp.pl@[83.24.145.121]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 29 Jun 2025 00:38:42 +0200 From: Aleksander Jan Bajkowski To: rafael@kernel.org, daniel.lezcano@linaro.org, rui.zhang@intel.com, lukasz.luba@arm.com, jic23@kernel.org, dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, olek2@wp.pl, zhiyong.tao@mediatek.com, linux-pm@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 1/3] arm64: dts: mediatek: add thermal sensor support on mt7981 Date: Sun, 29 Jun 2025 00:38:35 +0200 Message-Id: <20250628223837.848244-2-olek2@wp.pl> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250628223837.848244-1-olek2@wp.pl> References: <20250628223837.848244-1-olek2@wp.pl> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-WP-MailID: 83e3732595d5e7000e752de9e0de6415 X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 0000000 [ceMx] Content-Type: text/plain; charset="utf-8" The temperature sensor in the MT7981 is same as in the MT7986. Signed-off-by: Aleksander Jan Bajkowski --- arch/arm64/boot/dts/mediatek/mt7981b.dtsi | 29 ++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7981b.dtsi index 5cbea9cd411f..c2001a82722a 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 =3D <1>; }; =20 - clock-controller@1001e000 { + apmixedsys: clock-controller@1001e000 { compatible =3D "mediatek,mt7981-apmixedsys"; reg =3D <0 0x1001e000 0 0x1000>; #clock-cells =3D <1>; @@ -184,6 +184,29 @@ spi@1100b000 { status =3D "disabled"; }; =20 + thermal@1100c800 { + compatible =3D "mediatek,mt7981-thermal"; + reg =3D <0 0x1100c800 0 0x800>; + interrupts =3D ; + clocks =3D <&infracfg CLK_INFRA_THERM_CK>, + <&infracfg CLK_INFRA_ADC_26M_CK>; + clock-names =3D "therm", "auxadc"; + nvmem-cells =3D <&thermal_calibration>; + nvmem-cell-names =3D "calibration-data"; + #thermal-sensor-cells =3D <1>; + mediatek,auxadc =3D <&auxadc>; + mediatek,apmixedsys =3D <&apmixedsys>; + }; + + auxadc: adc@1100d000 { + compatible =3D "mediatek,mt7981-auxadc"; + reg =3D <0 0x1100d000 0 0x1000>; + clocks =3D <&infracfg CLK_INFRA_ADC_26M_CK>; + clock-names =3D "main"; + #io-channel-cells =3D <1>; + status =3D "disabled"; + }; + pio: pinctrl@11d00000 { compatible =3D "mediatek,mt7981-pinctrl"; reg =3D <0 0x11d00000 0 0x1000>, @@ -211,6 +234,10 @@ efuse@11f20000 { reg =3D <0 0x11f20000 0 0x1000>; #address-cells =3D <1>; #size-cells =3D <1>; + + thermal_calibration: calib@274 { + reg =3D <0x274 0xc>; + }; }; =20 clock-controller@15000000 { --=20 2.39.5