From nobody Tue Oct 10 14:22:39 2023 X-Original-To: freebsd-riscv@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S4dRC0FBpz4wqMp for ; Tue, 10 Oct 2023 14:23:03 +0000 (UTC) (envelope-from csgordon@fastmail.com) Received: from wnew3-smtp.messagingengine.com (wnew3-smtp.messagingengine.com [64.147.123.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4S4dRB5Wl9z4Pm4 for ; Tue, 10 Oct 2023 14:23:02 +0000 (UTC) (envelope-from csgordon@fastmail.com) Authentication-Results: mx1.freebsd.org; none Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id CA61A2B00127; Tue, 10 Oct 2023 10:23:01 -0400 (EDT) Received: from imap53 ([10.202.2.103]) by compute2.internal (MEProxy); Tue, 10 Oct 2023 10:23:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1696947781; x=1696948381; bh=qp wsnD/cuAmdeUiKh54AaJecrxr+I1rJRUeU/zhYqRs=; b=RrsWKMAFvY/KFWVNLB rR6ZLVMY74WjANdjZZQgDHYdXGbVpgun5ukuBZWE1fxk52oXwrcOtH17UJs2oZgx oOgKG3wONVjLdoCx42IRoScr5Dd9/yk9gD8h42uAKvaO9lZ/JvXj5D4uqVbeU98D 53R3r3XiJofrwDZg2CudBr+1xQyGVNqijEhU/DDM9FVQvLrfIQXKfw792jQ7P+38 gI55EaOWLTmhACk/qVim78MOZvofZQS05D7euaaUWVp326Hw9TLxSfF/L4Lpmed1 lZUfWSdvNASPIo0HI9aUhrr58QvIKUryechzHWqa+zo/RxW0UhIpanVNJDfuSdsJ mCDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=i60c149f6.fm2; t=1696947781; x=1696948381; bh=qpw snD/cuAmdeUiKh54AaJecrxr+I1rJRUeU/zhYqRs=; b=aVru7FnPRc4O2m2+h7H ilhG4Y9oSVsoHEzsF4nl2/YbzmmZtz5VeaIPGwb2pz6jVCGQBkGdvnZK0d83uoaJ Y/J8/bAVti5Mm2vjOzU/8EKNJbe9yZnT6ZtsFZ5p5jJH0BhgD02Xagz+WyZ0YCMc jYE10yXpldSyfdieqKDfx/kb0dHmioe4oR/j/I8kXU725JEABrD3nlr/p2IMhURj rFTzJiyibxUtS9gWqtS+bHd7qIKG3w5apv48/7rqIaFDtMs3F9oxZ1tMB37iDrei C4qcDp1Unj3ciR6XB7feEOECGGebAM3phAI3K0LUK5IYWae0mlhMfdGVLp5PtOeY DgA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrheehgdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsegrtderreerreejnecuhfhrohhmpedfveholhhi nhcuufdrucfiohhrughonhdfuceotghsghhorhguohhnsehfrghsthhmrghilhdrtghomh eqnecuggftrfgrthhtvghrnhepgffgtdetheeghfevgfeftdevvdekfedvgeeugeejudei geevledvteegheeggfdvnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegtshhgohhrughonhes fhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: i60c149f6:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id EEA8E3640069; Tue, 10 Oct 2023 10:23:00 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-958-g1b1b911df8-fm-20230927.002-g1b1b911d List-Id: FreeBSD on the RISC-V instruction set architecture List-Archive: https://lists.freebsd.org/archives/freebsd-riscv List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-riscv@freebsd.org X-BeenThere: freebsd-riscv@freebsd.org MIME-Version: 1.0 Message-Id: <7f59abe7-11ee-4efe-9688-28e5722fec9a@app.fastmail.com> In-Reply-To: References: <55416c03-c838-46d5-8f18-f6eb1657f4a5@app.fastmail.com> Date: Tue, 10 Oct 2023 09:22:39 -0500 From: "Colin S. Gordon" To: "JMT Sihvola" , freebsd-riscv@freebsd.org Subject: Re: StarFive VisionFive 2 support Content-Type: multipart/alternative; boundary=65b2f5a2657247728ae76e4743e95f81 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:29838, ipnet:64.147.123.0/24, country:US] X-Rspamd-Queue-Id: 4S4dRB5Wl9z4Pm4 --65b2f5a2657247728ae76e4743e95f81 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Jari, That's awesome work!=20 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 cha= nges. It looks like I did at least partly duplicate your work with the d= wmmc driver (https://github.com/csgordon/freebsd-starfive2/commit/fd72e1= e25f5b29ed991d4417c458607d4dbc1b50#diff-d360fe7dc1bc197a1617d90236841797= 881672100cd60e466bacfd60c1dcc3b4), which I mostly adapted from one of th= e 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 optim= istic mine will also work (going to try an install to eMMC after this em= ail). It doesn't have any actual driver support beyond serial (though us= ing 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=E2=80=AFAM 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. Recen= tly it was recommended to me that I check here whether anyone else was w= orking on this before I got too far, to avoid duplicating and work. >=20 > I've had JH7110's FreeBSD support as my project to learn kernel develo= pment. >=20 > Here is my github repository: > https://github.com/jsihvola/freebsd-src/ >=20 > I have written preliminary drivers for GPIO, reset and clock gen > and now it boots. >=20 > (Unfortunately I wasn't aware of M. Horne's DMA fix for MMC and spent = around a=20 > month fixing it by myself (I only should have gone through his old Git= hub=20 > repository more carefully...)) >=20 > For last weeks I've been working with Ethernet driver (gmac4 devices a= re=20 > supported in FreeBSD (/sys/dev/eqos) but JH7110 needs more code...) >=20 > Being busy with all this stuff I haven't _yet_ inspected Robn's Github=20 > repository, but I'm aware of it. >=20 > So be free to use my codes. And I hope we can communicate for a more=20 > coordinated JH7110 development effort. >=20 > -Jari Sihvola >=20 > -- > jsihv@gmx.com > la_mettrie @libera > la_mttrie @EFNET >=20 --65b2f5a2657247728ae76e4743e95f81 Content-Type: text/html;charset=utf-8 Content-Transfer-Encoding: quoted-printable
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 c= hanges. It looks like I did at least partly duplicate your work with the= dwmmc driver (https://github.com/csgord= on/freebsd-starfive2/commit/fd72e1e25f5b29ed991d4417c458607d4dbc1b50#dif= f-d360fe7dc1bc197a1617d90236841797881672100cd60e466bacfd60c1dcc3b4),= which I mostly adapted from one of the existing drivers.  I'll als= o 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 n= eeds 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 be= yond serial (though using the live system to poke at the hardware has be= en very useful to me).

-Colin

On Tue, Oct 10, 2023, at 06:43, JMT Sihvola wrote:
On Tue, Oct 10, = 2023 at 3:03=E2=80=AFAM Colin S. Gordon wrote:
>I've be= en looking at support for the StarFive VisionFive 2 off and on for the l= ast 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 repos= itory:

<= div>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 dr= iver (gmac4 devices are 
supported in FreeBSD (/sys/d= ev/eqos) but JH7110 needs more code...)

Bei= ng 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 mo= re 
coordinated JH7110 development effort.
<= div>
-Jari Sihvola

--
= la_mettrie @libera
la_mttrie @EFNET


--65b2f5a2657247728ae76e4743e95f81--