From: Primoz Fiser <primoz.fiser@norik.com>
To: Wei Fang <wei.fang@nxp.com>, Shenwei Wang <shenwei.wang@nxp.com>,
Clark Wang <xiaoning.wang@nxp.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
davem@davemloft.net, Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: imx@lists.linux.dev, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org, upstream@lists.phytec.de
Subject: [PATCH 0/2] Populate of_node for i.MX netdevs
Date: Thu, 17 Jul 2025 11:00:35 +0200 [thread overview]
Message-ID: <20250717090037.4097520-1-primoz.fiser@norik.com> (raw)
Recently when working on predictable network names for i.MX SoCs, it
was discovered that of_node sysfs properties are missing for FEC and
EQOS interfaces.
Without this, udev is unable to expose the OF_* properties (OF_NAME,
OF_FULLNAME, OF_COMPATIBLE, OF_ALIAS, etc.) and thus we cannot identify
interface based on those properties.
Fix this by populating netdev of_node in respective drivers.
Result:
$ ls -l /sys/class/net/end1/of_node
/sys/class/net/end1/of_node ->
'../../../../../../../firmware/devicetree/base/soc@0/bus@42800000/ethernet@428a0000'/
$ ls -l /sys/class/net/end0/of_node
/sys/class/net/end0/of_node ->
'../../../../../../../firmware/devicetree/base/soc@0/bus@42800000/ethernet@42890000'/
$ udevadm info /sys/class/net/end0
P: /devices/platform/soc@0/42800000.bus/42890000.ethernet/net/end0
M: end0
R: 0
U: net
I: 2
E: DEVPATH=/devices/platform/soc@0/42800000.bus/42890000.ethernet/net/end0
E: SUBSYSTEM=net
E: OF_NAME=ethernet
E: OF_FULLNAME=/soc@0/bus@42800000/ethernet@42890000
E: OF_COMPATIBLE_0=fsl,imx93-fec
E: OF_COMPATIBLE_1=fsl,imx8mq-fec
E: OF_COMPATIBLE_2=fsl,imx6sx-fec
E: OF_COMPATIBLE_N=3
E: OF_ALIAS_0=ethernet0
E: INTERFACE=end0
E: IFINDEX=2
E: USEC_INITIALIZED=5227083
E: ID_NET_DRIVER=fec
E: ID_NET_NAMING_SCHEME=latest
E: ID_NET_NAME_MAC=enx502df44dbd5e
E: ID_NET_NAME_ONBOARD=end0
E: ID_PATH=platform-42890000.ethernet
E: ID_PATH_TAG=platform-42890000_ethernet
E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/end0
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:
$ udevadm info /sys/class/net/end1
P: /devices/platform/soc@0/42800000.bus/428a0000.ethernet/net/end1
M: end1
R: 1
U: net
I: 3
E: DEVPATH=/devices/platform/soc@0/42800000.bus/428a0000.ethernet/net/end1
E: SUBSYSTEM=net
E: OF_NAME=ethernet
E: OF_FULLNAME=/soc@0/bus@42800000/ethernet@428a0000
E: OF_COMPATIBLE_0=nxp,imx93-dwmac-eqos
E: OF_COMPATIBLE_1=snps,dwmac-5.10a
E: OF_COMPATIBLE_N=2
E: OF_ALIAS_0=ethernet1
E: INTERFACE=end1
E: IFINDEX=3
E: USEC_INITIALIZED=5370305
E: ID_NET_NAMING_SCHEME=latest
E: ID_NET_NAME_MAC=enx502df44dbd5f
E: ID_NET_NAME_ONBOARD=end1
E: ID_PATH=platform-428a0000.ethernet
E: ID_PATH_TAG=platform-428a0000_ethernet
E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/end1
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:
Primoz Fiser (2):
net: fec: fec_probe(): Populate netdev of_node
net: stmmac: Populate netdev of_node
drivers/net/ethernet/freescale/fec_main.c | 1 +
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 +
2 files changed, 2 insertions(+)
--
2.34.1
next reply other threads:[~2025-07-17 9:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-17 9:00 Primoz Fiser [this message]
2025-07-17 9:00 ` [PATCH 1/2] net: fec: fec_probe(): Populate netdev of_node Primoz Fiser
2025-07-21 9:44 ` Peng Fan
2025-07-17 9:00 ` [PATCH 2/2] net: stmmac: " Primoz Fiser
2025-07-21 9:47 ` Peng Fan
2025-07-17 14:02 ` [PATCH 0/2] Populate of_node for i.MX netdevs Jakub Kicinski
2025-07-18 5:10 ` Primoz Fiser
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=20250717090037.4097520-1-primoz.fiser@norik.com \
--to=primoz.fiser@norik.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=imx@lists.linux.dev \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shenwei.wang@nxp.com \
--cc=upstream@lists.phytec.de \
--cc=wei.fang@nxp.com \
--cc=xiaoning.wang@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®