Skip to contentSkip to conversation

Add Bananapi R4 Pro support

PATCH Applied Frank Wunderlich 5 participants 13 messages Nov 5, 2025 – Nov 11, 2025

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

v2 cover Add Bananapi R4 Pro support

From: Frank Wunderlich <[email protected]>

BananaPi R4 Pro is a MT7988A based board which exists in 2 different hardware versions:

- 4E: 4 GB RAM and using internal 2.5G Phy for WAN-Combo
- 8X: 8 GB RAM and 2x Aeonsemi AS21010P 10G phys

common parts:

- MediaTek MT7988A Quad-core Arm Corex-A73,1.8GHz processor
- 8GB eMMC flash
- 256MB SPI-NAND Flash
- Micro SD card slot
- 1x 10G SFP+ WAN
- 1x 10G SFP+ LAN
- 4x 2.5G RJ45 LAN (MxL86252C)
- 1x 1G RJ45 LAN (MT7988 internal switch)
- 2x miniPCIe slots with PCIe3.0 2lane interface for Wi-Fi NIC
- 2x M.2 M-KEY slots with PCIe3.0 1lane interface for NVME SSD
- 3x M.2 B-KEY slots with USB3.2 for 5G Module (PCIe shared with key-m)
- 1x USB3.2 slot
- 1x USB2.0 slot
- 1x USB TypeC Debug Console
- 2x13 PIN Header for expanding application

official product information:
https://docs.banana-pi.org/en/BPI-R4_Pro/BananaPi_BPI-R4_Pro

The PCIe is per default in key-m state and can be changed to key-b with the pcie-overlays.

changes:
v2:
- dropped "dt-bindings: arm: mediatek: add BPI-R4 Pro board" which was applied from v1
- added new patch "disable 2.5G phy and enable at board layer"
- squashed "mt7988a: Add label for ssusb0" to r4pro dts commit
- some updates after angelos review to the r4pro dts commit
- fixed buck4 and ldo displayed voltage (cannot be controlled by software) to match schematic
- reorder fan after eth node (alphanumeric)
- reorder spi-tx after spi-rx (alphanumeric)
- follow reg first, then others also for spi-nand partitions
- drop 2pg5 phy disabling node (due to new patch disabling by default)
- change order of pinctrl (first number than names)
- fix commit prefix (mediatek was missing)

Frank Wunderlich (5):
dt-bindings: pinctrl: mt7988: allow gpio-hogs
arm64: dts: mediatek: mt7988: disable 2.5G phy and enable at board
layer
arm64: dts: mediatek: mt7988: Add devicetree for BananaPi R4 Pro
arm64: dts: mediatek: mt7988a-bpi-r4-pro: add PCIe overlays
arm64: dts: mediatek: mt7988a-bpi-r4pro: Add mmc overlays

 .../pinctrl/mediatek,mt7988-pinctrl.yaml      |   5 +
 arch/arm64/boot/dts/mediatek/Makefile         |   8 +
 .../mediatek/mt7988a-bananapi-bpi-r4-2g5.dts  |   1 +
 .../mt7988a-bananapi-bpi-r4-pro-4e.dts        |  16 +
 .../mt7988a-bananapi-bpi-r4-pro-8x.dts        |  16 +
 .../mt7988a-bananapi-bpi-r4-pro-cn15.dtso     |  20 +
 .../mt7988a-bananapi-bpi-r4-pro-cn18.dtso     |  20 +
 .../mt7988a-bananapi-bpi-r4-pro-emmc.dtso     |  33 ++
 .../mt7988a-bananapi-bpi-r4-pro-sd.dtso       |  31 +
 .../mediatek/mt7988a-bananapi-bpi-r4-pro.dtsi | 534 ++++++++++++++++++
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi     |   3 +-
 11 files changed, 686 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-4e.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-8x.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-cn15.dtso
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-cn18.dtso
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-emmc.dtso
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-sd.dtso
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro.dtsi
Signature · 1 line
2.43.0
#1 lore raw

PATCH v2 1/5 dt-bindings: pinctrl: mt7988: allow gpio-hogs

From: Frank Wunderlich <[email protected]>

Allow gpio-hogs in pinctrl node for switching pcie on Bananapi R4 Pro.

---
 .../devicetree/bindings/pinctrl/mediatek,mt7988-pinctrl.yaml | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/pinctrl/mediatek,mt7988-pinctrl.yaml +5 -0
index 26dfe7e7735a..1f31b520cb43 100644
@@ -61,6 +61,11 @@ required:
   - "#gpio-cells"
 
 patternProperties:
+  "-hog(-[0-9]+)?$":
+    type: object
+    required:
+      - gpio-hog
+
   '-pins$':
     type: object
     additionalProperties: false
Signature · 1 line
2.43.0
#2 lore raw

Re: [PATCH v2 1/5] dt-bindings: pinctrl: mt7988: allow gpio-hogs

Am 5. November 2025 20:50:01 MEZ schrieb Frank Wunderlich <[email protected]>:

Quoted 7 lines

From: Frank Wunderlich <[email protected]>

Allow gpio-hogs in pinctrl node for switching pcie on Bananapi R4 Pro.

Seems Angelos RB tag is missing "a" in "Gioacchino" in email

Got error:
said: 550 5.1.1 User does not exist - <[email protected]> (in reply to RCPT TO command)

maybe this can be fixed while applying?

regards Frank

maintainer Reviewed-by
#3 lore raw

Re: [PATCH v2 1/5] dt-bindings: pinctrl: mt7988: allow gpio-hogs

Il 05/11/25 21:01, Frank Wunderlich ha scritto:

Quoted 11 lines

Am 5. November 2025 20:50:01 MEZ schrieb Frank Wunderlich <[email protected]>:

Quoted 7 lines

From: Frank Wunderlich <[email protected]>

Allow gpio-hogs in pinctrl node for switching pcie on Bananapi R4 Pro.

Seems Angelos RB tag is missing "a" in "Gioacchino" in email

Quoted 7 lines

Got error:
said: 550 5.1.1 User does not exist - <[email protected]> (in reply to RCPT TO command)

maybe this can be fixed while applying?

regards Frank

Eh, have I typoed my own name?

So cool. Lol

Just in case it's needed:

Cheers,
Angelo

#4 lore raw

Re: [PATCH v2 1/5] dt-bindings: pinctrl: mt7988: allow gpio-hogs

Quoted 18 lines · AngeloGioacchino Del Regno

Il 05/11/25 21:01, Frank Wunderlich ha scritto:

Quoted 17 lines

Am 5. November 2025 20:50:01 MEZ schrieb Frank Wunderlich <[email protected]>:

Quoted 7 lines

From: Frank Wunderlich <[email protected]>

Allow gpio-hogs in pinctrl node for switching pcie on Bananapi R4 Pro.

Seems Angelos RB tag is missing "a" in "Gioacchino" in email

Got error:
said: 550 5.1.1 User does not exist - <[email protected]> (in reply to RCPT TO command)

maybe this can be fixed while applying?

Quoted 8 lines
Quoted 1 line

regards Frank

Eh, have I typoed my own name?

So cool. Lol

Just in case it's needed:

I have a vim macro to a) save my hands typing lots of tags b) make sure I don't typo. ;)

#5 lore raw

Re: [PATCH v2 1/5] dt-bindings: pinctrl: mt7988: allow gpio-hogs

Quoted 10 lines · Conor Dooley
Quoted 10 lines
Quoted 7 lines

Got error:
said: 550 5.1.1 User does not exist - <[email protected]> (in reply to RCPT TO command)

maybe this can be fixed while applying?

regards Frank

Eh, have I typoed my own name?

Quoted 7 lines
Quoted 4 lines

So cool. Lol

Just in case it's needed:

I have a vim macro to a) save my hands typing lots of tags b) make sure I don't typo. ;)

Typos happen. Also for me.

A good idea is when you change mail address try to negotiate something simpler, this is one of the reasons a lot of maintainers have simple mail addresses such as [email protected] (which will be my next mail address the day it is needed).

Yours,
Linus Walleij

#6 lore raw

Re: [PATCH v2 1/5] dt-bindings: pinctrl: mt7988: allow gpio-hogs

In reply to Frank Wunderlich
Quoted 7 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Allow gpio-hogs in pinctrl node for switching pcie on Bananapi R4 Pro.

I already applied an earlier version but it seems identical. Tags were picked up.

Yours,
Linus Walleij

#7 lore raw

Re: [PATCH v2 1/5] dt-bindings: pinctrl: mt7988: allow gpio-hogs

Am 11. November 2025 00:34:44 MEZ schrieb Linus Walleij <[email protected]>:

Quoted 12 lines · Frank Wunderlich
Quoted 8 lines

From: Frank Wunderlich <[email protected]>

Allow gpio-hogs in pinctrl node for switching pcie on Bananapi R4 Pro.

I already applied an earlier version but it seems identical. Tags were picked up.

Thank you

Code/description is not changed,but angelos tag is wrong there (missing a in email,above is also wrong). Not sure if it has effects for get_maintainers.pl (non-maintainers part). But would be better if you can still fix it.

Quoted 2 lines

Yours,
Linus Walleij

regards Frank

#8 lore raw

PATCH v2 2/5 arm64: dts: mediatek: mt7988: Disable 2.5G phy and enable at board layer

In reply to Frank Wunderlich

From: Frank Wunderlich <[email protected]>

The internal 2.5G phy of mt7988 is only used by some specific board variants.
Disable it by default and enable it where needed.

---
 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-2g5.dts | 1 +
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi                    | 1 +
 2 files changed, 2 insertions(+)
arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-2g5.dts +1 -0
index 6f0c81e3fd94..0e41c07d3a5f 100644
@@ -19,4 +19,5 @@ &gmac1 {
 &int_2p5g_phy {
 	pinctrl-0 = <&i2p5gbe_led0_pins>;
 	pinctrl-names = "i2p5gbe-led";
+	status = "okay";
 };
arch/arm64/boot/dts/mediatek/mt7988a.dtsi +1 -0
index 366203a72d6d..ed4b592c9dd5 100644
@@ -995,6 +995,7 @@ mdio_bus: mdio-bus {
 				int_2p5g_phy: ethernet-phy@15 {
 					compatible = "ethernet-phy-ieee802.3-c45";
 					reg = <15>;
+					status = "disabled";
 				};
 			};
 		};
Signature · 1 line
2.43.0
#9 lore raw

PATCH v2 3/5 arm64: dts: mediatek: mt7988: Add devicetree for BananaPi R4 Pro

In reply to Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Add devicetree for Bpi-R4-Pro.

BananaPi R4 Pro is a MT7988A based board which exists in 2 different hardware versions:

- 4E: 4 GB RAM and using internal 2.5G Phy for WAN-Combo
- 8X: 8 GB RAM and 2x Aeonsemi AS21010P 10G phys

common parts:

- MediaTek MT7988A Quad-core Arm Corex-A73,1.8GHz processor
- 8GB eMMC flash
- 256MB SPI-NAND Flash
- Micro SD card slot
- 1x 10G SFP+ WAN
- 1x 10G SFP+ LAN
- 4x 2.5G RJ45 LAN (MxL86252C)
- 1x 1G RJ45 LAN (MT7988 internal switch)
- 2x miniPCIe slots with PCIe3.0 2lane interface for Wi-Fi NIC
- 2x M.2 M-KEY slots with PCIe3.0 1lane interface for NVME SSD
- 3x M.2 B-KEY slots with USB3.2 for 5G Module (PCIe shared with key-m)
- 1x USB3.2 slot
- 1x USB2.0 slot
- 1x USB TypeC Debug Console
- 2x13 PIN Header for expanding application

https://docs.banana-pi.org/en/BPI-R4_Pro/BananaPi_BPI-R4_Pro

The PCIe is per default in key-m state and can be changed to key-b with the pcie-overlays.

---
v2:
- squashed "mt7988a: Add label for ssusb0"
- drop bootargs
- update based on angelos review
- drop gpio-header table comment because header is not yet part of this dts
- dropped delete-property for non-existent "mediatek,p0_speed_fixup"
- fix voltage displayed for buck4/ldo based on schematic
- reorder fan after eth node (alphanumeric)
- reorder spi-tx after spi-rx (alphanumeric)
- follow reg first, then others also for spi-nand partitions
- drop 2pg5 phy disabling node (due to new patch disabling by default)
- change order of pinctrl (first number than names)
- fix commit prefix (mediatek was missing)

---
 arch/arm64/boot/dts/mediatek/Makefile         |   4 +
 .../mt7988a-bananapi-bpi-r4-pro-4e.dts        |  16 +
 .../mt7988a-bananapi-bpi-r4-pro-8x.dts        |  16 +
 .../mediatek/mt7988a-bananapi-bpi-r4-pro.dtsi | 534 ++++++++++++++++++
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi     |   2 +-
 5 files changed, 571 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-4e.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-8x.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro.dtsi
arch/arm64/boot/dts/mediatek/Makefile +4 -0
index a4df4c21399e..8640e5f32d4b 100644
@@ -24,6 +24,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986b-rfb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-2g5.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-emmc.dtbo
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-pro-4e.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-pro-8x.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-sd.dtbo
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8167-pumpkin.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-elm.dtb
@@ -111,4 +113,6 @@ DTC_FLAGS_mt7986a-bananapi-bpi-r3 := -@
 DTC_FLAGS_mt7986a-bananapi-bpi-r3-mini := -@
 DTC_FLAGS_mt7988a-bananapi-bpi-r4 := -@
 DTC_FLAGS_mt7988a-bananapi-bpi-r4-2g5 := -@
+DTC_FLAGS_mt7988a-bananapi-bpi-r4-pro-4e := -@
+DTC_FLAGS_mt7988a-bananapi-bpi-r4-pro-8x := -@
 DTC_FLAGS_mt8395-radxa-nio-12l := -@
arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-4e.dts new file +16 -0
new file mode 100644
index 000000000000..c7ea6e88c4f4
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2025 MediaTek Inc.
+ * Author: Frank Wunderlich <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "mt7988a-bananapi-bpi-r4-pro.dtsi"
+
+/ {
+	model = "Bananapi BPI-R4";
+	compatible = "bananapi,bpi-r4-pro-4e",
+		     "bananapi,bpi-r4-pro",
+		     "mediatek,mt7988a";
+};
arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-8x.dts new file +16 -0
new file mode 100644
index 000000000000..c9a0e69e9dd5
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2025 MediaTek Inc.
+ * Author: Frank Wunderlich <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "mt7988a-bananapi-bpi-r4-pro.dtsi"
+
+/ {
+	model = "Bananapi BPI-R4";
+	compatible = "bananapi,bpi-r4-pro-8x",
+		     "bananapi,bpi-r4-pro",
+		     "mediatek,mt7988a";
+};
arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro.dtsi new file +534 -0

534 lines not on this page · raw message

arch/arm64/boot/dts/mediatek/mt7988a.dtsi +1 -1
index ed4b592c9dd5..5a7a9b2f954e 100644
@@ -418,7 +418,7 @@ lvts: lvts@1100a000 {
 			nvmem-cell-names = "lvts-calib-data-1";
 		};
 
-		usb@11190000 {
+		ssusb0: usb@11190000 {
 			compatible = "mediatek,mt7988-xhci", "mediatek,mtk-xhci";
 			reg = <0 0x11190000 0 0x2e00>,
 			      <0 0x11193e00 0 0x0100>;
Signature · 1 line
2.43.0
#10 lore raw

PATCH v2 4/5 arm64: dts: mediatek: mt7988a-bpi-r4-pro: Add PCIe overlays

In reply to Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Add overlays to switch between key-m and key-e slots.

---
 arch/arm64/boot/dts/mediatek/Makefile         |  2 ++
 .../mt7988a-bananapi-bpi-r4-pro-cn15.dtso     | 20 +++++++++++++++++++
 .../mt7988a-bananapi-bpi-r4-pro-cn18.dtso     | 20 +++++++++++++++++++
 3 files changed, 42 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-cn15.dtso
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-cn18.dtso
arch/arm64/boot/dts/mediatek/Makefile +2 -0
index 8640e5f32d4b..8e99f6e33b25 100644
@@ -26,6 +26,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-2g5.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-emmc.dtbo
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-pro-4e.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-pro-8x.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-pro-cn15.dtbo
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-pro-cn18.dtbo
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-sd.dtbo
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8167-pumpkin.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-elm.dtb
arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-cn15.dtso new file +20 -0
new file mode 100644
index 000000000000..9750916042de
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2025 MediaTek Inc.
+ * Author: Frank Wunderlich <[email protected]>
+ */
+
+/* This enables key-b slot CN15 on pcie2(11280000 1L0) on BPI-R4-Pro */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	compatible = "bananapi,bpi-r4-pro", "mediatek,mt7988a";
+};
+
+&{/soc/pinctrl@1001f000/pcie-2-hog} {
+	output-low;
+};
arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-cn18.dtso new file +20 -0
new file mode 100644
index 000000000000..9830fb0fd97a
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2025 MediaTek Inc.
+ * Author: Frank Wunderlich <[email protected]>
+ */
+
+/* This enables key-b slot CN18 on pcie3(11290000 1L1) on BPI-R4-Pro */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	compatible = "bananapi,bpi-r4-pro", "mediatek,mt7988a";
+};
+
+&{/soc/pinctrl@1001f000/pcie-3-hog} {
+	output-low;
+};
Signature · 1 line
2.43.0
#11 lore raw

PATCH v2 5/5 arm64: dts: mediatek: mt7988a-bpi-r4pro: Add mmc overlays

In reply to Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Add MMC overlays for BPI-R4 Pro.

---
 arch/arm64/boot/dts/mediatek/Makefile         |  2 ++
 .../mt7988a-bananapi-bpi-r4-pro-emmc.dtso     | 33 +++++++++++++++++++
 .../mt7988a-bananapi-bpi-r4-pro-sd.dtso       | 31 +++++++++++++++++
 3 files changed, 66 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-emmc.dtso
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-sd.dtso
arch/arm64/boot/dts/mediatek/Makefile +2 -0
index 8e99f6e33b25..776b9274e8fa 100644
@@ -28,6 +28,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-pro-4e.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-pro-8x.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-pro-cn15.dtbo
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-pro-cn18.dtbo
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-pro-emmc.dtbo
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-pro-sd.dtbo
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-sd.dtbo
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8167-pumpkin.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-elm.dtb
arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-emmc.dtso new file +33 -0
new file mode 100644
index 000000000000..5ed2f0a6bd66
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2021 MediaTek Inc.
+ * Author: Frank Wunderlich <[email protected]>
+ */
+
+/dts-v1/;
+/plugin/;
+
+/ {
+	compatible = "bananapi,bpi-r4-pro", "mediatek,mt7988a";
+};
+
+&{/soc/mmc@11230000} {
+	pinctrl-names = "default", "state_uhs";
+	pinctrl-0 = <&mmc0_pins_emmc_51>;
+	pinctrl-1 = <&mmc0_pins_emmc_51>;
+	bus-width = <8>;
+	max-frequency = <200000000>;
+	cap-mmc-highspeed;
+	mmc-hs200-1_8v;
+	mmc-hs400-1_8v;
+	hs400-ds-delay = <0x12814>;
+	vqmmc-supply = <&reg_1p8v>;
+	vmmc-supply = <&reg_3p3v>;
+	non-removable;
+	no-sd;
+	no-sdio;
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+};
+
arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-pro-sd.dtso new file +31 -0
new file mode 100644
index 000000000000..1ec1a9fbd8ba
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 MediaTek Inc.
+ * Author: Frank Wunderlich <[email protected]>
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	compatible = "bananapi,bpi-r4-pro", "mediatek,mt7988a";
+};
+
+&{/soc/mmc@11230000} {
+	pinctrl-names = "default", "state_uhs";
+	pinctrl-0 = <&mmc0_pins_sdcard>;
+	pinctrl-1 = <&mmc0_pins_sdcard>;
+	cd-gpios = <&pio 12 GPIO_ACTIVE_LOW>;
+	bus-width = <4>;
+	max-frequency = <48000000>;
+	cap-sd-highspeed;
+	vmmc-supply = <&reg_3p3v>;
+	vqmmc-supply = <&reg_3p3v>;
+	no-mmc;
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+};
+
Signature · 1 line
2.43.0
maintainer Applied
#12 lore raw

Re: (subset) [PATCH v2 0/5] Add Bananapi R4 Pro support

In reply to Frank Wunderlich
Quoted 9 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

BananaPi R4 Pro is a MT7988A based board which exists in 2 different hardware versions:

- 4E: 4 GB RAM and using internal 2.5G Phy for WAN-Combo
- 8X: 8 GB RAM and 2x Aeonsemi AS21010P 10G phys

[...]

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

[2/5] arm64: dts: mediatek: mt7988: Disable 2.5G phy and enable at board layer

      commit: 0e5d9e529383688deccce632c713692e53b31cf6
[3/5] arm64: dts: mediatek: mt7988: Add devicetree for BananaPi R4 Pro
      commit: f397471a6a8c2b621e1fd06430fc528ab3925422
[4/5] arm64: dts: mediatek: mt7988a-bpi-r4-pro: Add PCIe overlays
      commit: dec929e61a42ed5d6717d3ec2b6a7734c2ab825b
[5/5] arm64: dts: mediatek: mt7988a-bpi-r4pro: Add mmc overlays
      commit: a58c368067417f3d89b92ccc18fa0bb610b34349

Cheers,
Angelo