From patchwork Wed Oct 25 17:08:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 158190 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp102177vqb; Wed, 25 Oct 2023 10:09:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEGActyaI9JPu195zMMLFw4B3P0WXcGoYA3FB/7GL08tMx6+Cm8xJ3s7vnNu+7sliBEeiFM X-Received: by 2002:a0c:aa5c:0:b0:66d:55da:191d with SMTP id e28-20020a0caa5c000000b0066d55da191dmr14259987qvb.37.1698253764480; Wed, 25 Oct 2023 10:09:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698253764; cv=none; d=google.com; s=arc-20160816; b=aj15wbEZ4iKyejknev/9WSgWyEyRN7eOdsSTp+w7xd92FpWKOTr03leyN89IKmsB4X HcrCC//z4cObWl/15T6Y0CVA3DhHcymsu+leMyhW+9f0wTj5S7jXeJ1Wt1yCsTGwEd8q UB9YKB+Ul/cYv8hdu3/7+LM9txLAdFG9dPninIe9y8zN6NtHFBNubSdwAyVLpTqZpMYn uor4lLlNieWF6NH9QXyL0wr6Z9KNdsG1vnH2KdKQFxRasm22InLR2TqCQt0IrVqVHHjV 3vZmfvl2MpuTiKdF6XVkfY6MJmaN7VFoNLoFoS9mVK/mOwXvkJPPK3tUUppMeRA0GIew SEsQ== 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=Bac0cPNtRqeMT6ltBwYDY11vruRiib1jT+EBIKA5buQ=; fh=wfd1Xmj6Lq3BnEWEssc4j0CgKCXWDB9uo47QgHsv+Ag=; b=DcBCcGnk5BTIu0sDdyOOEMWUrVe+IgiWYU+NJycoTeIA+R6hwVJZCnSGVrAL5l5hwJ mBjQYVcKl7ECEh8CTM2aux0KvdOhVIEH2sn3WRd65r9cpyhMbyY03/sjrR6K173PWi5Y htNfHZeGgIkoO31j61nrFE61wGG64c5KkCYE1bTxu44KAZnsuXwIV6vvTE8cfvn1Rt0W Egyz0kurS3hruuJGlNw4MtqGo8nLbF9ZEFXj5Sf1/T2k+L5X3DBcY4OzxbUjv+VB8NUk DJRGcAwPDhOTBel+4mDe3kgAMOZaofJ/xnZE9OZ1MtPOTx8LeRVfE+y3vFRVFlx0zYcW l9zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=Gql11qAG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id me4-20020a0562145d0400b0066db3467946si5107608qvb.461.2023.10.25.10.09.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 10:09:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=Gql11qAG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 380688145947; Wed, 25 Oct 2023 10:09:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233581AbjJYRI4 (ORCPT + 26 others); Wed, 25 Oct 2023 13:08:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233876AbjJYRIv (ORCPT ); Wed, 25 Oct 2023 13:08:51 -0400 Received: from mxout1.routing.net (mxout1.routing.net [IPv6:2a03:2900:1:a::a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D30C13A for ; Wed, 25 Oct 2023 10:08:48 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout1.routing.net (Postfix) with ESMTP id 968DA3FC25; Wed, 25 Oct 2023 17:08:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1698253723; 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=Bac0cPNtRqeMT6ltBwYDY11vruRiib1jT+EBIKA5buQ=; b=Gql11qAG1rQf0U7yBatwmKbA0iV7KgSvliP/+cIz3IjPjCEw9PeyUftMorgZD/fAvWB9tR 3P/01PexfIvBZs58mWou57ZQL2KYJ8I9f6szVIN3hj5o7Azquh6RKbmFP7p5ylTJDIjHOd mkfvTt/wEds8iweT4efe3s/NGU/fbGs= Received: from frank-G5.. (fttx-pool-217.61.159.50.bambit.de [217.61.159.50]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id DEE393608ED; Wed, 25 Oct 2023 17:08:42 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , AngeloGioacchino Del Regno , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Daniel Golle , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Eric Woudstra , stable@vger.kernel.org Subject: [PATCH v2 1/5] arm64: dts: mt7986: fix emmc hs400 mode without uboot initialization Date: Wed, 25 Oct 2023 19:08:28 +0200 Message-Id: <20231025170832.78727-2-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231025170832.78727-1-linux@fw-web.de> References: <20231025170832.78727-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: e843dea4-707f-44c8-985a-73ad6095ed42 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 25 Oct 2023 10:09:18 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780748139358372775 X-GMAIL-MSGID: 1780748139358372775 From: Eric Woudstra Eric reports errors on emmc with hs400 mode when booting linux on bpi-r3 without uboot [1]. Booting with uboot does not show this because clocks seem to be initialized by uboot. Fix this by adding assigned-clocks and assigned-clock-parents like it's done in uboot [2]. [1] https://forum.banana-pi.org/t/bpi-r3-kernel-fails-setting-emmc-clock-to-416m-depends-on-u-boot/15170 [2] https://github.com/u-boot/u-boot/blob/master/arch/arm/dts/mt7986.dtsi#L287 Cc: stable@vger.kernel.org Fixes: 513b49d19b34 ("arm64: dts: mt7986: add mmc related device nodes") Signed-off-by: Eric Woudstra Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi index 24eda00e320d..77ddd9e44ed2 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -374,6 +374,10 @@ mmc0: mmc@11230000 { reg = <0 0x11230000 0 0x1000>, <0 0x11c20000 0 0x1000>; interrupts = ; + assigned-clocks = <&topckgen CLK_TOP_EMMC_416M_SEL>, + <&topckgen CLK_TOP_EMMC_250M_SEL>; + assigned-clock-parents = <&apmixedsys CLK_APMIXED_MPLL>, + <&topckgen CLK_TOP_NET1PLL_D5_D2>; clocks = <&topckgen CLK_TOP_EMMC_416M_SEL>, <&infracfg CLK_INFRA_MSDC_HCK_CK>, <&infracfg CLK_INFRA_MSDC_CK>, From patchwork Wed Oct 25 17:08:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 158188 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp102070vqb; Wed, 25 Oct 2023 10:09:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHQQuHi1bKjPCh5ZqTBsKqY5KJboauLj/kiqi/0c85N2E34xwc31VWc4vzuHG3zaf+jqNCC X-Received: by 2002:a05:622a:1910:b0:417:d4b1:ea28 with SMTP id w16-20020a05622a191000b00417d4b1ea28mr21190571qtc.7.1698253754962; Wed, 25 Oct 2023 10:09:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698253754; cv=none; d=google.com; s=arc-20160816; b=Ec6oETu/6gwpfEsF2c5xqH1SNDH58nsPQo2ai0Mfc6TwMzYifbGnJMTvhgWWUY8Jzp XM47fgddfyqRcG9YMz77LxphNixclZ+fXWjmlZTNh/rQG6KKFjGXjC+ykl2QLu0PDgPY Inp8bpOre0uoRDNP+LS6QQNM0mqjo1hgn1VpkxMZSqc98otlq1ffECAjryRlBr5dDLX6 2PN2rPjK//b74Z3Dd/eutNSxsezxALMA2nOcDPTCsNEioBJpBZU0aHpojk2micDNrTZ9 sWDV9GldFYV9Ou4WXMy8qviWKRyK+Bnz0oWtPuIrTWjPBjVZi54A64k6XxLajWVP9d/B 33tA== 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=70qdNXbgp7mMO78/SPuLeWZa4xfLIughW1Q+g0cjqr0=; fh=SwIf/Xmhr5VbSRApyCAu05w8wdG0RyLeMNW6QMUCmh0=; b=XTWcv8lZObPtPs+ku2eTsf5ZdcHUcxF8U3lab2ROVwAc3Wqx9Osv7j7Ym6P4XgIP70 ThWZl6eAYW83Orv/hmelKihJv+I6ONMNoqcaACzeOfh8PxN67pz9ggpfJoozg+KJ+ko4 dzvO+ErYc7wUtbLHJBjlMyX10Cib8GHZvjl3/tThGoLD2LpnCltaIoLELtnOPsyDVDcI 5gBKAVFIgYqOqm9OBye2gttKgV0+tqSxLd6MdE1oK4fRwqRZRFZcEGrVx2gjuvCSxWXO SrnI0A6ckF061TwGlrKVHsWM+2PYZcOgjNE3vdV0WEhgc0b3XcCD91GsYtG/NzVHBexp Hy9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=NSf1eKQa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id c12-20020ac87dcc000000b0041801679df7si8545222qte.544.2023.10.25.10.09.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 10:09:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=NSf1eKQa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 8FCC3801C483; Wed, 25 Oct 2023 10:09:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234427AbjJYRJB (ORCPT + 26 others); Wed, 25 Oct 2023 13:09:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233879AbjJYRIv (ORCPT ); Wed, 25 Oct 2023 13:08:51 -0400 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6241C183 for ; Wed, 25 Oct 2023 10:08:46 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout3.routing.net (Postfix) with ESMTP id 305336264B; Wed, 25 Oct 2023 17:08:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1698253724; 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=70qdNXbgp7mMO78/SPuLeWZa4xfLIughW1Q+g0cjqr0=; b=NSf1eKQaOyAzpcKZ6qbk7UroE2dniPWMCSzt4J5Q+8XsuVI1Gp19jh/UWX2fOcfndOVZAN 3r48n5dvmPqh4tJo+gVR7Eekj6zmRjUM4dMX1uBKkp1G2h3BTIajHHVpQ4QPXYlV1X0twm z2waVg0YfD85CvzFaJw6hD0MZ9Ugkeg= Received: from frank-G5.. (fttx-pool-217.61.159.50.bambit.de [217.61.159.50]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 8B60F3607E4; Wed, 25 Oct 2023 17:08:43 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , AngeloGioacchino Del Regno , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Daniel Golle , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Eric Woudstra Subject: [PATCH v2 2/5] arm64: dts: mt7986: define 3W max power to both SFP on BPI-R3 Date: Wed, 25 Oct 2023 19:08:29 +0200 Message-Id: <20231025170832.78727-3-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231025170832.78727-1-linux@fw-web.de> References: <20231025170832.78727-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 55a383b4-c02b-4178-bc07-5f480166bd68 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 25 Oct 2023 10:09:12 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780748129633210932 X-GMAIL-MSGID: 1780748129633210932 From: Frank Wunderlich All SFP power supplies are connected to the system VDD33 which is 3v3/8A. Set 3A per SFP slot to allow SFPs work which need more power than the default 1W. Fixes: 8e01fb15b815 ("arm64: dts: mt7986: add Bananapi R3") Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts | 2 ++ 1 file changed, 2 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 af4a4309bda4..f9702284607a 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts @@ -126,6 +126,7 @@ sfp1: sfp-1 { compatible = "sff,sfp"; i2c-bus = <&i2c_sfp1>; los-gpios = <&pio 46 GPIO_ACTIVE_HIGH>; + maximum-power-milliwatt = <3000>; mod-def0-gpios = <&pio 49 GPIO_ACTIVE_LOW>; tx-disable-gpios = <&pio 20 GPIO_ACTIVE_HIGH>; tx-fault-gpios = <&pio 7 GPIO_ACTIVE_HIGH>; @@ -137,6 +138,7 @@ sfp2: sfp-2 { i2c-bus = <&i2c_sfp2>; los-gpios = <&pio 31 GPIO_ACTIVE_HIGH>; mod-def0-gpios = <&pio 47 GPIO_ACTIVE_LOW>; + maximum-power-milliwatt = <3000>; tx-disable-gpios = <&pio 15 GPIO_ACTIVE_HIGH>; tx-fault-gpios = <&pio 48 GPIO_ACTIVE_HIGH>; }; From patchwork Wed Oct 25 17:08:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 158192 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp102458vqb; Wed, 25 Oct 2023 10:09:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHXaoJKNdnlOaqCO9jkBM6jVAIKX1s0wMRJvkh/SdI22RANS4NVXg9uuvHOqAx6IkOz6FvO X-Received: by 2002:a25:ac07:0:b0:d9c:7d48:300b with SMTP id w7-20020a25ac07000000b00d9c7d48300bmr9910662ybi.33.1698253785963; Wed, 25 Oct 2023 10:09:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698253785; cv=none; d=google.com; s=arc-20160816; b=TQoMtTB82qmSXBZtwuiefJz54u1QtxrBJFq6cjt27/a4NAANlUabSKsfy5d+nxTufN AVwHv7DRcKnWpakP18xANZ+CqbASqVah5S6yXQtt5+TEsA0gGW3JgzzZZjVu4ZjgpElB Yhu1wHaw5JTKpvQQsQKBN9jy14289jndZyjaXdUKhphQzv7db5fwXwj4FVjQz+/3CC2k C2eY34it3W9SRn4MMvXCCHh58pftRtkRk2rcaSLSSG7aIu5l7fC1/vxMwnUWJZvCwWB4 DKLtXjPLBPDHGbmWEr+RNJibDi2x0N7OZKKG3DpSIJOIkJM1FQlBagRA0jdAa9ixAWe9 u/OA== 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=9fN/MQV6dwt8BvtYNvMR12qWNERnV7Wj49zgD8ObeVA=; fh=SwIf/Xmhr5VbSRApyCAu05w8wdG0RyLeMNW6QMUCmh0=; b=cYYw2nJ+FZthj6wDNp0ZfivZQgNz4WfXcbCMuKFJD/BEbFo1YXgM5YSrTeqn8i+oLS Sd+9BggPu+Cj3Rkau20zJL82dwqecOIFeVfKzAEFiRAlI/ch7ZAyvlKPrsExqp86lSgT PeX/SlQcGtWErPUhBlf+mBywmYgQL12/t1wXbNtzyIksmydhB5xq91mgFHirdPpVnPXT +MiiDWiDojJAixUUC12rY/z7UTKKhWlwbmnAx0u/oZD/8FeFlRyLuOk8H533Sd8qT8Ex inVKWtfE+NzWFPoxEXmyyFfZda/oYUYDU+wVEHAuOHpJ7bznS9WxOkTgV6RkYtn6prU2 hOvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=VtFrx0zc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id i4-20020a256d04000000b00d9a42c75a5csi10823647ybc.653.2023.10.25.10.09.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 10:09:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=VtFrx0zc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 9A6B881C0CA6; Wed, 25 Oct 2023 10:09:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234559AbjJYRJL (ORCPT + 26 others); Wed, 25 Oct 2023 13:09:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233880AbjJYRIv (ORCPT ); Wed, 25 Oct 2023 13:08:51 -0400 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E461184 for ; Wed, 25 Oct 2023 10:08:46 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout4.routing.net (Postfix) with ESMTP id D58D61025C5; Wed, 25 Oct 2023 17:08:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1698253725; 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=9fN/MQV6dwt8BvtYNvMR12qWNERnV7Wj49zgD8ObeVA=; b=VtFrx0zcDRKK20SYDAD7XyFziUjVNDiy8fI2lqOyiXFo2zn/v/Lb4HySL4Nm7AzyvioUHH Qp6MFraRa39+17LVkKPqEraI6BEs5NNdcq3KuxV73pdSZS0R3BqtJ7WWG9QlOUXmE6pZ4a LkWnawYUAcSUKkekMCnOaROufBtkM3Q= Received: from frank-G5.. (fttx-pool-217.61.159.50.bambit.de [217.61.159.50]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 2AB493608ED; Wed, 25 Oct 2023 17:08:44 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , AngeloGioacchino Del Regno , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Daniel Golle , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Eric Woudstra Subject: [PATCH v2 3/5] arm64: dts: mt7986: change cooling trips Date: Wed, 25 Oct 2023 19:08:30 +0200 Message-Id: <20231025170832.78727-4-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231025170832.78727-1-linux@fw-web.de> References: <20231025170832.78727-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: eafcfba0-3d01-49d2-bf58-32026e9a4c7d X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 25 Oct 2023 10:09:42 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780748161783071226 X-GMAIL-MSGID: 1780748161783071226 From: Frank Wunderlich Add Critical and hot trips for emergency system shutdown and limiting system load. Change passive trip to active to make sure fan is activated on the lowest trip. Fixes: 1f5be05132f3 ("arm64: dts: mt7986: add thermal-zones") Fixes: c26f779a2295 ("arm64: dts: mt7986: add pwm-fan and cooling-maps to BPI-R3 dts") Suggested-by: Daniel Golle Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- v2: - squash patch for bpi-r3 as suggested by angelo --- .../dts/mediatek/mt7986a-bananapi-bpi-r3.dts | 10 +++++----- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 20 +++++++++++++++---- 2 files changed, 21 insertions(+), 9 deletions(-) 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 f9702284607a..b876e501216b 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts @@ -152,16 +152,16 @@ cpu-active-high { trip = <&cpu_trip_active_high>; }; - cpu-active-low { + cpu-active-med { /* active: set fan to cooling level 1 */ cooling-device = <&fan 1 1>; - trip = <&cpu_trip_active_low>; + trip = <&cpu_trip_active_med>; }; - cpu-passive { - /* passive: set fan to cooling level 0 */ + cpu-active-low { + /* active: set fan to cooling level 0 */ cooling-device = <&fan 0 0>; - trip = <&cpu_trip_passive>; + trip = <&cpu_trip_active_low>; }; }; }; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi index 77ddd9e44ed2..fc751e049953 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -614,22 +614,34 @@ cpu_thermal: cpu-thermal { 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 { + cpu_trip_active_med: active-med { temperature = <85000>; hysteresis = <2000>; type = "active"; }; - cpu_trip_passive: passive { - temperature = <40000>; + cpu_trip_active_low: active-low { + temperature = <60000>; hysteresis = <2000>; - type = "passive"; + type = "active"; }; }; }; From patchwork Wed Oct 25 17:08:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 158189 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp102122vqb; Wed, 25 Oct 2023 10:09:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFuL5ECnCJtIJaEhBODp2FK5n9Rn8e3sClUzw7gz1gHhXcbNXDNUHBGnnnNWs8vTfWd0iiw X-Received: by 2002:a81:4945:0:b0:5a7:bbc2:4e12 with SMTP id w66-20020a814945000000b005a7bbc24e12mr18243424ywa.4.1698253759709; Wed, 25 Oct 2023 10:09:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698253759; cv=none; d=google.com; s=arc-20160816; b=i2HXk1BMSELy9TxWm/XwJ4q5CcOVi522rWf2vbLbbiMfL+PXE9GzJ32L+aiHbZQI1f xFi9iWlf70tixeGGNvyO4+3a0sFz9Sqhm8p9SUoAnyJcEMFXpe3MeoW2ouk4+uk0n+a6 8a1eXWJtQlWlxLDw/j2htEqm3S1RHedarZZc+HZdSRUe9BM1QAxeA+VNATuLF1E2b/xl oJa6BUgQByBKmMC8PsXcsWnlkqu0cah4YnyDN8reyEUtHXUUljYHVqaIxVgyyfhqGkwU ZV8VPsSDGokWJbfn0a4EYogMbLHTBZJISqhcapOw6/XDKs7FFIntdVTsG4tda16R+pkq zwHA== 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=/ZcR70W2aaviUYh6DeqIY7yeaQVzt5WB1qm/b2mX/Og=; fh=SwIf/Xmhr5VbSRApyCAu05w8wdG0RyLeMNW6QMUCmh0=; b=Iz6NURiV9r/phlVjdlDg4RVUiCTEiS4cUrlDL2V5QEnmn7bP3CkT4UfZg4DoTHljAg dOvGqXCyySFw71ybWbSL4FH2Z5PTgNXTrV+zQvYqIQM9DGayQdSk8GeKzJDo+5awJkBQ TCW5+PyD3dFJU4xwrtHd/KVblyY550bREvoizX9nFKphfKLW1PBtsAsvVw5UBf/AMlq8 V1mPI0I3GjZqhDKBd/pjSN1q8dre/i2idMK4O2Py9d+RJ/GEooL2F5bSRaXD5UmO7iI/ A0Okg9gRXlb1sVrMF4ew6IEIVPXo8VKAo2s3a+l3If85gtAoIpNsHzVlW8uhtnBdbevm xDyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=ABCXw35o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id e3-20020a816903000000b005a7b5754d90si11420564ywc.547.2023.10.25.10.09.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 10:09:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=ABCXw35o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9D10881121E1; Wed, 25 Oct 2023 10:09:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234594AbjJYRJI (ORCPT + 26 others); Wed, 25 Oct 2023 13:09:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234338AbjJYRIx (ORCPT ); Wed, 25 Oct 2023 13:08:53 -0400 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C511111 for ; Wed, 25 Oct 2023 10:08:51 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout3.routing.net (Postfix) with ESMTP id 7A26362673; Wed, 25 Oct 2023 17:08:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1698253725; 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=/ZcR70W2aaviUYh6DeqIY7yeaQVzt5WB1qm/b2mX/Og=; b=ABCXw35oowNiQDqR+e1jhWA3UGJmLRmFRVrljB5wCfYAyjykl375M+OQv+/DcBAeTyviCU QoaCWiTIbBoJnxnfHf+mNaoOhbA3kWagcQpqZYh3tfpg4Ra/K//er97q4mpa8q4Au/9orh PPeZix8FitLSng9njIXRNsCM/OlUbn8= Received: from frank-G5.. (fttx-pool-217.61.159.50.bambit.de [217.61.159.50]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id CE3F73607E4; Wed, 25 Oct 2023 17:08:44 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , AngeloGioacchino Del Regno , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Daniel Golle , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Eric Woudstra Subject: [PATCH v2 4/5] arm64: dts: mt7986: add dtbs with applied overlays for bpi-r3 Date: Wed, 25 Oct 2023 19:08:31 +0200 Message-Id: <20231025170832.78727-5-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231025170832.78727-1-linux@fw-web.de> References: <20231025170832.78727-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: cc576bb0-6b33-412d-8270-f0ec18aa8843 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 25 Oct 2023 10:09:18 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780748134456233574 X-GMAIL-MSGID: 1780748134456233574 From: Frank Wunderlich Build devicetree binaries for testing overlays and providing users full dtb without using overlays. Suggested-by: Rob Herring Signed-off-by: Frank Wunderlich --- https://lore.kernel.org/all/CAL_JsqK_3xxD0DFwipXO85P=q=EYjUdjE1_8g1MKtvw3vVzx5A@mail.gmail.com/ https://lore.kernel.org/all/CAL_JsqJSi=kJSix=f3787ULZnaCy_Y26Phdhy5y9fat_vkDuUw@mail.gmail.com/ v2: make full dtbs multiline for better readability --- arch/arm64/boot/dts/mediatek/Makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile index c99c3372a4b5..24eeba0703ce 100644 --- a/arch/arm64/boot/dts/mediatek/Makefile +++ b/arch/arm64/boot/dts/mediatek/Makefile @@ -8,11 +8,33 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-bananapi-bpi-r64.dtb + dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-emmc.dtbo dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-nand.dtbo dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-nor.dtbo dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-sd.dtbo +mt7986a-bananapi-bpi-r3-emmc-nand-dtbs := \ + mt7986a-bananapi-bpi-r3.dtb \ + mt7986a-bananapi-bpi-r3-emmc.dtbo \ + mt7986a-bananapi-bpi-r3-nand.dtbo +dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-emmc-nand.dtb +mt7986a-bananapi-bpi-r3-emmc-nor-dtbs := \ + mt7986a-bananapi-bpi-r3.dtb \ + mt7986a-bananapi-bpi-r3-emmc.dtbo \ + mt7986a-bananapi-bpi-r3-nor.dtbo +dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-emmc-nor.dtb +mt7986a-bananapi-bpi-r3-sd-nand-dtbs := \ + mt7986a-bananapi-bpi-r3.dtb \ + mt7986a-bananapi-bpi-r3-sd.dtbo \ + mt7986a-bananapi-bpi-r3-nand.dtbo +dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-sd-nand.dtb +mt7986a-bananapi-bpi-r3-sd-nor-dtbs := \ + mt7986a-bananapi-bpi-r3.dtb \ + mt7986a-bananapi-bpi-r3-sd.dtbo \ + mt7986a-bananapi-bpi-r3-nor.dtbo +dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-sd-nor.dtb + dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-rfb.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986b-rfb.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt8167-pumpkin.dtb From patchwork Wed Oct 25 17:08: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: 158191 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp102225vqb; Wed, 25 Oct 2023 10:09:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFL7kb5wn01CuDoTaQz5ChEffappPMzAwf751Zx6UcuYbcpMsOkpvW+UwFSPvV5xCBJ7ggL X-Received: by 2002:a05:6214:23cc:b0:65b:2ad1:14f8 with SMTP id hr12-20020a05621423cc00b0065b2ad114f8mr17820087qvb.42.1698253768525; Wed, 25 Oct 2023 10:09:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698253768; cv=none; d=google.com; s=arc-20160816; b=BirCp098DFFy80eRhU81mopLV4nnot0SLYq4jygG/aAwM8HIIsbHC1ovmLyZPnnylU sRIhwg1ZtOdGBfAtN6hXaZuDJZUv7eoOPwQ8LU0RcC8U+NHNOMSa2O2RzVf5dYZ+o0AG p3bH71NIc/BUQgoMPdU0N9RN7htPLtcyP0KC/KYSIlCaUHV2PpN4ZGfp+bb8dPEKaUwt CRuVZuNWxx0Ettg5bhDxZxRCwFubrIv01espPYqAcDN7ZXaiOqDkmalljDM9nyssC7f0 39L/+X4fM9RAOJQtQ+5Wharw3pVNpt8x+S6XNXCfc9gBSTm5+HQ1b+vAHhKVP1X5bDXl o23A== 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=8yuV5J53FWoKCjRSM/WVoKUuB+P+j+Xkv2dcfbiTgzw=; fh=SwIf/Xmhr5VbSRApyCAu05w8wdG0RyLeMNW6QMUCmh0=; b=iVtB+DKvijJol4UU4rbC4gQjNyP7BgzDj2uAWLdnKPp15eHyENUSGG09Xzu+broMDY Co+K/syh9Oag2fzeoa13N+Te78wA19QRu9uC7l0GUZxSOsYjZlnoRYNzME4CweCO+KbR CEjs67px9mCEJce+LK4Y+7AYwryUC/u35SOyiKgc+C4DH9WM5w1Dx8pCxjBeqnCPQNeO rlSXMdayJYCpLkfmKkFNAaUjDjRJHT/S3ZCY4q1pXhQT/JusfPghLwjPhHePeF3ozXUX 4NpLUb13SbpRU1qCxYOyPeBeNmNVq8zbesGPtZlZhUvFgRcIa2h4tLxejMqvchRCPI06 Dv3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=Y2gPZwpM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id cu17-20020a05621417d100b0066d19d6a761si8652525qvb.279.2023.10.25.10.09.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 10:09:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=Y2gPZwpM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 26D3480E761C; Wed, 25 Oct 2023 10:09:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233876AbjJYRI6 (ORCPT + 26 others); Wed, 25 Oct 2023 13:08:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233862AbjJYRIv (ORCPT ); Wed, 25 Oct 2023 13:08:51 -0400 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4F02138 for ; Wed, 25 Oct 2023 10:08:47 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout4.routing.net (Postfix) with ESMTP id 242FE1025DC; Wed, 25 Oct 2023 17:08:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1698253726; 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=8yuV5J53FWoKCjRSM/WVoKUuB+P+j+Xkv2dcfbiTgzw=; b=Y2gPZwpMZXzI2K1k7RPrz6So7WgjlgUJmQOOGgsoxMKAVOxV8q1LMu//igS7RGYSu4hAl6 HhQjEJGGQ/QT9V7eOC+WfBoPGSWK0vjChDKJ+317t0aGsvaOzFHWoCqMiALzwrXlfdmd7Y qvJMXqt5+FlrSSnkO7XQnfTgjvnYEeM= Received: from frank-G5.. (fttx-pool-217.61.159.50.bambit.de [217.61.159.50]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 77D8A3608ED; Wed, 25 Oct 2023 17:08:45 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , AngeloGioacchino Del Regno , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Daniel Golle , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Eric Woudstra Subject: [PATCH v2 5/5] arm64: dts: mt7986: add overlay for SATA power socket on BPI-R3 Date: Wed, 25 Oct 2023 19:08:32 +0200 Message-Id: <20231025170832.78727-6-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231025170832.78727-1-linux@fw-web.de> References: <20231025170832.78727-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 274a7bdb-48f4-4d28-940a-144c3d90acaf X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 25 Oct 2023 10:09:25 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780748143422861741 X-GMAIL-MSGID: 1780748143422861741 From: Frank Wunderlich Bananapi R3 has a Power socket entended for using external SATA drives. This Socket is off by default but can be switched with gpio 8. Add an overlay to activate it. Signed-off-by: Frank Wunderlich --- v2: - rebase on the patch "add dtbs with applied overlays for bpi-r3" - add sata-overlay to the full dtbs --- arch/arm64/boot/dts/mediatek/Makefile | 13 +++++-- .../mt7986a-bananapi-bpi-r3-sata.dtso | 39 +++++++++++++++++++ 2 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-sata.dtso diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile index 24eeba0703ce..c3b236a47513 100644 --- a/arch/arm64/boot/dts/mediatek/Makefile +++ b/arch/arm64/boot/dts/mediatek/Makefile @@ -13,26 +13,31 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-emmc.dtbo dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-nand.dtbo dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-nor.dtbo +dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-sata.dtbo dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-sd.dtbo mt7986a-bananapi-bpi-r3-emmc-nand-dtbs := \ mt7986a-bananapi-bpi-r3.dtb \ mt7986a-bananapi-bpi-r3-emmc.dtbo \ - mt7986a-bananapi-bpi-r3-nand.dtbo + mt7986a-bananapi-bpi-r3-nand.dtbo \ + mt7986a-bananapi-bpi-r3-sata.dtbo dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-emmc-nand.dtb mt7986a-bananapi-bpi-r3-emmc-nor-dtbs := \ mt7986a-bananapi-bpi-r3.dtb \ mt7986a-bananapi-bpi-r3-emmc.dtbo \ - mt7986a-bananapi-bpi-r3-nor.dtbo + mt7986a-bananapi-bpi-r3-nor.dtbo \ + mt7986a-bananapi-bpi-r3-sata.dtbo dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-emmc-nor.dtb mt7986a-bananapi-bpi-r3-sd-nand-dtbs := \ mt7986a-bananapi-bpi-r3.dtb \ mt7986a-bananapi-bpi-r3-sd.dtbo \ - mt7986a-bananapi-bpi-r3-nand.dtbo + mt7986a-bananapi-bpi-r3-nand.dtbo \ + mt7986a-bananapi-bpi-r3-sata.dtbo dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-sd-nand.dtb mt7986a-bananapi-bpi-r3-sd-nor-dtbs := \ mt7986a-bananapi-bpi-r3.dtb \ mt7986a-bananapi-bpi-r3-sd.dtbo \ - mt7986a-bananapi-bpi-r3-nor.dtbo + mt7986a-bananapi-bpi-r3-nor.dtbo \ + mt7986a-bananapi-bpi-r3-sata.dtbo dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-sd-nor.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-rfb.dtb diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-sata.dtso b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-sata.dtso new file mode 100644 index 000000000000..6ab06813412a --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-sata.dtso @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2021 MediaTek Inc. + * Author: Frank Wunderlich + */ + +/dts-v1/; +/plugin/; + +#include + +/ { + compatible = "bananapi,bpi-r3", "mediatek,mt7986a"; + + fragment@0 { + target-path = "/"; + __overlay__ { + reg_sata12v: regulator-sata12v { + compatible = "regulator-fixed"; + regulator-name = "sata12v"; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + gpio = <&pio 8 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on; + }; + + reg_sata5v: regulator-sata5v { + compatible = "regulator-fixed"; + regulator-name = "sata5v"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + vin-supply = <®_sata12v>; + }; + }; + }; +}; +