Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp659921lqh; Thu, 28 Mar 2024 12:14:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXDPf7umoB/uYHNB2IXwSHG19F1DXZWhtnKD1T4aAhmH7k/hhhbCu6/jIX2vem9zk9a5jqL+B8qv9ZEdR/UiXe6ayfDGk6yQ9kMqireBQ== X-Google-Smtp-Source: AGHT+IES1QxwTTsC6mbELHVZUjZ0A232fVxqGzaW06jKwZrhgShfqTXrOtTEoLJLpGAHfnDEGgTb X-Received: by 2002:a05:6358:4903:b0:17f:87fd:4ae with SMTP id w3-20020a056358490300b0017f87fd04aemr259105rwn.11.1711653248676; Thu, 28 Mar 2024 12:14:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711653248; cv=pass; d=google.com; s=arc-20160816; b=tD5IupXYuJQ6tC4/6iECuqqYsy2PQCV6YfA22Qma91q/kSUFyvLVeuyH6vSPxUrs0i 8md6RSZPnmrdBFNbhgW1b5+spKH5mxORZZWEdwWH4Hg6hMVDTtnZs1PQJyKNaSiAvATN FYdWQb1OCkyWqx8kVYIJPoTBLRGkzG7jXspnL1BO4R4IGxAMhs1nRYLgypVuGL60aeTc Mhf988QRG3rbWdpvkDIr06xykFojkd7uxAqkQNJOUyYqz6KQP1RNwIV+lREBLatw3Aey XsW1TAUHqgrbVEM1I5PsTBGBG4QHWk5mfXcyIiq6KI1FwXdVGheS9wxKp71fN8abtjss SM2A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-filter; bh=OpsGFI4AB8/F54l0oI8YXsgaWWxapVihfAczEHmbJxc=; fh=byLtYStTBgqWsH7RqVUzGNNXm5S/nkk9nurNFY6Z5MM=; b=wTE6HioSHWp07+hY9PYm0AI99YJQx8rHPGSFA9nUe+5nHIkLgn6KHbOtXZrABek+S3 2Q7dsuwICsVBzCyfB6xy5h3r/AGtJ6YAZPXBa8882cOi3kL9vc73j7BFCAdotQgmHWEI /d4E7R+GwuMfwus0++m9StC8E9Knnh9EvQNP65GOXxmZ0++Yh84bQeRs/++n20y3A5JB hSszraRDRgs0UttG5TgJX/ADGj1aadoj36NpY2yq7xH6//Mlv7lLcyQ3uVPrQG4PYDm3 qOIToU20fuDcwEdIGe7Ryq9KbagWBLZm1189UnOhSL+R89QqfHBqav75fqEi1tgdoN5t y6kQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=boDSLKJt; arc=pass (i=1 spf=pass spfdomain=salutedevices.com dkim=pass dkdomain=salutedevices.com dmarc=pass fromdomain=salutedevices.com); spf=pass (google.com: domain of linux-kernel+bounces-123458-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123458-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=salutedevices.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id bm22-20020a656e96000000b005dc4eb5d421si2127663pgb.347.2024.03.28.12.14.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 12:14:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-123458-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=boDSLKJt; arc=pass (i=1 spf=pass spfdomain=salutedevices.com dkim=pass dkdomain=salutedevices.com dmarc=pass fromdomain=salutedevices.com); spf=pass (google.com: domain of linux-kernel+bounces-123458-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123458-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=salutedevices.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 73673B238EF for ; Thu, 28 Mar 2024 19:13:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 13AE8137C3E; Thu, 28 Mar 2024 19:13:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b="boDSLKJt" 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 E5722130A54; Thu, 28 Mar 2024 19:13:33 +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=1711653217; cv=none; b=PSbeZUeaB4e0tn1PBNRbHXm7AiFTNHiyg0QbXNwA+0ZPpEYqeiz8zZZP3PU+0fAkz2TTmSR6gCsiNAxRnzoCWOUtSlUEeLJZXaACHYluQASyzYOKddfOiVtw4+HJAiMqthVmJU5hypqnNzih4mUSjsYsg9gmhNOurS1SjzsoIbo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711653217; c=relaxed/simple; bh=xjn9DRXg0PxHasT20GZ2Eovvdr4ihurWpS/1lm7ZVyw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=h6WHnqLN7j+WA0OdkTr4GNz+Fa6rj3PoaY/UROYkYpE6hd4d3bFlazrT7QgEtOGfyln0oRIwuJ8v9p/gUPtx7dCGKrxWozEyyL0phR41tgAWC+CgxRXWLXyUmIAme3iVMghcJ62XwVMQpx1KdB0FZMc6IoQLF3Nq75clbG49Xy4= 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=boDSLKJt; 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 Received: from p-infra-ksmg-sc-msk02 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 4CD02120005; Thu, 28 Mar 2024 22:13:31 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 4CD02120005 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1711653211; bh=OpsGFI4AB8/F54l0oI8YXsgaWWxapVihfAczEHmbJxc=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=boDSLKJtz53S5gfNoeeWNZERPcL8BH509Y74DErvlqwdw+M0ZL54RVBWAIo/jRMOr zU4NE0ZGAzW7Tb4ZnUyFoz5CLYcMAjnoP2NLC19wG3DGWIy3sBCRHAWvTWUsD8bJFH KQda/lZgP72a0T4f44vo2CppIJSp4oqU6ne6JvWIr8k3FwDoSWAl7bRcSlEg4L5ZIz 7DncGRTd0YR1NYIU1L7FLvyjKMQP+qzaQRyg3Gx4CAl6cWWNIYLoeK7wdhuoT+IbHw Kgp0vMbYZPGsVhvrziQoUdECkjQmPB1lbpEGvm6rcGLzOijwqsuAIBSYRDb871PVRh GpOzeVrgg6vMA== 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 22:13:31 +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 22:13:30 +0300 From: Dmitry Rokosov To: , , , , , , , , , , , , CC: , , , , , , , Dmitry Rokosov Subject: [PATCH v2 2/2] thermal: amlogic: support A1 SoC family Thermal Sensor controller Date: Thu, 28 Mar 2024 22:13:11 +0300 Message-ID: <20240328191322.17551-3-ddrokosov@salutedevices.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240328191322.17551-1-ddrokosov@salutedevices.com> References: <20240328191322.17551-1-ddrokosov@salutedevices.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) 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: 184477 [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:7.1.1,5.0.1;salutedevices.com:7.1.1;127.0.0.199:7.1.2;100.64.160.123:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1, 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 18:13:00 #24496606 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); -- 2.43.0