lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4a2c60a2-03a7-43b8-9f40-ea2b0a3c4154@lunn.ch>
Date: Mon, 26 May 2025 16:14:07 +0200
From: Andrew Lunn <andrew@...n.ch>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: James Hilliard <james.hilliard1@...il.com>, netdev@...r.kernel.org,
	linux-sunxi@...ts.linux.dev, 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>,
	Chen-Yu Tsai <wens@...e.org>,
	Jernej Skrabec <jernej.skrabec@...il.com>,
	Samuel Holland <samuel@...lland.org>,
	Maxime Coquelin <mcoquelin.stm32@...il.com>,
	Alexandre Torgue <alexandre.torgue@...s.st.com>,
	Yinggang Gu <guyinggang@...ngson.cn>,
	Huacai Chen <chenhuacai@...nel.org>,
	Yanteng Si <si.yanteng@...ux.dev>,
	Feiyang Chen <chenfeiyang@...ngson.cn>,
	Uwe Kleine-König <u.kleine-koenig@...libre.com>,
	Jinjie Ruan <ruanjinjie@...wei.com>,
	Paul Kocialkowski <paulk@...-base.io>,
	linux-arm-kernel@...ts.infradead.org,
	linux-stm32@...md-mailman.stormreply.com,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 2/2] net: stmmac: dwmac-sun8i: Allow runtime
 AC200/AC300 phy selection

On Mon, May 26, 2025 at 09:04:40AM +0100, Russell King (Oracle) wrote:
> On Sun, May 25, 2025 at 06:29:22PM -0600, James Hilliard wrote:
> > +	if (!nvmem_cell_read_u16(dev, "ac300", &val)) {
> > +		const char *phy_name = (val & AC300_KEY) ? "ac300" : "ac200";
> > +		int index = of_property_match_string(dev->of_node, "phy-names", phy_name);
> > +		if (index < 0) {
> > +			dev_err(dev, "PHY name not found in device tree\n");
> > +			return -EINVAL;
> > +		}
> > +
> > +		plat_dat->phy_node = of_parse_phandle(dev->of_node, "phys", index);
> > +		if (!plat_dat->phy_node) {
> > +			dev_err(dev, "Failed to get PHY node from phys property\n");
> > +			return -EINVAL;
> > +		}
> > +	}
> 
> 1. You are re-using the drivers/phy binding for ethernet PHYs driven by
>    phylib here.
> 2. You need to update
>    Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml
>    in a separate patch.

A real user, i.e. a patch to a .dts file, would also be good.

  Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ