Skip to contentSkip to conversation

arm64: dts: mt7986: add overlay for SATA power socket on BPI-R3

PATCH Applied Frank Wunderlich 2 participants 2 messages Dec 6, 2024 – Dec 19, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 arm64: dts: mt7986: add overlay for SATA power socket on BPI-R3

From: Frank Wunderlich <[email protected]>

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.

---
v4:
- rebased on 6.13-rc1 without the full-dtb patch
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         |  1 +
 .../mt7986a-bananapi-bpi-r3-sata.dtso         | 35 +++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-sata.dtso
arch/arm64/boot/dts/mediatek/Makefile +1 -0
index 8fd7b2bb7a15..d844c4ce9863 100644
@@ -17,6 +17,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-mini.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
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-rfb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986b-rfb.dtb
arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-sata.dtso new file +35 -0
new file mode 100644
index 000000000000..17659545470e
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2021 MediaTek Inc.
+ * Author: Frank Wunderlich <[email protected]>
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+&{/} {
+	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 = <&reg_sata12v>;
+	};
+
+};
+
Signature · 1 line
2.43.0
maintainer Applied
#1 lore raw
Quoted 6 lines · 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.

Applied to v6.13-next/dts64, thanks!

[1/1] arm64: dts: mt7986: add overlay for SATA power socket on BPI-R3

      commit: 312189ebb802a0242639a9c628cfdc6e532d8e11

Cheers,
Angelo