From patchwork Mon May 29 20:42:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 100425 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1762380vqr; Mon, 29 May 2023 14:00:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6MPD54HFH98RZScbZv5rjTAJ5Z7zeOEWDm0dyswK5SDsGK9/sSWZJEvkx4NZNHVDGg35S0 X-Received: by 2002:a05:6a20:a10c:b0:103:7b89:d70a with SMTP id q12-20020a056a20a10c00b001037b89d70amr116951pzk.54.1685394049086; Mon, 29 May 2023 14:00:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685394049; cv=none; d=google.com; s=arc-20160816; b=VsTesmT4vmDad24qvtYPFVSxjOVbHyokCo9FvbzrXhXyhCTaEpYHrDQ+xadLexpWrb pXnLqwgmZo0vP3zZS9m2nyyZGTgexY4fj3EO1cbYnDnzGDt2+kvh6OQojb8XgUiFIRjY rJ5xqwXtXgpglDY1In9YLJk7jnPn0CXO10tYnPeUNkSBePwvG90NIPImNev899bYO3fV 8XGqwU0YTIks2Cj2tWPhPmujSzKRL86HtrIvKaDSYnAcCTCgTVOYTk4GKtcuKSyl1lrg imOaXuBlLVdulxQzj4mZX5gXoUbGcBBad+EhZ/GI9maDpbY36m05zRYvYJtdk6dNrBGH i16Q== 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=/UhVQK7t+HosSVy3q0W/MQmzaLul2qg9td8dQYWmD0k=; b=iIj2l1qISvhHGixRcmaWR87bZmfqtHoxmj/9YtOQETO9BsKP7YpBOhfIsroI/JL+6v mSVd0UJ9TZbRUPkje2MxrPFWUwn3mCqu2QVJjT9TrCccYn9+tKL4IHPSH0drkPyHEWjN m76LAVu56imEJiQnadbf0tDH/G6XWOs8/FYvc/C2zQI0FjE1or0eMI9YyDl/WBLLaBm3 tNrfQTgO78bZSgkuvom4wzFjWg74ZT27DvlmF3k9eiQruCJ8pcEFGFW9sXnINl0r0qRh WyGh4ep6USF/EJ141qGMDoYoLcVuUpm+IljwIAbhD/wZ4ZKECFqy3I81WeGla2fZIpwp RsNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=BR1ELm0l; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b19-20020a639313000000b0053487937119si9574953pge.351.2023.05.29.14.00.34; Mon, 29 May 2023 14:00:49 -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=@mailerdienst.de header.s=20200217 header.b=BR1ELm0l; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229621AbjE2Unl (ORCPT + 99 others); Mon, 29 May 2023 16:43:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229593AbjE2Unj (ORCPT ); Mon, 29 May 2023 16:43:39 -0400 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95E75CF; Mon, 29 May 2023 13:43:34 -0700 (PDT) Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout4.routing.net (Postfix) with ESMTP id ADD441005E9; Mon, 29 May 2023 20:43:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1685393012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/UhVQK7t+HosSVy3q0W/MQmzaLul2qg9td8dQYWmD0k=; b=BR1ELm0lTE3YGEG0DQRxvZAaxdI24SK7OtZgNG9O471K5TJQF/KKId68A3wUnZyBpe6Ai6 klpuc/f5L6nRPJFTk0M9mViM8330O3X2Wog18JST5c5Ud4OCILQcOiHOf9s/2BqymHOcj0 trrK64xgMn/d4X9+VRSEkQVOJNdrBw0= Received: from frank-G5.. (fttx-pool-217.61.156.2.bambit.de [217.61.156.2]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id B9450100AD7; Mon, 29 May 2023 20:43:31 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Srinivas Kandagatla , "Hui.Liu" , Zhiyong Tao , Andrew-CT Chen , Lala Lin , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Daniel Golle , Rob Herring Subject: [PATCH v2 1/4] dt-bindings: nvmem: mediatek: efuse: add support for mt7986 Date: Mon, 29 May 2023 22:42:55 +0200 Message-Id: <20230529204258.65238-2-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230529204258.65238-1-linux@fw-web.de> References: <20230529204258.65238-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 43c692b0-9847-4de0-bc01-d0ed8cf8e474 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, T_SPF_TEMPERROR 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767263750843657955?= X-GMAIL-MSGID: =?utf-8?q?1767263750843657955?= From: Frank Wunderlich Add compatible string for mt7986 SoC. Signed-off-by: Frank Wunderlich Acked-by: Rob Herring --- Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml index d16d42fb98b6..7ec2988b597e 100644 --- a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml +++ b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml @@ -27,6 +27,7 @@ properties: - enum: - mediatek,mt7622-efuse - mediatek,mt7623-efuse + - mediatek,mt7986-efuse - mediatek,mt8173-efuse - mediatek,mt8183-efuse - mediatek,mt8186-efuse From patchwork Mon May 29 20:42:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 100423 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1757973vqr; Mon, 29 May 2023 13:47:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ78IJPoCgKmd9FOfkxOaA0txj0CRDGqikAhA3xIURMC9MxKeUzJlYMjdOup7vyYYBxJUDL6 X-Received: by 2002:a17:902:dacf:b0:1ae:4013:986c with SMTP id q15-20020a170902dacf00b001ae4013986cmr322529plx.63.1685393228671; Mon, 29 May 2023 13:47:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685393228; cv=none; d=google.com; s=arc-20160816; b=wlyzZyseIqYfV3ZV5arRqzP3WxRcrkw0FgbzNvV9vpdN1OHCTPv2AxhIoW74IAepDM MVxm1jMluHRJbM7DwDmlOaPdJO6u2b1JgCChnZc/H19uEXVliHrQwlfRuXG4ljFpOb0D JVM8sxTayiXTdByrfxHr/+aHak+Mvsz3jpshS+Tx82aAGeyy/s+EtLHwzkl+xByQM76D R0+2zce9Gq3RX59bIUAPhO/fFk0gIq9ZT7iGcWmC07bLFuP9XMweMeCJ0VgsUcA9zMEq uUn1w+UG2JscZ5HyLCuCotbnak8wJ6UMNxqRuignjRcZPs/Ri7ZcvIQTBPbVuc4xot+J Wa1g== 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=LEvUQRyEjuyLGOQSr30JCL5wkoldAB6QzYq6vNAehBw=; b=Q5C2gqG31yRRx3g0rn4y64Qy+wwrCz3WqAq8MbN4AoBJvLK2469pVuSBzJccZmB/ER cCYA+rGz+kOLT8AlQS1Kq5ERtLvJYBaqlliE9rBixC+JHtUxGCsKzQLXLXl10MQvdBsr A6bTo4JXgABW8BqtmFSoZ5a1U8YebC9Gbtp8tPd/RLygJFZe7EIG/TEwsLY8DEVwVwoM MqDh2ZiwuxyIyJ0ZCPXDr6PvvhaT6BbxJpZWhAokCfiRZfl9XLnPIFz2TEq1KvCu7xr3 JljaN6CewWVhK0O+zNP2uO/r+UBtJsj4KmsHFaunvtc0Kf/5QlBFQkzQAJZiFgGur6sE Y1/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=Ggy3yFGo; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u6-20020a170902e80600b001aadba392c1si2967145plg.464.2023.05.29.13.46.53; Mon, 29 May 2023 13:47:08 -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=@mailerdienst.de header.s=20200217 header.b=Ggy3yFGo; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229636AbjE2Uno (ORCPT + 99 others); Mon, 29 May 2023 16:43:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229600AbjE2Unk (ORCPT ); Mon, 29 May 2023 16:43:40 -0400 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F9DDC7; Mon, 29 May 2023 13:43:35 -0700 (PDT) Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout3.routing.net (Postfix) with ESMTP id 7DDDE60546; Mon, 29 May 2023 20:43:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1685393013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LEvUQRyEjuyLGOQSr30JCL5wkoldAB6QzYq6vNAehBw=; b=Ggy3yFGo9RI2DwMHZRxHsxRHAsUBt7zxYpA8e8klBos0XjeYwjPmH8jggN7xKnpZNi3Z7R WNc2QGG4kdOjlB90GtKZt2OYxB56ZbVC2cmb2RlX5QjfDAYPEvclLT+gYN7+wGSoXyNw7v clBAJBEkDCWQrUB37mKxZx7H9O4v6so= Received: from frank-G5.. (fttx-pool-217.61.156.2.bambit.de [217.61.156.2]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 95DD31006D1; Mon, 29 May 2023 20:43:32 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Srinivas Kandagatla , "Hui.Liu" , Zhiyong Tao , Andrew-CT Chen , Lala Lin , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Daniel Golle Subject: [PATCH v2 2/4] arm64: dts: mt7986: add thermal and efuse Date: Mon, 29 May 2023 22:42:56 +0200 Message-Id: <20230529204258.65238-3-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230529204258.65238-1-linux@fw-web.de> References: <20230529204258.65238-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: c0f3b566-cefa-4a02-b786-1cb62287543d X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, T_SPF_TEMPERROR 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767262890235387101?= X-GMAIL-MSGID: =?utf-8?q?1767262890235387101?= From: Daniel Golle Add thermal related nodes to mt7986 devicetree. Signed-off-by: Daniel Golle Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 37 ++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi index aa9e679b78e2..a409d5e845c2 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -337,6 +337,15 @@ spi1: spi@1100b000 { status = "disabled"; }; + auxadc: adc@1100d000 { + compatible = "mediatek,mt7986-auxadc"; + reg = <0 0x1100d000 0 0x1000>; + clocks = <&infracfg CLK_INFRA_ADC_26M_CK>; + clock-names = "main"; + #io-channel-cells = <1>; + status = "disabled"; + }; + ssusb: usb@11200000 { compatible = "mediatek,mt7986-xhci", "mediatek,mtk-xhci"; @@ -375,6 +384,21 @@ mmc0: mmc@11230000 { status = "disabled"; }; + thermal: thermal@1100c800 { + #thermal-sensor-cells = <1>; + compatible = "mediatek,mt7986-thermal"; + reg = <0 0x1100c800 0 0x800>; + interrupts = ; + clocks = <&infracfg CLK_INFRA_THERM_CK>, + <&infracfg CLK_INFRA_ADC_26M_CK>, + <&infracfg CLK_INFRA_ADC_FRC_CK>; + clock-names = "therm", "auxadc", "adc_32k"; + mediatek,auxadc = <&auxadc>; + mediatek,apmixedsys = <&apmixedsys>; + nvmem-cells = <&thermal_calibration>; + nvmem-cell-names = "calibration-data"; + }; + pcie: pcie@11280000 { compatible = "mediatek,mt7986-pcie", "mediatek,mt8192-pcie"; @@ -426,6 +450,18 @@ pcie_port: pcie-phy@11c00000 { }; }; + efuse: efuse@11d00000 { + compatible = "mediatek,mt7986-efuse", + "mediatek,efuse"; + reg = <0 0x11d00000 0 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + + thermal_calibration: calib@274 { + reg = <0x274 0xc>; + }; + }; + usb_phy: t-phy@11e10000 { compatible = "mediatek,mt7986-tphy", "mediatek,generic-tphy-v2"; @@ -567,5 +603,4 @@ wifi: wifi@18000000 { memory-region = <&wmcpu_emi>; }; }; - }; From patchwork Mon May 29 20:42:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 100426 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1762721vqr; Mon, 29 May 2023 14:01:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7jNZaJ221C1y7aJK7IOKR5o35TD8OhTypQdXys1ARHO6IGenECk+NRyfBfJIuHX10uAd66 X-Received: by 2002:a17:902:e5d0:b0:1af:981b:eeff with SMTP id u16-20020a170902e5d000b001af981beeffmr285290plf.64.1685394079114; Mon, 29 May 2023 14:01:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685394079; cv=none; d=google.com; s=arc-20160816; b=zCKttDwmgcKxV/vht/KbapMItEPxwM0NnbJAPhNmgcnqaBjdRt1I3tTG34CwsGS9lz 2cS/43t8ZD9Y/Wj82tmFcermwi6gT8VofjKX3WMmuddNf3tWqv/oznKtkL8adHaBGcX3 xdRP8I4PrmbFD3jWRRXE5NT23QsLjzVZ/JhHJiKSz8UxPkWOx/pWmgQNUYjxlSj20qw4 AaCUmEoWIX7WpbEsc+D0306urcShHr8aBZtqjnAaw6s46iBOo4RmsFuIxdCRhO6LbMce MKoL4BaDzLZ0TU4qCWZanh0YFjE5YxGYC/2iDQJFpmjUacWqEvzhyEWISSEIPa26vTKG 6eZw== 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=cDhjjWLFoezZAi/uvwan8VYbJJegbs/FI4UlVYsQEcA=; b=kEkSL8XOAzahPfFCwu4Z00x2iNNdrXApnbz4uwyANYrnnLHjDRWTTT1LawEyOrmYen BOHwhm1IJlEwcds1IZ+NXCgHMITAkoMvXXeUYaW5Cee6Kb9M+hU3+QQ87EBSc5WariTr n72EvCPBkqp+hiJiJDRthy3lmGAhSWYXthzGxmAJWJyh9H9etSTfGmWHkWb2L4P6F+Em VSPQsvGTCYpUS2I647ikKtEtnogJ1pzXIhthJ/1vhoXGePe77qI5MBOoFV8e+B9VxI2N n+z/slbV/Wtm0uOZYXlWF0m4T0GQsKWYfrWoI7NTjgmmBB94LUCk68QkW9PvNSp1oowr ej7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=WzpP0SHn; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s13-20020a17090aad8d00b002402275fc56si10312489pjq.118.2023.05.29.14.01.04; Mon, 29 May 2023 14:01:19 -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=@mailerdienst.de header.s=20200217 header.b=WzpP0SHn; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229656AbjE2Uwo (ORCPT + 99 others); Mon, 29 May 2023 16:52:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbjE2Uwm (ORCPT ); Mon, 29 May 2023 16:52:42 -0400 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FC97C7; Mon, 29 May 2023 13:52:41 -0700 (PDT) Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout2.routing.net (Postfix) with ESMTP id 54B9C5FBD8; Mon, 29 May 2023 20:43:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1685393014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cDhjjWLFoezZAi/uvwan8VYbJJegbs/FI4UlVYsQEcA=; b=WzpP0SHn+OnZOkihcA/BoupceBtWe7QqKIQ1D4yILwJwnZxeZcAmBZO9N0brpsAL1vaMCo VNekBSXfHtErz5nvHTaLb9pym86CweVfQgVfiqCV7LQ3knRalaBMX45ijUVX9qdAiUOQ4d qYLV5hTKoPjFYsGqnTTBJAUHQM38Z2w= Received: from frank-G5.. (fttx-pool-217.61.156.2.bambit.de [217.61.156.2]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 6A3D6100AD7; Mon, 29 May 2023 20:43:33 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Srinivas Kandagatla , "Hui.Liu" , Zhiyong Tao , Andrew-CT Chen , Lala Lin , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Daniel Golle Subject: [PATCH v2 3/4] arm64: dts: mt7986: add thermal-zones Date: Mon, 29 May 2023 22:42:57 +0200 Message-Id: <20230529204258.65238-4-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230529204258.65238-1-linux@fw-web.de> References: <20230529204258.65238-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 1e0afbdd-08cb-4eec-9e6e-32b2db403961 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767263781750682921?= X-GMAIL-MSGID: =?utf-8?q?1767263781750682921?= From: Daniel Golle Add thermal-zones to mt7986 devicetree. Signed-off-by: Daniel Golle Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- changes in v2: - drop top 2 thermal trips as suggested by matthias --- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 28 +++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi index a409d5e845c2..a059fcdaa8b7 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -603,4 +603,32 @@ wifi: wifi@18000000 { memory-region = <&wmcpu_emi>; }; }; + + thermal-zones { + cpu_thermal: cpu-thermal { + polling-delay-passive = <1000>; + polling-delay = <1000>; + thermal-sensors = <&thermal 0>; + + trips { + cpu_trip_active_high: active-high { + temperature = <115000>; + hysteresis = <2000>; + type = "active"; + }; + + cpu_trip_active_low: active-low { + temperature = <85000>; + hysteresis = <2000>; + type = "active"; + }; + + cpu_trip_passive: passive { + temperature = <40000>; + hysteresis = <2000>; + type = "passive"; + }; + }; + }; + }; }; From patchwork Mon May 29 20:42:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 100424 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1758220vqr; Mon, 29 May 2023 13:47:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7f3WIR6OgAtP+XDFKWFhtsy3+x+wQ+dBhitynqnLgZyIGOr3oTDolg43ugzs2u/cbhIc6Q X-Received: by 2002:a17:902:7898:b0:1a6:54ce:4311 with SMTP id q24-20020a170902789800b001a654ce4311mr266206pll.43.1685393268897; Mon, 29 May 2023 13:47:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685393268; cv=none; d=google.com; s=arc-20160816; b=R1OAleDN0RzBgy79iOMgJ2A0ybM/4JdJl+78oALVTo466ixAwpbLjX4Diyja0umIGl /Fn0O5cQGf0Wl0nOUAzknr63vRZa6AbuceU9jrl50CiC+ibK9itOWtxN1mlO0ahw5TKp M5NZwfFgDoLcFOeFyp42LnaaTMLJqeg55GW8ngGJsFlzliAgfeWfoa/r4NXle7mYsxrp +m8Wlx4Vibk5mu6CkGuTamOz4fcnVjaDWPqu+9zX9imXppqlxAYc6phB32vLnXHx0+e0 9eP3k8itOJVfrMDc6RnYQxyfle0jTCcCewhAMc4/DsNjf81qSObWCdz7q+mN813prLs/ 9UOQ== 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=NiNTNWADcq8Wf9sTDfcLcaA78qUAbBkS8piCK+YIth4=; b=UuLtEu1UGV7LEfc3VqhlrmFWM8ccSEV52GND6UT0WnUiMsd0dh6OJbUbScWOhkMgwZ jeonUC3p/nVlsEkBlRdP0+bxQTFizQSunU57yFEhIqhZhwoMxVtv/Mq5zm3e3UgRdEJV XqKD2q+/KVeb0cDr++2zDSw9ASjScIFOLm2tNQRFsCQExzfbncBvfpqDMQHzZ46fKQim VNy7jhpXM0uEJqpvawOXU9KSiDXeN9izw3YeDjMHvPbofI504O8cuL+dn5FOBE3TyZ9J X5ZDpZ1QjM3gqa5v6CJdq7W2T+nZVKZsNdlZeDhTmdhADJsWWwq57SGCH1Nm7f6DKAQr HYPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=X7uCk1A5; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u6-20020a170902e80600b001aadba392c1si2967145plg.464.2023.05.29.13.47.35; Mon, 29 May 2023 13:47:48 -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=@mailerdienst.de header.s=20200217 header.b=X7uCk1A5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229708AbjE2Unw (ORCPT + 99 others); Mon, 29 May 2023 16:43:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229632AbjE2Unn (ORCPT ); Mon, 29 May 2023 16:43:43 -0400 Received: from mxout1.routing.net (mxout1.routing.net [134.0.28.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 964F9DB; Mon, 29 May 2023 13:43:38 -0700 (PDT) Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout1.routing.net (Postfix) with ESMTP id 695513FC7F; Mon, 29 May 2023 20:43:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1685393015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NiNTNWADcq8Wf9sTDfcLcaA78qUAbBkS8piCK+YIth4=; b=X7uCk1A5RWowtoLg5C28QXGgBuPhnlgquA0AlaMFd43ibD+ZUiiExwvswPC2MKv8xwn93/ lYdNhnN/6uXhuWKKJ1g57S9tFrJvZcprKeOWolnq3tU34kfnUUp1wV3Es+/nhVbwQv8nsJ lqZPUaqmWk5su9LXSJu66RUD+Zv4PZg= Received: from frank-G5.. (fttx-pool-217.61.156.2.bambit.de [217.61.156.2]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 4483E1006D1; Mon, 29 May 2023 20:43:34 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Srinivas Kandagatla , "Hui.Liu" , Zhiyong Tao , Andrew-CT Chen , Lala Lin , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Daniel Golle Subject: [PATCH v2 4/4] arm64: dts: mt7986: add pwm-fan and cooling-maps to BPI-R3 dts Date: Mon, 29 May 2023 22:42:58 +0200 Message-Id: <20230529204258.65238-5-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230529204258.65238-1-linux@fw-web.de> References: <20230529204258.65238-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: b1d02627-873f-44dd-a92e-df7ed1a9bf87 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767262932500346463?= X-GMAIL-MSGID: =?utf-8?q?1767262932500346463?= From: Daniel Golle Add pwm-fan and cooling-maps to BananaPi-R3 devicetree. Signed-off-by: Daniel Golle Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- this is based on Patch from openwrt. as my PWM-fan seems to need 5v pwm signal and r3 only provides 3v3 on 3pin-socket it does not work for me. --- .../dts/mediatek/mt7986a-bananapi-bpi-r3.dts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts index 782519429497..29c018bbf29d 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts @@ -37,6 +37,15 @@ dcin: regulator-12vd { regulator-always-on; }; + fan: pwm-fan { + compatible = "pwm-fan"; + #cooling-cells = <2>; + /* cooling level (0, 1, 2) - pwm inverted */ + cooling-levels = <255 96 0>; + pwms = <&pwm 0 10000 0>; + status = "okay"; + }; + gpio-keys { compatible = "gpio-keys"; @@ -132,6 +141,28 @@ sfp2: sfp-2 { }; }; +&cpu_thermal { + cooling-maps { + cpu-active-high { + /* active: set fan to cooling level 2 */ + cooling-device = <&fan 2 2>; + trip = <&cpu_trip_active_high>; + }; + + cpu-active-low { + /* active: set fan to cooling level 1 */ + cooling-device = <&fan 1 1>; + trip = <&cpu_trip_active_low>; + }; + + cpu-passive { + /* passive: set fan to cooling level 0 */ + cooling-device = <&fan 0 0>; + trip = <&cpu_trip_passive>; + }; + }; +}; + &crypto { status = "okay"; };