Re: StarFive VisionFive 2 support
- In reply to: Colin S. Gordon: "Re: StarFive VisionFive 2 support"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 10 Oct 2023 17:46:59 UTC
On Tue, Oct 10, 2023, Colin S. Gordon wrote: >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. Even GPL-only licensed code seems to be used. For instance a file sys/arm64/rockchip/rk3568_combphy.c refers to sys/contrib/device-tree/include/dt-bindings/phy/phy.h ...though this is probably not desirable at all This is one reason why I've assumed being able to use MIT licensed files might be fine enough for headers. >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). The DMA bug was met already during the initialization of MMC in the boot. But it is dependent on factors related to memory usage, so it's possible that alternative implementations avoid it (...though it may surface later). M. Horne's bug report I linked includes details about the issue. >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. The DTB I use is from Starfive's github (devel branch). As far as I have understood, using DTB files from other projects is OK (and dts files are permissively licensed) – but again, I'm not sure what the prevailing practices are. (there are different DTBs for different revisions of JH7110) I learned it myself hard way during my efforts with JH7100 that switching to the latest DTB available may fix bugs. (I tried to parse a DTB file by myself from Starfive's dts files but it turned out that FreeBSD's dtc program had some syntactical features missing and could not do that. As far as I recall some developers reported the issue forward) -Jari