From patchwork Thu Mar 28 13:37:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Rokosov X-Patchwork-Id: 13608570 Received: from mx1.sberdevices.ru (mx2.sberdevices.ru [45.89.224.132]) (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 8D5117CF37; Thu, 28 Mar 2024 13:38:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.89.224.132 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711633096; cv=none; b=Puya923MvjiQuyV9SRlK5L8sDaz6lLfsVFN1K+6Ix4SQvhvUrRWmKaJAifEFd9ceEsQ9UzExzgd8XS1Z0t6VtucSjlkujEXeN4jaSaA/T8PRrGZ9DCIDY8lW84RHlY3BXG93KR5fUELOuXaXBimhvPHVUsr23PaI3ynlFAd8FaM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711633096; c=relaxed/simple; bh=TgXWfahIgNNcAoMQJ59AQ0okdIQDTlo0Qo25KTDlQfM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FADdkB/8BWvSsfBnbnECkEQ/FdRhLzuZ/3fkhOAy3BHXbwpz/0DiyBECq5QL4RTJKAar3coKV7bEjNClgo011YAuYVntxpazubGWM8aQgMe62BOhcs0RvyXUf5a7z3bXae54iVMvfvIObaxx0QYNOSZvdgyIESAwg39fc7/gNr0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com; spf=pass smtp.mailfrom=salutedevices.com; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b=BYfL54vR; arc=none smtp.client-ip=45.89.224.132 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=salutedevices.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b="BYfL54vR" Received: from p-infra-ksmg-sc-msk02 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id AD74F120002; Thu, 28 Mar 2024 16:38:10 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru AD74F120002 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1711633090; bh=4qRZdUHB9Ov6yM433hxyPD/kVZr4M3hR3znxgjgkKUw=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=BYfL54vRw+9C2l7mhlWB3W7j7xPz8+n23YBx9J3HyQO3VAhikJHCjwqqWzXZxRlvO J2Ddj9ONfxY0/VePV6sUhBurxrReLL/P4fCvxgIJ7526OKRLXCz1S05rUiQiq2BbBs huAP4rr8YB5/DSKYQUU1k3eKfLEnLRwU82dLsFWUvI5GpXK3GUWLJd+pIKCF1xgbF3 cqNUIfosqTu5BdLkVpBCJtABONxaTB+SWl03MAvi2i8pbQGWV78S9ptqpxLX6HhaM8 pZaBUQ4qkTAudK+RFEFIt+QxqlJiSbo37L25WUKOHjZIFgPivn3gdy1430YH8bSpbQ xnniZrTai/kXg== Received: from smtp.sberdevices.ru (p-i-exch-sc-m02.sberdevices.ru [172.16.192.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Thu, 28 Mar 2024 16:38:10 +0300 (MSK) Received: from CAB-WSD-L081021.sberdevices.ru (100.64.160.123) by p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 28 Mar 2024 16:38:10 +0300 From: Dmitry Rokosov To: , , , , , , , , , , , , CC: , , , , , , , Dmitry Rokosov Subject: [PATCH v1 1/2] dt-bindings: thermal: amlogic: add support for A1 thermal sensor Date: Thu, 28 Mar 2024 16:37:52 +0300 Message-ID: <20240328133802.15651-2-ddrokosov@salutedevices.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240328133802.15651-1-ddrokosov@salutedevices.com> References: <20240328133802.15651-1-ddrokosov@salutedevices.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) To p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 184470 [Mar 28 2024] X-KSMG-AntiSpam-Version: 6.1.0.4 X-KSMG-AntiSpam-Envelope-From: ddrokosov@salutedevices.com X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 14 0.3.14 5a0c43d8a1c3c0e5b0916cc02a90d4b950c01f96, {Tracking_from_domain_doesnt_match_to}, 100.64.160.123:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;smtp.sberdevices.ru:5.0.1,7.1.1;salutedevices.com:7.1.1;127.0.0.199:7.1.2, FromAlignment: s, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean X-KSMG-LinksScanning: Clean X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2024/03/28 10:33:00 #24492761 X-KSMG-AntiVirus-Status: Clean, skipped Provide right compatible properties for Amlogic A1 Thermal Sensor controller. A1 family supports only one thermal node - CPU thermal sensor. Signed-off-by: Dmitry Rokosov --- .../bindings/thermal/amlogic,thermal.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml index 20f8f9b3b971..0e7f6568d385 100644 --- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml +++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml @@ -13,11 +13,15 @@ description: Binding for Amlogic Thermal properties: compatible: - items: - - enum: - - amlogic,g12a-cpu-thermal - - amlogic,g12a-ddr-thermal - - const: amlogic,g12a-thermal + oneOf: + - items: + - enum: + - amlogic,g12a-cpu-thermal + - amlogic,g12a-ddr-thermal + - const: amlogic,g12a-thermal + - items: + - const: amlogic,a1-cpu-thermal + - const: amlogic,a1-thermal reg: maxItems: 1 From patchwork Thu Mar 28 13:37:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Rokosov X-Patchwork-Id: 13608571 Received: from mx1.sberdevices.ru (mx1.sberdevices.ru [37.18.73.165]) (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 8D8007EF04; Thu, 28 Mar 2024 13:38:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=37.18.73.165 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711633097; cv=none; b=D2Wgn4bV00ClqhgBuwrqWJuN9PL61UTj46qIrFil0BQM8AYT7DI0ZIgT67RY0FzQtKAVLVDgFoBI56W+HPsVyMlBGGBA87mgdPeY3LxYBYFPrHdTeNPzCp07lxuHudML5fPLw1goMVHOJrdQafoClNkuAKrSz3ayVXYTRbPU2Tw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711633097; c=relaxed/simple; bh=p3hbEiIiLzGLbAc/LQxfxpj7XX12LshDGTQMkyM/UPA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=QsHYI6YCFsZQ3H9gqEwNNAcFneFZ7F64F9UbwUwDYcPs5fJ0wQYxwwUCaoeHMN9GMrjeBpZCph1ntnP4x/aF8vtW8ka1xDivBZjOMQSqDYBYP4Tzw5hIoaGU9c7/lJ6x7WoL2DdmSr2HkE9h79xrVzEVd6fIM5GcmDpGdh0l8do= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com; spf=pass smtp.mailfrom=salutedevices.com; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b=vWvVB3aG; arc=none smtp.client-ip=37.18.73.165 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=salutedevices.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b="vWvVB3aG" Received: from p-infra-ksmg-sc-msk01 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 68132100016; Thu, 28 Mar 2024 16:38:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 68132100016 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1711633091; bh=YRwihRdpMFrpryJryrHnyMLc35RgfMsFKeEAc77u4o8=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=vWvVB3aG1m/eLf0UM82dzWqT3uKfXKYlc++pnS+jg8auBVlcTS6Hh5YxLMU/l4WGP l5rizDvVd8SXDFMRI+/Xrxo34gZsnBDpVQ9jHiG6XUF8hH2een2D13+t3tKBZJ92h0 a4NxwtVFwvgxSapxnsyT/BnCpeM03riqXnDaBuIBclIiE8Dgk6N8xrYZ4FWnQpExO7 GOyJxhDGu8S9YKN8pMrJS2TsPVXSi2JHjvV6hmGj+FOF0H3xUdRg8yYwC+jNr0bwnl DWNGysHfHFKln+3OSvcxqmFPbkz91FRy8zC0tfebve5+iiFABNgIX3WU9t83gPAbj6 7/Huxhtd16Szg== Received: from smtp.sberdevices.ru (p-i-exch-sc-m02.sberdevices.ru [172.16.192.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Thu, 28 Mar 2024 16:38:11 +0300 (MSK) Received: from CAB-WSD-L081021.sberdevices.ru (100.64.160.123) by p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 28 Mar 2024 16:38:10 +0300 From: Dmitry Rokosov To: , , , , , , , , , , , , CC: , , , , , , , Dmitry Rokosov Subject: [PATCH v1 2/2] thermal: amlogic: support A1 SoC family Thermal Sensor controller Date: Thu, 28 Mar 2024 16:37:53 +0300 Message-ID: <20240328133802.15651-3-ddrokosov@salutedevices.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240328133802.15651-1-ddrokosov@salutedevices.com> References: <20240328133802.15651-1-ddrokosov@salutedevices.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) To p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 184470 [Mar 28 2024] X-KSMG-AntiSpam-Version: 6.1.0.4 X-KSMG-AntiSpam-Envelope-From: ddrokosov@salutedevices.com X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 14 0.3.14 5a0c43d8a1c3c0e5b0916cc02a90d4b950c01f96, {Tracking_from_domain_doesnt_match_to}, smtp.sberdevices.ru:5.0.1,7.1.1;127.0.0.199:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;salutedevices.com:7.1.1;100.64.160.123:7.1.2, FromAlignment: s, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean X-KSMG-LinksScanning: Clean X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2024/03/28 10:33:00 #24492761 X-KSMG-AntiVirus-Status: Clean, skipped In comparison to other Amlogic chips, there is one key difference. The offset for the sec_ao base, also known as u_efuse_off, is special, while other aspects remain the same. Signed-off-by: Dmitry Rokosov Reviewed-by: Neil Armstrong --- drivers/thermal/amlogic_thermal.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c index 5877cde25b79..1d23afd32013 100644 --- a/drivers/thermal/amlogic_thermal.c +++ b/drivers/thermal/amlogic_thermal.c @@ -222,6 +222,12 @@ static const struct amlogic_thermal_data amlogic_thermal_g12a_ddr_param = { .regmap_config = &amlogic_thermal_regmap_config_g12a, }; +static const struct amlogic_thermal_data amlogic_thermal_a1_cpu_param = { + .u_efuse_off = 0x114, + .calibration_parameters = &amlogic_thermal_g12a, + .regmap_config = &amlogic_thermal_regmap_config_g12a, +}; + static const struct of_device_id of_amlogic_thermal_match[] = { { .compatible = "amlogic,g12a-ddr-thermal", @@ -231,6 +237,10 @@ static const struct of_device_id of_amlogic_thermal_match[] = { .compatible = "amlogic,g12a-cpu-thermal", .data = &amlogic_thermal_g12a_cpu_param, }, + { + .compatible = "amlogic,a1-cpu-thermal", + .data = &amlogic_thermal_a1_cpu_param, + }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, of_amlogic_thermal_match);