[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DDOQYH87ZV1H.1QZH1R36WMIC6@bootlin.com>
Date: Wed, 22 Oct 2025 11:34:59 +0200
From: Théo Lebrun <theo.lebrun@...tlin.com>
To: "Maxime Chevallier" <maxime.chevallier@...tlin.com>,
Théo Lebrun <theo.lebrun@...tlin.com>, "Andrew Lunn"
<andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, "Eric
Dumazet" <edumazet@...gle.com>, "Jakub Kicinski" <kuba@...nel.org>, "Paolo
Abeni" <pabeni@...hat.com>, "Rob Herring" <robh@...nel.org>, "Krzysztof
Kozlowski" <krzk+dt@...nel.org>, "Conor Dooley" <conor+dt@...nel.org>,
"Nicolas Ferre" <nicolas.ferre@...rochip.com>, "Claudiu Beznea"
<claudiu.beznea@...on.dev>, "Russell King" <linux@...linux.org.uk>
Cc: <netdev@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, Benoît Monin
<benoit.monin@...tlin.com>, Grégory Clement
<gregory.clement@...tlin.com>, "Tawfik Bayouk"
<tawfik.bayouk@...ileye.com>, "Thomas Petazzoni"
<thomas.petazzoni@...tlin.com>, "Vladimir Kondratiev"
<vladimir.kondratiev@...ileye.com>
Subject: Re: [PATCH net-next v2 5/5] net: macb: Add "mobileye,eyeq5-gem"
compatible
On Wed Oct 22, 2025 at 10:09 AM CEST, Maxime Chevallier wrote:
> On 22/10/2025 09:38, Théo Lebrun wrote:
>> Add support for the two GEM instances inside Mobileye EyeQ5 SoCs, using
>> compatible "mobileye,eyeq5-gem". With it, add a custom init sequence
>> that must grab a generic PHY and initialise it.
>>
>> We use bp->phy in both RGMII and SGMII cases. Tell our mode by adding a
>> phy_set_mode_ext() during macb_open(), before phy_power_on(). We are
>> the first users of bp->phy that use it in non-SGMII cases.
>>
>> Signed-off-by: Théo Lebrun <theo.lebrun@...tlin.com>
>
> This seems good to me. I was worried that introducing the unconditionnal
> call to phy_set_mode_ext() could trigger spurious errors should the
> generic PHY driver not support the requested interface, but AFAICT
> there's only the zynqmp in-tree that use the 'phys' property with macb,
> and the associated generic PHY driver (drivers/phy/phy-zynqmp.c) doesn't
> implement a .set_mode, so that looks safe.
>
> Reviewed-by: Maxime Chevallier <maxime.chevallier@...tlin.com>
Ah, good catch. I checked that both !phy || !phy->ops->set_mode lead to
return 0, but I hadn't checked if other PHY drivers could have a
.set_mode() implementation that failed on this new call.
Compatibles that might read a "phys" DT property:
- cdns,zynqmp-gem => no DT upstream
- microchip,mpfs-macb => no DT upstream
- xlnx,versal-gem => xilinx/versal-net.dtsi, &gem0..1, no PHY attached.
- xlnx,zynqmp-gem => xilinx/zynqmp.dtsi, &gem0..3, PHY attached in
xilinx/zynqmp-sck-kr-g-rev*.dtso. PHY provider is &psgtr,
"xlnx,zynqmp-psgtr-v1.1", drivers/phy/xilinx/phy-zynqmp.c
So as you pointed out, only xilinx/phy-zynqmp.c is used according to
upstream DTs. I also checked lkml, no patches adding a .set_mode().
We shouldn't be breaking upstream DTs with the current patch.
Thanks for the review Maxime,
--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists