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>; + }; + }; + }; +}; +