From patchwork Fri Apr 11 00:38:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Kalashnikov X-Patchwork-Id: 14047393 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 00FF9C3601E for ; Fri, 11 Apr 2025 00:44:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mgLz+wxMK3cB0CjJ97zDR/iMoodve9Fd9p0FjX989r0=; b=SW5szKX1DHD2wp1SvvoexMRsjF N8AtF80xsaOmVGtzhXoE432FJaOuZjJQS4uX2KvmTV8m+ICN++AItn59aNo+ljx85UJi3lSIQKKXI zlTQkXNZx4zvq+a2HonvxNcW3DqdpE6qvF0A9TswffA0ctMYfnJ3GP1nyetcVFWH/zeYfiBk47Ihz ls3BkGENqtvxbyXLsdmBAbJ5AGg/i2ckVxI146TUl0ASOqgZ+t8UsH88SDAYIdD2VQFIeweRXsKMR sNITOgw6adghVaG9embVMeCngNMKpvy+3sJp5rU1Of12iT1xr7kqzSMEAWO/VeDArPjogiQfj9OlW hhI2ltOA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u32VX-0000000C9we-0AyC; Fri, 11 Apr 2025 00:44:35 +0000 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u32Qa-0000000C9BK-3A4I for linux-arm-kernel@lists.infradead.org; Fri, 11 Apr 2025 00:39:30 +0000 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-30c2d427194so13622551fa.0 for ; Thu, 10 Apr 2025 17:39:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744331967; x=1744936767; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mgLz+wxMK3cB0CjJ97zDR/iMoodve9Fd9p0FjX989r0=; b=UnwMgS2UYBQe8LDiN8AsoaVg0YoYE1BIMfepLSbLyClwXTZo8YyCvVKU8pru58j2vp HZFAOBCNGLphp8RMR/2nmz8g8srHwXnRmdur8ksWy1vRPHU6XsJj9JMmSYuMoHh/u5Wx tNHxpVb5xpGxs9cjhVzorCweLaB+06TdMDy5gSsAxquOsYPpoqB5wpPnReQUQB7ew8lv kMHSJ0N0To+0zF2GqsaYTUD+MvWmeZf9nDhDB8wgJfLnQULtT7OrXDZ62C9lHHhf+NUO 5S4Elej7hEEK3GdFOkCmCi9N8IZu4HsgPq2bXVEXvOtIvWbXLrNvDDQFCH51xVTOJ4YZ 2zKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744331967; x=1744936767; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mgLz+wxMK3cB0CjJ97zDR/iMoodve9Fd9p0FjX989r0=; b=oLUBqIpq/2aB6NmodfS/cINBhKN+zCTOT/dtGuOIkLzST9QLHvIXaZhh4KiSrd5wfo wKMTBLZ+rJ1gvVtYzfVDDYV+o9VrmYhUdDwHCIS6MoPXkOzyM6Mx60PChjs5/xLcLEie NVHzuInR1MYymCPPeKdhvGAY0GauoA4OH/J9mQafuRMQ/vnGg8AonHJOBIwtHteGew6i TPB4az9/fdG0bbaQkcQsU7xYVu2wSjIKZuqq1nFhZAoE6v/+5Yub5i4xRO6K50kjTvUZ TE0kv01423oBYTpNNm45ekIBT/hXiGMafWcPMnkgP9qNZoh5hAa0jn3MfXg0HY/Fgml0 j41Q== X-Forwarded-Encrypted: i=1; AJvYcCWw2wkw2/ljB6HU8LcqpTWjXTjI07T/IXShOauv4gm6URSNMySIV+/nRFeCzAwkURVUV/fm0EkWXLqYItqZqbbH@lists.infradead.org X-Gm-Message-State: AOJu0YyJvIQQgQLoCNZQN0r+xeyyrW1c1imFbSbXXgbfEsiGBDEoTOhF 81q4x7UDxzz+2RjxsPrbF8STdUmsa24DIH0UYTuaK41Ro8zbTMSg X-Gm-Gg: ASbGncskCxfNTsC40UZyygDVfa4G2hg/FEIWgnrUPoGou/i22blVwd4IPqIfmuaShZu JMXjwFuHDwfWhaYddQQhUKjAuv5NrAIIzwpCGQnBgZlR3fw/A+PkeEEXVAcYBI+62rtM8Gatri0 gc91c9wlN4rJwFr8weYCbZqiPxkzhFi7/cL/qycupQjg5qKC3oYrAQ/8rw9aSWsXRZL6bb1Zch1 fIV5KWUFAGofJElJBm2kTBUJS73Pyjlr0PvlrKsqQSMXx8yGOGGnaIsTPeJiaGHXQyEpGI1Ady9 6ryiMHyj3pM81qA97Ft/eU85aAdbyu997gtreDWneuWAFXJO9Ws2lmX9SH0u X-Google-Smtp-Source: AGHT+IFsLLiiBQI5ZLGY7lfwqEqas7w6lvcmymmKeoSRpIy/66PmWCqCbglM7RpgOnvLMZAozSYyIg== X-Received: by 2002:a05:651c:905:b0:30b:ecfc:78bf with SMTP id 38308e7fff4ca-310499d40fdmr2095651fa.5.1744331966765; Thu, 10 Apr 2025 17:39:26 -0700 (PDT) Received: from localhost.localdomain ([176.106.241.81]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30f464ea5c6sm6344251fa.62.2025.04.10.17.39.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Apr 2025 17:39:26 -0700 (PDT) From: iuncuim To: Vasily Khoruzhick , Yangtao Li , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Andre Przywara Cc: "Rafael J . Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Piotr Oniszczuk Subject: [PATCH 1/6] thermal/drivers/sun8i: add gpadc clock Date: Fri, 11 Apr 2025 08:38:21 +0800 Message-ID: <20250411003827.782544-2-iuncuim@gmail.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250411003827.782544-1-iuncuim@gmail.com> References: <20250411003827.782544-1-iuncuim@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250410_173928_792863_AA27A591 X-CRM114-Status: GOOD ( 13.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Mikhail Kalashnikov Some processors (e.g. Allwinner A523) require GPADC clocking activation for temperature sensors to work. So let's add support for enabling it. Signed-off-by: Mikhail Kalashnikov --- drivers/thermal/sun8i_thermal.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c index 226747906..1f3908a60 100644 --- a/drivers/thermal/sun8i_thermal.c +++ b/drivers/thermal/sun8i_thermal.c @@ -66,8 +66,9 @@ struct tsensor { }; struct ths_thermal_chip { - bool has_mod_clk; - bool has_bus_clk_reset; + bool has_gpadc_clk; + bool has_mod_clk; + bool has_bus_clk_reset; bool needs_sram; int sensor_num; int offset; @@ -89,7 +90,8 @@ struct ths_device { struct regmap_field *sram_regmap_field; struct reset_control *reset; struct clk *bus_clk; - struct clk *mod_clk; + struct clk *mod_clk; + struct clk *gpadc_clk; struct tsensor sensor[MAX_SENSOR_NUM]; }; @@ -417,6 +419,16 @@ static int sun8i_ths_resource_init(struct ths_device *tmdev) if (ret) return ret; + if (tmdev->chip->has_gpadc_clk) { + tmdev->gpadc_clk = devm_clk_get_enabled(&pdev->dev, "gpadc"); + if (IS_ERR(tmdev->gpadc_clk)) + return PTR_ERR(tmdev->gpadc_clk); + } + + ret = clk_prepare_enable(tmdev->gpadc_clk); + if (ret) + return ret; + if (tmdev->chip->needs_sram) { struct regmap *regmap; From patchwork Fri Apr 11 00:38:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Kalashnikov X-Patchwork-Id: 14047395 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0EB19C3601E for ; Fri, 11 Apr 2025 00:46:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=T38zkrO9x36m4etdaLiyiX7JPZf+RzDpwj3Zgm9TBys=; b=wsuGDEZej/C+EEpIPcIyi4pyU3 OuwQaWTSopygAr0z3BxnJCGQnIdZrzqJyLfRDWQuZcGH+a23BaMcxBiWMWyX+j7hh8HiPB8GF3O1Q p4ueRwRzdcc8fXJ8R4SMoHSXBQ/qJaf8r8zkr1DSNx8d+FMnshRZ1eHDD+Vmow8lnLSmJnevAEtjB VjpwU2e+ZqOCKLy+/clW5nAgZSgeW7vsLh5II/1dzBiAcGJA4+Cxc6dII/dDT7duuSxOHmI6yKeF3 5UCVNgX9vP0k9NcUq1DKKRRojQA8Autaan7gP7UH4QrkJ9ai2mkaLOjGfQqSPPCqpOUzbn3lFMoZo gsVjT+NA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u32XJ-0000000CA6f-3IJE; Fri, 11 Apr 2025 00:46:25 +0000 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u32Qs-0000000C9EV-2AfR for linux-arm-kernel@lists.infradead.org; Fri, 11 Apr 2025 00:39:47 +0000 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-310447fe59aso9111681fa.0 for ; Thu, 10 Apr 2025 17:39:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744331985; x=1744936785; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=T38zkrO9x36m4etdaLiyiX7JPZf+RzDpwj3Zgm9TBys=; b=UGCSUd8ijq4lypGtWDPN97yf5AP7ZdPHttbFXRXgKKl+A6HY+1Tbu6tX38nbtQgiG1 mfLygTCifRFQ73TzDZHeqzbB276eRkoSOHHcnGKjt8q1DOQ6A+eyj1Ptqu7nx7XLbTRj OFsrwyI6j50qomi4LYw8Yjb9h96lOp/X9ijXDR65ECYUiSMUArT0/NcKc0PvfnF4dbqq UCdYb+a+wLWJpHs4hD8wR8/DVJOa4hrWkXqOS5Sli0zObqeuanHBZ8/1SuF/IzyfgoLH Oj0bCswKBdiuMKqHJFoMxZ4BsQG7UX0R1zTs073po0ImiroKLdRa0vvDi4p8yRMZ5Xkn Vj1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744331985; x=1744936785; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=T38zkrO9x36m4etdaLiyiX7JPZf+RzDpwj3Zgm9TBys=; b=DxgVn2dPjUspmMkeg//nGwqrDDUSTY5e3iU44yPs9S4ck34GnrEjpgKKoEwbgz9Luj kR8KOZmxp6ZcIPGXtI8gf7wR1mnjz13OoUX5Ecd5cTMgnvRlRo3IFQoE3x44Db67G+nb P4WkRAc8q1mfNG49N9sB4aW6PJZiAZgcANU0gUPu8q4LogMVss1HglmDFa+X8rbTOoQs 8SHlp/e2wrFKqNITraShkm8ywKzTMQwgESFz+0WpBGwquXttCUY21oShIlrls3yuIRUT VOyVruQ6/dyTNQsCvNlDj0p1EQ3hgHyxIFgcaVX/MKSgQaQKzYe88HTd12SXHB3iIn3s wbbg== X-Forwarded-Encrypted: i=1; AJvYcCWRp9YynsP9xT+0LEPqwpOFveMe5D9XvTVCjsVUUufipQgqxIaGR8zGkGoz+8eWCHMlykzTFTucio84HReCjsdx@lists.infradead.org X-Gm-Message-State: AOJu0YzC8+qunU/e42Z/QCQ0id4xa25hvC+rF/6z6BA9eeBcXbaeOpoL pmE/2wU+Y+tm9GEbDhQwelvc1BNITL8GhVmZo6VfxADCwxNKG/KR X-Gm-Gg: ASbGncuz9mptNEAjGFbpDJeiZ1eTv8YpJ9VxPS6/Y9SkXB65ng1Xi+nLKBVrZivylAw cY3tn5nesCwhaFVkcog8KpzLalVUmzL0O2Vyh0QjnNNR65qx+PvLXaVM1WeIMQYazp1uiSgRt3B DWxvQHlb4pyOoTaw+5fYf5zd7Eud7ppE4wKglk9COp72XX1FPj91TbUt5r84AK3t3oY3T5fA7B0 Hi3mLDu8QxeQTXLot5rQkH5ZiomUrHCq177QCiVmuTX0F6V0eA9VM7oJZDBzsOp+5xIWWMgqfV1 Ah1xuTFEin+T3SV7k/6KyGykqQPs3/rWXxK3bBVKJjp7U4UllA== X-Google-Smtp-Source: AGHT+IFbxnSm5FcYra/NhgQKMu+OkU4ccH3bURF6g7KgB4DcFLTWIFmK1C48nXnn+TaTiHuSf8qBLw== X-Received: by 2002:a2e:ad86:0:b0:30c:1358:6400 with SMTP id 38308e7fff4ca-310499b4447mr1902191fa.5.1744331984565; Thu, 10 Apr 2025 17:39:44 -0700 (PDT) Received: from localhost.localdomain ([176.106.241.81]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30f464ea5c6sm6344251fa.62.2025.04.10.17.39.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Apr 2025 17:39:44 -0700 (PDT) From: iuncuim To: Vasily Khoruzhick , Yangtao Li , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Andre Przywara Cc: "Rafael J . Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Piotr Oniszczuk Subject: [PATCH 2/6] thermal/drivers/sun8i: replace devm_reset_control_get to shared Date: Fri, 11 Apr 2025 08:38:22 +0800 Message-ID: <20250411003827.782544-3-iuncuim@gmail.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250411003827.782544-1-iuncuim@gmail.com> References: <20250411003827.782544-1-iuncuim@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250410_173946_555441_B3A7F086 X-CRM114-Status: GOOD ( 12.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Mikhail Kalashnikov The A523 processor has two temperature controllers, but they share a common reset line. We need to use devm_reset_control_get_shared() instead of devm_reset_control_get() Signed-off-by: Mikhail Kalashnikov --- drivers/thermal/sun8i_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c index 1f3908a60..dc4055c9c 100644 --- a/drivers/thermal/sun8i_thermal.c +++ b/drivers/thermal/sun8i_thermal.c @@ -391,7 +391,7 @@ static int sun8i_ths_resource_init(struct ths_device *tmdev) return PTR_ERR(tmdev->regmap); if (tmdev->chip->has_bus_clk_reset) { - tmdev->reset = devm_reset_control_get(dev, NULL); + tmdev->reset = devm_reset_control_get_shared(dev, NULL); if (IS_ERR(tmdev->reset)) return PTR_ERR(tmdev->reset); From patchwork Fri Apr 11 00:38:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Kalashnikov X-Patchwork-Id: 14047396 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 93290C3601E for ; Fri, 11 Apr 2025 00:48:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=d+rSfwK2IdMno7cgyqb3eYYWrYZbiRnVldmhW9L6vWA=; b=g1PHWYh922rVeDYqyaMowV3Faz OHO+/hCSWy5mDMy2oo2OQtqseP+mAQK1vBhZ1fz1Qyuqm7qDEbA1ZSNRHwj0gXZ00gafLb925NA1F IAljsT2Xx7Y9yOJ8vyu+4s6syc9Z+REjXf2ypKdnToyIVKI8MTWSCf9/8EKT5Re4WsHNnsmjRVU25 oOwJgLBQRbTkXKaJGtcYIS4tmu6WTEEL3CqjIWOiBHIe+E4qE3nVXSi+rP5Y9cOHJnf4vRmih8SHo WyWNH8v4pVDkbqmVKoEWozNxsrHhY9b5BFYfuuahll/a/QlCLKc6ual3+t9g1CU5YLwOgGczydPUd wjjeFVYA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u32Z5-0000000CADt-22q0; Fri, 11 Apr 2025 00:48:15 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u32RB-0000000C9HJ-3sPD for linux-arm-kernel@lists.infradead.org; Fri, 11 Apr 2025 00:40:07 +0000 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-3061513d353so15198711fa.2 for ; Thu, 10 Apr 2025 17:40:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744332004; x=1744936804; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=d+rSfwK2IdMno7cgyqb3eYYWrYZbiRnVldmhW9L6vWA=; b=hA++DAUUw6U3dKRrnXwQrnQLV6Mlg2M57HjsuRpZb8jlHIK7/iLr2ZM7Th1tXql3gr cwM3GlyhZI9xlD8OSDL8CLlY7/RipLF8PdkZc1FOtK9SnSBJ/gCOvIkXfVEun8afXLxc xjnIJoVawVjSon2VWv9rUJJ0FPNVAsRWXcpHYrntErXN73mPCNXgPp2272bv5TtMdiOn 3rzbNtR/rum3yPWyPJ1E6fczOzyGU7pfMFkvvksoJclmkzR25LlSWUnsk8ljXAuWErZX 1KYOK5JRRZdl3vAW9Evq53UB9m1rbKYKreKx1NwSiC+I4F5zVoaPsRYn2xt31JTJGJ+1 vypA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744332004; x=1744936804; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d+rSfwK2IdMno7cgyqb3eYYWrYZbiRnVldmhW9L6vWA=; b=b94kp18Cvw9AqVDRZlj4PPo2ozX7M8gvus4HblZbW9Jqp0i5ELyPzDGCZlpPvP7bcj UtEbR9G/naFSPjPWy7s9/O9szlLdmPQadu0WLGHtAkifqO7UgiC04nssXm890SAJ1sZh Q3xjzRl+6qNMlaYiiXc6lYah5gqCZL+qlrwZphJQWKVlkm4k8T5RYBeDOBIiiLYHwlws KZLprSO3Cg/fNHNgOAD07CcljoXo5PhRBgE/47C7uRlYASBj4SVyEUIGBhYEXLpfeu1E hKtLF8VUkZt2ZRkbKvl5jznHIuZa7HJ6V9yCgEYylxcgJc00SIeSAphmCF24dcWEC3IJ Ghyg== X-Forwarded-Encrypted: i=1; AJvYcCVjFsn/KlIOXzUvVlZnEmHS/EQaWT9ASduuTycFmz/SMepX9MBVF60WCnpg+ty84HVuN5WOmMjYGxTs361Xw7Jf@lists.infradead.org X-Gm-Message-State: AOJu0YyVK5TKSD2Sd2G/7Px8fTpO6L/fzQ69FXiGpA7W6VLpk3BWzWet MyYKMgkxAud7O5EP7WxsNQeLLHGrG2ed+P5Whr9J7KjvfGfQlPUh X-Gm-Gg: ASbGncvZzkSgi4ja96c4mfxWOQspbi8V6+5J+GDriDUFf8ZSy2uIqoKCUnhGarZGzvB p1JXB5xAN0QW1Arsyvea50Rplfh5MqpIYhE5dXNWQEhfsr21Vgot0togfek4NT3PJZxy6y/A9bo VBZyXhOdyiJcHfhd/Ph+9aS7dEPLCeipWgGIFWjbWjlYiO4evvDkhVMSJjk3BaVJsZ4f+rpzz0z AdNJUMHIRwpkVXz7iyo9OTuEWv1wI5Bdc+UwvmF3ztPx3XB9jFiPbAngkGTNmmTZIIKuLyTQ4Ol EPBJHk+GqOZobXVKSJ4vkwkBCHnFZa5QFot1AOpTcHjZmZf9Ng== X-Google-Smtp-Source: AGHT+IEHx3pLyyA7RUjJFQMZKlcC6nirFWEfuuk3UQ55sdEchAVrUtO52D2wnKHHqYnoHtifKxO3Bg== X-Received: by 2002:a2e:ab18:0:b0:30c:7a7:e87c with SMTP id 38308e7fff4ca-31049a9a9f5mr2279391fa.35.1744332003965; Thu, 10 Apr 2025 17:40:03 -0700 (PDT) Received: from localhost.localdomain ([176.106.241.81]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30f464ea5c6sm6344251fa.62.2025.04.10.17.39.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Apr 2025 17:40:03 -0700 (PDT) From: iuncuim To: Vasily Khoruzhick , Yangtao Li , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Andre Przywara Cc: "Rafael J . Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Piotr Oniszczuk Subject: [PATCH 3/6] thermal/drivers/sun8i: Add support for A523 THS0/1 controllers Date: Fri, 11 Apr 2025 08:38:23 +0800 Message-ID: <20250411003827.782544-4-iuncuim@gmail.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250411003827.782544-1-iuncuim@gmail.com> References: <20250411003827.782544-1-iuncuim@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250410_174005_973723_86E9F1F4 X-CRM114-Status: GOOD ( 26.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Mikhail Kalashnikov The A523 processor has two temperature controllers, THS0 and THS1. THS0 has only one temperature sensor, which is located in the DRAM. THS1 does have 3 sensors: ths1_0 - "big" cores ths1_1 - "little" cores ths1_2 - gpu The datasheet mentions a fourth sensor in the NPU, but lacks any registers for operation other than calibration registers. The vendor code reads the value from ths1_2, but uses separate calibration data, so we get two different values from real one. Signed-off-by: Mikhail Kalashnikov --- drivers/thermal/sun8i_thermal.c | 134 ++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c index dc4055c9c..919b05a96 100644 --- a/drivers/thermal/sun8i_thermal.c +++ b/drivers/thermal/sun8i_thermal.c @@ -116,6 +116,15 @@ static int sun50i_h5_calc_temp(struct ths_device *tmdev, return -1590 * reg / 10 + 276000; } +static int sun55i_a523_calc_temp(struct ths_device *tmdev, + int id, int reg) +{ + if (reg >= 0x7c8) + return tmdev->chip->scale * (tmdev->chip->offset - reg); + else + return 65 * (2825 - reg); +} + static int sun8i_ths_get_temp(struct thermal_zone_device *tz, int *temp) { struct tsensor *s = thermal_zone_device_priv(tz); @@ -208,6 +217,100 @@ static irqreturn_t sun8i_irq_thread(int irq, void *data) return IRQ_HANDLED; } + +/* + * The A523 nvmem calibration values. The ths1_3 is not used as it + * doesn't have its own sensor and doesn't have any internal switch. + * Instead, the value from the ths1_2 sensor is used, which gives the + * illusion of an independent sensor for NPU and GPU when using + * different calibration values. + * + * efuse layout 0x38-0x3F (caldata[0..3]): + * caldata[0] caldata[1] caldata[2] caldata[3] + * 0 16 24 32 36 48 60 64 + * +---------------+---------------+---------------+---------------+ + * | | | temp | ths1_0 | ths1_1 | + + * +---------------+---------------+---------------+---------------+ + * + * efuse layout 0x40-0x43 (caldata[4..5]) - not in use + * + * efuse layout 0x44-0x4B (caldata[6..9]): + * caldata[6] caldata[7] caldata[8] caldata[9] + * 0 12 16 24 32 36 48 64 + * +---------------+---------------+---------------+---------------+ + * | ths1_2 | ths1_3 | ths0_0 | | + + * +---------------+---------------+---------------+---------------+ + */ +static int sun55i_a523_ths_calibrate(struct ths_device *tmdev, + u16 *caldata, int callen) +{ + struct device *dev = tmdev->dev; + int i, ft_temp; + + if (!caldata[0]) + return -EINVAL; + + ft_temp = (((caldata[2] << 8) | (caldata[1] >> 8)) & FT_TEMP_MASK) * 100; + + for (i = 0; i < tmdev->chip->sensor_num; i++) { + int sensor_reg, sensor_temp, cdata, offset; + /* + * Chips ths0 and ths1 have common parameters for value + * calibration. To separate them we can use the number of + * temperature sensors on each chip. + * For ths0 this value is 1. + */ + if (tmdev->chip->sensor_num == 1) { + sensor_reg = ((caldata[7] >> 8) | (caldata[8] << 8)) & TEMP_CALIB_MASK; + } else { + switch (i) { + case 0: + sensor_reg = (caldata[2] >> 4) & TEMP_CALIB_MASK; + break; + case 1: + sensor_reg = caldata[3] & TEMP_CALIB_MASK; + break; + case 2: + sensor_reg = caldata[6] & TEMP_CALIB_MASK; + break; + default: + sensor_reg = 0; + break; + } + } + + sensor_temp = tmdev->chip->calc_temp(tmdev, i, sensor_reg); + + /* + * Calibration data is CALIBRATE_DEFAULT - (calculated + * temperature from sensor reading at factory temperature + * minus actual factory temperature) * X (scale from + * temperature to register values) + */ + cdata = CALIBRATE_DEFAULT - + ((sensor_temp - ft_temp) / tmdev->chip->scale); + + if (cdata & ~TEMP_CALIB_MASK) { + /* + * Calibration value more than 12-bit, but calibration + * register is 12-bit. In this case, ths hardware can + * still work without calibration, although the data + * won't be so accurate. + */ + dev_warn(dev, "sensor%d is not calibrated.\n", i); + continue; + } + + offset = (i % 2) * 16; + regmap_update_bits(tmdev->regmap, + SUN50I_H6_THS_TEMP_CALIB + (i / 2 * 4), + TEMP_CALIB_MASK << offset, + cdata << offset); + } + + return 0; +} + static int sun8i_h3_ths_calibrate(struct ths_device *tmdev, u16 *caldata, int callen) { @@ -721,6 +824,35 @@ static const struct ths_thermal_chip sun50i_h616_ths = { .calc_temp = sun8i_ths_calc_temp, }; +/* The A523 has a shared reset line for both chips */ +static const struct ths_thermal_chip sun55i_a523_ths0 = { + .sensor_num = 1, + .has_bus_clk_reset = true, + .has_gpadc_clk = true, + .ft_deviation = 5000, + .offset = 2736, + .scale = 74, + .temp_data_base = SUN50I_H6_THS_TEMP_DATA, + .calibrate = sun55i_a523_ths_calibrate, + .init = sun50i_h6_thermal_init, + .irq_ack = sun50i_h6_irq_ack, + .calc_temp = sun55i_a523_calc_temp, +}; + +static const struct ths_thermal_chip sun55i_a523_ths1 = { + .sensor_num = 3, + .has_bus_clk_reset = true, + .has_gpadc_clk = true, + .ft_deviation = 5000, + .offset = 2736, + .scale = 74, + .temp_data_base = SUN50I_H6_THS_TEMP_DATA, + .calibrate = sun55i_a523_ths_calibrate, + .init = sun50i_h6_thermal_init, + .irq_ack = sun50i_h6_irq_ack, + .calc_temp = sun55i_a523_calc_temp, +}; + static const struct of_device_id of_ths_match[] = { { .compatible = "allwinner,sun8i-a83t-ths", .data = &sun8i_a83t_ths }, { .compatible = "allwinner,sun8i-h3-ths", .data = &sun8i_h3_ths }, @@ -731,6 +863,8 @@ static const struct of_device_id of_ths_match[] = { { .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths }, { .compatible = "allwinner,sun20i-d1-ths", .data = &sun20i_d1_ths }, { .compatible = "allwinner,sun50i-h616-ths", .data = &sun50i_h616_ths }, + { .compatible = "allwinner,sun55i-a523-ths0", .data = &sun55i_a523_ths0 }, + { .compatible = "allwinner,sun55i-a523-ths1", .data = &sun55i_a523_ths1 }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, of_ths_match); From patchwork Fri Apr 11 00:38:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Kalashnikov X-Patchwork-Id: 14047397 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 07B21C3601E for ; Fri, 11 Apr 2025 00:50:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HkLjkAkBybKViu/IzAoHDfQk1VY1JyR4qcLvgOYgY4E=; b=dXfvBiPxS25KyAHBcBQCQWPeJd FJguwhlkkv1ArWkFYfJxTvqEJpN3A/2i2adGfOUXpOINT9f9WJwWiyl6MhCs1G+oR5niDKwNKGZcL m6/8tkGiyNdFFYdIZcr6uQ5Xsl6klEKwKL7XCiXpOBYll8Wu73STo+sZ1bqKLZgfx/Bf096GghnY+ kQ8yrIDUKtIgv4QOTa+pjbQAA6YDuCQS8SF8UNpsp9GZ6rqxr7zvj1frLczAif/jO+okCWxOuuc28 XpALhGXs5pIt8K05cnajnnRQ2kLV+zP6VsT5tMh3CVxoDJ8gFTgR8CFChHnHplHsOw/+PSsFV/kNE O3SwagLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u32ar-0000000CANu-0awB; Fri, 11 Apr 2025 00:50:05 +0000 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u32RU-0000000C9Ma-3Ern for linux-arm-kernel@lists.infradead.org; Fri, 11 Apr 2025 00:40:25 +0000 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-30eef9ce7feso13654871fa.0 for ; Thu, 10 Apr 2025 17:40:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744332023; x=1744936823; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HkLjkAkBybKViu/IzAoHDfQk1VY1JyR4qcLvgOYgY4E=; b=fXqbMcjiFroglF9bCFBAIUwieAgwl5l0L1FwPEfKYW7B6icVJ6pg9EnGasktvwl77v BvgLosyt1mtQJwmGUf08d4s9gzN9LXZwhEHJX4RcnvSn+qDabcWOQSVk3z3kyS14Wf5X CAaWHNaqNZ8HY+LqjVNJ9BxapnT/8nE70lsE75mQ1NlEqaZ7qDl0F7QaGBtUfCqdLdAq c1rFc3fFF7n4n/3U4tzL2fCtxLkAvqVCUCr69Mi/IWc09f3pOHdKHW6rRTRdpogBXhep t0ZV9b1YpoXk8+f/zkWcfKP8di4RJTNhGPEEDcbZx+5h+6JWBDmmJQ3txrwBFshiFkDJ 4bvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744332023; x=1744936823; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HkLjkAkBybKViu/IzAoHDfQk1VY1JyR4qcLvgOYgY4E=; b=nT4w6RAAWZesoFpPqyYZZcQ94atwIB5Sxy8p19zODKnyIlOnEf9foirwTf3xEwM0Kz Z2k0u8jtgxTW8Sneb+nJ8PQESvb+Fv9U16V4b10iqYEf6MlItiOFWk12P2PHNVkidTZx 1J382xjq154DUXsJW87+bAtHESrUp54ytAfLgdfb+HvNeVeZZGhrVl5rX9xOyNqvDEgM eX/56JgrhlYhM1ym7Stllwl+dCQtfAmy9b9shcoEzChlDm0VNVAvJsF1FPh4taJB2cx5 G/k7x1m+DddYolM9WSbJ2h51pCQtgblIt7ksrcumU69yOOmlJFOccr1l8jH0f7xTQKoY bqQw== X-Forwarded-Encrypted: i=1; AJvYcCXhrihK9eI0ScbBnW9AoyrdCaX0tKlks+3cGIrm7xfbaD4M8cDnOIPO/MmMp4pTWttbAfWQNdoiMQa229BB161d@lists.infradead.org X-Gm-Message-State: AOJu0YzAzpNPP+OMkagqh1Jrh1AyQVeD+UG4wVo6AvfWf3Z9nehGqVbn KFuMkTwRARSsoh97k72qkQxoTwHFaMSF/sZ04ehA3MDWx4zuL879 X-Gm-Gg: ASbGncud4UrE34tXgM/gUeJzrmlCvLtydrREbcaWjrZypg7FQVJI2JcUrYBsRIgVsio FYWvbmVJ4Nhq6FZGVBAdD8OqMLeffF8XWIrJxwTdv3jy+EdsMjLwydrWksQ0L0EdxIzSPQ66i7C HIOcCwBHopFdocTc8P+1LZVysfRCzGDyMUR6OdFNGK6Go2cVCaxFlILYDjM2atrkJfMI8rCXwKc G49NaCdVst8F+hxSSHiq9H//GXctoRnR6Z7wzSrdiivI/LqB3xpVJQw21WJfKn8fpOmst3DjQ3n cZPc9ZN3XMf+ZRKIQDJGu3J1Jz3gv4k3LY5knkVW51L8uh3+LA== X-Google-Smtp-Source: AGHT+IH0C04pdT7V39Cl5bBkK9z9UT0OrMbiEPLzhJb+HovoC/tpoPabyXxob1snSgH5ltQh5BDI9Q== X-Received: by 2002:a05:651c:2203:b0:30c:3f82:6844 with SMTP id 38308e7fff4ca-31049aadec7mr1968671fa.34.1744332023158; Thu, 10 Apr 2025 17:40:23 -0700 (PDT) Received: from localhost.localdomain ([176.106.241.81]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30f464ea5c6sm6344251fa.62.2025.04.10.17.40.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Apr 2025 17:40:22 -0700 (PDT) From: iuncuim To: Vasily Khoruzhick , Yangtao Li , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Andre Przywara Cc: "Rafael J . Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Piotr Oniszczuk Subject: [PATCH 4/6] arm64: dts: allwinner: A523: Add SID controller node Date: Fri, 11 Apr 2025 08:38:24 +0800 Message-ID: <20250411003827.782544-5-iuncuim@gmail.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250411003827.782544-1-iuncuim@gmail.com> References: <20250411003827.782544-1-iuncuim@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250410_174024_811590_242FB120 X-CRM114-Status: GOOD ( 10.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Mikhail Kalashnikov The SID controller should be compatible with A64 and others SoC with 0x200 offset. Signed-off-by: Mikhail Kalashnikov --- arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi index ee485899b..d626612bb 100644 --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi @@ -171,6 +171,13 @@ ccu: clock-controller@2001000 { #reset-cells = <1>; }; + sid: efuse@3006000 { + compatible = "allwinner,sun50i-a523-sid", "allwinner,sun50i-a64-sid"; + reg = <0x03006000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + }; + mmc0: mmc@4020000 { compatible = "allwinner,sun55i-a523-mmc", "allwinner,sun20i-d1-mmc"; From patchwork Fri Apr 11 00:38:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Kalashnikov X-Patchwork-Id: 14047399 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A30F8C3601E for ; Fri, 11 Apr 2025 00:52:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pqMMUOwQC1FQBaxF5Z+cbkCBiisCIHbCIXU0D1pZnrM=; b=YZ6HhOnDoMw3HAxhkJrY2Omr4w OyUCaOj6Q8ZQ/1EeHaVubig3e7+/BjEOf+bqHJpEDI7iJhqdDwcKeXh+SPxum1asH1pbSd6DVKazn BT6vTZUdoVTItOEu7g/ZqNRRSZp5/wJuNEsIQsYT7itpjVsW44gcc1a20vG96aAoSncyEPFSZYthx g9vplQ2fyRIJTsxPAZGysEXuSuCh9QEMbHCAFyI7lDUoJ29P1Y6zIHJmft8trmznrwj5qHVJrZOtV NPYYnsG+AvH24xnvaYjsK1KN2NdXaXhScjiTDLOlvh/5rYl9YvYpJ769yoWS75S0ga7MwCyYOzzpL d5ltRHFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u32cd-0000000CAbR-3t13; Fri, 11 Apr 2025 00:51:55 +0000 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u32Ro-0000000C9QB-3kCZ for linux-arm-kernel@lists.infradead.org; Fri, 11 Apr 2025 00:40:46 +0000 Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-3061513d353so15204521fa.2 for ; Thu, 10 Apr 2025 17:40:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744332043; x=1744936843; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pqMMUOwQC1FQBaxF5Z+cbkCBiisCIHbCIXU0D1pZnrM=; b=an6uYji4RH4kjTtKWkbo6B3DoyLa4OWDCqaD3qVAC476CtoKLEy6wamvaqk9iOJuFK WbbVGCV9Q/2dAszp0iPZBAzMW7FzgU+raXTcGNauOFzxR3p4l3oWdBqDZEpT3kVVGnzl M/AHaK0m4fqXRaA9bUekQGML2eRxHpIyUjaHkqnF+GyxfCZbwvafnod1IlrNPQiMYaxb fH82s2tdS7K4SwiAfNMM4FJITGdrXEgjvKPBDeQHfiEuMHjHzRkNcdQOP5ImbbLu3Vsl +gUVCWmip1+z7hCuGzPTeMSwfly8H0bD6ROUKSGyuIlUWkEGR5ZiyBEFdl/pfBqksY/R ZUVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744332043; x=1744936843; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pqMMUOwQC1FQBaxF5Z+cbkCBiisCIHbCIXU0D1pZnrM=; b=HKUWrAUG6Vc4zYfTCvNneBfEJrT7rvImA0OqIWyaKRlElGb8pT0MCYB+VW88K7FXjd RCW6AUk5HPowCxA5VJ2i72j9BJVVhyBEJZE/gy0WhrYd7kX5sgiimiy71vF6obaNf0d3 PdaxNDb4IprUlyEfm61pIgG7aqGgxKARYt+mNtRfLjWnrURQ8kWIq3M0frWXAD9IcyEG s9uI0NYLlYTStzOYxpfaXoQIkU3zGk38CkFtaTvxtKBIYoEL+W+8LMo2Pe9w2uqnHF9x N7/IVn/aDJ7suk0w8bpjI5el26iE0NpRP8biL9nbXMkrHSpobSsn9lXtbkankMN8u2Kx 3KiA== X-Forwarded-Encrypted: i=1; AJvYcCVn/oluJnew9UUY54bL7sh6RqEi+SqjeVm5D3AbPyt+aaoS4Gs74ZtX1Vn+Pzde9cDClJJQOk3NAulH2RwQwHTt@lists.infradead.org X-Gm-Message-State: AOJu0YzXCMi+/Cqr2835JZC7M0PWrM67+8bZwXaJj1YzB+g+I9mM/BFQ yqD4nuOAeWLTsdU+P3/vOvPlptoXW9LBIVo2GMEkVJYSnppOPdlb X-Gm-Gg: ASbGncs+nm3Z/32kSH8f92Px+3WY4kYW7p/nNRpSL4vjE8RzwsUoUyPWDj/TANtT9wZ 9KXc1j3p5izVDeWWj7Ob7ysAg8z1v9kiWT0mB0AZPM9aZ0q9t1ZWe6YaF8G+9e3detowR45XHpc 532Gaiztq+X8rnpXGq6u4RJSzuPtxaeWAsMVsU3/RrmulZNUOI6NcCCzNy+mKXuoNgqgMgvQBUb Zw3Hd6huuEXOu/b4a8Yu/sEar6F7KkbpF6EAbVlxNrGYlcicTAJPX1ixsOwIw/7ubilbZqq5Eqd 2RtmvIOB0xPfARm7nDcffulA0EqkzdCAIVAg2yrDGVR7AtlG2g== X-Google-Smtp-Source: AGHT+IF33816+KiMMv+fNeFdW0EInDxjtilG9kyALznQ6Y0n6dpa1CvrQmH8HkK1cx1k6+UUsrWg3g== X-Received: by 2002:a2e:a9a3:0:b0:302:2598:de91 with SMTP id 38308e7fff4ca-310499fb36bmr1693111fa.16.1744332042866; Thu, 10 Apr 2025 17:40:42 -0700 (PDT) Received: from localhost.localdomain ([176.106.241.81]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30f464ea5c6sm6344251fa.62.2025.04.10.17.40.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Apr 2025 17:40:42 -0700 (PDT) From: iuncuim To: Vasily Khoruzhick , Yangtao Li , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Andre Przywara Cc: "Rafael J . Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Piotr Oniszczuk Subject: [PATCH 5/6] arm64: dts: allwinner: A523: Add thermal sensors and zones Date: Fri, 11 Apr 2025 08:38:25 +0800 Message-ID: <20250411003827.782544-6-iuncuim@gmail.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250411003827.782544-1-iuncuim@gmail.com> References: <20250411003827.782544-1-iuncuim@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250410_174044_936284_5C16C4E3 X-CRM114-Status: GOOD ( 13.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Mikhail Kalashnikov The A523 processor has two temperature controllers, THS0 and THS1. THS0 has only one temperature sensor, which is located in the DRAM. THS1 does have 3 sensors: ths1_0 - "big" cores ths1_1 - "little" cores ths1_2 - gpu Add the thermal sensor configuration and the thermal zones Signed-off-by: Mikhail Kalashnikov --- .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 138 ++++++++++++++++++ 1 file changed, 138 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi index d626612bb..4f36032b2 100644 --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi @@ -7,6 +7,7 @@ #include #include #include +#include / { interrupt-parent = <&gic>; @@ -22,6 +23,7 @@ cpu0: cpu@0 { device_type = "cpu"; reg = <0x000>; enable-method = "psci"; + #cooling-cells = <2>; }; cpu1: cpu@100 { @@ -29,6 +31,7 @@ cpu1: cpu@100 { device_type = "cpu"; reg = <0x100>; enable-method = "psci"; + #cooling-cells = <2>; }; cpu2: cpu@200 { @@ -36,6 +39,7 @@ cpu2: cpu@200 { device_type = "cpu"; reg = <0x200>; enable-method = "psci"; + #cooling-cells = <2>; }; cpu3: cpu@300 { @@ -43,6 +47,7 @@ cpu3: cpu@300 { device_type = "cpu"; reg = <0x300>; enable-method = "psci"; + #cooling-cells = <2>; }; cpu4: cpu@400 { @@ -50,6 +55,7 @@ cpu4: cpu@400 { device_type = "cpu"; reg = <0x400>; enable-method = "psci"; + #cooling-cells = <2>; }; cpu5: cpu@500 { @@ -57,6 +63,7 @@ cpu5: cpu@500 { device_type = "cpu"; reg = <0x500>; enable-method = "psci"; + #cooling-cells = <2>; }; cpu6: cpu@600 { @@ -64,6 +71,7 @@ cpu6: cpu@600 { device_type = "cpu"; reg = <0x600>; enable-method = "psci"; + #cooling-cells = <2>; }; cpu7: cpu@700 { @@ -71,6 +79,7 @@ cpu7: cpu@700 { device_type = "cpu"; reg = <0x700>; enable-method = "psci"; + #cooling-cells = <2>; }; }; @@ -171,11 +180,39 @@ ccu: clock-controller@2001000 { #reset-cells = <1>; }; + ths1: thermal-sensor@2009400 { + compatible = "allwinner,sun55i-a523-ths1"; + reg = <0x02009400 0x400>; + interrupts = ; + clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_GPADC1>; + clock-names = "bus", "gpadc"; + resets = <&ccu RST_BUS_THS>; + nvmem-cells = <&ths_calibration>; + nvmem-cell-names = "calibration"; + #thermal-sensor-cells = <1>; + }; + + ths0: thermal-sensor@200a000 { + compatible = "allwinner,sun55i-a523-ths0"; + reg = <0x0200a000 0x400>; + interrupts = ; + clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_GPADC0>; + clock-names = "bus", "gpadc"; + resets = <&ccu RST_BUS_THS>; + nvmem-cells = <&ths_calibration>; + nvmem-cell-names = "calibration"; + #thermal-sensor-cells = <0>; + }; + sid: efuse@3006000 { compatible = "allwinner,sun50i-a523-sid", "allwinner,sun50i-a64-sid"; reg = <0x03006000 0x1000>; #address-cells = <1>; #size-cells = <1>; + + ths_calibration: thermal-sensor-calibration@38 { + reg = <0x38 0x14>; + }; }; mmc0: mmc@4020000 { @@ -602,4 +639,105 @@ rtc: rtc@7090000 { #clock-cells = <1>; }; }; + + thermal-zones { + cpu0_thermal: cpu0-thermal { + polling-delay-passive = <500>; + polling-delay = <1000>; + thermal-sensors = <&ths1 1>; + sustainable-power = <1200>; + + trips { + cpu0_threshold: cpu-trip-0 { + temperature = <70000>; + type = "passive"; + hysteresis = <0>; + }; + cpu0_target: cpu-trip-1 { + temperature = <90000>; + type = "passive"; + hysteresis = <0>; + }; + cpu0_critical: cpu-trip-2 { + temperature = <110000>; + type = "critical"; + hysteresis = <0>; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu0_target>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu4_thermal: cpu4-thermal { + polling-delay-passive = <500>; + polling-delay = <1000>; + thermal-sensors = <&ths1 0>; + sustainable-power = <1600>; + + trips { + cpu4_threshold: cpu-trip-0 { + temperature = <70000>; + type = "passive"; + hysteresis = <0>; + }; + cpu4_target: cpu-trip-1 { + temperature = <90000>; + type = "passive"; + hysteresis = <0>; + }; + cpu4_critical: cpu-trip-2 { + temperature = <110000>; + type = "critical"; + hysteresis = <0>; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu4_target>; + cooling-device = <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + gpu-thermal { + polling-delay-passive = <500>; + polling-delay = <1000>; + thermal-sensors = <&ths1 2>; + sustainable-power = <2400>; + + trips { + gpu_temp_critical: gpu-trip-0 { + temperature = <110000>; + type = "critical"; + hysteresis = <0>; + }; + }; + }; + + ddr-thermal { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&ths0>; + + trips { + ddr_temp_critical: ddr-trip-0 { + temperature = <110000>; + type = "critical"; + hysteresis = <0>; + }; + }; + }; + }; }; From patchwork Fri Apr 11 00:38:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Kalashnikov X-Patchwork-Id: 14047400 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CC199C3601E for ; Fri, 11 Apr 2025 00:53:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RVVDUXMgIvl3qGuqG7Y9JWon05wMZyYxnJ2zr2Ehlos=; b=gB/1a8/WnF2adXSOn+KsrhrOgw aHnMc/64lb/sMAPb6vUPO/jQLcau0TYmf9xv2xB/4nZ+twNvttJNSgn5mPlHlI12++3QYID6/H9b5 TBXswBHH8ea0aL11nH4UtYNq/HcPdMXw+k9J0xsXNTMYRVr39cRIiPzUCVdDWFa/SaK1tZjXGojB8 tjW9syOkh+LvP3VPQ7IUarpJDdQiiOhafDxzu9SO2xs/sjI2F2VHCVxCIdfNNPbHDI16dsweOBP4p UoHV1a+Vw/0mwicoW8JhAqEY/GV6yAMamzSwfigUP2ibY09RSstOffnrVEHwHWJKlPg8u/vEJuLdY 1Ff9oNPA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u32eP-0000000CAlQ-2RdM; Fri, 11 Apr 2025 00:53:45 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u32S8-0000000C9Uw-003A for linux-arm-kernel@lists.infradead.org; Fri, 11 Apr 2025 00:41:05 +0000 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-30bfca745c7so12475171fa.0 for ; Thu, 10 Apr 2025 17:41:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744332062; x=1744936862; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RVVDUXMgIvl3qGuqG7Y9JWon05wMZyYxnJ2zr2Ehlos=; b=YR/oRDnAthuCshxTT4SRkc5bW2Qzq2EOTnvLswLyZgnS0421qH7p+d2jIVmjC6kKyk F1EMV3lrrZoc6V/5pmoQaVO4e6uCvI8ISJZlrB0e7YEUEgPj4yRfnk9AqqN50G9s1RJI JeUpWi3hwnCvm+o4p3du8OBtgtdVMii2Ow6uLpzLzGuLDViyZzgkzefIthxt8N2OFENp j/edLZp/q6kNCodATfqPfjPtQL/EfiaHUf79O65XxgDezZo5wj3iG+CuySJsPlSkkQtw 9YDAYbeG+45nAvhyeGfDY0oXMQXgNayjyuxt74zYg/M77jZO+wUhC08g5e+7HYk55ewf hGWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744332062; x=1744936862; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RVVDUXMgIvl3qGuqG7Y9JWon05wMZyYxnJ2zr2Ehlos=; b=M6djfzaLNlNJIsXNZj1S+rTzwfE52F1C+Ip/liOceCgmyJUFNS6rs/5vXdKbg973SE jqKH9DW+njpmhWFmsatsc20mlJtRAOeD8tzWyVZ/f6Bpy4yChjQwuLwBqYiLXkLZSwg/ gLiQWHFnB/JlzLh5NbQyWi71gwyjMzuKphNVo6VbXUHlCWPHuZF0TiTHjaMlnypXDB56 KH0Wu57J/DBtXMHnHSWCYlQ83XhqH5Ug44Qu+zeK6uMmunSCxY5FdN+XmKDKAXApQPAq tRkv4u3QjOldV9q+9vF9iZAo9OREStG77OB0lCI3zBBbGbZdiI0bdb3MN97ACZGjJKHB 5lPQ== X-Forwarded-Encrypted: i=1; AJvYcCXh308hYNuQQMo1lfymqcH594Hu+ejQKFpuEXBoXRmQxgdc5tFHovfRtRsizLmfUp8dtIZP7mbEjlkLhxxiuZp1@lists.infradead.org X-Gm-Message-State: AOJu0Yz8d8TvZ1HZd8mViiv90CsnRDdlRKDNvkEpXKxhsP1vsOr3JsN2 mSV/r9TixOQCO6ygHsCkf04cn7MS9DcRQgSSh3HovpyP6qj5FcCD X-Gm-Gg: ASbGncttzOJdeK78V+N5gyumPPF8H1x4jG5jNpdctjz+m9fSfhRUTUwJwp09wfN5i/W yvBL46knlNEStyLtqnN3E6+ae8Dea5Nqsbr+j1EPJZtWGCFCnGgZNit1zZPZYugdh7XG2HLi5Tc MbzF4d+WUd5OjKEL8CDzbt2cQR8jxGhddiqLSSI05yfE8s4ONsA//OJoqyrdOjzwpxJMQI6/8vQ pr+djKe5wmKJjsFdeWpYloDXDNJL31nCJF4ct3cM9qoy2RpLItmu5SRaIkYKLGXKiweS/XF02XI xjJav5u4wiEIMnendPeXxDfQ5z7EEpCOZyaYZ8ZgrHylDaq1cg== X-Google-Smtp-Source: AGHT+IGiJdnH2bwA47CyELRWVzejAMbjmYQFTtee9XHHNai4Q7kPWpY1iiYd/YOYoOt9vN/NRllLgg== X-Received: by 2002:a2e:b8cc:0:b0:30b:b987:b6a7 with SMTP id 38308e7fff4ca-31049518235mr2053581fa.0.1744332062006; Thu, 10 Apr 2025 17:41:02 -0700 (PDT) Received: from localhost.localdomain ([176.106.241.81]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30f464ea5c6sm6344251fa.62.2025.04.10.17.40.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Apr 2025 17:41:01 -0700 (PDT) From: iuncuim To: Vasily Khoruzhick , Yangtao Li , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Andre Przywara Cc: "Rafael J . Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Piotr Oniszczuk Subject: [PATCH 6/6] dt-bindings: thermal: sun8i: Add A523 THS0/1 controllers Date: Fri, 11 Apr 2025 08:38:26 +0800 Message-ID: <20250411003827.782544-7-iuncuim@gmail.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250411003827.782544-1-iuncuim@gmail.com> References: <20250411003827.782544-1-iuncuim@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250410_174104_037319_00CA5EDA X-CRM114-Status: GOOD ( 10.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Mikhail Kalashnikov Add dt-bindings description of the thermal sensors in the A523 processor. Signed-off-by: Mikhail Kalashnikov --- .../bindings/thermal/allwinner,sun8i-a83t-ths.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml b/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml index 3e61689f6..70ac395ef 100644 --- a/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml +++ b/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml @@ -24,17 +24,21 @@ properties: - allwinner,sun50i-h5-ths - allwinner,sun50i-h6-ths - allwinner,sun50i-h616-ths + - allwinner,sun55i-a523-ths0 + - allwinner,sun55i-a523-ths1 clocks: minItems: 1 items: - description: Bus Clock + - description: GPADC Clock - description: Module Clock clock-names: minItems: 1 items: - const: bus + - const: gpadc - const: mod reg: @@ -107,6 +111,7 @@ allOf: enum: - allwinner,sun8i-h3-ths - allwinner,sun20i-d1-ths + - allwinner,sun55i-a523-ths0 then: properties: