From patchwork Tue May 30 20:12:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 101097 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2443951vqr; Tue, 30 May 2023 13:32:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5xWoCsLe6avkKpoyOb936FQZO2p3IvVR842W9OxMVpJLoEMs8eNIh3WGB3Cvm9n6QTJCGH X-Received: by 2002:a17:903:120f:b0:1ae:1364:6079 with SMTP id l15-20020a170903120f00b001ae13646079mr3801668plh.44.1685478735734; Tue, 30 May 2023 13:32:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685478735; cv=none; d=google.com; s=arc-20160816; b=Y2r76ZimZtBxq8P6ycDXZvfOgNUbk1lLFmr90yIbTssBc9Jex8rpPe24kp4ekl4Lfh HXGnQg31YzWdaOTH9883X12x2ScTH+c4p67W/wdlivBUY+SXayvyVh2MAgq7fu8yKMgJ UWnM3VIR3Wd8TQBUW8pyVtV20WvXyeA4yEet4dEyzAN2iYV152KJOBUSBjDQhOA+gPQ4 fiwpRiwueO5ePAiDPB5dRj4Un6+0Iv8fmP+tbrZBn+YZA69wroh2KmvMvsnvsyivJJwc XtHGpEEwhnBoiQphCqX+QLYDi8D0h653FGcPx94P48U5prJZ/QE4TUKlZgHkGrddHp9/ lC6w== 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=b+s46f8pZVeepKPoIDXzqkOVxBv1C8drs+pF/P4Tmh9HrL3Xoo6lSk2ZMcJiQOi8+m OG/io1alBexn7pbVYvXDLZxX0HYv8iSCoESa19JsBAjhktKzr1RZL2vyWQQwJEYZRQJP 5Oc20nQnhhiJRVEdvujV9mb8T+bv7DFDxIFPtmIlRHUOMZ2HerUiWhg6ejeWHSN6rzt1 r0aZCY9OHbt/VqDTUvoxaPXa5zwgjLtpK0cT0xc6t6Pwjyte4/RN+gGtK7yvWUBGgw4R alei5PhwkSktSx7GxfQF0VhkLdSin6AWtv2SxzTypF+D8ot3qNQ/HQ/wJ0Erp1BFnfXP ouzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=kagLpLsN; 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 bj3-20020a170902850300b001a63e4ff6fbsi3380382plb.178.2023.05.30.13.32.03; Tue, 30 May 2023 13:32:15 -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=kagLpLsN; 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 S233159AbjE3UNj (ORCPT + 99 others); Tue, 30 May 2023 16:13:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230230AbjE3UNf (ORCPT ); Tue, 30 May 2023 16:13:35 -0400 Received: from mxout1.routing.net (mxout1.routing.net [IPv6:2a03:2900:1:a::a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58537102; Tue, 30 May 2023 13:13:34 -0700 (PDT) Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout1.routing.net (Postfix) with ESMTP id 8979041A92; Tue, 30 May 2023 20:13:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1685477612; 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=kagLpLsNghQ+3kEot5WtdGyjyNAXlnvLvHr5/6LpcEV1/Ve6J5gEFBOynkFtn+XbgOFszi mtvTrw6aFJ7V4RePZW/3dPLp8f5CifvzU0uIkHTok5JssI2pAQPiIqiPXX8zI+bHeGCzSX PTwQrZ8KsK6Jj9g0mGaZeyIa3lW0qEw= Received: from frank-G5.. (fttx-pool-217.61.157.145.bambit.de [217.61.157.145]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 29DA8405AF; Tue, 30 May 2023 20:13: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 v3 1/4] dt-bindings: nvmem: mediatek: efuse: add support for mt7986 Date: Tue, 30 May 2023 22:12:32 +0200 Message-Id: <20230530201235.22330-2-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230530201235.22330-1-linux@fw-web.de> References: <20230530201235.22330-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 96610b03-20e4-48fc-b513-0c5f26603653 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,URIBL_BLOCKED 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?1767352550822275570?= X-GMAIL-MSGID: =?utf-8?q?1767352550822275570?= From: Frank Wunderlich Add compatible string for mt7986 SoC. Signed-off-by: Frank Wunderlich Acked-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno --- 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 Tue May 30 20:12:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 101098 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2444001vqr; Tue, 30 May 2023 13:32:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6ZQ9KGMsHt8nTPPXJpyvbaWtVjdDyUY+HVNhMPu2FAeTyeTvi6yCNq3GErTKyK8ASZkd41 X-Received: by 2002:a05:6a20:12c7:b0:111:366:ee9f with SMTP id v7-20020a056a2012c700b001110366ee9fmr4068885pzg.48.1685478742182; Tue, 30 May 2023 13:32:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685478742; cv=none; d=google.com; s=arc-20160816; b=ltAuPE7HtB8+IYup2t6TUEo/4QOdi+r+Cnbl8FQYlZbcXvyt7JWpC6D98FtAnpiHbN GwZBARLr/3y7WZAPBFN6LuxvdW6NVEAcWPm8iMqc+zIuCHayeBcCFjbPRIrim8axCDeP +EixC01u701mTAElFi0jH9bNaYU08CdQ8+R8FAXFH3T4KwQLryRdBoDGRaS4wTdA2X8W LD14E1Nk1EynB+W435Kt27V8CROMiDrzuFJS8xPgo3awbYDo1Jad/7+X7EXbNczuJHrj sygPVi1o8lp+fSuneMfLasaLBUjOFABBTGMPUt0O2dIbPGx2FcHIZxO1+xow7fozRDr7 Yq+g== 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=bXh/enNCt6k/VhDbW4GU/2xM8uza5LciUBEJxVS6EdI=; b=Jlxw/1CDH1WSlniYCkXg9IrICwoeWu7jhbtXf+V7BMjBtKbjExvRLmx85nACzj+Rpz KhrWoN40TuL40ZoWUAcizgNVNqeW5FHhWLycaJq0akjKYTJWAkrr3hwvtyY0kW5FnTp+ wZNVq2xWbfiy9AwaV3ODmLs5YCleZRF5QstitKH0o9Pk536iKej8hFqPWRZhGvIvCItd aNUfiQamUDBYqkYUH+8rsQCGU07QY+Be1ZVHJ1MWnuF/id47pk8pZjm3rDo1GgYKazZH EImdg1Xpct5WAvbBqwgdbQ8lef5daIj5lcRVZPnlq03uYbOAUJdH3VhpNyoo5ERQFsXv R1/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=CI8BBcYb; 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 x71-20020a63864a000000b0053fb3688fadsi1984295pgd.144.2023.05.30.13.32.09; Tue, 30 May 2023 13:32:22 -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=CI8BBcYb; 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 S233276AbjE3UNm (ORCPT + 99 others); Tue, 30 May 2023 16:13:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232847AbjE3UNg (ORCPT ); Tue, 30 May 2023 16:13:36 -0400 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25A24106; Tue, 30 May 2023 13:13:35 -0700 (PDT) Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout3.routing.net (Postfix) with ESMTP id 9E38062608; Tue, 30 May 2023 20:13:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1685477613; 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=bXh/enNCt6k/VhDbW4GU/2xM8uza5LciUBEJxVS6EdI=; b=CI8BBcYbvix0dTim705n4OMjImZz6V/xlQ/NOsayZsWYdaz0AMBFPnx4W2blggIxZ/o0QE Njfo1MNnEJtOuhKnGyrFzzIdLc3sxhRtuv5vSk5vRDlUurCYgBuof80wfqZi0fplupWlY5 xzgWfpJE1thUuH9z6qij6vrdS68CrYI= Received: from frank-G5.. (fttx-pool-217.61.157.145.bambit.de [217.61.157.145]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 649944092B; Tue, 30 May 2023 20:13: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 v3 2/4] arm64: dts: mt7986: add thermal and efuse Date: Tue, 30 May 2023 22:12:33 +0200 Message-Id: <20230530201235.22330-3-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230530201235.22330-1-linux@fw-web.de> References: <20230530201235.22330-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: ad369705-4d0d-4dc7-9ee8-39fb1ed9b23d 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,URIBL_BLOCKED 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?1767352557922988853?= X-GMAIL-MSGID: =?utf-8?q?1767352557922988853?= 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 --- changes in v3: - efuse compatibles in one line --- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 36 ++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi index aa9e679b78e2..ad4fd77b65a7 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,17 @@ 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 +602,4 @@ wifi: wifi@18000000 { memory-region = <&wmcpu_emi>; }; }; - }; From patchwork Tue May 30 20:12:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 101100 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2444255vqr; Tue, 30 May 2023 13:32:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7h9txUWwIL3TakLhXcxfPik3f+mvjkeRHtLcPhowtF6gKgmXhlzqARTaVQLJfzK1Mk7W4M X-Received: by 2002:a17:902:ecc3:b0:1ac:5717:fd5 with SMTP id a3-20020a170902ecc300b001ac57170fd5mr4230701plh.60.1685478773589; Tue, 30 May 2023 13:32:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685478773; cv=none; d=google.com; s=arc-20160816; b=xSY9gLjw0xWMB7fO49pM9VYho6I7S4CPRO4hK2YqnkQleO77zmoAMKCSRttuQFOHVD 7FiYBcjb4WDXITB7vr9J7YLyDw2LtYIJPFhShbK8eE79Q8rp6WT9so/IbkKFe2jgFRf6 jLnNuj+z7WuR5rHjSgBKhw6qBB8lZlA1T5wX38M5Xb3c/GwF6OQ4tPBxTKoizyfNPzw8 ARkizDB9fp8Yo4Eem3fR/KFW/eI8KDOBmTIkzcABdc2JpgDpePu9BsklV7wNcw1MebCk 62U5QRfpWj9PAuN6w7xjQsW4kYFn2jLuqU11e1ugPn2uUZbWMZaAcBA4zsLmV9FKES5j SXiw== 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=lb8VvV6rbPTiUgU7OuTn7VUuQ6DRjIHw3Ydrif+cqic=; b=X5SxUvR+G8pRNFI+RD7Pr4rzZCs9dfyqTRyvNJBh/PKCeTb2Wpy2DSAzJaASD08eU2 hoX1GrpgiBDr8b+e7ZF8v/C80INLajjOIuTONK7PCRE7V3oMeDvvgzIkJJzzxARGqUhK fRaftYRh8lFKa+HaKn4xHy+ufOq5Sm7hEPv3Oa2K6XGVslzIB0lG7tmAPWLLG3VlPOMi CuLMnp6b0cjWQ5+I9dszrIEh9VhPUb02hMokhjNkHDpXGlUl5vzmvIOOUc5qQfZgE5Mm 0bW7lII848V5L8IALnSiyNqxh6H/XYNabHW8QxSlcdhiwnHARZNwCyphHCH8XSas3lK6 7JaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=QPdF6+61; 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 a12-20020a170902eccc00b001afe1d16369si11394787plh.420.2023.05.30.13.32.40; Tue, 30 May 2023 13:32:53 -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=QPdF6+61; 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 S233274AbjE3UNp (ORCPT + 99 others); Tue, 30 May 2023 16:13:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233070AbjE3UNi (ORCPT ); Tue, 30 May 2023 16:13:38 -0400 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94377102; Tue, 30 May 2023 13:13:36 -0700 (PDT) Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout3.routing.net (Postfix) with ESMTP id 9817F62611; Tue, 30 May 2023 20:13:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1685477614; 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=lb8VvV6rbPTiUgU7OuTn7VUuQ6DRjIHw3Ydrif+cqic=; b=QPdF6+618BLtjAckInZuH0K205JSHVMjF/8xOWGDJqBq05tZIPKqgLeKo5ALXw5B852ujk TLTFgm9z6WQa569u+85//3Je6ayK4rypiji14uhkv6FPuzDDL7Y1cft+5c6Sr96J1ycNpo zZR/W/wvopcjfcobKUEC2JGfjI5fbUw= Received: from frank-G5.. (fttx-pool-217.61.157.145.bambit.de [217.61.157.145]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 7BB2A402C6; Tue, 30 May 2023 20:13: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 v3 3/4] arm64: dts: mt7986: add thermal-zones Date: Tue, 30 May 2023 22:12:34 +0200 Message-Id: <20230530201235.22330-4-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230530201235.22330-1-linux@fw-web.de> References: <20230530201235.22330-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: e1463851-b6ea-46c5-aebe-f5df515957ed 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,URIBL_BLOCKED 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?1767352590157443911?= X-GMAIL-MSGID: =?utf-8?q?1767352590157443911?= 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 ad4fd77b65a7..68539ea788df 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -602,4 +602,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 Tue May 30 20:12:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 101103 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2444441vqr; Tue, 30 May 2023 13:33:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4lgmiXaLbK0IcESi0wzsZc3HidDj8DFDzRAIv4OC/T1UpH/DvHJMC7wh58H+rwlFghXcZI X-Received: by 2002:a05:6a20:5486:b0:10c:7676:73bd with SMTP id i6-20020a056a20548600b0010c767673bdmr12486979pzk.5.1685478796791; Tue, 30 May 2023 13:33:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685478796; cv=none; d=google.com; s=arc-20160816; b=gaV9KEu9vgxhaPtPT6UA6MukQpZQEt8ctS4h0/POqZQUmkHh6YRPXGwZ/Jwgu84YNs 2K2HSPqn5iHqKp2+X+xwLJIfFfFeXSfzfQUit9aCrJYw4QJtDlhd/r6ygEPObWf2rF4F 01pUHAVx9Li2OIj0zfx09X/r5XRbRklzpWOMt+IHBGLOydizD32FPbVIDlLAV5RgokS9 ac7VztzSLq0vWlJFParnBvzvOjxknQQsz348xEnoapa24drC36SmLmcb6xoJepqId4MQ fekKSm7VOSX5Mw9gX720QUqMCr9jlSjFEPhwR/tKEjNq4UhTA3II06PXUcnYriYyUBeG vizw== 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=BFfAo9ifBuoYhXH6mSTzgnU8pbkgDeuCzxPB9AR/n9k=; b=EbhM6NndUV9vsRaVgHjWGcV1lzcdEgBwSwRiXymCyXtHwGFk49k+fJlEBOqbnTu31k 9YaSaTqr0smhO5ba7bt6DD4WHKKLVdD8XId06K1mrCYIgH9Z2hK/e3/z38vljmX0HAVB IPy3UH8HrzM62c6uxYjFqNfAAykQS3eZnX+ahRtXO3juB7vgM7WobC1pD3HbEFi1u2WK hGVOEVsEToLcJl215NawgErdDIBUtwh8PeLnffVMuLVG1jCxYFuLTsXfQkMlZ3iTvokA 2p1Bx2aKCRnzj2PUrykrWXEjEqpMz4qiyZROhsfiNWChv36W2+OjzO0Q8faP2MpLbbeK 0gKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=xDavmHBl; 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 t18-20020a63b252000000b0051854bde329si1174384pgo.367.2023.05.30.13.33.04; Tue, 30 May 2023 13:33:16 -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=xDavmHBl; 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 S232053AbjE3UNt (ORCPT + 99 others); Tue, 30 May 2023 16:13:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233103AbjE3UNi (ORCPT ); Tue, 30 May 2023 16:13:38 -0400 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E18810A; Tue, 30 May 2023 13:13:37 -0700 (PDT) Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout2.routing.net (Postfix) with ESMTP id 8E308615DB; Tue, 30 May 2023 20:13:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1685477615; 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=BFfAo9ifBuoYhXH6mSTzgnU8pbkgDeuCzxPB9AR/n9k=; b=xDavmHBlUzSpXgjrFHSaDgVB7cl4BE8IpATNpSGSlAQya7VaW7RfjZjdZwWrLbLMCkItgh TGN3fRYeyQdF2vaxUvFsh6P8G5Yzv4SrqQK5fD5vhagK1GMHlQDc69arQzjbLNI/1aMT3g L22x3g/9HrNSiu4u3YM7euUr97QBojc= Received: from frank-G5.. (fttx-pool-217.61.157.145.bambit.de [217.61.157.145]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 7E12C4062D; Tue, 30 May 2023 20:13: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 v3 4/4] arm64: dts: mt7986: add pwm-fan and cooling-maps to BPI-R3 dts Date: Tue, 30 May 2023 22:12:35 +0200 Message-Id: <20230530201235.22330-5-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230530201235.22330-1-linux@fw-web.de> References: <20230530201235.22330-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: eb43ed84-52f3-4a28-89ff-cb5b0bbaf3e3 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,URIBL_BLOCKED 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?1767352614481598349?= X-GMAIL-MSGID: =?utf-8?q?1767352614481598349?= 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"; };