From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FE6A30FC34; Thu, 26 Feb 2026 10:46:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772102791; cv=none; b=KZ2dZskIwtYt9hI1337VeNVcl4U8hdzSY3+ID83M7pIFGtajk0LdhrnKWGRn1itRVoGSjwSsjnN2l2sQVFUnfilpYS5qOczSE03qbRfY7R2U/9BEr2ImL4LRkPv2RtV0dmNlyzZTihJjcgEm37h+5mtEcfRmz0kxdw1UV1rYWSo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772102791; c=relaxed/simple; bh=uDsB0i6QXrY22o/BHBYBi7a/Koo8ot6LI6Ju593/6xY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UBIQBPqCt1IxlVSHltR4g6WGbXmI5V4dRFh55NQkZdj3PE5mAS7pJ/8qYa9mZslURFcm9rfJA7wcTBlXzhaI3kYHz+INUeNEjEnn1AwYZDZpZqIxAkPLr8uUKCZMRXAnPgmJX+6wCgv8pMo4pSjBDdlhsl4A4CqoYgIfyg3YGEQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dqApQBF+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dqApQBF+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07D3DC19422; Thu, 26 Feb 2026 10:46:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772102790; bh=uDsB0i6QXrY22o/BHBYBi7a/Koo8ot6LI6Ju593/6xY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dqApQBF+a2+ASv11fBkuASvxv1L0IH4ibb8JP4ZH741RqaqHOnojnW7ZD73cWyILw 4ccTSta1YxM3CTOtwBKqpP88pwM2bJq5ZDEo2SE8qUZEeEEfIzKGk+r54IcZcq6niu F/uQAHbMjIIbcvf8RJ3M7/kbtKnMCbRbYlPCsxePO2kcyvP7I5dLUI7XkF5LHfvuEj zRr4ILjiH+d7im/as1dCHxhKkGqma3V982rxtxvQAxkVGpJHn/heQbzHOb+pwvwq0+ IDeqGkI7Ov0GaGVVO/gjejuSIKGV6K+eL8PX6ok8+G3hOVEUI4YUvXQkyMQ9NUEVsI s5iCS8uLt3e+g== Date: Thu, 26 Feb 2026 10:46:24 +0000 From: Conor Dooley To: =?iso-8859-1?Q?Th=E9o?= Lebrun Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nicolas Ferre , Claudiu Beznea , Russell King , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?iso-8859-1?Q?Beno=EEt?= Monin , =?iso-8859-1?Q?Gr=E9gory?= Clement , Maxime Chevallier , Tawfik Bayouk , Thomas Petazzoni , Vladimir Kondratiev Subject: Re: [PATCH net-next v3 5/5] net: macb: Add "mobileye,eyeq5-gem" compatible Message-ID: <20260226-folic-excitable-82eff83a125a@spud> References: <20251023-macb-eyeq5-v3-0-af509422c204@bootlin.com> <20251023-macb-eyeq5-v3-5-af509422c204@bootlin.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Im2QyThLb1POUKOO" Content-Disposition: inline In-Reply-To: <20251023-macb-eyeq5-v3-5-af509422c204@bootlin.com> --Im2QyThLb1POUKOO Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 23, 2025 at 06:22:55PM +0200, Th=E9o 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. >=20 > 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. >=20 > The phy_set_mode_ext() call is made unconditionally. It cannot cause > issues on platforms where !bp->phy or !bp->phy->ops->set_mode as, in > those cases, the call is a no-op (returning zero). From reading > upstream DTS, we can figure out that no platform has a bp->phy and a > PHY driver that has a .set_mode() implementation: > - cdns,zynqmp-gem: no DTS upstream. > - microchip,mpfs-macb: microchip/mpfs.dtsi, &mac0..1, no PHY attached. > - xlnx,versal-gem: xilinx/versal-net.dtsi, &gem0..1, no PHY attached. > - xlnx,zynqmp-gem: xilinx/zynqmp.dtsi, &gem0..3, PHY attached to > drivers/phy/xilinx/phy-zynqmp.c which has no .set_mode(). Ran into this patch while looking at other stuff. Theo could you explain this analysis to someone not really au fait with phys? Looking at soc.dtsi files won't show you phys, since that's a board level decision, but you have found one for the zynqmp-gem so I guess that's just the way you presented the data? mpfs definitely has phys attached, so is you not finding one for it but finding for zynqmp, an indication that you were only looking for rgmii phys? Also, is the analysis of the connected phy driver accurate for zynmqmp? zynqmp-zc1751-xm018-dc4.dts seems to have 4 ethernet phys: ethernet_phy0: ethernet-phy@0 { /* Marvell 88e1512 */ reg =3D <0>; }; ethernet_phy7: ethernet-phy@7 { /* Vitesse VSC8211 */ reg =3D <7>; }; ethernet_phy3: ethernet-phy@3 { /* Realtek RTL8211DN */ reg =3D <3>; }; ethernet_phy8: ethernet-phy@8 { /* Vitesse VSC8211 */ reg =3D <8>; }; I'm not sure that this matters because they probably don't actually implement mode changes as they're dedicated ethernet phys. The zynmp phy seems to only be used for !ethernet devices. The phys I'm aware of being used with mpfs are all also dedicated ethernet ones. Calling phy_set_mode_ext() seems to be to be the right decision, but the rationale confused me a little. Cheers, Conor. --Im2QyThLb1POUKOO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCaaAkgAAKCRB4tDGHoIJi 0iTVAP9HHR8z82MzQweWvBR0kQrJMikIfQ3m8ksMbGhiqsLiKAD8Cxa8C7Ggx/NI dVXtXKShc3DBXOu7l49uCeq8DFBqgQg= =x46e -----END PGP SIGNATURE----- --Im2QyThLb1POUKOO--