summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2022-04-22 14:52:27 +0300
committerDavid S. Miller <davem@davemloft.net>2022-04-22 14:52:27 +0300
commitcb1e6bf42bce63158884ab83fb171b518693c771 (patch)
tree0742fb9d54b393d4c2e9ef446021640b870637b0
parent42d594357e01e360b78e13659c42de1598698fd2 (diff)
parent29e96fe9e0ec0f0fe1dd306a4ccb7b8983eae67a (diff)
downloadlinux-cb1e6bf42bce63158884ab83fb171b518693c771.tar.xz
Merge branch 'zynqmp-phy-config-optional'
Radhey Shyam Pandey says: ==================== 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. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--Documentation/devicetree/bindings/net/cdns,macb.yaml8
-rw-r--r--drivers/net/ethernet/cadence/macb_main.c2
2 files changed, 1 insertions, 9 deletions
diff --git a/Documentation/devicetree/bindings/net/cdns,macb.yaml b/Documentation/devicetree/bindings/net/cdns,macb.yaml
index 6cd3d853dcba..e5b628736930 100644
--- a/Documentation/devicetree/bindings/net/cdns,macb.yaml
+++ b/Documentation/devicetree/bindings/net/cdns,macb.yaml
@@ -84,13 +84,6 @@ properties:
phys:
maxItems: 1
- phy-names:
- const: sgmii-phy
- description:
- Required with ZynqMP SoC when in SGMII mode.
- Should reference PS-GTR generic PHY device for this controller
- instance. See ZynqMP example.
-
resets:
maxItems: 1
description:
@@ -204,7 +197,6 @@ examples:
reset-names = "gem1_rst";
status = "okay";
phy-mode = "sgmii";
- phy-names = "sgmii-phy";
phys = <&psgtr 1 PHY_TYPE_SGMII 1 1>;
fixed-link {
speed = <1000>;
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);