All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Vladimir Oltean <vladimir.oltean@nxp.com>, netdev@vger.kernel.org
Cc: "Woojung Huh" <woojung.huh@microchip.com>,
	UNGLinuxDriver@microchip.com, "Andrew Lunn" <andrew@lunn.ch>,
	"Vivien Didelot" <vivien.didelot@gmail.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Vladimir Oltean" <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Michael Grzeschik" <m.grzeschik@pengutronix.de>,
	"Oleksij Rempel" <linux@rempel-privat.de>,
	"Thorsten Leemhuis" <regressions@leemhuis.info>,
	"Alvin Šipraga" <alsi@bang-olufsen.dk>,
	"Craig McQueen" <craig@mcqueen.id.au>
Subject: Re: [PATCH net] net: dsa: microchip: keep compatibility with device tree blobs with no phy-mode
Date: Fri, 19 Aug 2022 12:19:12 +0200	[thread overview]
Message-ID: <095c6c01-d4dd-8275-19fc-f9fe1ea40ab8@rasmusvillemoes.dk> (raw)
In-Reply-To: <20220818143250.2797111-1-vladimir.oltean@nxp.com>

On 18/08/2022 16.32, Vladimir Oltean wrote:
> DSA has multiple ways of specifying a MAC connection to an internal PHY.
> One requires a DT description like this:
> 
> 	port@0 {
> 		reg = <0>;
> 		phy-handle = <&internal_phy>;
> 		phy-mode = "internal";
> 	};
> 
> (which is IMO the recommended approach, as it is the clearest
> description)
> 
> but it is also possible to leave the specification as just:
> 
> 	port@0 {
> 		reg = <0>;
> 	}
> 
> and if the driver implements ds->ops->phy_read and ds->ops->phy_write,
> the DSA framework "knows" it should create a ds->slave_mii_bus, and it
> should connect to a non-OF-based internal PHY on this MDIO bus, at an
> MDIO address equal to the port address.
> 
> There is also an intermediary way of describing things:
> 
> 	port@0 {
> 		reg = <0>;
> 		phy-handle = <&internal_phy>;
> 	};

Well, there's also e.g. arch/arm/boot/dts/at91-sama5d3_ksz9477_evb.dts
which sets the phy-mode but not the phy-handle:

                        port@0 {
                                reg = <0>;
                                label = "lan1";
                                phy-mode = "internal";
                        };

And doing that in my case seems to fix things (I wouldn't know what
phy-handle to point at anyway), so since we're still in development, I
think I'll do that. But if I want to follow the new-world-order to the
letter, should I also figure out a way to point at a phy-handle?
> Fixes: 2c709e0bdad4 ("net: dsa: microchip: ksz8795: add phylink support")
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=216320
> Reported-by: Craig McQueen <craig@mcqueen.id.au>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

I've also tested this patch on top of v5.19 without altering my .dts,
and that also seems to fix things, so I suppose you can add

Fixes: 65ac79e18120 ("net: dsa: microchip: add the phylink get_caps")
Tested-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>

Thanks,
Rasmus

  parent reply	other threads:[~2022-08-19 10:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18 14:32 [PATCH net] net: dsa: microchip: keep compatibility with device tree blobs with no phy-mode Vladimir Oltean
2022-08-18 15:06 ` Alvin Šipraga
2022-08-18 15:18   ` Vladimir Oltean
2022-08-18 15:25     ` Alvin Šipraga
2022-08-18 15:13 ` Andrew Lunn
2022-08-18 15:21   ` Vladimir Oltean
2022-08-18 15:33   ` Russell King (Oracle)
2022-08-19 10:19 ` Rasmus Villemoes [this message]
2022-08-19 10:57   ` Vladimir Oltean
2022-08-19 11:47     ` Rasmus Villemoes
2022-08-19 16:41       ` Vladimir Oltean
2022-08-22 20:11         ` Tim Harvey
2022-08-19 23:32 ` Jakub Kicinski
2022-08-20 11:24   ` Vladimir Oltean
2022-08-23  1:00 ` patchwork-bot+netdevbpf

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=095c6c01-d4dd-8275-19fc-f9fe1ea40ab8@rasmusvillemoes.dk \
    --to=linux@rasmusvillemoes.dk \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alsi@bang-olufsen.dk \
    --cc=andrew@lunn.ch \
    --cc=craig@mcqueen.id.au \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linux@rempel-privat.de \
    --cc=m.grzeschik@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=regressions@leemhuis.info \
    --cc=vivien.didelot@gmail.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=woojung.huh@microchip.com \
    /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.