From nobody Mon Oct 6 10:16:36 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 ECACB288524; Tue, 22 Jul 2025 11:26:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753183590; cv=none; b=qwbxeXkLCaI5JwnoWyhYTd5IHJX9OcILfvZTlqzcbX9NT4ajsRdAzlCCKBolvWoRt5xjoE0kOV2xVe8RAfcBFvq3CYngRALmWNop8BVrn7fFhn7u4R9eY1i6kA5cVXbeJ3uFdGajVpPG2+yMnyvT2hU61up22vfcEDdjVnOibIY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753183590; c=relaxed/simple; bh=YRA1hYrEORFOB7GQuzTQX4VTQhnY9esTD7J0wHpqIjg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MULoCRE6w/E6jQLrNjMxOWgB3TAONPxKuyDlJwmE88C4BEdgeJVZNsZERQ36il4OAYIUT1pnxyc4omyZAHrPm7+BPWPyoalATbgr8qtN3RrOZ6YOHRz5yErcyWqjIYrhhwdMQqOY0djThAZJhGJ4NOAl4MN9cqtpzJ2kXSHRfQs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fMDuRiiD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fMDuRiiD" Received: by smtp.kernel.org (Postfix) with ESMTPS id 9351AC4CEF4; Tue, 22 Jul 2025 11:26:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753183589; bh=YRA1hYrEORFOB7GQuzTQX4VTQhnY9esTD7J0wHpqIjg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=fMDuRiiDGlEukblcq+Qoss2+dwTvSbp68Ai0QD2ZMx3d1k2uH2NHhoSkCaJWWD+Ys EDw1L90A9QfaunFIXb+LlTd3f/Q3sXWgopqjgu4IngkLeV1L0WNnttQaymjzRheil0 6n5MU2Xb80XxVzC/G+ZswxE1eWP+GvrkBiJG4i1L/m2JRREGkQEsac6Q3XuPRzRXSU xNgsmfXYR/tIyV9q47W1rH/HVsiA505r6uULUM9hZUr2oF6sxgOBcfeba8dH48/MeA 1ikiJgNdQuHiYYVzy/krJu8gFKFnXW/o19jR8pESpv7YYCZEhOiZFDmOoymAYWn7z2 /eEJ8r8m/rSVQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 843D7C83F27; Tue, 22 Jul 2025 11:26:29 +0000 (UTC) From: Xianwei Zhao via B4 Relay Date: Tue, 22 Jul 2025 19:26:27 +0800 Subject: [PATCH v2 1/3] dt-bindings: thermal: amlogic: Add compatible string for C3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250722-c3-thermal-v2-1-b2231b4be79e@amlogic.com> References: <20250722-c3-thermal-v2-0-b2231b4be79e@amlogic.com> In-Reply-To: <20250722-c3-thermal-v2-0-b2231b4be79e@amlogic.com> To: Guillaume La Roque , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: linux-pm@vger.kernel.org, linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Xianwei Zhao , Liming Xue X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1753183587; l=1117; i=xianwei.zhao@amlogic.com; s=20231208; h=from:subject:message-id; bh=F245QN28IAzyYVKe5LdflpfqaXIiAZXvhwVaz2WE8mk=; b=q+REDs12RZEfw/hMQsKiHAKbppF7thzkQndT/LP7EhRcH5t87fMSM1iDpgzs5MsZeD8FmYgmc K4d+gMdl/vnDxBp1OybqgW5ji0qQu7ttbckZPAsqLorPzjHq0G3M111 X-Developer-Key: i=xianwei.zhao@amlogic.com; a=ed25519; pk=o4fDH8ZXL6xQg5h17eNzRljf6pwZHWWjqcOSsj3dW24= X-Endpoint-Received: by B4 Relay for xianwei.zhao@amlogic.com/20231208 with auth_id=107 X-Original-From: Xianwei Zhao Reply-To: xianwei.zhao@amlogic.com From: Xianwei Zhao Add the compatible properties for Amlogic C3 SoC family. C3 family supports only one thermal node - CPU thermal sensor. Signed-off-by: Liming Xue Signed-off-by: Xianwei Zhao Acked-by: Rob Herring (Arm) --- Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml= b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml index 70b273271754..27ddb67c7743 100644 --- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml +++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml @@ -16,12 +16,14 @@ $ref: thermal-sensor.yaml# properties: compatible: oneOf: + - enum: + - amlogic,a1-cpu-thermal + - amlogic,c3-cpu-thermal - items: - enum: - amlogic,g12a-cpu-thermal - amlogic,g12a-ddr-thermal - const: amlogic,g12a-thermal - - const: amlogic,a1-cpu-thermal =20 reg: maxItems: 1 --=20 2.37.1 From nobody Mon Oct 6 10:16:36 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2CC102E2F10; Tue, 22 Jul 2025 11:26:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753183590; cv=none; b=lzX8+nEitqXnO+h6gKY0PdHiNsPnv5PVm7lCT9FNmL9bElxgtZmzohuWDDPk/PLd+IrdsjnDKczBx4oMhe2rxIKlOhcVQgxOdfSvO70OFXa7HGsLBAeIzejz91TTW+nsdP1750CIbHMfRrfnvEr1RYzNPtS1B9+alQAwX2woc7M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753183590; c=relaxed/simple; bh=VIow2Oh79+ksdUzwuxUSWaFAQ/Cb/re8rFKTI6k85j0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Wtggv1gyTS37zChRLOW9aOLj/33/PBq3pevZ2MxySDWiVw+m0IUBa3NzccrVfMNOAUejbxV8PMwzpkwIeAC7Fw+shrbYHfNOKSm2FuxxQe+wBsnKViNpsaNQv56tVbKEMX95l2TvVWqw9hL860J4r/vENytqKDrvK2VjUtaGXek= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tCrJ071E; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tCrJ071E" Received: by smtp.kernel.org (Postfix) with ESMTPS id A6B38C4CEF6; Tue, 22 Jul 2025 11:26:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753183589; bh=VIow2Oh79+ksdUzwuxUSWaFAQ/Cb/re8rFKTI6k85j0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=tCrJ071EseGnJPK5qXEaZJ3TkfZ9KKJugPXtXESn499s0IH/TV3RmMfhlzTllnhep eq1ESGsI1PfEDInAfqM/ZU0d0U4vvQzcdge0IbdNaAQtwkWEc+KZJfdjxeMD+aRxnp 1IJG5XOf3fsxrLBTC0NTp523BfHKdH3uD0ml9LlDLCew0OYPXtMKs8waGIvP9A1h/t RdV5+p2Td3s/CuG5HY9bv9BaJ9I5dyw811L3BWnopj97RxMyKeiPMUGBbB2SiMPIzk sZiSIV3va0mNdFIJM4ASl4iVKHDb+H9nx64SzURs0NalT7wwJL7JfAxLEx4lYIGdcT 2b/uKQ3ZwjPrg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94E80C83F25; Tue, 22 Jul 2025 11:26:29 +0000 (UTC) From: Xianwei Zhao via B4 Relay Date: Tue, 22 Jul 2025 19:26:28 +0800 Subject: [PATCH v2 2/3] thermal: amlogic: Support C3 thermal controller driver Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250722-c3-thermal-v2-2-b2231b4be79e@amlogic.com> References: <20250722-c3-thermal-v2-0-b2231b4be79e@amlogic.com> In-Reply-To: <20250722-c3-thermal-v2-0-b2231b4be79e@amlogic.com> To: Guillaume La Roque , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: linux-pm@vger.kernel.org, linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Xianwei Zhao , Liming Xue X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1753183587; l=1585; i=xianwei.zhao@amlogic.com; s=20231208; h=from:subject:message-id; bh=8XB3aK58Pggx5wnTbdR3sz0nyiYdXkHkRUiHqo4F+k8=; b=EaPPDTlRO84fqaozVJ58Tw29Pt8gBKnOdXcHobVHZLPyZAIRrgWWbmmHMqjy+WX0wWQ7rMa17 dDWRgvoforgAt6VocVBtVccPUis5r/OMN/AiefFc/OHk1HkFezSSg00 X-Developer-Key: i=xianwei.zhao@amlogic.com; a=ed25519; pk=o4fDH8ZXL6xQg5h17eNzRljf6pwZHWWjqcOSsj3dW24= X-Endpoint-Received: by B4 Relay for xianwei.zhao@amlogic.com/20231208 with auth_id=107 X-Original-From: Xianwei Zhao Reply-To: xianwei.zhao@amlogic.com From: Xianwei Zhao Add the thermal controller driver for the C3 SoC family. The main difference compared to other Amlogic chips lies in the offset of the sec_ao base (referred to as u_efuse_off), which is handled differently. Everything else remains consistent. Signed-off-by: Liming Xue Reviewed-by: Neil Armstrong Signed-off-by: Xianwei Zhao --- drivers/thermal/amlogic_thermal.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_th= ermal.c index 5448d772db12..d1b08119c818 100644 --- a/drivers/thermal/amlogic_thermal.c +++ b/drivers/thermal/amlogic_thermal.c @@ -226,6 +226,12 @@ static const struct amlogic_thermal_data amlogic_therm= al_a1_cpu_param =3D { .regmap_config =3D &amlogic_thermal_regmap_config_g12a, }; =20 +static const struct amlogic_thermal_data amlogic_thermal_c3_cpu_param =3D { + .u_efuse_off =3D 0x108, + .calibration_parameters =3D &amlogic_thermal_g12a, + .regmap_config =3D &amlogic_thermal_regmap_config_g12a, +}; + static const struct of_device_id of_amlogic_thermal_match[] =3D { { .compatible =3D "amlogic,g12a-ddr-thermal", @@ -239,6 +245,10 @@ static const struct of_device_id of_amlogic_thermal_ma= tch[] =3D { .compatible =3D "amlogic,a1-cpu-thermal", .data =3D &amlogic_thermal_a1_cpu_param, }, + { + .compatible =3D "amlogic,c3-cpu-thermal", + .data =3D &amlogic_thermal_c3_cpu_param, + }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, of_amlogic_thermal_match); --=20 2.37.1 From nobody Mon Oct 6 10:16:36 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2CBA92E2F05; Tue, 22 Jul 2025 11:26:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753183590; cv=none; b=IIM3BJhLe/7x/3HgKQA0zZOowIi2HOo06KahQtg8N1XpvcRpfyPaNkAO9FxQULT/unT9DkAW62ON1pJgr5ZUdSCYsXAlDlfNQ+4woRsTejEacmn9rv6hoZZ4Rthu3DJwusig66hlHQY3mmYUH3ryeFfrL6V2qvzUaIrznZFfRj8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753183590; c=relaxed/simple; bh=gpUTUqXOWbULFlsiYSGEN3jZoAtqx3OWjHms0p86oTg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Zg6JV/4O1Hqoure7YSLOIparSudA+KLO7U7gFWPfeRx1025c8aC7+4iZCCU7NV+5AFkLbmSDaS3KOAyD+8kbZNQJQ5qsKu2o9CNQ06fHlIHAXKmCcLwim4pH7LZLnX5CIcyLkGPhYSoRNBfIC33lVuZxo5lMv/XgSLvOuTxICm0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nZ87M1xL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nZ87M1xL" Received: by smtp.kernel.org (Postfix) with ESMTPS id BC823C4CEF7; Tue, 22 Jul 2025 11:26:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753183589; bh=gpUTUqXOWbULFlsiYSGEN3jZoAtqx3OWjHms0p86oTg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=nZ87M1xL6Yk0BG7E0SFkozay2PjlaXgqwer7C0N6jR664uq26o+naJBL59ZRez01w 4TE5jePrre9dRrcoC3Tj5u2CxZ+K8JrPsOZCeOMVmucV63ZNO+vFHJDlwqy0jbEVPi 6+IEqOHUMtEx4yEyFGYP4b8CnNMnFPLJFmLja2ahGXwQdHArBl1W6SOPwuvQiG7+9C ZkhYyDqHK1RfRO6gCiDeTuK+2nfRPpDXEHsN+Tnav1D1pNrlbQ7hnbhaSv9JXqIWgr dE4WiETx19O8cz3oKSUW85vNHjoTjj9OPwClFJ+85m2y9Hjy8KdvSOaqbKo92/xAJm vfxRn+F7uVJYg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1FC1C87FC5; Tue, 22 Jul 2025 11:26:29 +0000 (UTC) From: Xianwei Zhao via B4 Relay Date: Tue, 22 Jul 2025 19:26:29 +0800 Subject: [PATCH v2 3/3] arm64: dts: amlogic: c3: Add tempsensor controller node Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250722-c3-thermal-v2-3-b2231b4be79e@amlogic.com> References: <20250722-c3-thermal-v2-0-b2231b4be79e@amlogic.com> In-Reply-To: <20250722-c3-thermal-v2-0-b2231b4be79e@amlogic.com> To: Guillaume La Roque , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: linux-pm@vger.kernel.org, linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Xianwei Zhao , Liming Xue X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1753183587; l=1174; i=xianwei.zhao@amlogic.com; s=20231208; h=from:subject:message-id; bh=IoRBkt3TWKHWrtMJz187CwMxwu8yF7DTD3qyajQTJnE=; b=LmYFK1+8fHyOjr607kbVF4ATEFnyzGdngoasYURRQr2BWxwHZ8cPDjAMx45X65KAZp/FxwlMx Wbt4Q7TQ7uSApW4HfcfFSbzCQjIKrOLYrapEVKroqNXJs8E1KIBHOc7 X-Developer-Key: i=xianwei.zhao@amlogic.com; a=ed25519; pk=o4fDH8ZXL6xQg5h17eNzRljf6pwZHWWjqcOSsj3dW24= X-Endpoint-Received: by B4 Relay for xianwei.zhao@amlogic.com/20231208 with auth_id=107 X-Original-From: Xianwei Zhao Reply-To: xianwei.zhao@amlogic.com From: Xianwei Zhao Add the Tempsensor controller node for C3 SoC family. Signed-off-by: Liming Xue Reviewed-by: Neil Armstrong Signed-off-by: Xianwei Zhao --- arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi b/arch/arm64/boot/= dts/amlogic/amlogic-c3.dtsi index cb9ea3ca6ee0..c853390eca6c 100644 --- a/arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi +++ b/arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi @@ -727,6 +727,17 @@ clkc_pll: clock-controller@8000 { "fix"; }; =20 + temperature-sensor@20000 { + compatible =3D "amlogic,c3-cpu-thermal"; + reg =3D <0x0 0x20000 0x0 0x50>; + interrupts =3D ; + clocks =3D <&clkc_periphs CLKID_TS>; + assigned-clocks =3D <&clkc_periphs CLKID_TS>; + assigned-clock-rates =3D <500000>; + amlogic,ao-secure =3D <&sec_ao>; + #thermal-sensor-cells =3D <0>; + }; + eth_phy: mdio-multiplexer@28000 { compatible =3D "amlogic,g12a-mdio-mux"; reg =3D <0x0 0x28000 0x0 0xa4>; --=20 2.37.1