Re: StarFive VisionFive 2 support

From: Colin S. Gordon <csgordon_at_fastmail.com>
Date: Tue, 10 Oct 2023 14:22:39 UTC
Hi Jari,

That's awesome work! 

I see some GPL and MIT license headers in your current changes, which I'm trying to avoid, but I'll gladly build on some of the BSD-licensed changes. It looks like I did at least partly duplicate your work with the dwmmc driver (https://github.com/csgordon/freebsd-starfive2/commit/fd72e1e25f5b29ed991d4417c458607d4dbc1b50#diff-d360fe7dc1bc197a1617d90236841797881672100cd60e466bacfd60c1dcc3b4), which I mostly adapted from one of the existing drivers.  I'll also take a look at M. Horne's code, I wasn't aware of that myself.

Robn's repository is a way to repackage FreeBSD's RISC-V release images to use a uzip-compressed memory disk to boot while it lacked support for SD card --- it looks like your branch no longer needs it, and I'm optimistic mine will also work (going to try an install to eMMC after this email). It doesn't have any actual driver support beyond serial (though using the live system to poke at the hardware has been very useful to me).

-Colin

On Tue, Oct 10, 2023, at 06:43, JMT Sihvola wrote:
> On Tue, Oct 10, 2023 at 3:03 AM Colin S. Gordon wrote:
> >I've been looking at support for the StarFive VisionFive 2 off and on for the last few weeks, using the OpenBSD support as a reference. Recently it was recommended to me that I check here whether anyone else was working on this before I got too far, to avoid duplicating and work.
> 
> I've had JH7110's FreeBSD support as my project to learn kernel development.
> 
> Here is my github repository:
> https://github.com/jsihvola/freebsd-src/
> 
> I have written preliminary drivers for GPIO, reset and clock gen
> and now it boots.
> 
> (Unfortunately I wasn't aware of M. Horne's DMA fix for MMC and spent around a 
> month fixing it by myself (I only should have gone through his old Github 
> repository more carefully...))
> 
> For last weeks I've been working with Ethernet driver (gmac4 devices are 
> supported in FreeBSD (/sys/dev/eqos) but JH7110 needs more code...)
> 
> Being busy with all this stuff I haven't _yet_ inspected Robn's Github 
> repository, but I'm aware of it.
> 
> So be free to use my codes. And I hope we can communicate for a more 
> coordinated JH7110 development effort.
> 
> -Jari Sihvola
> 
> --
> jsihv@gmx.com
> la_mettrie @libera
> la_mttrie @EFNET
>