Port-arm archive

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

Re: PINE H64 MODEL B emac0 rgephy fail to autoconfigure

(I resend this mail as previous one has gone somewhere.)

On Sun, Mar 7, 2021 at 8:45 PM Shoichi Miyake <shoichi.miyake%gmail.com@localhost> wrote:
> Hi, allow me to ask PINE H64 status.
> Last week, I got a PINE H64 MODEL-B and tried the image from armbsd.org
> - NetBSD-9-aarch64-202103041240Z-pine-h64
> - NetBSD-HEAD-aarch64-202103042000Z-pine-h64
> Both images failed to attach emac0 as:
> emac0 at simplebus1: EMAC
> emac0: Ethernet address f2:00:26:dd:40:ef
> emac0: interrupting on GIC irq 44
> emac0: autoconfiguration error: no PHY found!
> According to wifi.netbsd.org/ports/evbarm/allwinner, sun50i gbe seems to work.
> Did anybody try H64 and check emac0 working?
> Best regards,
> Shoichi Miyake


I saw similar failure on my NanoPi NEO.
The emac(4) on my NanoPi NEO fails to reset the chip with
following debug dmesg when ifconfig it up.

> [ 313.1986972] emac0: soft reset timed out

This problem happens when it's connected to some particular hubs
or the ethernet cable is not connected.
Once this problem happens, the chip cannot communicate and finally
the kernel panics. It looks like someone breaks memories.

Comparing with OpenBSD's dev/fdt/if_dwxe.c, NetBSD's sunxi_emac.c does
chip reset in sunxi_init_locked, not in sunxi_emac_attach.
It means that init clears PHY (if necessary) and DMA configurations
set up in attach.

I'm *not sure* I do correct thing but it works by moving
sunxi_emac_reset in sunxi_emac_init_locked to after
sunxi_emac_setup_resources in sunxi_emac_attach.

Home | Main Index | Thread Index | Old Index