rockchip-s is probably the cheapest arm64 board
usb, sdcard, ethernet, uart work
most of the changes are ported from linux and openbsd
the rk3308_cru.c file is basically generated with a set of conversion cpp macros (convert linux macros to freebsd macros)
the regulator-pwm is crude and only supports continuous mode
setting cpu frequency works
temperature reading works
ethernet media autoselect does not work
with older u-boot 2017 ethernet does not work (phy regulator seems down)
Details
you need to build u-boot from git with rock-pi-s-rk3308_defconfig + EFI support
preloader and trust.img are from rockchip (there is no public source code for bl31), then use rk-loaderimage (ports) to convert u-boot-dtb.bin into u-boot.img
i built a 13.x kernel and it works (all the files in the diff are from -CURRENT but they are mostly the same as 13.2 )
u-boot binaries available here link
disk layout is similar to other rockchip sbcs, you need 16MB of empty space before the first/efi partition
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
sys/arm64/conf/std.rockchip | ||
---|---|---|
10 | Sort this list and remove the extra white line? | |
sys/arm64/rockchip/clk/rk3308_cru.c | ||
1 | Add a copyright header? | |
sys/arm64/rockchip/if_dwc_rk.c | ||
2 | we don't use BSD-2-Clause-FreeBSD anymore, just BSD-2-Clause is fine. | |
sys/arm64/rockchip/rk_pwm.c | ||
2 | BSD-2-Clause | |
sys/arm64/rockchip/rk_spi.c | ||
2 | BSD-2-Clause | |
sys/conf/files.arm64 | ||
693 | sort the list. | |
sys/dev/extres/regulator/regulator_pwm.c | ||
1 | Please add a copyright header. | |
sys/dev/extres/regulator/regulator_pwm.h | ||
1 | Please add a copyright header. |
I've added a few comment but please split this in multiple commits and reviews (one per device, one for the clocks, on for pwm regulators etc ...).
sys/arm64/rockchip/if_dwc_rk.c | ||
---|---|---|
163 | Remove this empty line. | |
186 | Can't find any reference to the "rockchip,rk3308-mac" binding. Whhy is this needed ? | |
358 | Missed a empty line before function starts. | |
470 | Debug leftover ? | |
528 | Please revert this change | |
678 | Why ? | |
sys/arm64/rockchip/rk_pwm.c | ||
402 | Why ? | |
sys/arm64/rockchip/rk_spi.c | ||
95 | Add the new compat data without removing some existing ones please. | |
478 | Why ? | |
sys/arm64/rockchip/rk_tsadc.c | ||
265 | Extra line. | |
405 | Extra compat data. |
sys/arm64/rockchip/if_dwc_rk.c | ||
---|---|---|
186 | It looks like it's in the u-boot dts | |
sys/arm64/rockchip/rk_spi.c | ||
95 | It looks like there is white space at the end of the line. | |
sys/dev/extres/regulator/regulator_pwm.c | ||
1–2 | New files shouldn't add $FreeBSD$. |