[CC'ed to Kettenis in case he doesn't read misc@]
On 3/24/24 20:43, Peter J. Philipp wrote:
On 3/24/24 14:09, Slava Voronzoff wrote:
On Fri, 22 Mar 2024 04:28:15 +0100
"Peter J. Philipp"<p...@delphinusdns.org> wrote:
No I didn't try a newer OBSD, I will soon though. :-) And no I didn't
change anything in the DTB.
While this is an EXTREMELY dirty attempt to add it can you try somehow this
patch for OpenBS-current kernel?
OR try to decompile dtb, edit dts file to change "bflb,bl808-uart" to something
supported generic like ns16550a, recompile it back to dtb and load from OpenBSD's boot
loader
Index: sys/dev/fdt/com_fdt.c
===================================================================
RCS file: /cvs/src/sys/dev/fdt/com_fdt.c,v
retrieving revision 1.9
diff -u -p -r1.9 com_fdt.c
--- sys/dev/fdt/com_fdt.c 31 Jan 2024 01:01:10 -0000 1.9
+++ sys/dev/fdt/com_fdt.c 24 Mar 2024 13:04:37 -0000
@@ -59,7 +59,8 @@ com_fdt_init_cons(void)
(node = fdt_find_cons("ns16550a")) == NULL &&
(node = fdt_find_cons("snps,dw-apb-uart")) == NULL &&
(node = fdt_find_cons("ti,omap3-uart")) == NULL &&
- (node = fdt_find_cons("ti,omap4-uart")) == NULL)
+ (node = fdt_find_cons("ti,omap4-uart")) == NULL &&
+ (node = fdt_find_cons("bflb,bl808-uart")) == NULL)
return;
if (fdt_get_reg(node, 0, ®))
return;
@@ -101,7 +102,8 @@ com_fdt_match(struct device *parent, voi
OF_is_compatible(faa->fa_node, "ns16550a") ||
OF_is_compatible(faa->fa_node, "snps,dw-apb-uart") ||
OF_is_compatible(faa->fa_node, "ti,omap3-uart") ||
- OF_is_compatible(faa->fa_node, "ti,omap4-uart"));
+ OF_is_compatible(faa->fa_node, "ti,omap4-uart") ||
+ OF_is_compatible(faa->fa_node, "bflb,bl808-uart"));
}
void
Hi,
I don't know if it's so simple... but I just finished a bflbuart.c
driver. It is based on the sfuart.c driver and I used the
linux sources, and the bl808 reference manual to guide me.
https://github.com/pbug44/openbsd-src/commit/996f961786d17399d68ef8aef547a10ef22ca82b
However I noticed that there is no PLIC/INTR activity. Does
anyone know if this is due to no clock driver? If so that's
my next thing to do unless someone beats me to it. I have
another question. I added the bflbuart to the files.riscv64
and the Makefile doesn't update in
/sys/arch/riscv64/compile/RAMDISK/obj/Makefile.. I don't know what I
have to do it..for
now I manually updated this file.
Please excuse for the weird formatting. I'm still on thunderbird on
OpenBSD and I'm not fully comfy with it.
Best Regards,
-pjp
Just a small update, this morning I wrote another driver bflbtimer.c
based on sxitimer.c. However there is no interrupts. But I'm glad to
say that I possibly found the problem. It's another T-HEAD problem and
this time it's got to do with Strong-Ordering on mapping data, and the
Ox64, which seems to be a little bit more strict than the Mango Pi. To
do this though the SBI needs to be recompiled and reflashed, I was going
to do this anyhow but now I'm forced to. Here is some developer from
NUTTX documenting his work, which I gladly will learn from.
https://lupyuen.github.io/articles/plic3#enable-strong-order
I'm CC'ing this to Mark Kettenis in case he wanted to be informed on
this. Eventually I may even boot into an Ox64 by end of April! I have
my hopes up. :-)
Best Regards,
-pjp
--
*** I used to sign with -peter, but noticed it's not unique, -pjp may come up
in the future, so please adjust for that ***