Skip to contentSkip to conversation

Add Bananapi R4 variants and add xsphy

PATCH Applied Frank Wunderlich 7 participants 29 messages Apr 22, 2025 – May 20, 2025

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

v4 cover Add Bananapi R4 variants and add xsphy

From: Frank Wunderlich <[email protected]>

With this series i continue the mt7988/bananapi-r4 dts upstream work

changes in v4:
- changes based on review comments in v3 (mostly bindings)
- changed topmisc unit address to match reg

Daniel Golle (1):
phy: mediatek: xsphy: support type switch by pericfg

Frank Wunderlich (7):
dt-bindings: arm: mediatek: add bpi-r4 2g5 phy variant
arm64: dts: mediatek: mt7988a-bpi-r4: allow hw variants of bpi-r4
dt-bindings: phy: mtk-xs-phy: Add mt7988 compatible
dt-bindings: phy: mtk-xs-phy: support type switch by pericfg
dt-bindings: mfd: syscon: Add mt7988-topmisc
arm64: dts: mediatek: mt7988: Add xsphy for ssusb0/pcie2
arm64: dts: mediatek: mt7988a-bpi-r4: enable xsphy

 .../devicetree/bindings/arm/mediatek.yaml     |   4 +
 .../devicetree/bindings/mfd/syscon.yaml       |   2 +
 .../bindings/phy/mediatek,xsphy.yaml          |  16 +
 arch/arm64/boot/dts/mediatek/Makefile         |   2 +
 .../mediatek/mt7988a-bananapi-bpi-r4-2g5.dts  |  11 +
 .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts  | 400 +----------------
 .../dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi | 403 ++++++++++++++++++
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi     |  36 ++
 drivers/phy/mediatek/phy-mtk-xsphy.c          |  85 +++-
 9 files changed, 563 insertions(+), 396 deletions(-)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-2g5.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
Signature · 1 line
2.43.0
#1 lore raw

PATCH v4 1/8 dt-bindings: arm: mediatek: add bpi-r4 2g5 phy variant

From: Frank Wunderlich <[email protected]>

Add new compatible for Bananapi R4 with 2.5G phy.
Base board is compatible with existing BPI-R4 only 1 SFP is replaced by RJ45 port and use mt7988 internal phy.

---
v3:
- new patch adding compatible for 2.5g variant

---
 Documentation/devicetree/bindings/arm/mediatek.yaml | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/arm/mediatek.yaml +4 -0
index 108ae5e0185d..3aed03df0e3c 100644
@@ -104,6 +104,10 @@ properties:
           - enum:
               - bananapi,bpi-r4
           - const: mediatek,mt7988a
+      - items:
+          - const: bananapi,bpi-r4-2g5
+          - const: bananapi,bpi-r4
+          - const: mediatek,mt7988a
       - items:
           - enum:
               - mediatek,mt8127-moose
Signature · 1 line
2.43.0
#6 lore raw

PATCH v4 2/8 arm64: dts: mediatek: mt7988a-bpi-r4: allow hw variants of bpi-r4

In reply to Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Sinovoip has released other variants of Bananapi-R4 board. The known changes affecting only the LAN SFP+ slot which is replaced by a 2.5G phy with optional PoE.

Just move the common parts to a new dtsi and keep differences (only i2c for lan-sfp) in dts.

---
v3:
- move compatible to dts
- added own compatible for 2g5 variant
- update information in board model
v2:
- added basic dts for 2g5 variant
- moved i2c used for sfp-lan to board dts

---
 arch/arm64/boot/dts/mediatek/Makefile         |   2 +
 .../mediatek/mt7988a-bananapi-bpi-r4-2g5.dts  |  11 +
 .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts  | 400 +-----------------
 .../dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi | 399 +++++++++++++++++
 4 files changed, 417 insertions(+), 395 deletions(-)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-2g5.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
arch/arm64/boot/dts/mediatek/Makefile +2 -0
index 58484e830063..a1ebc9aa4ba6 100644
@@ -22,6 +22,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-sd.dtbo
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-rfb.dtb
 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-sd.dtbo
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8167-pumpkin.dtb
@@ -107,4 +108,5 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
 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_mt8395-radxa-nio-12l := -@
arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-2g5.dts new file +11 -0
new file mode 100644
index 000000000000..53de9c113f60
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0-only OR MIT
+
+/dts-v1/;
+
+#include "mt7988a-bananapi-bpi-r4.dtsi"
+
+/ {
+	compatible = "bananapi,bpi-r4-2g5", "bananapi,bpi-r4", "mediatek,mt7988a";
+	model = "Banana Pi BPI-R4 (1x SFP+, 1x 2.5GbE)";
+	chassis-type = "embedded";
+};
arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts +5 -395

413 lines not on this page · raw message

arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi new file +399 -0

399 lines not on this page · raw message

Signature · 1 line
2.43.0
#8 lore raw

PATCH v4 3/8 dt-bindings: phy: mtk-xs-phy: Add mt7988 compatible

In reply to Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Add compatible for xs-phy on mt7988.

---
 Documentation/devicetree/bindings/phy/mediatek,xsphy.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/phy/mediatek,xsphy.yaml +1 -0
index a9e3139fd421..3b5253659e6f 100644
@@ -49,6 +49,7 @@ properties:
       - enum:
           - mediatek,mt3611-xsphy
           - mediatek,mt3612-xsphy
+          - mediatek,mt7988-xsphy
       - const: mediatek,xsphy
 
   reg:
Signature · 1 line
2.43.0
#11 lore raw

PATCH v4 4/8 dt-bindings: phy: mtk-xs-phy: support type switch by pericfg

In reply to Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Add support for type switch by pericfg register between USB3/PCIe.

---
v4:
- changes based on comments from Krzysztof
- change to phy type configuration controller/register

---
 .../devicetree/bindings/phy/mediatek,xsphy.yaml   | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
Documentation/devicetree/bindings/phy/mediatek,xsphy.yaml +15 -0
index 3b5253659e6f..0bed847bb4ad 100644
@@ -151,6 +151,21 @@ patternProperties:
         minimum: 1
         maximum: 31
 
+      mediatek,syscon-type:
+        $ref: /schemas/types.yaml#/definitions/phandle-array
+        description:
+          A phandle to syscon used to access the register of type switch,
+          the field should always be 3 cells long.
+        items:
+          - items:
+              - description:
+                  Phandle to phy type configuration system controller
+              - description:
+                  Phy type configuration register offset
+              - description:
+                  Index of config segment
+                enum: [0, 1, 2, 3]
+
     required:
       - reg
       - clocks
Signature · 1 line
2.43.0
#16 lore raw

PATCH v4 5/8 dt-bindings: mfd: syscon: Add mt7988-topmisc

In reply to Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Add compatible for Mediatek mt7988 topmisc syscon. This hardware block contains 2 functional blocks

- a powercontroller which is not needed (switched by atf)
- a multiplexer for high-speed Combo-Phy

This compatible is only for the multiplexer part.

---
 Documentation/devicetree/bindings/mfd/syscon.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/mfd/syscon.yaml +2 -0
index c6bbb19c3e3e..4f3d522bc3de 100644
@@ -84,6 +84,7 @@ select:
           - mediatek,mt2701-pctl-a-syscfg
           - mediatek,mt2712-pctl-a-syscfg
           - mediatek,mt6397-pctl-pmic-syscfg
+          - mediatek,mt7988-topmisc
           - mediatek,mt8135-pctl-a-syscfg
           - mediatek,mt8135-pctl-b-syscfg
           - mediatek,mt8173-pctl-a-syscfg
@@ -187,6 +188,7 @@ properties:
           - mediatek,mt2701-pctl-a-syscfg
           - mediatek,mt2712-pctl-a-syscfg
           - mediatek,mt6397-pctl-pmic-syscfg
+          - mediatek,mt7988-topmisc
           - mediatek,mt8135-pctl-a-syscfg
           - mediatek,mt8135-pctl-b-syscfg
           - mediatek,mt8173-pctl-a-syscfg
Signature · 1 line
2.43.0
#20 lore raw

PATCH v4 6/8 phy: mediatek: xsphy: support type switch by pericfg

In reply to Frank Wunderlich

From: Daniel Golle <[email protected]>

Patch from Sam Shih <[email protected]> found in MediaTek SDK released under GPL.

Get syscon and use it to set the PHY type.
Extend support to PCIe and SGMII mode in addition to USB2 and USB3.

---
 drivers/phy/mediatek/phy-mtk-xsphy.c | 85 +++++++++++++++++++++++++++-
 1 file changed, 84 insertions(+), 1 deletion(-)
drivers/phy/mediatek/phy-mtk-xsphy.c +84 -1
index 7c248f5cfca5..c0ddb9273cc3 100644
@@ -11,10 +11,12 @@
 #include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/iopoll.h>
+#include <linux/mfd/syscon.h>
 #include <linux/module.h>
 #include <linux/of_address.h>
 #include <linux/phy/phy.h>
 #include <linux/platform_device.h>
+#include <linux/regmap.h>
 
 #include "phy-mtk-io.h"
 
@@ -81,12 +83,22 @@
 #define XSP_SR_COEF_DIVISOR	1000
 #define XSP_FM_DET_CYCLE_CNT	1024
 
+/* PHY switch between pcie/usb3/sgmii */
+#define USB_PHY_SWITCH_CTRL	0x0
+#define RG_PHY_SW_TYPE		GENMASK(3, 0)
+#define RG_PHY_SW_PCIE		0x0
+#define RG_PHY_SW_USB3		0x1
+#define RG_PHY_SW_SGMII		0x2
+
 struct xsphy_instance {
 	struct phy *phy;
 	void __iomem *port_base;
 	struct clk *ref_clk;	/* reference clock of anolog phy */
 	u32 index;
 	u32 type;
+	struct regmap *type_sw;
+	u32 type_sw_reg;
+	u32 type_sw_index;
 	/* only for HQA test */
 	int efuse_intr;
 	int efuse_tx_imp;
@@ -259,6 +271,10 @@ static void phy_parse_property(struct mtk_xsphy *xsphy,
 			inst->efuse_intr, inst->efuse_tx_imp,
 			inst->efuse_rx_imp);
 		break;
+	case PHY_TYPE_PCIE:
+	case PHY_TYPE_SGMII:
+		/* nothing to do */
+		break;
 	default:
 		dev_err(xsphy->dev, "incompatible phy type\n");
 		return;
@@ -305,6 +321,62 @@ static void u3_phy_props_set(struct mtk_xsphy *xsphy,
 				     RG_XTP_LN0_RX_IMPSEL, inst->efuse_rx_imp);
 }
 
+/* type switch for usb3/pcie/sgmii */
+static int phy_type_syscon_get(struct xsphy_instance *instance,
+			       struct device_node *dn)
+{
+	struct of_phandle_args args;
+	int ret;
+
+	/* type switch function is optional */
+	if (!of_property_present(dn, "mediatek,syscon-type"))
+		return 0;
+
+	ret = of_parse_phandle_with_fixed_args(dn, "mediatek,syscon-type",
+					       2, 0, &args);
+	if (ret)
+		return ret;
+
+	instance->type_sw_reg = args.args[0];
+	instance->type_sw_index = args.args[1] & 0x3; /* <=3 */
+	instance->type_sw = syscon_node_to_regmap(args.np);
+	of_node_put(args.np);
+	dev_info(&instance->phy->dev, "type_sw - reg %#x, index %d\n",
+		 instance->type_sw_reg, instance->type_sw_index);
+
+	return PTR_ERR_OR_ZERO(instance->type_sw);
+}
+
+static int phy_type_set(struct xsphy_instance *instance)
+{
+	int type;
+	u32 offset;
+
+	if (!instance->type_sw)
+		return 0;
+
+	switch (instance->type) {
+	case PHY_TYPE_USB3:
+		type = RG_PHY_SW_USB3;
+		break;
+	case PHY_TYPE_PCIE:
+		type = RG_PHY_SW_PCIE;
+		break;
+	case PHY_TYPE_SGMII:
+		type = RG_PHY_SW_SGMII;
+		break;
+	case PHY_TYPE_USB2:
+	default:
+		return 0;
+	}
+
+	offset = instance->type_sw_index * BITS_PER_BYTE;
+	regmap_update_bits(instance->type_sw, instance->type_sw_reg,
+			   RG_PHY_SW_TYPE << offset, type << offset);
+
+	return 0;
+}
+
 static int mtk_phy_init(struct phy *phy)
 {
 	struct xsphy_instance *inst = phy_get_drvdata(phy);
@@ -325,6 +397,10 @@ static int mtk_phy_init(struct phy *phy)
 	case PHY_TYPE_USB3:
 		u3_phy_props_set(xsphy, inst);
 		break;
+	case PHY_TYPE_PCIE:
+	case PHY_TYPE_SGMII:
+		/* nothing to do, only used to set type */
+		break;
 	default:
 		dev_err(xsphy->dev, "incompatible phy type\n");
 		clk_disable_unprepare(inst->ref_clk);
@@ -403,12 +479,15 @@ static struct phy *mtk_phy_xlate(struct device *dev,
 
 	inst->type = args->args[0];
 	if (!(inst->type == PHY_TYPE_USB2 ||
-	      inst->type == PHY_TYPE_USB3)) {
+	      inst->type == PHY_TYPE_USB3 ||
+	      inst->type == PHY_TYPE_PCIE ||
+	      inst->type == PHY_TYPE_SGMII)) {
 		dev_err(dev, "unsupported phy type: %d\n", inst->type);
 		return ERR_PTR(-EINVAL);
 	}
 
 	phy_parse_property(xsphy, inst);
+	phy_type_set(inst);
 
 	return inst->phy;
 }
@@ -510,6 +589,10 @@ static int mtk_xsphy_probe(struct platform_device *pdev)
 			dev_err(dev, "failed to get ref_clk(id-%d)\n", port);
 			return PTR_ERR(inst->ref_clk);
 		}
+
+		retval = phy_type_syscon_get(inst, child_np);
+		if (retval)
+			return retval;
 	}
 
 	provider = devm_of_phy_provider_register(dev, mtk_phy_xlate);
Signature · 1 line
2.43.0
#22 lore raw

PATCH v4 7/8 arm64: dts: mediatek: mt7988: Add xsphy for ssusb0/pcie2

In reply to Frank Wunderlich

From: Frank Wunderlich <[email protected]>

First usb and third pcie controller on mt7988 need a xs-phy to work properly.

---
v3:
- drop unneeded properties and compatibles from topmisc
- change offset to have clean syscon (without power controller) v4:
- fix unit adress of topmisc

---
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 36 +++++++++++++++++++++++
 1 file changed, 36 insertions(+)
arch/arm64/boot/dts/mediatek/mt7988a.dtsi +36 -0
index 88b56a24efca..a59f8708f0ef 100644
@@ -334,6 +334,8 @@ usb@11190000 {
 				 <&infracfg CLK_INFRA_133M_USB_HCK>,
 				 <&infracfg CLK_INFRA_USB_XHCI>;
 			clock-names = "sys_ck", "ref_ck", "mcu_ck", "dma_ck", "xhci_ck";
+			phys = <&xphyu2port0 PHY_TYPE_USB2>,
+			       <&xphyu3port0 PHY_TYPE_USB3>;
 			status = "disabled";
 		};
 
@@ -398,6 +400,9 @@ pcie2: pcie@11280000 {
 			pinctrl-0 = <&pcie2_pins>;
 			status = "disabled";
 
+			phys = <&xphyu3port0 PHY_TYPE_PCIE>;
+			phy-names = "pcie-phy";
+
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 0x7>;
 			interrupt-map = <0 0 0 1 &pcie_intc2 0>,
@@ -548,6 +553,37 @@ tphyu3port0: usb-phy@11c50700 {
 			};
 		};
 
+
+		topmisc: system-controller@11d10084 {
+			compatible = "mediatek,mt7988-topmisc",
+				     "syscon";
+			reg = <0 0x11d10084 0 0xff80>;
+		};
+
+		xs-phy@11e10000 {
+			compatible = "mediatek,mt7988-xsphy",
+				     "mediatek,xsphy";
+			#address-cells = <2>;
+			#size-cells = <2>;
+			ranges;
+			status = "disabled";
+
+			xphyu2port0: usb-phy@11e10000 {
+				reg = <0 0x11e10000 0 0x400>;
+				clocks = <&infracfg CLK_INFRA_USB_UTMI>;
+				clock-names = "ref";
+				#phy-cells = <1>;
+			};
+
+			xphyu3port0: usb-phy@11e13000 {
+				reg = <0 0x11e13400 0 0x500>;
+				clocks = <&infracfg CLK_INFRA_USB_PIPE>;
+				clock-names = "ref";
+				#phy-cells = <1>;
+				mediatek,syscon-type = <&topmisc 0x194 0>;
+			};
+		};
+
 		clock-controller@11f40000 {
 			compatible = "mediatek,mt7988-xfi-pll";
 			reg = <0 0x11f40000 0 0x1000>;
Signature · 1 line
2.43.0
#24 lore raw

PATCH v4 8/8 arm64: dts: mediatek: mt7988a-bpi-r4: enable xsphy

In reply to Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Enable XS-Phy on Bananapi R4 for pcie2.

---
 arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi | 4 ++++
 arch/arm64/boot/dts/mediatek/mt7988a.dtsi                 | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi +4 -0
index 0d332822971d..37e541a98ee1 100644
@@ -397,3 +397,7 @@ &tphy {
 &watchdog {
 	status = "okay";
 };
+
+&xsphy {
+	status = "okay";
+};
arch/arm64/boot/dts/mediatek/mt7988a.dtsi +1 -1
index a59f8708f0ef..8f6d1dfae24a 100644
@@ -560,7 +560,7 @@ topmisc: system-controller@11d10084 {
 			reg = <0 0x11d10084 0 0xff80>;
 		};
 
-		xs-phy@11e10000 {
+		xsphy: xs-phy@11e10000 {
 			compatible = "mediatek,mt7988-xsphy",
 				     "mediatek,xsphy";
 			#address-cells = <2>;
Signature · 1 line
2.43.0
maintainer Reviewed-by on v4 1/8
#2 lore raw

Re: [PATCH v4 1/8] dt-bindings: arm: mediatek: add bpi-r4 2g5 phy variant

In reply to Frank Wunderlich

Il 22/04/25 15:24, Frank Wunderlich ha scritto:

Quoted 7 lines

From: Frank Wunderlich <[email protected]>

Add new compatible for Bananapi R4 with 2.5G phy.
Base board is compatible with existing BPI-R4 only 1 SFP is replaced by RJ45 port and use mt7988 internal phy.

maintainer Reviewed-by on v4 2/8
#7 lore raw

Re: [PATCH v4 2/8] arm64: dts: mediatek: mt7988a-bpi-r4: allow hw variants of bpi-r4

In reply to Frank Wunderlich

Il 22/04/25 15:24, Frank Wunderlich ha scritto:

Quoted 11 lines

From: Frank Wunderlich <[email protected]>

Sinovoip has released other variants of Bananapi-R4 board. The known changes affecting only the LAN SFP+ slot which is replaced by a 2.5G phy with optional PoE.

Just move the common parts to a new dtsi and keep differences (only i2c for lan-sfp) in dts.

maintainer Reviewed-by on v4 6/8
#21 lore raw

Re: [PATCH v4 6/8] phy: mediatek: xsphy: support type switch by pericfg

In reply to Frank Wunderlich

Il 22/04/25 15:24, Frank Wunderlich ha scritto:

Quoted 10 lines

From: Daniel Golle <[email protected]>

Patch from Sam Shih <[email protected]> found in MediaTek SDK released under GPL.

Get syscon and use it to set the PHY type.
Extend support to PCIe and SGMII mode in addition to USB2 and USB3.

maintainer Reviewed-by on v4 5/8
#17 lore raw

Re: [PATCH v4 5/8] dt-bindings: mfd: syscon: Add mt7988-topmisc

In reply to Frank Wunderlich

Il 22/04/25 15:24, Frank Wunderlich ha scritto:

Quoted 11 lines

From: Frank Wunderlich <[email protected]>

Add compatible for Mediatek mt7988 topmisc syscon. This hardware block contains 2 functional blocks

- a powercontroller which is not needed (switched by atf)
- a multiplexer for high-speed Combo-Phy

This compatible is only for the multiplexer part.

Acked-by on v4 1/8
#5 lore raw

Re: [PATCH v4 1/8] dt-bindings: arm: mediatek: add bpi-r4 2g5 phy variant

In reply to Frank Wunderlich
Quoted 6 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Add new compatible for Bananapi R4 with 2.5G phy.
Base board is compatible with existing BPI-R4 only 1 SFP is replaced by RJ45 port and use mt7988 internal phy.

Quoted 7 lines

---
v3:
- new patch adding compatible for 2.5g variant

---
 Documentation/devicetree/bindings/arm/mediatek.yaml | 4 ++++
 1 file changed, 4 insertions(+)

Best regards,
Krzysztof

#4 lore raw

Re: [PATCH v4 1/8] dt-bindings: arm: mediatek: add bpi-r4 2g5 phy variant

In reply to Rob Herring

Am 23. April 2025 14:33:39 MESZ schrieb Rob Herring <[email protected]>:

Quoted 10 lines · Frank Wunderlich
Quoted 7 lines

From: Frank Wunderlich <[email protected]>

Add new compatible for Bananapi R4 with 2.5G phy.
Base board is compatible with existing BPI-R4 only 1 SFP is replaced by RJ45 port and use mt7988 internal phy.

You didn't add Krzysztof's acks on these patches.

Sorry,i thought i've added them in my local branch before running format-patch,but it seems i missed that somehow, possibly dropped these changes while aborting rebase.

regards Frank

Acked-by on v4 3/8
#10 lore raw

Re: [PATCH v4 3/8] dt-bindings: phy: mtk-xs-phy: Add mt7988 compatible

In reply to Frank Wunderlich
Quoted 8 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Add compatible for xs-phy on mt7988.

---
 Documentation/devicetree/bindings/phy/mediatek,xsphy.yaml | 1 +
 1 file changed, 1 insertion(+)

Best regards,
Krzysztof

Reviewed-by on v4 4/8
#13 lore raw

Re: [PATCH v4 4/8] dt-bindings: phy: mtk-xs-phy: support type switch by pericfg

In reply to Frank Wunderlich
Quoted 4 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Add support for type switch by pericfg register between USB3/PCIe.

Quoted 8 lines

---
v4:
- changes based on comments from Krzysztof
- change to phy type configuration controller/register

---
 .../devicetree/bindings/phy/mediatek,xsphy.yaml   | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Best regards,
Krzysztof

#14 lore raw

Re: [PATCH v4 4/8] dt-bindings: phy: mtk-xs-phy: support type switch by pericfg

In reply to Frank Wunderlich
Quoted 18 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Add support for type switch by pericfg register between USB3/PCIe.

---
v4:
- changes based on comments from Krzysztof
- change to phy type configuration controller/register

---
 .../devicetree/bindings/phy/mediatek,xsphy.yaml   | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
Documentation/devicetree/bindings/phy/mediatek,xsphy.yaml +0 -0
index 3b5253659e6f..0bed847bb4ad 100644

Documentation/devicetree/bindings/phy/mediatek,xsphy.yaml patternProperties: · line 154

Quoted 4 lines
Documentation/devicetree/bindings/phy/mediatek,xsphy.yaml +1 -0
@@ -151,6 +151,21 @@ patternProperties:
         minimum: 1
         maximum: 31
 
+      mediatek,syscon-type:

Although this should be probably mediatek,phy-type-syscon, because now it feels like you define here type of syscon. Anyway, keep Rb tag.

Best regards,
Krzysztof

Acked-by on v4 5/8
#18 lore raw

Re: [PATCH v4 5/8] dt-bindings: mfd: syscon: Add mt7988-topmisc

In reply to Frank Wunderlich
Quoted 8 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Add compatible for Mediatek mt7988 topmisc syscon. This hardware block contains 2 functional blocks

- a powercontroller which is not needed (switched by atf)
- a multiplexer for high-speed Combo-Phy

Quoted 6 lines

This compatible is only for the multiplexer part.

---
 Documentation/devicetree/bindings/mfd/syscon.yaml | 2 ++
 1 file changed, 2 insertions(+)

Best regards,
Krzysztof

#15 lore raw

Re: [PATCH v4 4/8] dt-bindings: phy: mtk-xs-phy: support type switch by pericfg

In reply to Krzysztof Kozlowski

Am 24. April 2025 09:35:11 MESZ schrieb Krzysztof Kozlowski <[email protected]>:

Quoted 22 lines · Frank Wunderlich
Quoted 21 lines

From: Frank Wunderlich <[email protected]>

Add support for type switch by pericfg register between USB3/PCIe.

---
v4:
- changes based on comments from Krzysztof
- change to phy type configuration controller/register

---
 .../devicetree/bindings/phy/mediatek,xsphy.yaml   | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
Documentation/devicetree/bindings/phy/mediatek,xsphy.yaml +0 -0
index 3b5253659e6f..0bed847bb4ad 100644
@@ -151,6 +151,21 @@ patternProperties:
         minimum: 1
         maximum: 31
 
Quoted 4 lines

Documentation/devicetree/bindings/phy/mediatek,xsphy.yaml patternProperties: · line 154

Quoted 1 line
Documentation/devicetree/bindings/phy/mediatek,xsphy.yaml +1 -0
+      mediatek,syscon-type:

Although this should be probably mediatek,phy-type-syscon, because now it feels like you define here type of syscon. Anyway, keep Rb tag.

I/Daniel took same property name like for tphy.
Thanks for your opinion,but i hope the series can be merged now :)

Quoted 3 lines

Best regards,
Krzysztof

regards Frank

maintainer Applied
#19 lore raw

Re: (subset) [PATCH v4 5/8] dt-bindings: mfd: syscon: Add mt7988-topmisc

In reply to Frank Wunderlich
Quoted 9 lines · Frank Wunderlich

Add compatible for Mediatek mt7988 topmisc syscon. This hardware block contains 2 functional blocks

- a powercontroller which is not needed (switched by atf)
- a multiplexer for high-speed Combo-Phy

This compatible is only for the multiplexer part.

[...]

Applied, thanks!

[5/8] dt-bindings: mfd: syscon: Add mt7988-topmisc

      commit: 4d54ce40400c215127ce24aa3a684a20e7d8493a

--
Lee Jones [李琼斯]

maintainer Applied
#27 lore raw

Re: (subset) [PATCH v4 0/8] Add Bananapi R4 variants and add xsphy

In reply to Frank Wunderlich
Quoted 10 lines · Frank Wunderlich

With this series i continue the mt7988/bananapi-r4 dts upstream work

changes in v4:
- changes based on review comments in v3 (mostly bindings)
- changed topmisc unit address to match reg

Daniel Golle (1):
phy: mediatek: xsphy: support type switch by pericfg

[...]

Applied, thanks!

[3/8] dt-bindings: phy: mtk-xs-phy: Add mt7988 compatible

      commit: 117d09e2830d6ff6c1bb2dc5629f972504fde51e
[4/8] dt-bindings: phy: mtk-xs-phy: support type switch by pericfg
      commit: b484b25a486962b568ada1f55c1b96dfd96b912d
[6/8] phy: mediatek: xsphy: support type switch by pericfg
      commit: f85eb659a48cc2f0c98a122e760552b69e56c06f

Best regards,

Signature · 1 line
~Vinod
maintainer Applied
#28 lore raw

Re: (subset) [PATCH v4 0/8] Add Bananapi R4 variants and add xsphy

In reply to Frank Wunderlich
Quoted 9 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

With this series i continue the mt7988/bananapi-r4 dts upstream work

changes in v4:
- changes based on review comments in v3 (mostly bindings)
- changed topmisc unit address to match reg

[...]

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

[1/8] dt-bindings: arm: mediatek: add bpi-r4 2g5 phy variant

      commit: dedef1ddbd1bb8e36530626f75eaba786a818dfe
[2/8] arm64: dts: mediatek: mt7988a-bpi-r4: allow hw variants of bpi-r4
      commit: 2bec30e8fc935b0868e87c32685e6f04190b1390
[7/8] arm64: dts: mediatek: mt7988: Add xsphy for ssusb0/pcie2
      commit: 45885a2c0bd8a6e91adb2c8897880dca228850e8
[8/8] arm64: dts: mediatek: mt7988a-bpi-r4: enable xsphy
      commit: ba0f084948e1f273c6264b1c8cc3cbed814f3b62

Cheers,
Angelo