Subject: Re: [PATCH net-next v2 5/5] net: macb: Add "mobileye,eyeq5-gem" compatible

From: Théo Lebrun <[email-masked]>
Date: Thu, 23 Oct 2025 16:20:16 +0200

On Wed Oct 22, 2025 at 9:33 PM CEST, Andrew Lunn wrote:
> On Wed, Oct 22, 2025 at 10:09:49AM +0200, Maxime Chevallier wrote:
>> Hi,
>> 
>> 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 <[email-masked]>
>> 
>> 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.
>
> I was thinking along the same lines, is this actually safe? It would
> be good to add something like this to the commit message to indicate
> this change is safe, the needed code analysis has been performed.

Sure, will integrate a summary similar to my reply to Maxime's message.
https://lore.kernel.org/lkml/[email-masked]/

Thanks,

--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com