January 23, 2023

Orange Pi R1 Plus LTS (RK3328) - The NetBSD device table

We tried booting the stock ROCK64 image and learned a bit about what device table it wants to use:
fdt_addr_r=0x01f00000
fdtcontroladdr=3df051c8
fdtfile=rockchip/rk3328-rock64.dtb
kernel_addr_r=0x02000000
I take a look at the NetBSD sources on Git:
cd /u1/NetBSD/Git/src/sys/arch/arm/dts
ls -l rk*
-rw-r--r-- 1 tom tom 1866 Jan 15 19:03 rk3399-crypto.dtsi
-rw-r--r-- 1 tom tom 3970 Jan 15 19:03 rk3399-rockpro64.dts
That's right. There is nothing there for "rk3328-rock64". Also worth noting is that the ROCK64 image used a 2017 vintage U-boot image (despite a caution I saw elswhere that suggested using 2018 or later). Perhaps it can be found in this fellows Github fork of NetBSD for the ROCK64: These have been inactive since June of 2018. And no rk3328 dts files that I can find. What about a good old Google search for rk3328-rock64.dts?

Where the heck is:

src/sys/arch/arm/dts/rk3328-rock64.dts

It does turn up mention for the very path I am looking for, along with a note from 2018 that support had been added to "NetBSD-current"

The CVS log has this entry:
Pull up following revision(s) (requested by jmcneill in ticket #545):
	sys/arch/arm/dts/rk3328.dtsi: revision 1.2
	sys/dev/fdt/dwc3_fdt.c: revision 1.8
	sys/arch/arm/dts/rk3328-rock64.dts: revision 1.5

The sun rises on a new day

Let's see what good old "locate" will turn up for us:
locate rk3328-rock64 | grep BSD
/u1/BSD/NetBSD-git/sys/arch/arm/dts/rk3328-rock64.dts
/u1/BSD/NetBSD-git/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
/u1/NetBSD/Git/src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
This bears some explaining. I have two copies of the NetBSD source from github, cloned at different times. This is due to my own neglect, but it is telling me something interesting here. The older copy shows the file of interest in two places. One is the expected location in sys/arch/arm/dts -- but that copy is gone in the current NetBSD.
Have any comments? Questions? Drop me a line!

Tom's electronics pages / [email protected]