Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

sunxi_emac: H3 w/ internal PHY breakage



Hi,

v1.19 moved the MAC soft reset into sunxi_emac_init_locked. Initially
experienced on FreeBSD once I ported this change, but I tested NetBSD
(because I use it on an OrangePi R1) to exhibit the same behavior:
some link changes and down/up on the interface will somewhat reliably
break emac0.

I propose the following change (patch against NetBSD at [1]) to revert
the move and instead assert the ephy reset before de-asserting it
again in sunxi_emac_setup_resources. U-Boot leaves it asserted upon
exit, and this is somewhat non-trivial to fix for both non-EFI and EFI
cases. However, forcing the ephy reset clears up the soft reset
timeout at boot w/ no link while leaving a stable emac0.

I've committed the same change to FreeBSD and have not yet had any
issues with it, but further testing would be appreciated.

Thanks,

Kyle Evans

[1] https://people.freebsd.org/~kevans/netbsd-intphy.diff


Home | Main Index | Thread Index | Old Index