How to run FreeBSD on new boards built on Rockchip 35XX..

i don't know anything about 15 besides that some includes like clk moved out of extres/ to dev so dev/extres/clk/clk.h becomes dev/clk/clk.h
you may ask jsm I think he is on 15 or 16
 
Anyway,the kind of error that I have displayed before is correlated with the sd card driver used on the Rockchip / Radxa board,that's very fragile. May be that it may be caused almost sure only because of that. Actually I'm using the sd card only for loading the modules and the kernel,but the userland / root partition is stored / loaded inside/from one USB stick that uses a more stable driver. In this way I expect no more crashes of the DRM stack / panfrost driver.
 
At the moment FreeBSD 15.0-RELEASE recognizes the Mali GPU on the Radxa Zero 3W board :

Code:
panfrost0: <Mali Midgard/Bifrost GPU> mem 0xfdea0000-0xfdea3fff irq 19,20,21 on ofwbus0
panfrost0: Mali GPU clock is unknown
device_attach: panfrost0 attach returned 6

but it is not functional yet because of the missing clock:

Code:
panfrost0: Mali GPU clock is unknown

Do you know why ?
 
I repost the DTE_ADDR to offset 0 from the vop, and renables paging.. that seems to work..
vop1 seems to have some iommu control registers in its own register space at offset 0x300
vop2 has no such thing. i don't know how they are suppose to work as they are not used in the linux driver but
https://rockchip.fr/RK3288 TRM/rk3288-chapter-27-visual-output-processor-(vop).pdf (search for dte_addr)
and here https://rockchip.fr/Rockchip RK3399 TRM V1.4 Part1.pdf page 555
 
rockpro64
 

Attachments

  • ss.png
    ss.png
    1.4 MB · Views: 71
Actually I'm trying to merge two scenarios on the radxa zero 3W board :

1) drm / vop2 work with a specific kernel configuration (running with the 15.0-BETA5),but not panfrost.

2) panfrost + iommu v2 work with a different kernel config (running with the 15.0-RELEASE),but without the drm stack and the vop2 driver.

so,for me there is again a lot of work to do...
 
For panfrost on 15 pmap stuff in iommu_pmap.c is renamed to smmu. So pmap_t is struct smmu_pmap *. Pmap lock is included in smmu_pmap_init. The rest is a change from pmap to smmu. No functional changes. I hope to implement iommu at least for version one in a bsd license . Let me know if you need help. Above is from memory but you get the idea.
 
more fun. i found out that the scmi-shmem node can be under /reserved-memory node and not under the sram (mmio-sram)
this is causing scmi driver attach to fail on radxa zero 3 boards.
 
from /usr/src
cpp -I sys/contrib/device-tree/src/arm64/rockchip/ -I. -I sys/contrib/device-tree/include/ -nostdinc -x assembler-with-cpp sys/contrib/device-tree/src/arm64/rockchip/rk3566-radxa-zero-3w.dts |dtc -@ -I dts|dtc -I dtb > /tmp/rk3566-radxa-zero-3w-compiled.dts
 
I've been tempted so hardly and I've bought the "Radxa Cubie A7Z". Do you have or do you know where I can grab the DTB file adapted for FreeBSD ?
 
you probably run a quartz64 cloned dtb i posted here, not the official radxa one

I'm using the dtb file that you gave to me some months ago.It seems to work good. At least,I didn't have to modify it at all to enable DRM and the panfrost driver for FreeBSD 15.0 via separate modules. And I had no problems to enable IOMMU Vers. 2.
 
Back
Top