Skip to contentSkip to conversation

dt-bindings: net: brcm,bcm54xx: add binding for Broadcom Ethernet PHYs

PATCH In review Rafał Miłecki 3 participants 4 messages Oct 13, 2025 – Oct 15, 2025

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

PATCH 1/2 dt-bindings: net: brcm,bcm54xx: add binding for Broadcom Ethernet PHYs

From: Rafał Miłecki <[email protected]>

Some network devices (e.g. access points) come with BCM54210E PHY that requires being set into master mode to work properly.

Add binding for BCM54210E as found in Luxul AP devices (600d:84a6) and the "brcm,master-mode" property.

---
 .../devicetree/bindings/net/brcm,bcm54xx.yaml | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/brcm,bcm54xx.yaml
Documentation/devicetree/bindings/net/brcm,bcm54xx.yaml new file +37 -0
new file mode 100644
index 000000000000..3ad226efe21d
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/brcm,bcm54xx.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom Ethernet PHYs
+
+maintainers:
+  - Rafał Miłecki <[email protected]>
+
+allOf:
+  - $ref: ethernet-phy.yaml#
+
+properties:
+  compatible:
+    enum:
+      - ethernet-phy-id600d.84a6
+
+  brcm,master-mode:
+    description: PHY requires setting into master mode
+    type: boolean
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    mdio {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        ethernet-phy@0 {
+            compatible = "ethernet-phy-id600d.84a6";
+            reg = <0>;
+            brcm,master-mode;
+        };
+    };
Signature · 1 line
2.51.0
#1 lore raw

PATCH 2/2 net: phy: broadcom: support "brcm,master-mode" DT property

From: Rafał Miłecki <[email protected]>

Specifying master mode as required is now possible using DT property which is a much nicer way. It allows clean per-device hardware description instead of runtime detection in specific Ethernet drivers.

---
 drivers/net/phy/broadcom.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/phy/broadcom.c +3 -1
index 3459a0e9d8b9..d66b79ea1c38 100644
@@ -110,11 +110,13 @@ static int bcm54xx_config_clock_delay(struct phy_device *phydev)
 
 static int bcm54210e_config_init(struct phy_device *phydev)
 {
+	struct device_node *np = phydev->mdio.dev.of_node;
 	int val;
 
 	bcm54xx_config_clock_delay(phydev);
 
-	if (phydev->dev_flags & PHY_BRCM_EN_MASTER_MODE) {
+	if (of_property_read_bool(np, "brcm,master-mode") ||
+	    phydev->dev_flags & PHY_BRCM_EN_MASTER_MODE) {
 		val = phy_read(phydev, MII_CTRL1000);
 		val |= CTL1000_AS_MASTER | CTL1000_ENABLE_MASTER;
 		phy_write(phydev, MII_CTRL1000, val);
Signature · 1 line
2.51.0
maintainer
#2 lore raw
In reply to Rafał Miłecki
Quoted 7 lines · Rafał Miłecki

From: Rafał Miłecki <[email protected]>

Some network devices (e.g. access points) come with BCM54210E PHY that requires being set into master mode to work properly.

Add binding for BCM54210E as found in Luxul AP devices (600d:84a6) and the "brcm,master-mode" property.

Is there anything broadcom about master mode? I assume this is just the usual prefer master:

ethtool -s eth42 [master-slave preferred-master|preferred-slave|forced-master|forced-slave]

Also, is this preferred-master or forced-master?

Humm, also how does this differ to ethernet-phy.yaml:

timing-role:
$ref: /schemas/types.yaml#/definitions/string
enum:
- forced-master
- forced-slave
- preferred-master
- preferred-slave
description: |
Specifies the timing role of the PHY in the network link. This property is required for setups where the role must be explicitly assigned via the device tree due to limitations in hardware strapping or incorrect strap configurations.
It is applicable to Single Pair Ethernet (1000/100/10Base-T1) and other PHY types, including 1000Base-T, where it controls whether the PHY should be a master (clock source) or a slave (clock receiver).

- 'forced-master': The PHY is forced to operate as a master.
- 'forced-slave': The PHY is forced to operate as a slave.
- 'preferred-master': Prefer the PHY to be master but allow negotiation.
- 'preferred-slave': Prefer the PHY to be slave but allow negotiation.

Andrew

Andrew

---
pw-bot: cr

maintainer
#3 lore raw
In reply to Rafał Miłecki
Quoted 7 lines · Rafał Miłecki

From: Rafał Miłecki <[email protected]>

Some network devices (e.g. access points) come with BCM54210E PHY that requires being set into master mode to work properly.

Add binding for BCM54210E as found in Luxul AP devices (600d:84a6) and the "brcm,master-mode" property.

Can't this mode be implied from the compatible string (or id registers)?

Quoted 6 lines
---
 .../devicetree/bindings/net/brcm,bcm54xx.yaml | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/brcm,bcm54xx.yaml