Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3733749rwd; Sat, 10 Jun 2023 13:41:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6UaKVmpFv04OIhrlqSmWjYw8i2vF2beJlZ5QchoxdCnO8Pm+xziAIE6/gC4L9thRDYdIok X-Received: by 2002:a17:90b:4ad2:b0:259:1a50:5719 with SMTP id mh18-20020a17090b4ad200b002591a505719mr4349468pjb.1.1686429669450; Sat, 10 Jun 2023 13:41:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686429669; cv=none; d=google.com; s=arc-20160816; b=U0UfaI8eZEAD6mO6+a1Rw0cKXgh3RhDTsSxxx7AWplaocZM+VBwH92dLMRGA01oGrx JqcS4wM9frVwWaqPkpFn67LUW5Hhc49cKkfwROvEi1NKF0m2KNmdryyjaMjDW5PwlDA5 DeWhr5EhWx6Avn9ZHk7RbWxBgHpeO0P2aAC11FpwUwr6yVINTElsKmKnPgh0F2i7qVk3 ZVsMqz4YDmKRbpzKndsaF7wo32sxaGYKX0ZPMGNwjriET0X+bGBGvzIAH/kKf6uTborh vYDEoXZDwWuppk27JybZYuJ+WnL1ETnIknUQfgGpzhakYZ1f3bWinxl0hyB8y/XPG3RA ouQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iADzhJzSziS7zTAopdQl1F1LJEpxTBMZdMAeH9fjzio=; b=vCPQxNi/B2fIw04nMKXbVLjREpd//+AbsigOqYpsrYjuyyXchzvIYXM4/edMnSndV2 IZvAfbq19L/OJ5u1jPQ38zyUocPS8hg5MCW+ssNc6FaO8IK/9PTUiT7CUupB1I2BlIwg +NbQ6vZEAl5iD1mCW+jEeS44oVNv6d4mKay7TMUNHkA+fzGCbmni4IK0uEItoRt2NTsc WQCf8fkGCMX9oQMKu1G4N7QJQD+9PecGuQZcODrdKFuXYf8Fnx2OuD6sDOAKtfMYIzJK ckcl4Bh5i6wlgngfPemt/M/I6PLMR7Cz7VofTISIHxaU8gzVOtOMg+LaD1bt8hUBKqg4 bnBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Bm3zYkI0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s193-20020a6377ca000000b00540ca2b00c6si1207405pgc.733.2023.06.10.13.40.56; Sat, 10 Jun 2023 13:41:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Bm3zYkI0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229677AbjFJUgi (ORCPT + 99 others); Sat, 10 Jun 2023 16:36:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231262AbjFJUgh (ORCPT ); Sat, 10 Jun 2023 16:36:37 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 455503AB5; Sat, 10 Jun 2023 13:36:32 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-3f7f4819256so22158805e9.1; Sat, 10 Jun 2023 13:36:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686429390; x=1689021390; 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=iADzhJzSziS7zTAopdQl1F1LJEpxTBMZdMAeH9fjzio=; b=Bm3zYkI0IGQ1FSCpqk+234/h0gkcSzDm70S2yoO/lXMfJwYUfFTD0FB2emzCrK2GI9 9wgoLsJxkwXeEgLVCLrIVVkFFyKms9G3DIucdfZVi5EORIEi2w8nfGSckf87X0Hs0D7g sw1ncM+AoiTjg+p0jOgGYvJwideciJNJ4tZhfCxU/j2eJS1t/poY3JDuYc+NZ7SnGAni 1whAg3p1QEiIO480DcOznESxesMcMh1P78/N+pWTw/qOjlkqaDRSsMvXwXtRGFJF80sT grGB4vXb/a8K+liaAGkrWio+4C3Nw/YGYib7QUaLe0Wdxe2YphuaamiuAcXdZHMO9BKO /+3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686429390; x=1689021390; 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=iADzhJzSziS7zTAopdQl1F1LJEpxTBMZdMAeH9fjzio=; b=Se8rPMLT4iT8UPPn/KiL2/oK71rgf/w5LOslXaPbHfj91uRoxeJMs3qSLa2t6Qk5Vx si33vx1kco7ooCEKFLsT3AQ9l/JoXHj6gJuJHsDlC0fyMerF0OjackSuuLXwljjOlexa n8wkXAy6jMYGJ7ZbmFrXlXIu2/WBowUgqBkUKVDZZxzUWuBbylioMNYH+PNIMYMWNywL ITG0VruZSExS1JWl/LfBGM5IoM+8kJr4ZmKTz3yIL5q4ygdK56BDoZKy7iTGT+d5EovR fupX5yEbbYQV6u1TNBxMPP691PiHBUjdL+v2rTKHlyrkGoQOtKy43H9+mSAj91zaIgWx Uw8g== X-Gm-Message-State: AC+VfDzhRprt14e9Zr1JKLKmRedUWpp2driD0Y4QRhvumoCktBRXaPwe BoI5E9AqYxO03RZ0f2geDg9/F0b8c/Vr8UEG X-Received: by 2002:a1c:7715:0:b0:3f8:153b:a51e with SMTP id t21-20020a1c7715000000b003f8153ba51emr441389wmi.36.1686429390438; Sat, 10 Jun 2023 13:36:30 -0700 (PDT) Received: from user-PC.. ([92.51.95.194]) by smtp.gmail.com with ESMTPSA id m13-20020a7bce0d000000b003f42a75ac2asm6572867wmc.23.2023.06.10.13.36.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Jun 2023 13:36:30 -0700 (PDT) From: Maksim Kiselev To: linux-kernel@vger.kernel.org Cc: Maxim Kiselev , Vasily Khoruzhick , Yangtao Li , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Cristian Ciocaltea , Andre Przywara , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org Subject: [PATCH v2 3/3] riscv: dts: allwinner: d1: Add thermal sensor and thermal zone Date: Sat, 10 Jun 2023 23:35:44 +0300 Message-Id: <20230610203549.1127334-4-bigunclemax@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230610203549.1127334-1-bigunclemax@gmail.com> References: <20230610203549.1127334-1-bigunclemax@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maxim Kiselev This patch adds a thermal sensor controller node for the D1/T113s. Also it adds a THS calibration data cell and thermal zone. Signed-off-by: Maxim Kiselev Signed-off-by: Maksim Kiselev --- .../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi b/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi index 922e8e0e2c09..b893f3325554 100644 --- a/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi +++ b/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi @@ -10,6 +10,7 @@ #include #include #include +#include / { #address-cells = <1>; @@ -138,6 +139,19 @@ ccu: clock-controller@2001000 { #reset-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"; @@ -365,6 +379,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 { @@ -843,4 +861,12 @@ rtc: rtc@7090000 { #clock-cells = <1>; }; }; + + thermal-zones { + cpu_thermal: cpu-thermal { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&ths 0>; + }; + }; }; -- 2.39.2