From patchwork Fri Apr 21 13:20:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13219996 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 993EDC77B7F for ; Fri, 21 Apr 2023 13:21:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc: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: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=mHOqo4HIEyB7ktMTIGmhNIv8WSv4OG8N14TT+vETEfY=; b=zKJ52mLajjv8nV ul3M5rjYYsTHX7h82xWK95gwwD4DZRMf+lJZDZw3wy8DAHkn7lNn8N9+rWp2N/b7+4rFdQeTZw2WN wZm05ptu+UFKte42jvuTppk39kKnDIYVBpy/suQZeT3sJrTP2n00zHFVA8pZQvtsneWE72OhugCkb xxJihUNYyWyNoIKkk7Y5VwbNCfl1FaCDenfAx4ZliZnxZHH0ntWAcRmalczT8c5jT85/HK+qs7sTy EhnHjFJNFfRitMrgZFb5vkm7Ljpu3GhmHlJBPmkaGTsf8vuieHlZ13MX4u3fQvpVsMvm7fO4/hzhQ Enq4Sp3zGxnifwCqiFaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ppqhX-00Axdt-28; Fri, 21 Apr 2023 13:21:23 +0000 Received: from mxout1.routing.net ([2a03:2900:1:a::a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ppqh9-00AxTI-13; Fri, 21 Apr 2023 13:21:01 +0000 Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout1.routing.net (Postfix) with ESMTP id 97F093FC7E; Fri, 21 Apr 2023 13:20:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1682083254; 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=mHOqo4HIEyB7ktMTIGmhNIv8WSv4OG8N14TT+vETEfY=; b=o9E6v+gujiezFk2NdyxP//YaF1oxEfhftHFfrnGRImu9HuaQolymY5kM3gNHsJeAy3XTcT BaAX02pfjXln71AVTA/54satIDDLpKKxyPvWL2zzG/ODhhyB4qC+YSKTVQ0ZYsluGYZnqa aT2nhtcB7b+smEtXP4BPqhv4T50YKWo= Received: from frank-G5.. (fttx-pool-217.61.159.143.bambit.de [217.61.159.143]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 9E0A810078A; Fri, 21 Apr 2023 13:20:53 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v1 1/7] dt-bindings: nvmem: mediatek: efuse: add support for mt7986 Date: Fri, 21 Apr 2023 15:20:41 +0200 Message-Id: <20230421132047.42166-2-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230421132047.42166-1-linux@fw-web.de> References: <20230421132047.42166-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 360423d2-8823-4f65-8664-11db58bb00fa X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230421_062059_501517_9F61A949 X-CRM114-Status: UNSURE ( 8.91 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew-CT Chen , Lars-Peter Clausen , Lala Lin , linux-iio@vger.kernel.org, Zhiyong Tao , "Hui.Liu" , linux-kernel@vger.kernel.org, Daniel Golle , devicetree@vger.kernel.org, Rob Herring , Srinivas Kandagatla , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Matthias Brugger , Jonathan Cameron , AngeloGioacchino Del Regno Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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 75e0a516e59a..e3894f9d566e 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 Fri Apr 21 13:20:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13219994 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 770A3C7618E for ; Fri, 21 Apr 2023 13:21:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc: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: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=Ing+04FHy9azxnBKKQYS9GlB1I/nT9NemmbN45zAZMM=; b=OqyCRKmPT9bnk6 7aoTeZy5DUkn/Zjlnpnd8mc2+bBFwjx/+O5Weq1ReR9nBC9jOQ3FAWKMMMOz/g2+OvsS5330KYob1 eJqIq1FFgNBVwbmOy8SZCXZspJ+eTUsMd0RoOMA63Kl5GdLVzXptRWXNFM8EjMnDAQarmMUB2XMKD CBIfAs+AUGPrx0sjXYU2FAU5R6NjrfPbfNu40ua+Ts2l/RyH1s7doCqC7izbpbGhgcOXef4aq3zVA dj044/6XtaaJSa2jthkaChY0Y+HRKRDALoEFbDSiVXikUrtO+IMZPB9K1YDzlkb/VtwjujkIqZfFp Bmu1zs/Hf4aZNe0zADVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ppqhG-00AxWu-06; Fri, 21 Apr 2023 13:21:06 +0000 Received: from mxout2.routing.net ([2a03:2900:1:a::b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ppqh8-00AxTD-1P; Fri, 21 Apr 2023 13:20:59 +0000 Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout2.routing.net (Postfix) with ESMTP id 7886660518; Fri, 21 Apr 2023 13:20:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1682083255; 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=Ing+04FHy9azxnBKKQYS9GlB1I/nT9NemmbN45zAZMM=; b=lRZMmgZ9DFw3/xJxUm5Z5jLlPJ053LKjmLH+F05gwNMKu4OYyBzXU/kmxcBbEr3H1x0XBO NKKnBUVRVDDUfzZs1gvsfj5dO0k3q7avNXWtKlVO5+5Ph+PsEE2pXjiSAyoNDjquKCnHHI 6hPYevKIoGCYQyXb6j2SCIOta0OlqF8= Received: from frank-G5.. (fttx-pool-217.61.159.143.bambit.de [217.61.159.143]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 82DA310072A; Fri, 21 Apr 2023 13:20:54 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v1 2/7] dt-bindings: iio: adc: Add support for MT7986 Date: Fri, 21 Apr 2023 15:20:42 +0200 Message-Id: <20230421132047.42166-3-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230421132047.42166-1-linux@fw-web.de> References: <20230421132047.42166-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 53b6faa0-46e6-4992-a972-e498238c0908 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230421_062058_704112_151653D4 X-CRM114-Status: UNSURE ( 9.19 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew-CT Chen , Lars-Peter Clausen , Lala Lin , linux-iio@vger.kernel.org, Zhiyong Tao , "Hui.Liu" , linux-kernel@vger.kernel.org, Daniel Golle , devicetree@vger.kernel.org, Rob Herring , Srinivas Kandagatla , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Matthias Brugger , Jonathan Cameron , AngeloGioacchino Del Regno Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Frank Wunderlich Add compatible string and specific clock property for mt7986. Signed-off-by: Frank Wunderlich --- .../devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml b/Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml index 7f79a06e76f5..6168b44ea72c 100644 --- a/Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml +++ b/Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml @@ -26,6 +26,7 @@ properties: - mediatek,mt2712-auxadc - mediatek,mt6765-auxadc - mediatek,mt7622-auxadc + - mediatek,mt7986-auxadc - mediatek,mt8173-auxadc - items: - enum: From patchwork Fri Apr 21 13:20:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13219995 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 C1311C77B75 for ; Fri, 21 Apr 2023 13:21:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc: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: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=Chq2A5ZaKQ5AonXzE0cmKnIIyaGF0ZRsNYPxOGHLHdk=; b=LrSlI4sSAOZZ+Q 7JxSOS3t4Yr6Yzpx3UzvWvYtzPoF7u1dfRu1+lOOdgaCrtUIT5ZpTd4xelRMHcYAJqs5yhBg4DO1/ Fc+DsmQmizhrSbZ09G5UgsRNG70rKh9Ayp5uqwC7Zp2kL0/TTOF3CHtrgyUY3CAI6ONLTwTdtlWN/ tUfwDjzbpMZykZhU2MqS3+q+OFo5dqIZ5ARZ42SVmyXAndJdu3HoVIAEdqFeTeOeLyQcv0S441+aq hvsty2DYXwqDKpLN8LZr1Wz7sBpEyXbkavP2ufpOm+HaMVja08M+CpewYdoG6vd2+t0gY9Wpbjiej zAR6IlZfhV3BWbTexOrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ppqhW-00Axcs-0s; Fri, 21 Apr 2023 13:21:22 +0000 Received: from mxout1.routing.net ([2a03:2900:1:a::a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ppqh9-00AxTH-13; Fri, 21 Apr 2023 13:21:01 +0000 Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout1.routing.net (Postfix) with ESMTP id 5BFAA401E6; Fri, 21 Apr 2023 13:20:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1682083256; 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=Chq2A5ZaKQ5AonXzE0cmKnIIyaGF0ZRsNYPxOGHLHdk=; b=PruVhIsuYMJcYiD4PID30UKnRStIz7edJS8EZMRdfvOr5ywuRQkVmjEuvFKIzO3dv6Dzpi Mp/qF+to4zLBo/1OLIvxF/YRoBpXT5Iy2nWJ0ESrJ00mMzhGfiZTJdsTMxlOiAOxNN+vh7 Lq3fzI5jnZCu6+TLtadK6m7JVYjHvLQ= Received: from frank-G5.. (fttx-pool-217.61.159.143.bambit.de [217.61.159.143]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 634601007E3; Fri, 21 Apr 2023 13:20:55 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v1 3/7] arm64: dts: mt7986: add thermal and efuse Date: Fri, 21 Apr 2023 15:20:43 +0200 Message-Id: <20230421132047.42166-4-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230421132047.42166-1-linux@fw-web.de> References: <20230421132047.42166-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: f64cf289-99f5-410a-8bbb-41118ff9e27b X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230421_062059_508153_4FBE605F X-CRM114-Status: GOOD ( 10.88 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew-CT Chen , Lars-Peter Clausen , Lala Lin , linux-iio@vger.kernel.org, Zhiyong Tao , "Hui.Liu" , linux-kernel@vger.kernel.org, Daniel Golle , devicetree@vger.kernel.org, Rob Herring , Srinivas Kandagatla , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Matthias Brugger , Jonathan Cameron , AngeloGioacchino Del Regno Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Daniel Golle Add thermal related nodes to mt7986 devicetree. Signed-off-by: Daniel Golle Signed-off-by: Frank Wunderlich --- 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 51944690e790..a38965e23825 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -323,6 +323,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"; @@ -361,6 +370,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"; @@ -412,6 +436,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"; @@ -553,5 +589,4 @@ wifi: wifi@18000000 { memory-region = <&wmcpu_emi>; }; }; - }; From patchwork Fri Apr 21 13:20:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13219997 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 6D360C77B7D for ; Fri, 21 Apr 2023 13:21:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc: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: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=xrmWdssTBgZOrykp/nvNV4GPcLmobxUOfAu5yBCmoZs=; b=JaZcMolxqHzj7b PmBhlTYgUi5JLdwBwUat2KOzjLIVxgPQSk8ntBmR23kumDr3atHf4Emf0WOyRmOGqk+CloloGuKVV 0MbocAjop7E2qJmPYRsdYDiN0x0Cfx/w7bdFtJtkklQWeNXMargVWqMBj/zN3+x4ONk1C2fJuld9j 3AG3bMtcuamyOpi3KDf3hvzK5KBCSbVXYMZ/wxsF1LACDyj288Xwm8iVmfWblHs3i5tWm/EefNpgk ocd36VTF707JgMTClnGKI+G5nz+I9Tp60TiNxRHL2fugc/rF2XYPxfXNgEJzjhbBU3maYQ0jnBx2s 7MjCVKNbnieVJ3ToMw6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ppqhX-00AxdJ-0D; Fri, 21 Apr 2023 13:21:23 +0000 Received: from mxout2.routing.net ([2a03:2900:1:a::b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ppqh8-00AxTK-29; Fri, 21 Apr 2023 13:21:01 +0000 Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout2.routing.net (Postfix) with ESMTP id 37C5460659; Fri, 21 Apr 2023 13:20:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1682083257; 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=xrmWdssTBgZOrykp/nvNV4GPcLmobxUOfAu5yBCmoZs=; b=rmYesXrOV1tW9rPiprxVCKZWeIwOco4ylGe3KzI65UFoIx25kGWF9brnoWGjxgS1iR1Bcd ZZfgQQcxHlqVGWQy8rtZBDYpWXtdq+JBj2XdNVES3fs2GH1mCUmIz7eQkh2DfCJHlrwER0 Nu00aK7bkcyDZiCrFEGHCcJXLxadK60= Received: from frank-G5.. (fttx-pool-217.61.159.143.bambit.de [217.61.159.143]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 442C410072A; Fri, 21 Apr 2023 13:20:56 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v1 4/7] arm64: dts: mt7986: add PWM Date: Fri, 21 Apr 2023 15:20:44 +0200 Message-Id: <20230421132047.42166-5-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230421132047.42166-1-linux@fw-web.de> References: <20230421132047.42166-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: bde81c03-93b2-4a40-8fda-fbb03b5859d9 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230421_062058_889325_DCCC96BB X-CRM114-Status: UNSURE ( 9.37 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew-CT Chen , Lars-Peter Clausen , Lala Lin , linux-iio@vger.kernel.org, Zhiyong Tao , "Hui.Liu" , linux-kernel@vger.kernel.org, Daniel Golle , devicetree@vger.kernel.org, Rob Herring , Srinivas Kandagatla , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Matthias Brugger , Jonathan Cameron , AngeloGioacchino Del Regno Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Daniel Golle This adds pwm node to mt7986. Signed-off-by: Daniel Golle Signed-off-by: Frank Wunderlich --- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi index a38965e23825..a409d5e845c2 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -240,6 +240,20 @@ crypto: crypto@10320000 { status = "disabled"; }; + pwm: pwm@10048000 { + compatible = "mediatek,mt7986-pwm"; + reg = <0 0x10048000 0 0x1000>; + #clock-cells = <1>; + #pwm-cells = <2>; + interrupts = ; + clocks = <&topckgen CLK_TOP_PWM_SEL>, + <&infracfg CLK_INFRA_PWM_STA>, + <&infracfg CLK_INFRA_PWM1_CK>, + <&infracfg CLK_INFRA_PWM2_CK>; + clock-names = "top", "main", "pwm1", "pwm2"; + status = "disabled"; + }; + uart0: serial@11002000 { compatible = "mediatek,mt7986-uart", "mediatek,mt6577-uart"; From patchwork Fri Apr 21 13:20:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13219998 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 5AE69C7618E for ; Fri, 21 Apr 2023 13:21:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc: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: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=t44L4PTrhbK6D0p+6ylhl2O6MzEiiAOATjFq63Zbih0=; b=U/RMGCGcO0gzuI v6uhpLAYjY9RuE9zFPPWRqYovBba+dWD/lgt8swqDQJCTjY/231Eo5WmvICGmJO47ojuM6gT+WGBt iuzPXkQCpqsy+0rm6YU+2k7y8q9Motd458S8NzPqUAeJ2X9zY6PVLi2TJZRXJXoO9qo2HVpHeOXS9 fixg8LurfltNpf8QZrO/s2+Owlv2d7azUO4V3zd2Cry5V6fcijfLI3DEdZI4lQNA17zOxNwtZ1DJE gDvc9E0EmbkYbaleDEzw1AWMJjNkcehK0MJaZ71dPti7mh7YsD4qQjxGKgQVx3QOflLsFy0j9+WfW lfIKPetxB1mWp1cJLM2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ppqho-00Axnk-38; Fri, 21 Apr 2023 13:21:41 +0000 Received: from mxout4.routing.net ([2a03:2900:1:a::9]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ppqhA-00AxTi-2v; Fri, 21 Apr 2023 13:21:02 +0000 Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout4.routing.net (Postfix) with ESMTP id 23B3B10120C; Fri, 21 Apr 2023 13:20:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1682083258; 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=t44L4PTrhbK6D0p+6ylhl2O6MzEiiAOATjFq63Zbih0=; b=um3C1eazgsWx7DDRNeT2e+DxzwF4WC8m0/DlYPXzFbgljHNLd6wjLt/WNWOzkIWkwT3KnK eGX6kFXGwRaQuRY1eY0GFUWOtE4VUusjdt1S2pfe5FFwEcIdUYvhysVEcSlne0lt6sWrv1 5X1rCnQsMMD31XJKTYTJUoU6gcBYBU8= Received: from frank-G5.. (fttx-pool-217.61.159.143.bambit.de [217.61.159.143]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 2A9711007E3; Fri, 21 Apr 2023 13:20:57 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v1 5/7] arm64: dts: mt7986: add PWM to BPI-R3 Date: Fri, 21 Apr 2023 15:20:45 +0200 Message-Id: <20230421132047.42166-6-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230421132047.42166-1-linux@fw-web.de> References: <20230421132047.42166-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 2a9dabd6-f8f5-4683-b208-d6dbddd4de4e X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230421_062101_086535_69F8BF9F X-CRM114-Status: GOOD ( 10.24 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew-CT Chen , Lars-Peter Clausen , Lala Lin , linux-iio@vger.kernel.org, Zhiyong Tao , "Hui.Liu" , linux-kernel@vger.kernel.org, Daniel Golle , devicetree@vger.kernel.org, Rob Herring , Srinivas Kandagatla , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Matthias Brugger , Jonathan Cameron , AngeloGioacchino Del Regno Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Frank Wunderlich Add pwm node and pinctrl to BananaPi R3 devicetree. Signed-off-by: Frank Wunderlich --- .../boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts | 13 +++++++++++++ 1 file changed, 13 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 2b028141f1f7..782519429497 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts @@ -274,6 +274,13 @@ mux { }; }; + pwm_pins: pwm-pins { + mux { + function = "pwm"; + groups = "pwm0", "pwm1_0"; + }; + }; + spi_flash_pins: spi-flash-pins { mux { function = "spi"; @@ -344,6 +351,12 @@ mux { }; }; +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm_pins>; + status = "okay"; +}; + &spi0 { pinctrl-names = "default"; pinctrl-0 = <&spi_flash_pins>; From patchwork Fri Apr 21 13:20:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13220000 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 2AFE2C77B7D for ; Fri, 21 Apr 2023 13:22: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:Cc: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: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=G0r0DPCZt1EU488fl2GZEqSoMWdqqn9V2ojnp3z0FnE=; b=P0zjla2HkRLX4H kCukTMzuJFsKaM00nZqT3zsqznvWf6wbZ/bTnb9DrxKp7K2eWyL0W4Jf0BM4gOzafW6+nphhUG/PT TOS7AYL5qhhmITWi7Ohbpq8CwKw1IPOgL+KCuZFkIsP8K7fEKhQluv3UecotoISAg8zoiuMAJLoHW cJ3RArXSORgogu0+aZEIywQvfiQYBYlCO2ENamASebEX0q4zo9Ouy3zVElz2kyzSn6iBnWz9MsZzJ 5CH1EymPamL/68rBiE6AFXv3GGV9iO2vvbDR6bkubRk6qI7w6adsk1s+ge8jXzrejnxlgg+buxqbc gSysnkeY0VB9tNI/5/Hw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ppqi6-00Axyu-08; Fri, 21 Apr 2023 13:21:58 +0000 Received: from mxout1.routing.net ([2a03:2900:1:a::a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ppqhC-00AxVI-1t; Fri, 21 Apr 2023 13:21:04 +0000 Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout1.routing.net (Postfix) with ESMTP id 1C172403F3; Fri, 21 Apr 2023 13:20:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1682083259; 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=G0r0DPCZt1EU488fl2GZEqSoMWdqqn9V2ojnp3z0FnE=; b=UR4nsX1r2aXnxpPuEaO65hov5YFHqI6djkFgTMhrnWyj63ZWLuhJlewOo5544FPp1+UgP4 N6WAsS3x0rWze0vX0EseVtLBI5ZPUGU4jJBZpqERpBYsQISLw1Uh0JJv0RXYjQ8XEemfRa +ruFmmCim29eRZGRt1EDMjERyp7xULQ= Received: from frank-G5.. (fttx-pool-217.61.159.143.bambit.de [217.61.159.143]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 119EE10072A; Fri, 21 Apr 2023 13:20:58 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v1 6/7] arm64: dts: mt7986: add thermal-zones Date: Fri, 21 Apr 2023 15:20:46 +0200 Message-Id: <20230421132047.42166-7-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230421132047.42166-1-linux@fw-web.de> References: <20230421132047.42166-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 5d68a617-c55d-461a-a20f-0eeaabed9417 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230421_062102_782288_84CE5DBF X-CRM114-Status: UNSURE ( 9.45 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew-CT Chen , Lars-Peter Clausen , Lala Lin , linux-iio@vger.kernel.org, Zhiyong Tao , "Hui.Liu" , linux-kernel@vger.kernel.org, Daniel Golle , devicetree@vger.kernel.org, Rob Herring , Srinivas Kandagatla , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Matthias Brugger , Jonathan Cameron , AngeloGioacchino Del Regno Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Daniel Golle Add thermal-zones to mt7986 devicetree. Signed-off-by: Daniel Golle Signed-off-by: Frank Wunderlich --- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi index a409d5e845c2..845b29a9664a 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -603,4 +603,44 @@ 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_crit: crit { + temperature = <125000>; + hysteresis = <2000>; + type = "critical"; + }; + + cpu_trip_hot: hot { + temperature = <120000>; + hysteresis = <2000>; + type = "hot"; + }; + + 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 Fri Apr 21 13:20:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13219999 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 60663C77B75 for ; Fri, 21 Apr 2023 13:21:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc: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: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=NiNTNWADcq8Wf9sTDfcLcaA78qUAbBkS8piCK+YIth4=; b=Vc6ZEDQc5edU4b QGRpqflTavy8q9UfkJ1/xvNACfQAo8+OPWI8NtQH8kxaPjK4NjEVjR+fajxqdot56v5eJqkPklrIy uBv2ct58+glgfeOx0WKMBS7+VCH/SBF76F89YxrtfW5mraVb2b0LMC36LRajzj2R3IFalFDJxMj6u sexZU8ygfMizTNmljF43PyVApFKraVa3pNmOkM/Aq8snNs5TBvk3tYELbwDe7wh5sRPBPw9RWwr+J g4OjtWGfUsSVcIKB7t7n3v8Zo0MXQKh4VvfYhth3mXmVv4+SIFIIyvuHQG9HN6QASgEgpa60FdIgZ 3Ao/3b3aHAPSRMI7uQPg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ppqhz-00AxuP-0t; Fri, 21 Apr 2023 13:21:51 +0000 Received: from mxout2.routing.net ([2a03:2900:1:a::b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ppqhB-00AxUm-1w; Fri, 21 Apr 2023 13:21:03 +0000 Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout2.routing.net (Postfix) with ESMTP id 12A946035B; Fri, 21 Apr 2023 13:21:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1682083260; 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=GtRSq3+StukDoPcXTwschldIT9Dh74lS8zWFW/HR3WD2Gprt28Ek92ULzH7jPn+2yEne+P rYmNv/xPJpdA8sGSw0z0zdh0s5oBGf0pny9jULvFO5WkAHYVQ2g4mVIWKCDCUFZD7dZA/V 21zP22t/SyrakEx5djdaovOHFlikY9w= Received: from frank-G5.. (fttx-pool-217.61.159.143.bambit.de [217.61.159.143]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 0DADE10078A; Fri, 21 Apr 2023 13:20:59 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v1 7/7] arm64: dts: mt7986: add pwm-fan and cooling-maps to BPI-R3 dts Date: Fri, 21 Apr 2023 15:20:47 +0200 Message-Id: <20230421132047.42166-8-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230421132047.42166-1-linux@fw-web.de> References: <20230421132047.42166-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: ffa0c9e8-5f36-4bc6-80fc-5fd1b0adccf6 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230421_062101_872725_4A123566 X-CRM114-Status: GOOD ( 11.35 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew-CT Chen , Lars-Peter Clausen , Lala Lin , linux-iio@vger.kernel.org, Zhiyong Tao , "Hui.Liu" , linux-kernel@vger.kernel.org, Daniel Golle , devicetree@vger.kernel.org, Rob Herring , Srinivas Kandagatla , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Matthias Brugger , Jonathan Cameron , AngeloGioacchino Del Regno Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Daniel Golle Add pwm-fan and cooling-maps to BananaPi-R3 devicetree. Signed-off-by: Daniel Golle Signed-off-by: Frank Wunderlich --- 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"; };