Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1516808lqt; Sat, 8 Jun 2024 01:12:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVZs10jtTe8BLgcZHLMhaXAOrkCGXw8Q7I6LJXjtXIDmv71QLzGPi/MfvJGj8l96Aj9Y1EDdOlN3aXl508hTunhE6B2E69kfJoySSeDFQ== X-Google-Smtp-Source: AGHT+IFm4uPUjjjB3u8oiSuFoo+K9SfMRs8PamTSbC8MUE758baXCj6C5SYqCEOeBOQhfHiBmouB X-Received: by 2002:a25:ce11:0:b0:df7:8b27:9292 with SMTP id 3f1490d57ef6-dfaf6684c61mr4308236276.42.1717834351581; Sat, 08 Jun 2024 01:12:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717834351; cv=pass; d=google.com; s=arc-20160816; b=I3D1Ldtu+xbEZrbzKftVxqhZXEUGSErUvMQYHYC/Hx7VjOSjUfj7dIW6ozFClISN+a cYM5wsUyF4ou7fvlWZkUxXJAd6YS2DaOLkTX8fTPEgSJ74Pk/NKGYPWuvyK0ocrQyLxO c4OdCh8mu3DcxTRdTFWfdb2MZNK5ayOiec70DSTO7YlJWY0mEvGmJEK+S4+xH8d5+75V x8ZFXPjBf3VZTIltAqHmEvxyEc2qzUF4UUyX39pX50ApwD/EbEZKfTWgU/TLITQNo4Kt Vws1ayoWr6IxMzhXDWchl8Vh6Re6UNgbQW3CW3AJOMqAIK0+j5GWKHiRbzd91uUkujJ0 iKVA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=COBqnfw9jmd19Qe8P9hzoCORT/LkJpn4G+nYf3HB3Xk=; fh=7McbYEDSLS3KisvGRmcjH9NQ9ym9M4paT6hatn7+tlQ=; b=x5NfNwnoUeC7qKkWUR2NCaqF1sZTY6NVvcaV1iRZL6YmnDv1oQdGC6snyMhm1AkhLe zwmyAM31ctbhE3AJwTji8C26Z4BWitmopRCzjLA9YsJkyoY9lE3fGuyU1WzoLtbZNzJh qENBIiAvC8mpmxnW3oGS6HXZp1McX/0vhXbGnz8qx6IWAqkODp5XK/00fazeIpwabNXL JR+Ns9Z2dbVOn6TZi4VTiGhwkiA+S7FgxLGlCy9jTzGBS1hBMnF75U0l8Ga7MewQok9e IzzpKTxeQIgSU0/uPBRTKigSQTGO08dek0heqi86RTxf9v0qvZPgxT+sZ6pQ/2gxRHHh W5ow==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=fAggY7pv; arc=pass (i=1 spf=pass spfdomain=fw-web.de dkim=pass dkdomain=mailerdienst.de); spf=pass (google.com: domain of linux-kernel+bounces-206941-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206941-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-4405c5f1ac1si4064641cf.712.2024.06.08.01.12.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Jun 2024 01:12:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206941-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=fAggY7pv; arc=pass (i=1 spf=pass spfdomain=fw-web.de dkim=pass dkdomain=mailerdienst.de); spf=pass (google.com: domain of linux-kernel+bounces-206941-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206941-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 49B661C210B3 for ; Sat, 8 Jun 2024 08:12:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 97AFB176AC9; Sat, 8 Jun 2024 08:12:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="fAggY7pv" Received: from mxout2.routing.net (mxout2.routing.net [134.0.28.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1DBF7179BD; Sat, 8 Jun 2024 08:12:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.0.28.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717834344; cv=none; b=lr0NnF9+8pM01ZlEVJMkGf5Czz2P01pu9rmXQo/39N6Q8Jd/tmxlQ0D82bUcBoqgvTVrZUsM8Y6XSmsTYxlGLmny2Awcwx0HtMrlcAI0lotMpP6dxUgRTvRBKMmOUmcuyIIDBs9KFI9FnySDAPWdqK+zr+Kcw7+UItHiPWXgKg8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717834344; c=relaxed/simple; bh=u9h2ASGk3dgMRL3ClbaO/j9atbgc18++9OC0IL2p5Ts=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MadXP8uo1rV4+kObXjEgD2oaQ+lM9S2a6BVVZOfD6Sr7teaCrsrxNEd6UEusZUYcUruXbIOTdbw5F8Ry3QyWLnWFtnNwCVLnmNi0nLbkdX1O2hHOu2Yvh+5Q9Y7lOi5e24tVWBN+SlNSsFfnuOgYYPRd8KZMGmw6eK2gDAFIpUU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de; spf=pass smtp.mailfrom=fw-web.de; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b=fAggY7pv; arc=none smtp.client-ip=134.0.28.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fw-web.de Received: from mxbox4.masterlogin.de (unknown [192.168.10.79]) by mxout2.routing.net (Postfix) with ESMTP id A141F601D3; Sat, 8 Jun 2024 08:05:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1717833951; 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=COBqnfw9jmd19Qe8P9hzoCORT/LkJpn4G+nYf3HB3Xk=; b=fAggY7pv+SXUz/Qh75i6O6aIBroOhGi+H1zgEjYVfOhB8vshCA6ZZXuosdug81T7JDkpNr F3/wd83pLAnPB3DM/EAFRb63WmV7f0uKq3xvlxUciChKXSaZe7CtzsQQmDuooOGAsSplUC zdQznpXiUbyLnPE4VZlcYbvL9JX2V3s= Received: from frank-G5.. (fttx-pool-217.61.155.199.bambit.de [217.61.155.199]) by mxbox4.masterlogin.de (Postfix) with ESMTPSA id CCC398010F; Sat, 8 Jun 2024 08:05:50 +0000 (UTC) From: Frank Wunderlich To: Matthias Brugger , AngeloGioacchino Del Regno , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Frank Wunderlich , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, Daniel Golle Subject: [PATCH v3 2/2] arm64: dts: mt7986: add overlay for SATA power socket on BPI-R3 Date: Sat, 8 Jun 2024 10:05:30 +0200 Message-Id: <20240608080530.9436-3-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240608080530.9436-1-linux@fw-web.de> References: <20240608080530.9436-1-linux@fw-web.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mail-ID: d825f04a-d61b-4af0-a7c3-99149f58adbc 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 --- v3: - make sata overlay better readable 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 | 35 +++++++++++++++++++ 2 files changed, 44 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 0ec5b904d35d..ac0af5ffe97d 100644 --- a/arch/arm64/boot/dts/mediatek/Makefile +++ b/arch/arm64/boot/dts/mediatek/Makefile @@ -14,26 +14,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..17659545470e --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-sata.dtso @@ -0,0 +1,35 @@ +// 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"; + + 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