2022-04-21 17:19:45

by Radhey Shyam Pandey

[permalink] [raw]
Subject: [PATCH 0/2] net: macb: Make ZynqMP SGMII phy configuration optional

This patchset drop phy-names property from MACB node and also make
SGMII Phy configuration optional. The motivation for this change
is to support traditional usescase in which first stage bootloader
does PS-GT configuration, and should still be supported in macb
driver.


Radhey Shyam Pandey (2):
dt-bindings: net: cdns,macb: Drop phy-names property for ZynqMP SGMII
PHY
net: macb: In ZynqMP initialization make SGMII phy configuration
optional

Documentation/devicetree/bindings/net/cdns,macb.yaml | 8 --------
drivers/net/ethernet/cadence/macb_main.c | 2 +-
2 files changed, 1 insertion(+), 9 deletions(-)

--
2.7.4


2022-04-22 20:33:12

by Radhey Shyam Pandey

[permalink] [raw]
Subject: [PATCH 2/2] net: macb: In ZynqMP initialization make SGMII phy configuration optional

In the macb binding documentation "phys" is an optional property. Make
implementation in line with it. This change allows the traditional flow
in which first stage bootloader does PS-GT configuration to work along
with newer use cases in which PS-GT configuration is managed by the
phy-zynqmp driver.

It fixes below macb probe failure when macb DT node doesn't have SGMII
phys handle.
"macb ff0b0000.ethernet: error -ENODEV: failed to get PS-GTR PHY"

Signed-off-by: Radhey Shyam Pandey <[email protected]>
---
drivers/net/ethernet/cadence/macb_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index a5140d4d3baf..6434e74c04f1 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -4588,7 +4588,7 @@ static int zynqmp_init(struct platform_device *pdev)

if (bp->phy_interface == PHY_INTERFACE_MODE_SGMII) {
/* Ensure PS-GTR PHY device used in SGMII mode is ready */
- bp->sgmii_phy = devm_phy_get(&pdev->dev, "sgmii-phy");
+ bp->sgmii_phy = devm_phy_optional_get(&pdev->dev, NULL);

if (IS_ERR(bp->sgmii_phy)) {
ret = PTR_ERR(bp->sgmii_phy);
--
2.7.4

2022-04-22 21:00:14

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH 0/2] net: macb: Make ZynqMP SGMII phy configuration optional

Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <[email protected]>:

On Wed, 20 Apr 2022 16:33:08 +0530 you wrote:
> This patchset drop phy-names property from MACB node and also make
> SGMII Phy configuration optional. The motivation for this change
> is to support traditional usescase in which first stage bootloader
> does PS-GT configuration, and should still be supported in macb
> driver.
>
>
> [...]

Here is the summary with links:
- [1/2] dt-bindings: net: cdns,macb: Drop phy-names property for ZynqMP SGMII PHY
https://git.kernel.org/netdev/net-next/c/3ac8316e09b0
- [2/2] net: macb: In ZynqMP initialization make SGMII phy configuration optional
https://git.kernel.org/netdev/net-next/c/29e96fe9e0ec

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html