Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jun 2024 17:40:39 +0200
From:      JMT Sihvola <jsihv@gmx.com>
To:        freebsd-riscv@freebsd.org
Subject:   Re: JH7110 dwc MAC support
Message-ID:  <trinity-e7a78d45-28c3-4905-9504-37475fb12770-1718379639909@3c-app-mailcom-bs01>
In-Reply-To: <7E28ED97-DD4B-40AA-91FB-DB3982042265@mit.edu>
References:  <7E28ED97-DD4B-40AA-91FB-DB3982042265@mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help


> Sent: Friday, June 14, 2024 at 6:06 PM
> From: "John F Carr" <jfc@mit.edu>
> To: "freebsd-riscv@freebsd.org" <freebsd-riscv@FreeBSD.org>
> Subject: JH7110 dwc MAC support
>
> Has anybody gotten the ethernet driver working on this chip?
> It's a DesignWare MAC according to the device tree so if_dwc.c
> should be the starting point.  The driver does not work
> simply by changing the "compatible" string.  It can't find
> the PHY because all the register reads come back 0.  The
> only documentation I can find is the Linux driver source code.
> I can try updating register offsets and command bit patterns
> to match what the Linux driver does with "snps,dwmac-5.20".

JH7110 uses dwmac version 5.2. FreeBSD has codes for 4.x (which is
almost similar) in sys/dev/eqos. JH7110 also uses Motorcomm's
Ethernet-phy version 8531 which currently isn't supported.

I have updated those codes to get network working on JH7110 but
I have not yet submitted them because there is a problem which prevents
changing the Ethernet port on fly. It's possible that this problem is caused
by a bug outside of these drivers. It has been difficult to track it down
but I keep working on with the issue.

I have those updated driver codes in my personal github:
https://github.com/jsihvola/freebsd-src/
See the last commit (otherwise this repository is not up-to-date).

So if you can live with the port switching issue, those codes
should make it possible to get JH7110 online. Also, eqos driver
has some shortcomings, making network speed slower than what it could be.

JH7110 clocks required by Ethernet are available in FreeBSD repository.
GPIO & MMC have been submitted. USB & pinctrl are being worked on.

-jari sihvola




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?trinity-e7a78d45-28c3-4905-9504-37475fb12770-1718379639909>