Date: Tue, 10 Oct 2023 12:03:08 -0500 From: "Colin S. Gordon" <csgordon@fastmail.com> To: "JMT Sihvola" <jsihv@gmx.com>, freebsd-riscv@freebsd.org Subject: Re: StarFive VisionFive 2 support Message-ID: <6c0ddf11-b9c9-4861-affc-7f21e82df755@app.fastmail.com> In-Reply-To: <trinity-72a4ce22-a269-4916-963b-ae24f5c1410f-1696950977207@3c-app-mailcom-bs09> References: <55416c03-c838-46d5-8f18-f6eb1657f4a5@app.fastmail.com> <trinity-2e0070c2-eb6e-4934-ac6b-78688009c627-1696938230097@3c-app-mailcom-bs01> <7f59abe7-11ee-4efe-9688-28e5722fec9a@app.fastmail.com> <trinity-72a4ce22-a269-4916-963b-ae24f5c1410f-1696950977207@3c-app-mailcom-bs09>
next in thread | previous in thread | raw e-mail | index | archive | help
--45102aa67e8d43f5a0e4bf4e18079fc8 Content-Type: text/plain I agree some clarity on the licensing issue would be nice. It seems clear that GPL-only licensed code isn't allowed in the kernel, but if MIT-licensed code (and dual-licensed including an MIT option) is then that would simplify things greatly. I currently don't have proper clock support, though it looks like that part of your work is under BSD, so I'll grab that rather than writing my own from scratch. I haven't hit the DMA bug you noted yet, but I also haven't really done much with the filesystem yet (in particular, I haven't done much *writing* to the disk yet, just basic tests, and haven't built install media yet --- bsdinstall fails for me currently because it can't create files it wants in a read-only memory disk). I guess the other operative question is: which dtb are you using? I see you have one checked in --- where did it come from? OpenBSD for a while only supported one particular dtb which was *not* one of the ones from the StarFive public releases on Github, and I've been working with the one that I know works for OpenBSD. I can trace lookup failure for the biu and ciu clocks through to a missing property in the dtb I'm using (#clock-names) and then to some kind of misinterpretation I haven't debugged yet when I manually add that property to the mmc nodes. -Colin On Tue, Oct 10, 2023, at 10:16, JMT Sihvola wrote: > > Colin S. Gordon wrote: > >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. > > So far I've not quite grasped what is FreeBSD's stance on this issue. > Some of my question on IRC have gone unanswered but I've got a picture > that some dual-licensed files are used as such. I myself extracted > some of the most important header code and used it under MIT > license (naturally giving credits to the original author). > > Colin S. Gordon wrote: > >It looks like I did at least partly duplicate your work with the dwmmc driver(https://github.com/csgordon/freebsd-starfive2/commit/fd7 > >00cd60e466bacfd60c1dcc3b4 [github.com]), 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. > > Oddly enough, for me MMC didn't require any additional code beyond offering > clocks, (maybe the reset driver) and fixing that DMA bug which was > initially reported here: > https://reviews.freebsd.org/D34118 > > ...and which I re-reported here: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273694 > > I don't recall having any issues with biu and ciu clocks, so I'm not > sure what that is about. > > -Jari > > --45102aa67e8d43f5a0e4bf4e18079fc8 Content-Type: text/html Content-Transfer-Encoding: quoted-printable <!DOCTYPE html><html><head><title></title><style type=3D"text/css">p.Mso= Normal,p.MsoNoSpacing{margin:0} p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>I agree so= me clarity on the licensing issue would be nice. It seems clear that GPL= -only licensed code isn't allowed in the kernel, but if MIT-licensed cod= e (and dual-licensed including an MIT option) is then that would simplif= y things greatly.<br></div><div><br></div><div>I currently don't have pr= oper clock support, though it looks like that part of your work is under= BSD, so I'll grab that rather than writing my own from scratch. I haven= 't hit the DMA bug you noted yet, but I also haven't really done much wi= th the filesystem yet (in particular, I haven't done much *writing* to t= he disk yet, just basic tests, and haven't built install media yet --- b= sdinstall fails for me currently because it can't create files it wants = in a read-only memory disk).<br></div><div><br></div><div>I guess the ot= her operative question is: which dtb are you using? I see you have one c= hecked in --- where did it come from? OpenBSD for a while only supported= one particular dtb which was *not* one of the ones from the StarFive pu= blic releases on Github, and I've been working with the one that I know = works for OpenBSD. I can trace lookup failure for the biu and ciu clocks= through to a missing property in the dtb I'm using (#clock-names) and t= hen to some kind of misinterpretation I haven't debugged yet when I manu= ally add that property to the mmc nodes.<br></div><div><br></div><div>-C= olin<br></div><div><br></div><div>On Tue, Oct 10, 2023, at 10:16, JMT Si= hvola wrote:<br></div><blockquote type=3D"cite" id=3D"qt" style=3D""><di= v><br></div><div>Colin S. Gordon wrote:<br></div><div>>I see some GPL= and MIT license headers in your current changes, which I'm trying to av= oid, but I'll gladly build on some of the BSD-licensed<br></div><div>cha= nges.<br></div><div><br></div><div>So far I've not quite grasped what is= FreeBSD's stance on this issue.<br></div><div>Some of my question on IR= C have gone unanswered but I've got a picture<br></div><div>that some du= al-licensed files are used as such. I myself extracted<br></div><div>som= e of the most important header code and used it under MIT<br></div><div>= license (naturally giving credits to the original author).<br></div><div= ><br></div><div>Colin S. Gordon wrote:<br></div><div>>It looks like I= did at least partly duplicate your work with the dwmmc driver(<a href=3D= "https://github.com/csgordon/freebsd-starfive2/commit/fd7">https://githu= b.com/csgordon/freebsd-starfive2/commit/fd7</a><br></div><div>>00cd60= e466bacfd60c1dcc3b4 [github.com]), which I mostly adapted from one of th= e existing drivers. I'll also take a look at M. Horne's code, I wa= sn't aware of that myself.<br></div><div><br></div><div>Oddly enough, fo= r me MMC didn't require any additional code beyond offering <br></d= iv><div>clocks, (maybe the reset driver) and fixing that DMA bug which w= as <br></div><div>initially reported here:<br></div><div><a href=3D= "https://reviews.freebsd.org/D34118">https://reviews.freebsd.org/D34118<= /a><br></div><div><br></div><div>...and which I re-reported here:<br></d= iv><div><a href=3D"https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D2= 73694">https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273694</a><br= ></div><div><br></div><div>I don't recall having any issues with biu and= ciu clocks, so I'm not<br></div><div>sure what that is about.<br></div>= <div><br></div><div>-Jari<br></div><div><br></div><div><br></div></block= quote><div><br></div></body></html> --45102aa67e8d43f5a0e4bf4e18079fc8--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6c0ddf11-b9c9-4861-affc-7f21e82df755>