All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] net: macb: Make ZynqMP SGMII phy configuration optional
@ 2022-04-20 11:03 Radhey Shyam Pandey
  2022-04-20 11:03 ` [PATCH 1/2] dt-bindings: net: cdns,macb: Drop phy-names property for ZynqMP SGMII PHY Radhey Shyam Pandey
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Radhey Shyam Pandey @ 2022-04-20 11:03 UTC (permalink / raw)
  To: davem, kuba, pabeni, robh+dt, krzk+dt, nicolas.ferre, claudiu.beznea
  Cc: netdev, devicetree, linux-kernel, michals, harinik, git,
	Radhey Shyam Pandey

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] dt-bindings: net: cdns,macb: Drop phy-names property for ZynqMP SGMII PHY
  2022-04-20 11:03 [PATCH 0/2] net: macb: Make ZynqMP SGMII phy configuration optional Radhey Shyam Pandey
@ 2022-04-20 11:03 ` Radhey Shyam Pandey
  2022-04-20 11:03 ` [PATCH 2/2] net: macb: In ZynqMP initialization make SGMII phy configuration optional Radhey Shyam Pandey
  2022-04-22 12:00 ` [PATCH 0/2] net: macb: Make ZynqMP " patchwork-bot+netdevbpf
  2 siblings, 0 replies; 5+ messages in thread
From: Radhey Shyam Pandey @ 2022-04-20 11:03 UTC (permalink / raw)
  To: davem, kuba, pabeni, robh+dt, krzk+dt, nicolas.ferre, claudiu.beznea
  Cc: netdev, devicetree, linux-kernel, michals, harinik, git,
	Radhey Shyam Pandey

In zynqmp SGMII initialization, there is a single PHY so remove phy-names
property as there is no real need of having it.

Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
---
Note: For this change taken reference from upstream commit (8a917813cc74)
phy: Allow a NULL phy name for devm_phy_get().
https://lore.kernel.org/r/20210414135525.3535787-1-robh@kernel.org
---
 Documentation/devicetree/bindings/net/cdns,macb.yaml | 8 --------
 1 file changed, 8 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>;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] net: macb: In ZynqMP initialization make SGMII phy configuration optional
  2022-04-20 11:03 [PATCH 0/2] net: macb: Make ZynqMP SGMII phy configuration optional Radhey Shyam Pandey
  2022-04-20 11:03 ` [PATCH 1/2] dt-bindings: net: cdns,macb: Drop phy-names property for ZynqMP SGMII PHY Radhey Shyam Pandey
@ 2022-04-20 11:03 ` Radhey Shyam Pandey
  2022-04-20 11:17   ` Michal Simek
  2022-04-22 12:00 ` [PATCH 0/2] net: macb: Make ZynqMP " patchwork-bot+netdevbpf
  2 siblings, 1 reply; 5+ messages in thread
From: Radhey Shyam Pandey @ 2022-04-20 11:03 UTC (permalink / raw)
  To: davem, kuba, pabeni, robh+dt, krzk+dt, nicolas.ferre, claudiu.beznea
  Cc: netdev, devicetree, linux-kernel, michals, harinik, git,
	Radhey Shyam Pandey

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 <radhey.shyam.pandey@xilinx.com>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] net: macb: In ZynqMP initialization make SGMII phy configuration optional
  2022-04-20 11:03 ` [PATCH 2/2] net: macb: In ZynqMP initialization make SGMII phy configuration optional Radhey Shyam Pandey
@ 2022-04-20 11:17   ` Michal Simek
  0 siblings, 0 replies; 5+ messages in thread
From: Michal Simek @ 2022-04-20 11:17 UTC (permalink / raw)
  To: Radhey Shyam Pandey, davem, kuba, pabeni, robh+dt, krzk+dt,
	nicolas.ferre, claudiu.beznea
  Cc: netdev, devicetree, linux-kernel, harinik, git



On 4/20/22 13:03, Radhey Shyam Pandey wrote:
> 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 <radhey.shyam.pandey@xilinx.com>
> ---
>   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);

Reviewed-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] net: macb: Make ZynqMP SGMII phy configuration optional
  2022-04-20 11:03 [PATCH 0/2] net: macb: Make ZynqMP SGMII phy configuration optional Radhey Shyam Pandey
  2022-04-20 11:03 ` [PATCH 1/2] dt-bindings: net: cdns,macb: Drop phy-names property for ZynqMP SGMII PHY Radhey Shyam Pandey
  2022-04-20 11:03 ` [PATCH 2/2] net: macb: In ZynqMP initialization make SGMII phy configuration optional Radhey Shyam Pandey
@ 2022-04-22 12:00 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-04-22 12:00 UTC (permalink / raw)
  To: Radhey Shyam Pandey
  Cc: davem, kuba, pabeni, robh+dt, krzk+dt, nicolas.ferre,
	claudiu.beznea, netdev, devicetree, linux-kernel, michals,
	harinik, git

Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-04-22 12:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-20 11:03 [PATCH 0/2] net: macb: Make ZynqMP SGMII phy configuration optional Radhey Shyam Pandey
2022-04-20 11:03 ` [PATCH 1/2] dt-bindings: net: cdns,macb: Drop phy-names property for ZynqMP SGMII PHY Radhey Shyam Pandey
2022-04-20 11:03 ` [PATCH 2/2] net: macb: In ZynqMP initialization make SGMII phy configuration optional Radhey Shyam Pandey
2022-04-20 11:17   ` Michal Simek
2022-04-22 12:00 ` [PATCH 0/2] net: macb: Make ZynqMP " patchwork-bot+netdevbpf

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.