Page MenuHomeFreeBSD

Add support for the Allwinner H2+ SoC
AbandonedPublic

Authored by stl_koffein.net on Apr 13 2017, 11:28 AM.

Details

Reviewers
jmcneill
manu
Summary

Lacking proper documentation, it is assumed to be compatible with the H3.

Test Plan

Tested on the Orange Pi Zero. MMC, USB, serial, ethernet, CPU frequency scaling all seem to work.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

andrew added inline comments.Apr 13 2017, 12:18 PM
sys/arm/conf/GENERIC
57

This should be sorted, H2 is before H3

sys/conf/options.arm
53

Should be sorted

sys/gnu/dts/arm/sun8i-h2-plus-orangepi-zero.dts
1 ↗(On Diff #27402)

Do we need to update these? It looks like Linux 4.11 will be released next week [1] so we could wait until then, or just pull in the files from the latest RC.

[1] http://news.softpedia.com/news/linus-torvalds-announces-the-fifth-release-candidate-of-the-linux-4-11-kernel-514492.shtml

manu added inline comments.Apr 13 2017, 12:56 PM
sys/arm/conf/ALLWINNER
36 ↗(On Diff #27402)

ALLWINNER config file will be removed soon, no need to update it.

sys/boot/fdt/dts/arm/orangepi-zero.dts
1 ↗(On Diff #27402)

I don't want to add more dts in sys/boot/fdt/.

sys/gnu/dts/arm/sun8i-h2-plus-orangepi-zero.dts
1 ↗(On Diff #27402)

No we don't want.
I'll update our dts when Linux 4.11 is released

sys/boot/fdt/dts/arm/orangepi-zero.dts
1 ↗(On Diff #27402)

Where should it go then? Without this, you don't have ethernet or cpufreq support.

sys/gnu/dts/arm/sun8i-h2-plus-orangepi-zero.dts
1 ↗(On Diff #27402)

This dts is the same as in linux-4.11-rc6.

manu added inline comments.Apr 13 2017, 1:11 PM
sys/boot/fdt/dts/arm/orangepi-zero.dts
1 ↗(On Diff #27402)

I want to convert our dts patch as overlays, so for now it should go nowhere in our repo.

sys/gnu/dts/arm/sun8i-h2-plus-orangepi-zero.dts
1 ↗(On Diff #27402)

Yes but DTS are first import in vendor branch then merge into sys/gnu/dts/
I do this in a bulk on stable Linux release.

Fixed the ordering in sys/arm/conf/GENERIC and sys/conf/options.arm; removed the DTS updates.

manu added inline comments.Apr 14 2017, 7:35 AM
sys/arm/allwinner/aw_ccu.c
86

This might be unneeded since we moved to aw_ccung for H3

jmcneill edited edge metadata.Apr 19 2017, 4:23 PM

Do we really need a different soc_type for H2+ since it is so close to H3? It seems we could save a lot of code here by moving the FDT_PLATFORM_DEF line under SOC_ALLWINNER_H3.

stl_koffein.net abandoned this revision.Jul 4 2017, 7:32 AM

Sorry I didn't get a chance to follow up on this. Closing as support was committed by @manu in r320315.