From: "Rafał Miłecki" <zajec5@gmail.com>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Florian Fainelli <florian.fainelli@broadcom.com>
Cc: "Heiner Kallweit" <hkallweit1@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
"Rafał Miłecki" <rafal@milecki.pl>
Subject: [PATCH net-next 2/2] net: phy: broadcom: support "brcm,master-mode" DT property
Date: Mon, 13 Oct 2025 22:29:44 +0200 [thread overview]
Message-ID: <20251013202944.14575-2-zajec5@gmail.com> (raw)
In-Reply-To: <20251013202944.14575-1-zajec5@gmail.com>
From: Rafał Miłecki <rafal@milecki.pl>
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.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
drivers/net/phy/broadcom.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c
index 3459a0e9d8b9..d66b79ea1c38 100644
--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -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);
--
2.51.0
next prev parent reply other threads:[~2025-10-13 20:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-13 20:29 [PATCH net-next 1/2] dt-bindings: net: brcm,bcm54xx: add binding for Broadcom Ethernet PHYs Rafał Miłecki
2025-10-13 20:29 ` Rafał Miłecki [this message]
2025-10-13 21:18 ` Andrew Lunn
2025-10-15 17:01 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251013202944.14575-2-zajec5@gmail.com \
--to=zajec5@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=hkallweit1@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rafal@milecki.pl \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.