Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2714516rda; Wed, 25 Oct 2023 10:09:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFhW2XrMCPTWCS9P8Zy+rZLE6aL2gS585afWeSQtRaSjJ7pTMZ2+SnbwYetAZT1IyjFT0qj X-Received: by 2002:a81:fd01:0:b0:5a7:af1f:62fc with SMTP id g1-20020a81fd01000000b005a7af1f62fcmr18294640ywn.19.1698253787942; Wed, 25 Oct 2023 10:09:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698253787; cv=none; d=google.com; s=arc-20160816; b=dp1mKKR4wuCNY/upFHpVVzBK7W6CG+oO28Rwc9jPZEAK/Lyw859Tq3NIn90MNGje2r Fe9loQNMVAQGHu94M5hgtfn7RL+DBXi8h8UYr1o7BO6QuYAxqzIWQcO5R+HTTMtRSIHA LMKpeDipHHbmvc/65TKSct27EbnC1CI2mRtRvCKS5dohAUXBhJpqcouax/7Uoi43lDjI 97ll/fkH/O6u3sUJclmzB5zfsBxPMBy0T/phGuuvAEr+kcLIxP+rRcQ90Leur01Jt/Ww 6AAPItb0+7cT482O85yd/OBK0Hoo9wypJXrAnZ8c+TZ8cZcfI5WWg5zc/a+yGXnBdw7m 78AQ== 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.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id p7-20020a0dff07000000b005a7bfcebc87si10690764ywf.265.2023.10.25.10.09.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 10:09:47 -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=Y2gPZwpM; 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 6748E81C8705; Wed, 25 Oct 2023 10:09:17 -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 S229842AbjJYRI6 (ORCPT + 99 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 Content-Transfer-Encoding: 8bit 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 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:17 -0700 (PDT) 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>; + }; + }; + }; +}; + -- 2.34.1