<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/net/fec_mxc.c, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>treewide: Clean up DECLARE_GLOBAL_DATA_PTR usage</title>
<updated>2026-02-17T19:50:22+00:00</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2026-02-09T01:30:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0f90b1e715f8abe41b0875752eb184f46032ff11'/>
<id>0f90b1e715f8abe41b0875752eb184f46032ff11</id>
<content type='text'>
Remove DECLARE_GLOBAL_DATA_PTR from files where gd is not used, and
drop the unnecessary inclusion of asm/global_data.h.

Headers should be included directly by the files that need them,
rather than indirectly via global_data.h.

Reviewed-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt; #STMicroelectronics boards and STM32MP1 ram test driver
Tested-by: Anshul Dalal &lt;anshuld@ti.com&gt; #TI boards
Acked-by: Yao Zi &lt;me@ziyao.cc&gt; #TH1520
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove DECLARE_GLOBAL_DATA_PTR from files where gd is not used, and
drop the unnecessary inclusion of asm/global_data.h.

Headers should be included directly by the files that need them,
rather than indirectly via global_data.h.

Reviewed-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt; #STMicroelectronics boards and STM32MP1 ram test driver
Tested-by: Anshul Dalal &lt;anshuld@ti.com&gt; #TI boards
Acked-by: Yao Zi &lt;me@ziyao.cc&gt; #TH1520
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: fec_mxc: Add support for i.MX91</title>
<updated>2026-02-06T23:29:30+00:00</updated>
<author>
<name>Primoz Fiser</name>
<email>primoz.fiser@norik.com</email>
</author>
<published>2026-01-29T07:52:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1a79ea5b36e1410ff7f551bcb2cc542185371586'/>
<id>1a79ea5b36e1410ff7f551bcb2cc542185371586</id>
<content type='text'>
The i.MX91 SoC reuses the ENET FEC from i.MX93. Add all required driver
checks to make it work also on the i.MX91 based platforms.

Signed-off-by: Primoz Fiser &lt;primoz.fiser@norik.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The i.MX91 SoC reuses the ENET FEC from i.MX93. Add all required driver
checks to make it work also on the i.MX91 based platforms.

Signed-off-by: Primoz Fiser &lt;primoz.fiser@norik.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: fec_mxc.c: improve readability of dm_fec_bind_mdio</title>
<updated>2025-11-29T20:06:39+00:00</updated>
<author>
<name>Markus Niebel</name>
<email>Markus.Niebel@ew.tq-group.com</email>
</author>
<published>2025-11-21T17:34:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=349288b7b9d90776bd5d7554648dcab075b8880a'/>
<id>349288b7b9d90776bd5d7554648dcab075b8880a</id>
<content type='text'>
The last parameter to device_bind_driver_to_node is optional.
Since the returned information is not used and overwritten by
uclass_get_device_by_ofnode just provide NULL as parameter.

Signed-off-by: Markus Niebel &lt;Markus.Niebel@ew.tq-group.com&gt;
Signed-off-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Signed-off-by: Alexander Feilke &lt;alexander.feilke@ew.tq-group.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The last parameter to device_bind_driver_to_node is optional.
Since the returned information is not used and overwritten by
uclass_get_device_by_ofnode just provide NULL as parameter.

Signed-off-by: Markus Niebel &lt;Markus.Niebel@ew.tq-group.com&gt;
Signed-off-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Signed-off-by: Alexander Feilke &lt;alexander.feilke@ew.tq-group.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: fec_mxc: add unique bus and device names for DM_MDIO</title>
<updated>2025-11-29T20:06:34+00:00</updated>
<author>
<name>Markus Niebel</name>
<email>Markus.Niebel@ew.tq-group.com</email>
</author>
<published>2025-11-21T17:34:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c5d3f7ac8e78d199cd961bee2c3f63726a1c4c69'/>
<id>c5d3f7ac8e78d199cd961bee2c3f63726a1c4c69</id>
<content type='text'>
When using DM_MDIO on SOC with more than one FEC and not sharing the MDIO
bus the name of the driver and the bus needs to be unique. Since name
used in device_bind_driver_to_node needs to be a static string, add the
string to the fec_priv struct and reuse fec_set_dev_name to generate the
name with the device sequence number.

Fixes: 3b8f99a3e762 ("net: fec: add support for DM_MDIO")

Signed-off-by: Markus Niebel &lt;Markus.Niebel@ew.tq-group.com&gt;
Signed-off-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Signed-off-by: Alexander Feilke &lt;alexander.feilke@ew.tq-group.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using DM_MDIO on SOC with more than one FEC and not sharing the MDIO
bus the name of the driver and the bus needs to be unique. Since name
used in device_bind_driver_to_node needs to be a static string, add the
string to the fec_priv struct and reuse fec_set_dev_name to generate the
name with the device sequence number.

Fixes: 3b8f99a3e762 ("net: fec: add support for DM_MDIO")

Signed-off-by: Markus Niebel &lt;Markus.Niebel@ew.tq-group.com&gt;
Signed-off-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Signed-off-by: Alexander Feilke &lt;alexander.feilke@ew.tq-group.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: fec_mxc: fix usage of DM_MDIO and DM_ETH_PHY</title>
<updated>2025-11-29T20:06:30+00:00</updated>
<author>
<name>Markus Niebel</name>
<email>Markus.Niebel@ew.tq-group.com</email>
</author>
<published>2025-11-21T17:34:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f4434ae02d5f96016cdad5e69862bf5139745e30'/>
<id>f4434ae02d5f96016cdad5e69862bf5139745e30</id>
<content type='text'>
If DM_ETH_PHY is used and the FEC instance owns the shared MDIO bus,
eth_phy_get_mdio_bus returns NULL. If DM_MDIO bus is used, the
mdio_register API is called from dm_mdio_post_probe. Therefore the
bus should must be queried by name in this case.

For DM_MDIO case fec_mii_setspeed has already being called in
dm_fec_mdio_probe(), so skip setting this again.

Fixes: 3b8f99a3e762 ("net: fec: add support for DM_MDIO")
Fixes: e75d08821574 ("net: fec-mxc: prevent crash if no MAC address is set")

Signed-off-by: Markus Niebel &lt;Markus.Niebel@ew.tq-group.com&gt;
Signed-off-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Signed-off-by: Alexander Feilke &lt;alexander.feilke@ew.tq-group.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If DM_ETH_PHY is used and the FEC instance owns the shared MDIO bus,
eth_phy_get_mdio_bus returns NULL. If DM_MDIO bus is used, the
mdio_register API is called from dm_mdio_post_probe. Therefore the
bus should must be queried by name in this case.

For DM_MDIO case fec_mii_setspeed has already being called in
dm_fec_mdio_probe(), so skip setting this again.

Fixes: 3b8f99a3e762 ("net: fec: add support for DM_MDIO")
Fixes: e75d08821574 ("net: fec-mxc: prevent crash if no MAC address is set")

Signed-off-by: Markus Niebel &lt;Markus.Niebel@ew.tq-group.com&gt;
Signed-off-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Signed-off-by: Alexander Feilke &lt;alexander.feilke@ew.tq-group.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: fec_mxc: rewrite fallback MDIO Bus allocation</title>
<updated>2025-11-29T20:06:26+00:00</updated>
<author>
<name>Markus Niebel</name>
<email>Markus.Niebel@ew.tq-group.com</email>
</author>
<published>2025-11-21T17:34:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fc199c481c6a0737d4020ea0cbbab84a2d87b1fd'/>
<id>fc199c481c6a0737d4020ea0cbbab84a2d87b1fd</id>
<content type='text'>
The code should only be executed if MDIO bus is not assigned.
Otherwise the already assigned / allocated bus will be overwritten.
Add condition check and simplify the code to make it more readable.

Signed-off-by: Markus Niebel &lt;Markus.Niebel@ew.tq-group.com&gt;
Signed-off-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Signed-off-by: Alexander Feilke &lt;alexander.feilke@ew.tq-group.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The code should only be executed if MDIO bus is not assigned.
Otherwise the already assigned / allocated bus will be overwritten.
Add condition check and simplify the code to make it more readable.

Signed-off-by: Markus Niebel &lt;Markus.Niebel@ew.tq-group.com&gt;
Signed-off-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Signed-off-by: Alexander Feilke &lt;alexander.feilke@ew.tq-group.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: fec_mxc: fix remove with DM_MDIO</title>
<updated>2025-11-29T17:42:26+00:00</updated>
<author>
<name>Markus Niebel</name>
<email>Markus.Niebel@ew.tq-group.com</email>
</author>
<published>2025-11-21T17:34:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=aafdd856941f1ab390db4bbf3105c5480f03397b'/>
<id>aafdd856941f1ab390db4bbf3105c5480f03397b</id>
<content type='text'>
If DM_MDIO is used and the FEC device is removed the mdio API
must not be used to remove the bus structure. Store pointer the
the udevice for MDIO bus created by dm_fec_bind_mdio and use DM
functions to cleanup the device in fecmxc_remove.

Fixes: 3b8f99a3e762 ("net: fec: add support for DM_MDIO")

Signed-off-by: Markus Niebel &lt;Markus.Niebel@ew.tq-group.com&gt;
Signed-off-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Signed-off-by: Alexander Feilke &lt;alexander.feilke@ew.tq-group.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If DM_MDIO is used and the FEC device is removed the mdio API
must not be used to remove the bus structure. Store pointer the
the udevice for MDIO bus created by dm_fec_bind_mdio and use DM
functions to cleanup the device in fecmxc_remove.

Fixes: 3b8f99a3e762 ("net: fec: add support for DM_MDIO")

Signed-off-by: Markus Niebel &lt;Markus.Niebel@ew.tq-group.com&gt;
Signed-off-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Signed-off-by: Alexander Feilke &lt;alexander.feilke@ew.tq-group.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: fec_mxc: fix probe of MDIO bus for DM_MDIO</title>
<updated>2025-11-29T17:42:26+00:00</updated>
<author>
<name>Markus Niebel</name>
<email>Markus.Niebel@ew.tq-group.com</email>
</author>
<published>2025-11-21T17:34:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=206f38e8dd33371ec383ae73c07adb76b7b7abcb'/>
<id>206f38e8dd33371ec383ae73c07adb76b7b7abcb</id>
<content type='text'>
When initializing the MDIO bus the MDC signal needs to be configured.
Otherwise the communication over the bus may fail. Add the call to
fec_mii_setspeed to the DM_MDIO probe handler.

Fixes: 3b8f99a3e762 ("net: fec: add support for DM_MDIO")

Signed-off-by: Markus Niebel &lt;Markus.Niebel@ew.tq-group.com&gt;
Signed-off-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Signed-off-by: Alexander Feilke &lt;alexander.feilke@ew.tq-group.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When initializing the MDIO bus the MDC signal needs to be configured.
Otherwise the communication over the bus may fail. Add the call to
fec_mii_setspeed to the DM_MDIO probe handler.

Fixes: 3b8f99a3e762 ("net: fec: add support for DM_MDIO")

Signed-off-by: Markus Niebel &lt;Markus.Niebel@ew.tq-group.com&gt;
Signed-off-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Signed-off-by: Alexander Feilke &lt;alexander.feilke@ew.tq-group.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: fec-mxc: prevent crash if no MAC address is set</title>
<updated>2025-11-29T17:42:26+00:00</updated>
<author>
<name>Markus Niebel</name>
<email>Markus.Niebel@ew.tq-group.com</email>
</author>
<published>2025-11-21T17:34:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2aa6880bc582da6f4846e277d63818b059e3dcd0'/>
<id>2aa6880bc582da6f4846e277d63818b059e3dcd0</id>
<content type='text'>
If no MAC address can be found (either in ROM, device tree or env),
the post_probe of an ethernet device will fail and therefore
the device cannot be instantiated.

The DM_ETH_PHY (eth-phy-uclass) use case must not be mixed with
using CONFIG_FEC_MXC_MDIO_BASE.

This prevents following error for MAC not fused, no eth[1]addr
env is present and providing a random MAC is disabled:

Net:
Error: ethernet@5b040000 address not set.

Error: ethernet@5b040000 address not set.
FEC: can't find phy-handle
"Error" handler, esr 0xbf000002
elr: 000000008004e4b8 lr : 000000008004e4b4 (reloc)
elr: 00000000bfe984b8 lr : 00000000bfe984b4
x0 : 0000000000000000 x1 : 0000000000000020
x2 : 00000000bbe61e50 x3 : 00000000bbe6e1a0
x4 : 0000000000000020 x5 : 0000000000000020
x6 : 000000000000000a x7 : 0000000000000000
x8 : 0000000000000000 x9 : 0000000000000008
x10: 00000000ffffffd8 x11: 0000000000000006
x12: 000000000001869f x13: 0000000000002c50
x14: 0000000000000000 x15: 00000000ffffffff
x16: 0000000000000000 x17: 0000000000000000
x18: 00000000bbe61d98 x19: 00000000bbe4fa68
x20: 00000000bbe78c10 x21: 00000000bbe6e460
x22: 00000000bbe78c10 x23: 00000000bbe91780
x24: 00000000bbe6e510 x25: 00000000000001f8
x26: 00000000ffff8000 x27: 0000000000000000
x28: 0000000000000000 x29: 00000000bbe4fa10

Code: f900003f 9100a3a1 97ffff6e 35000100 (f94017a1)
Resetting CPU ...

Signed-off-by: Markus Niebel &lt;Markus.Niebel@ew.tq-group.com&gt;
Signed-off-by: Alexander Feilke &lt;alexander.feilke@ew.tq-group.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If no MAC address can be found (either in ROM, device tree or env),
the post_probe of an ethernet device will fail and therefore
the device cannot be instantiated.

The DM_ETH_PHY (eth-phy-uclass) use case must not be mixed with
using CONFIG_FEC_MXC_MDIO_BASE.

This prevents following error for MAC not fused, no eth[1]addr
env is present and providing a random MAC is disabled:

Net:
Error: ethernet@5b040000 address not set.

Error: ethernet@5b040000 address not set.
FEC: can't find phy-handle
"Error" handler, esr 0xbf000002
elr: 000000008004e4b8 lr : 000000008004e4b4 (reloc)
elr: 00000000bfe984b8 lr : 00000000bfe984b4
x0 : 0000000000000000 x1 : 0000000000000020
x2 : 00000000bbe61e50 x3 : 00000000bbe6e1a0
x4 : 0000000000000020 x5 : 0000000000000020
x6 : 000000000000000a x7 : 0000000000000000
x8 : 0000000000000000 x9 : 0000000000000008
x10: 00000000ffffffd8 x11: 0000000000000006
x12: 000000000001869f x13: 0000000000002c50
x14: 0000000000000000 x15: 00000000ffffffff
x16: 0000000000000000 x17: 0000000000000000
x18: 00000000bbe61d98 x19: 00000000bbe4fa68
x20: 00000000bbe78c10 x21: 00000000bbe6e460
x22: 00000000bbe78c10 x23: 00000000bbe91780
x24: 00000000bbe6e510 x25: 00000000000001f8
x26: 00000000ffff8000 x27: 0000000000000000
x28: 0000000000000000 x29: 00000000bbe4fa10

Code: f900003f 9100a3a1 97ffff6e 35000100 (f94017a1)
Resetting CPU ...

Signed-off-by: Markus Niebel &lt;Markus.Niebel@ew.tq-group.com&gt;
Signed-off-by: Alexander Feilke &lt;alexander.feilke@ew.tq-group.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: fec_mxc: respect return value of phy_config</title>
<updated>2025-11-29T17:42:26+00:00</updated>
<author>
<name>Markus Niebel</name>
<email>Markus.Niebel@ew.tq-group.com</email>
</author>
<published>2025-11-21T17:34:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4253b90923f3426caf6514448590b3582b90a86b'/>
<id>4253b90923f3426caf6514448590b3582b90a86b</id>
<content type='text'>
phy_config may fail - for instance in parsing device tree.
This should be handled correctly. So return errors from
phy_config to caller.

Signed-off-by: Markus Niebel &lt;Markus.Niebel@ew.tq-group.com&gt;
Signed-off-by: Alexander Feilke &lt;alexander.feilke@ew.tq-group.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
phy_config may fail - for instance in parsing device tree.
This should be handled correctly. So return errors from
phy_config to caller.

Signed-off-by: Markus Niebel &lt;Markus.Niebel@ew.tq-group.com&gt;
Signed-off-by: Alexander Feilke &lt;alexander.feilke@ew.tq-group.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
