From patchwork Sun Dec 17 21:06:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maksim Kiselev X-Patchwork-Id: 13495996 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 BDD39C3DA6E for ; Sun, 17 Dec 2023 21:09:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GsvzuV3N+rb2wmhrv9DScUe2TIsoMdR7a+unmGBqeNA=; b=CDridFkFR9y5+X jF/PiJrPvK2vreGu8CaUGckepiFSZR1EjWU18Oz+MLwkQ+GkxfwG0YE/UrZoeLunLH5y3nt34Vdtx ZEPqTYbgOii5IjRP6k3QhojYzPE2g5OnZWvs8GtX61ZCeQRbbKFWGVtvuBESgFqTxXY05MqFK2lTO 12UoihZnNkts6Tk5S94P+5omv3QcrkOnG5IEXO4ZvmBEMpx19j+x3QjIn5Z0bNxP3Vx5S/nGU3cPx 4nUaKnXHfPEwrpisBWFz8yrGCISfJFlhr9Rf6OtQQyiJ8sgkqPoZ3I6vN1MSYGuQwMgOfxHqRdkC6 RSTbkHbX628T/pmMJhzQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rEyO2-008TMw-1Y; Sun, 17 Dec 2023 21:09:22 +0000 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rEyNw-008TKs-11; Sun, 17 Dec 2023 21:09:17 +0000 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-54dcfca54e0so3171534a12.1; Sun, 17 Dec 2023 13:09:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702847354; x=1703452154; 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=XxR6hF/d37at9Svy1FV0ihBmt4KDeen/lqmXip53gJA=; b=NIqST+799ndPbIyCB2H3zF2BCbXQXl/ZhJgenu1W1qvEFQ4CVa+KT0FHfdx+N/3bNM rIDhXpIe3BPU24V59lbZDzplB3wujho/4HVbpHESKOyMc/SCRBl3k4o1v+cuC9Pg5YSD jXzntF7jf1kSAs2ZBcFLwIwG2+9ER95T2eYulx/VHAFkNTIIAyhqoDSSuxDrMUp0P97e WPx84s7MaPfD9JnHBnEh6J/MUx5HMZDPhKfRyynzykSnhD4o5diZh6YgeFEDj0VZBZTb ytlKANXPvhEvW8/MEiIzDs3zFUTVL7MrKpWg/kkyj5mfAwHvwb8AxOQOAQw1fof01gMd fPWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702847354; x=1703452154; 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=XxR6hF/d37at9Svy1FV0ihBmt4KDeen/lqmXip53gJA=; b=AjD5AJzP9Xp61jwDLzeZr6Pm5EK71x2NUlzqPsYaSEpnNFNSPhvhIJl9+i+hgcHxrg 8bOcXhGfVvNf/Vcx39ufbQ62DAgMWIuAD3pAeAxrVg/3PexOwIxQ0yzEibDs2dzs8sQQ ekw+lm7tJoDv1v+zFRWGebT4nMeAAf5kPwhZ6wZpGE8BpT9uceLcV1pPkyn1rrpc0BPO 9wLg3Y9pDULNjT/RQyf9FwaF8kKbXI0wrh1zg3kJT4WXUIn/JJ7+XGgMDtDFIv4jxP5A SHr5hCj5j2yZhmDijqLOWmpvGoZDKhALSuqfw79nlGAHtRyh5grAgRGpG1vIqY2dNMXB GM+g== X-Gm-Message-State: AOJu0YxKNdQScWPmqSC8kARBX8qOISUph7ttvwWrqOsLl4rQ85Cuu3Ih 6QjKHRJv17MmDLonPRCCwVk= X-Google-Smtp-Source: AGHT+IH8rZUBNlfMGfHajr+JWoOQrRyXykFKDWSFBD2jwvMitlgbukM748ZcSk7h6iptqsxEjLQnuQ== X-Received: by 2002:a17:907:6d07:b0:a23:5369:9890 with SMTP id sa7-20020a1709076d0700b00a2353699890mr583642ejc.79.1702847354192; Sun, 17 Dec 2023 13:09:14 -0800 (PST) Received: from wpc.yadro.com (188-169-139-214.dsl.utg.ge. [188.169.139.214]) by smtp.gmail.com with ESMTPSA id vc11-20020a170907d08b00b00a1ce58e9fc7sm13316096ejc.64.2023.12.17.13.09.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 13:09:14 -0800 (PST) From: Maksim Kiselev To: Cc: Andre Przywara , Maxim Kiselev , Conor Dooley , Vasily Khoruzhick , Yangtao Li , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , John Watts , Cristian Ciocaltea , Marc Kleine-Budde , 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, linux-riscv@lists.infradead.org Subject: [PATCH v6 1/3] dt-bindings: thermal: sun8i: Add binding for D1/T113s THS controller Date: Mon, 18 Dec 2023 00:06:22 +0300 Message-Id: <20231217210629.131486-2-bigunclemax@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231217210629.131486-1-bigunclemax@gmail.com> References: <20231217210629.131486-1-bigunclemax@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231217_130916_614705_17D54407 X-CRM114-Status: UNSURE ( 8.87 ) X-CRM114-Notice: Please train this message. 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: Maxim Kiselev Add a binding for D1/T113s thermal sensor controller. Signed-off-by: Maxim Kiselev Reviewed-by: Conor Dooley --- .../bindings/thermal/allwinner,sun8i-a83t-ths.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml b/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml index fbd4212285e2..9b2272a9ec15 100644 --- a/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml +++ b/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml @@ -16,6 +16,7 @@ properties: - allwinner,sun8i-a83t-ths - allwinner,sun8i-h3-ths - allwinner,sun8i-r40-ths + - allwinner,sun20i-d1-ths - allwinner,sun50i-a64-ths - allwinner,sun50i-a100-ths - allwinner,sun50i-h5-ths @@ -61,6 +62,7 @@ allOf: compatible: contains: enum: + - allwinner,sun20i-d1-ths - allwinner,sun50i-a100-ths - allwinner,sun50i-h6-ths @@ -84,7 +86,9 @@ allOf: properties: compatible: contains: - const: allwinner,sun8i-h3-ths + enum: + - allwinner,sun8i-h3-ths + - allwinner,sun20i-d1-ths then: properties: @@ -103,6 +107,7 @@ allOf: enum: - allwinner,sun8i-h3-ths - allwinner,sun8i-r40-ths + - allwinner,sun20i-d1-ths - allwinner,sun50i-a64-ths - allwinner,sun50i-a100-ths - allwinner,sun50i-h5-ths From patchwork Sun Dec 17 21:06:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maksim Kiselev X-Patchwork-Id: 13495997 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 29E4FC3DA6E for ; Sun, 17 Dec 2023 21:09:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=thfeQDJ49Cxmk/8b46MAJN7Pmyk8W1bQAFdMr1Vshe0=; b=ObTzYe3y8YA1mL bMBeAAzyfCtXxFpPAWUdj9eA6Phl4S7wWNxRuoJGLpfosnvTMgpaVTU/FLGTTWzIpSMwtfzuy3/F0 vdJuBr2c7XzJKKjGKqj9lJ0iLn2kxyNkjwJo+Zm5yolgONNjdTiuz/3fgazLdI11wQRXYI7U4/IZT 2S65kHQm+l/zd6zIDjHUEgSWQdLIew9BZ8yNWzQuf3yXL6SzoYoB4avqN6RsaAQo1RnOrOusTd+AH JVal1sdU7jyGZOuCDT9gd9k+n8hxJMGnamRjzeK/FZwObCFvHcXmEKoLW0AxQ8gq+qTcViCycQnzp 3QNWSWWSjFyG1wzRXHlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rEyO9-008TQf-0b; Sun, 17 Dec 2023 21:09:29 +0000 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rEyO2-008TMm-1U; Sun, 17 Dec 2023 21:09:23 +0000 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-54ba86ae133so2049395a12.2; Sun, 17 Dec 2023 13:09:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702847361; x=1703452161; 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=LAUbIAntM3d+P1r7PxLEQx0z9V8P0MjzX6e4WUbLKOw=; b=cNOyRq9B5BJZvepvnP+MHPfaiAEA+4Imx1W0E+Obw8URZwaQIsIiCGHvHaETo90bSG aVM/pVwX26lTR+I2Wv7kL09f9br+AYL1w5VbjFLucQptBgoHvirO/G2biGHsc++nRcgN gEHkBEDxMBvHP5AIfjGXAM4+OaaeeJv82NdaXoMwaHxlGmiuKv3SSYIfmpgkYuEl9726 ibeBv6rFZX+Eq/sekyY+b6GnP+rrSoym3q5X/AJgp7BWndLqYc+ksicb+E9jXeOTY3nj hur1nCGDvAZJFUI7r6HNSaWTApz4m5JivukbZlA4twGa2/tZYZH50h0efV8Fs/G6DX8u q9hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702847361; x=1703452161; 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=LAUbIAntM3d+P1r7PxLEQx0z9V8P0MjzX6e4WUbLKOw=; b=AaTN6j6crGTzlh7FkLy2t9zX20sYFpSsXppxT7bViPqC4cQJJT5RqA9NEFPE2rRUxS xouLdK2hkX+W4vhihCb5jlmYxxE5mlHByZ2G9qC8UOfHAbBAcF1tKn93Ateygwsnqvsh GEPTZoQvJ34bhgj6+8d0hPql6UDpKunRIgzgW8AoX/0lLFqxeWks0Tuv5eyvmYl/+ycv qqdbzW6fuJGSVRd+jWscklxAGOnS/AlgUsf1sQSyF+HH1+icaZVXLR8JRly0oKxKoLMy /WRLXLXbbAGCok1jAFGY+s8Md41tJ1QuOBvXjIRsTD2AaYl2QOPReGsoi9iXyALEI9Ot 4UqQ== X-Gm-Message-State: AOJu0YyiSm8pvEzYqVfqPYOFLJDtbn5eLkuleKYSchUs/sYfMZDsGO6a 7PBNJJk84eXcSWbgKGK3ojI= X-Google-Smtp-Source: AGHT+IGXBluqcGQB7k35DpbnUHnaijO7J6FnYJlOKlthAcSTpRKN4IAiy50prOqyAzcchEuhhGrjqg== X-Received: by 2002:a17:907:a0d:b0:a23:3212:9c37 with SMTP id bb13-20020a1709070a0d00b00a2332129c37mr1452093ejc.50.1702847360868; Sun, 17 Dec 2023 13:09:20 -0800 (PST) Received: from wpc.yadro.com (188-169-139-214.dsl.utg.ge. [188.169.139.214]) by smtp.gmail.com with ESMTPSA id vc11-20020a170907d08b00b00a1ce58e9fc7sm13316096ejc.64.2023.12.17.13.09.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 13:09:20 -0800 (PST) From: Maksim Kiselev To: Cc: Andre Przywara , Maxim Kiselev , Vasily Khoruzhick , Yangtao Li , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , John Watts , Cristian Ciocaltea , Marc Kleine-Budde , 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, linux-riscv@lists.infradead.org Subject: [PATCH v6 2/3] thermal: sun8i: Add D1/T113s THS controller support Date: Mon, 18 Dec 2023 00:06:23 +0300 Message-Id: <20231217210629.131486-3-bigunclemax@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231217210629.131486-1-bigunclemax@gmail.com> References: <20231217210629.131486-1-bigunclemax@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231217_130922_599774_3455B77B X-CRM114-Status: GOOD ( 11.96 ) 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: Maxim Kiselev This patch adds a thermal sensor controller support for the D1/T113s, which is similar to the one on H6, but with only one sensor and different scale and offset values. Signed-off-by: Maxim Kiselev Reviewed-by: Andre Przywara Acked-by: Jernej Skrabec --- drivers/thermal/sun8i_thermal.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c index f989b55a8aa8..6a8e386dbc8d 100644 --- a/drivers/thermal/sun8i_thermal.c +++ b/drivers/thermal/sun8i_thermal.c @@ -606,6 +606,18 @@ static const struct ths_thermal_chip sun50i_h6_ths = { .calc_temp = sun8i_ths_calc_temp, }; +static const struct ths_thermal_chip sun20i_d1_ths = { + .sensor_num = 1, + .has_bus_clk_reset = true, + .offset = 188552, + .scale = 673, + .temp_data_base = SUN50I_H6_THS_TEMP_DATA, + .calibrate = sun50i_h6_ths_calibrate, + .init = sun50i_h6_thermal_init, + .irq_ack = sun50i_h6_irq_ack, + .calc_temp = sun8i_ths_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 }, @@ -614,6 +626,7 @@ static const struct of_device_id of_ths_match[] = { { .compatible = "allwinner,sun50i-a100-ths", .data = &sun50i_a100_ths }, { .compatible = "allwinner,sun50i-h5-ths", .data = &sun50i_h5_ths }, { .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths }, + { .compatible = "allwinner,sun20i-d1-ths", .data = &sun20i_d1_ths }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, of_ths_match); From patchwork Sun Dec 17 21:06:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maksim Kiselev X-Patchwork-Id: 13495998 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 8479DC3DA6E for ; Sun, 17 Dec 2023 21:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1+gwscveaV8r33V0x31+saDKIYnufFFeQfDwJJYMenU=; b=cN4o2L0EdRsHef 4aw5VcHlVJ0x71G4xoMBAFD5HYMWgClWBQri+sUh/AS1FvkrvEfl2bmHxs7dKxULdlpnSGXETNLc5 sSuKhoki4cEl7d32Tbz3QQXjBMxQ97fy0DGW9xJoOfxyB/n6AMLdXjW0VvOBR9GCXuUzN6S3HiNVl QVKpsinER8F8oRSnz+hncn2B4b8fSaMyt4nX/b4J/CFE+OAp7ADDsAIsHLSacrBwlg99xHtKE9PYT Y1bksMbp6cvPS1S7vlANcilmm8q/b6Ox4NLt6u++rIE1ItbiK5gIwZXB/F3BIzQWSDd/wFdw4AUbA 4v3l13unExvylI8W+U9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rEyOF-008TUO-05; Sun, 17 Dec 2023 21:09:35 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rEyO9-008TQ8-1k; Sun, 17 Dec 2023 21:09:31 +0000 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-50e1d61b657so2768693e87.0; Sun, 17 Dec 2023 13:09:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702847368; x=1703452168; 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=VEmC8yzpg0VqIzMb5nxgOtA5V+BfOBifdcCXQ6xHVfo=; b=ACFbfqh0aWOXam72tqth0AgEP19xR0xXjVYzKEfDgDcx07byJGySAgv3WsDJkhKBRu 8VGPeUx0WCm980jgODYBBD82BU7B7HU7KS8xr2m0hJ/erU7RPT7FAfsysHRXTTvL8B4Z 62581YqYbnVflrAVwXD7Sql6e2dcsLxm3Hn4lpPoy5V8C+6jPANp+feNNwaSqYN09nB+ ++kjvf9JEXEl+fVZEHRwTLPMQtMpuJ7aViTlmoyDAcmnkKQ4P0i/e5669vDnl84ggVg5 A/VuIlMzzrIT7yoXaPxdEnVLT5tc/cM6xPxfrRTA3Agv67Ad+bpMRuBoQEnMEXvItgpn N1xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702847368; x=1703452168; 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=VEmC8yzpg0VqIzMb5nxgOtA5V+BfOBifdcCXQ6xHVfo=; b=FFxga0Zg57qQ975ZyoSmVRyPPRxfcc7altul6LW0eHtiL/Um0RUgd6NKAGYt2a0MEW IZ9+bOMAqhfFeJcUVRNLt463+JWCgib5ac/ICr9f+arH5F+KUwN/bj2RMGIwJ3VIXerm RkXHyvGejRZMSuzckFduGZuIl/WmpX0WA9a9PvVP+FeGhg1hhEO+3EnW43B45xC8GpyP 2meMbLqnx4Vc30iSqh9fRvi7KEg19gas4gsCHz1Gp8Ir3v6QdDBfuoptoVUrs9jRojzb JQ/3annDZfkbpKhuTX3LNFXioPPhZgIfx3j7KHHU2XrJbZl9EwmBQchI9LImdYomN5Jb AEqA== X-Gm-Message-State: AOJu0YxltqSnXYyCXLLGmY2W1SuChY6EX6Cip5LVUwZTQgQgHeX5C7rQ nfgex3iCVfiyVUcNfC8aHWclBZjoFgSxBA== X-Google-Smtp-Source: AGHT+IEmHz+jRu9UqOYO0LhhslWbwSbg09nII/aLGLXumsvPqPzNtDYWNyrCPwroyrvzHYdz6tqJSQ== X-Received: by 2002:ac2:4c15:0:b0:50e:3b2a:a7ed with SMTP id t21-20020ac24c15000000b0050e3b2aa7edmr29915lfq.16.1702847367506; Sun, 17 Dec 2023 13:09:27 -0800 (PST) Received: from wpc.yadro.com (188-169-139-214.dsl.utg.ge. [188.169.139.214]) by smtp.gmail.com with ESMTPSA id vc11-20020a170907d08b00b00a1ce58e9fc7sm13316096ejc.64.2023.12.17.13.09.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 13:09:27 -0800 (PST) From: Maksim Kiselev To: Cc: Andre Przywara , Maxim Kiselev , Vasily Khoruzhick , Yangtao Li , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Marc Kleine-Budde , John Watts , Cristian Ciocaltea , 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, linux-riscv@lists.infradead.org Subject: [PATCH v6 3/3] riscv: dts: allwinner: d1: Add thermal sensor Date: Mon, 18 Dec 2023 00:06:24 +0300 Message-Id: <20231217210629.131486-4-bigunclemax@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231217210629.131486-1-bigunclemax@gmail.com> References: <20231217210629.131486-1-bigunclemax@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231217_130929_588387_04ABF1EE X-CRM114-Status: UNSURE ( 9.18 ) X-CRM114-Notice: Please train this message. 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: Maxim Kiselev This patch adds a thermal sensor controller node for the D1/T113s. Also it adds a THS calibration data cell to efuse node. Signed-off-by: Maxim Kiselev Reviewed-by: Andre Przywara --- .../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi b/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi index 5a9d7f5a75b4..6f5427d9cfbf 100644 --- a/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi +++ b/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi @@ -166,6 +166,19 @@ gpadc: adc@2009000 { #io-channel-cells = <1>; }; + ths: thermal-sensor@2009400 { + compatible = "allwinner,sun20i-d1-ths"; + reg = <0x02009400 0x400>; + interrupts = ; + clocks = <&ccu CLK_BUS_THS>; + clock-names = "bus"; + resets = <&ccu RST_BUS_THS>; + nvmem-cells = <&ths_calibration>; + nvmem-cell-names = "calibration"; + status = "disabled"; + #thermal-sensor-cells = <0>; + }; + dmic: dmic@2031000 { compatible = "allwinner,sun20i-d1-dmic", "allwinner,sun50i-h6-dmic"; @@ -415,6 +428,10 @@ sid: efuse@3006000 { reg = <0x3006000 0x1000>; #address-cells = <1>; #size-cells = <1>; + + ths_calibration: thermal-sensor-calibration@14 { + reg = <0x14 0x4>; + }; }; crypto: crypto@3040000 {