From nobody Mon Oct 6 12:02:05 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