Jump to content
  • 0

OrangePi Zero2 - Allwinner H616


Werner
 Share

Question

Before complaining about an issue read this!

 

tl;dr: Put your Zero2 and/or any other H616 based device on the shelf and WAIT for proper support to come. And no. There is no ETA. Assuming usable state end 2021/beginning 2022.

 

Software support is still work in progress and under heavy development. Provided preview images can break any time. Do not report this, we are aware of that and can/will not help you with that if you are not willing to investigate and research by yourself.

Feel free to join fellow developers to their efforts to create proper software support. But don't waste our time with complains. Thank you!

 

https://github.com/apritzel/linux/commits/h616-v5

https://github.com/jernejsk/u-boot/tree/h616-v2

https://github.com/apritzel/arm-trusted-firmware/tree/h616-v2-wip

 

 

-----------------------------------------------------------------------------

 

I started to play with this board and obviously failed miserably creating a basic Armbian integration.

 

Anyway. These are the information I collected so far:

 

dtb extraction from Xulong image: https://pastebin.com/raw/Uni2JzBF

 

orangepimonitor 🙄  http://ix.io/2FM0

 

 

root@orangepizero2:/etc/apt# lsmod
Module                  Size  Used by
zram                   36864  2
sprdwl_ng             438272  0
sprdbt_tty             36864  2
uwe5622_bsp_sdio      294912  2 sprdbt_tty,sprdwl_ng

 

kernel config: https://pastebin.com/raw/e2jTTZ7A

Link to comment
Share on other sites

Recommended Posts

  • 0
On 5/16/2021 at 11:43 PM, Igor said:

Another afternoon and all kernels for 5.12.y are done at build stage.

 

- cleaning

- do we need to archive 5.11.y. I would say no since its not LTS

- testing

 

5.11 to be buried, is EOL ( already ).

imho the non LTS kernels could be buried once mainline kernel hits .1 release. Thus eg. when 5.13.1 will be released bump edge kernel asap so 5.12 can be buried ( and forgotten )

( needless to say , but  "currents" should stay on LTS )

Link to comment
Share on other sites

Donate and support the project!

  • 0
1 hour ago, dolphs said:

5.11 to be buried, is EOL ( already ).


Yes, yes :D 

 

For 5.12.y -> we have to fix packaging problems that were introduced with 5.12.y ... actually code adjustment is already done, testing is undergoing.

Link to comment
Share on other sites

  • 0

The test build  (Hirsute 5.12.6 May 23 2021) gets stack at Starting kernel ...

 

Spoiler

U-Boot SPL 2021.01-rc5-armbian (May 12 2021 - 11:54:31 +0000)
DRAM: 512 MiB
Trying to boot from MMC1
NOTICE:  BL31: v2.4(debug):7eee1da-dirty
NOTICE:  BL31: Built : 11:54:21, May 12 2021
NOTICE:  BL31: Detected Allwinner H616 SoC (1823)
NOTICE:  BL31: Found U-Boot DTB at 0x4a084b18, model: OrangePi Zero2
INFO:    ARM GICv2 driver initialized
INFO:    PMIC: Probing AXP305 on I2C
INFO:    PMIC: aldo1 voltage: 3.300V
INFO:    PMIC: aldo2 voltage: 3.300V
INFO:    PMIC: aldo3 voltage: 3.300V
INFO:    PMIC: bldo1 voltage: 1.800V
INFO:    PMIC: dcdcd voltage: 1.500V
INFO:    PMIC: dcdce voltage: 3.300V
INFO:    Changed devicetree to reserve BL31 memory.
INFO:    BL31: Platform setup done
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for 855873 was applied
WARNING: BL31: cortex_a53: CPU workaround for 1530924 was missing!
NOTICE:  PSCI: System suspend is unavailable
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x4a000000
INFO:    SPSR = 0x3c9


U-Boot 2021.01-rc5-armbian (May 12 2021 - 11:54:31 +0000) Allwinner Technology

CPU:   Allwinner H616 (SUN50I)
Model: OrangePi Zero2
I2C:   ready
DRAM:  512 MiB
MMC:   mmc@4020000: 0
Loading Environment from FAT... Unable to use mmc 0:1... In:    serial@5000000
Out:   serial@5000000
Err:   serial@5000000
Net:   phy interface7
eth0: ethernet@5020000
starting USB...
No working controllers found
Autoboot in 1 seconds, press <Space> to stop
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
3202 bytes read in 3 ms (1 MiB/s)
## Executing script at 4fc00000
U-boot loaded from SD
Boot script loaded from mmc
156 bytes read in 2 ms (76.2 KiB/s)
18957 bytes read in 5 ms (3.6 MiB/s)
4191 bytes read in 5 ms (818.4 KiB/s)
Applying kernel provided DT fixup script (sun50i-h6-fixup.scr)
## Executing script at 45000000
11783984 bytes read in 998 ms (11.3 MiB/s)
21997576 bytes read in 1857 ms (11.3 MiB/s)
Moving Image from 0x40080000 to 0x40200000, end=41750000
## Loading init Ramdisk from Legacy Image at 4fe00000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    11783920 Bytes = 11.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 4fa00000
   Booting using the fdt blob at 0x4fa00000
   Loading Ramdisk to 494c3000, end 49fffef0 ... OK
   Loading Device Tree to 0000000049456000, end 00000000494c2fff ... OK

Starting kernel ...

 

 

Link to comment
Share on other sites

  • 0
27 minutes ago, Werner said:

Try increasing verbosity to get more info

As per the documentation I increased verbosity to 7 at armbianEnv.txt but no new output.

 

Spoiler

U-Boot SPL 2021.01-rc5-armbian (May 12 2021 - 11:54:31 +0000)
DRAM: 512 MiB
Trying to boot from MMC1
NOTICE:  BL31: v2.4(debug):7eee1da-dirty
NOTICE:  BL31: Built : 11:54:21, May 12 2021
NOTICE:  BL31: Detected Allwinner H616 SoC (1823)
NOTICE:  BL31: Found U-Boot DTB at 0x4a084b18, model: OrangePi Zero2
INFO:    ARM GICv2 driver initialized
INFO:    PMIC: Probing AXP305 on I2C
INFO:    PMIC: aldo1 voltage: 3.300V
INFO:    PMIC: aldo2 voltage: 3.300V
INFO:    PMIC: aldo3 voltage: 3.300V
INFO:    PMIC: bldo1 voltage: 1.800V
INFO:    PMIC: dcdcd voltage: 1.500V
INFO:    PMIC: dcdce voltage: 3.300V
INFO:    Changed devicetree to reserve BL31 memory.
INFO:    BL31: Platform setup done
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for 855873 was applied
WARNING: BL31: cortex_a53: CPU workaround for 1530924 was missing!
NOTICE:  PSCI: System suspend is unavailable
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x4a000000
INFO:    SPSR = 0x3c9


U-Boot 2021.01-rc5-armbian (May 12 2021 - 11:54:31 +0000) Allwinner Technology

CPU:   Allwinner H616 (SUN50I)
Model: OrangePi Zero2
I2C:   ready
DRAM:  512 MiB
MMC:   mmc@4020000: 0
Loading Environment from FAT... Unable to use mmc 0:1... In:    serial@5000000
Out:   serial@5000000
Err:   serial@5000000
Net:   phy interface7
eth0: ethernet@5020000
starting USB...
No working controllers found
Autoboot in 1 seconds, press <Space> to stop
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
3202 bytes read in 2 ms (1.5 MiB/s)
## Executing script at 4fc00000
U-boot loaded from SD
Boot script loaded from mmc
156 bytes read in 1 ms (152.3 KiB/s)
18957 bytes read in 5 ms (3.6 MiB/s)
4191 bytes read in 5 ms (818.4 KiB/s)
Applying kernel provided DT fixup script (sun50i-h6-fixup.scr)
## Executing script at 45000000
11783984 bytes read in 998 ms (11.3 MiB/s)
21997576 bytes read in 1857 ms (11.3 MiB/s)
Moving Image from 0x40080000 to 0x40200000, end=41750000
## Loading init Ramdisk from Legacy Image at 4fe00000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    11783920 Bytes = 11.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 4fa00000
   Booting using the fdt blob at 0x4fa00000
   Loading Ramdisk to 494c3000, end 49fffef0 ... OK
   Loading Device Tree to 0000000049456000, end 00000000494c2fff ... OK

Starting kernel ...

 

 

Link to comment
Share on other sites

  • 0
On 4/29/2021 at 2:22 AM, Gabor5745737 said:

"reboot" is not turning on the board, just off, requires manual power cycling.

Anyone else noticed it?

you can use sandisk tf card,it's will reboot normally .

the sbc  not work well with many tf cards, such as Samsung TF,which can't reboot.

Link to comment
Share on other sites

  • 0

 

Am 26.5.2021 um 18:09 schrieb lampra:

The test build  (Hirsute 5.12.6 May 23 2021) gets stack at Starting kernel ...

For me too (Armbian_21.05.2_Orangepizero2_hirsute_edge_5.12.6.img).

Edited by Joerg
Link to comment
Share on other sites

  • 0

Please accept my apologies if I should have posted this in a different place.

 

So I have a working local build environment and I want to test the mainline ATF. Which is the correct way to change the source and the tree and define PLAT=sun50i_h616?

When I change it at the families folder the and running ./compile.sh, I see the following in htop:

./compile.sh  BOARD=orangepizero2 BRANCH=edge RELEASE=hirsute BUILD_MINIMAL=yes BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no COMPRESS_OUTPUTIMAGE=sha,gpg,img,imgATF_PLAT=sun50i_h6

 

and it keeps spiting this:

Spoiler

[ o.k. ] Using config file [ /home/lampra/Downloads/build/userpatches/config-example.conf ]
[ o.k. ] Command line: setting BOARD to [ orangepizero2 ]
[ o.k. ] Command line: setting BRANCH to [ edge ]
[ o.k. ] Command line: setting RELEASE to [ hirsute ]
[ o.k. ] Command line: setting BUILD_MINIMAL to [ yes ]
[ o.k. ] Command line: setting BUILD_DESKTOP to [ no ]
[ o.k. ] Command line: setting KERNEL_ONLY to [ no ]
[ o.k. ] Command line: setting KERNEL_CONFIGURE to [ yes ]
[ o.k. ] Command line: setting COMPRESS_OUTPUTIMAGE to [ sun50i_h6 ]

 

 

 

Alternative can see an ATF folder in the userscripts folder /build/userpatches/atf/atf-sunxi64$ but I couldn't find any documentation how to use it.

Thank you

Link to comment
Share on other sites

  • 0
2 hours ago, Werner said:

sending PR

I probably could, but I am not sure how to handle this without braking everything else.

 

diff --git a/config/sources/families/include/sunxi64_common.inc b/config/sources/families/include/sunxi64_common.inc
index bc59438..1082479 100644
--- a/config/sources/families/include/sunxi64_common.inc
+++ b/config/sources/families/include/sunxi64_common.inc
@@ -27,9 +27,9 @@ case $BRANCH in
 
        edge)
 
-               KERNELSOURCE="https://github.com/megous/linux"
-               KERNELBRANCH="branch:orange-pi-5.12"
-               KERNELPATCHDIR='sunxi-'$BRANCH
+               KERNELSOURCE="https://github.com/apritzel/linux/"
+               KERNELBRANCH="branch:h616-v8-rc"
+               KERNELPATCHDIR='sunxi-orange-pi-5.12'
 
        ;;
 esac
diff --git a/config/sources/families/sun50iw6.conf b/config/sources/families/sun50iw6.conf
index 0862996..0a04279 100644
--- a/config/sources/families/sun50iw6.conf
+++ b/config/sources/families/sun50iw6.conf
@@ -8,14 +8,17 @@ ASOUND_STATE='asound.state.sun50iw2-dev'
 
 if [[ $BOARD == orangepizero2 ]]; then
 
-       ATFSOURCE='https://github.com/apritzel/arm-trusted-firmware'
-       ATFBRANCH='branch:h616-beta'
+       ATFSOURCE='https://github.com/ARM-software/arm-trusted-firmware'
+       ATFBRANCH='branch:master'
 
        ATF_PLAT="sun50i_h616";
        ATF_TARGET_MAP='PLAT=sun50i_h616 DEBUG=1 bl31;;build/sun50i_h616/debug/bl31.bin'
 
-       BOOTSOURCE='https://github.com/jernejsk/u-boot'
-       BOOTBRANCH='branch:h616-v2'
+       BOOTSOURCE='https://github.com/trini/u-boot'
+        BOOTBRANCH='branch:master'
 
        [[ -z $CPUMAX ]] && CPUMAX=1512000

 

Link to comment
Share on other sites

  • 0

overlay for UART5

 

/dts-v1/;

/ {
    compatible = "allwinner,sun50i-h6";

    fragment@0 {
        target-path = "/aliases";

        __overlay__ {
            serial5 = "/soc/serial@5001400";
        };
    };

    fragment@1 {
        target = < 0xffffffff >;

        __overlay__ {

            uart5-pins {
                pins = "PH2\0PH3";
                function = "uart5";
                phandle = < 0x01 >;
            };
        };
    };

    fragment@2 {
        target = < 0xffffffff >;

        __overlay__ {
            pinctrl-names = "default";
            pinctrl-0 = < 0x01 >;
            status = "okay";
        };
    };

    __symbols__ {
        uart5_pins = "/fragment@1/__overlay__/uart5-pins";
    };

    __fixups__ {
        pio = "/fragment@1:target:0";
        uart5 = "/fragment@2:target:0";
    };

    __local_fixups__ {

        fragment@2 {

            __overlay__ {
                pinctrl-0 = < 0x00 >;
            };
        };
    };
};
 

Link to comment
Share on other sites

  • 0

I use self build trunk version whit disabled kernel update for a while now. Besides bugs that are already known it is stable. I have installed BIND9 as a local slave authoritative DNS server and it is up 24/7.

 

If devs need any logs from me let me know.

Link to comment
Share on other sites

  • 0

Yeah seems missing in dtb package. Dont know why.

 

Edit: Got it. Seems like 5.12 does not include the necessary h616 patches but there is a patch folder for 5.13 that can be use for manual inclusion. Trying that atm.

If you want to try too locally edit this line to 5.13 and build:

https://github.com/armbian/build/blob/6844232dd70a47a7dedc066c630c875c3b55e881/config/sources/families/include/sunxi64_common.inc#L31

Also change symlink from 5.12 to 5.13 in patch/kernel folder

Link to comment
Share on other sites

  • 0

As mentioned by @mantouboji 5.13 is working well for the moment with the relevant patches. Though we are missing, among others,  overlays and wifi.

Regarding overlays, I tried to compile w1-gpio-cl but I had issues with the headers on 5.13. Did anyone manage to compile anything with 5.13?

Regarding wifi, as this is new AW hw,  I expect that we need to port the driver from the ventor's legacy sdk. Is anyone familiar with the process? 

Link to comment
Share on other sites

  • 0

What's the correct way to prepare a tftp-bootable kernel from the build outputs ? I've tried various combinations of `mkimage ..` and `booti .. | bootm .. | bootz' variations using `vmlinux` or `Image` as inputs, but i'm obviously lost, getting either "Bad Linux ARM64 Image magic!" or "Wrong Image Format for bootm command"

Link to comment
Share on other sites

  • 0

According to apritzel OPI zero2 has - unsupported Allwinner WiFi/BT chip

The firmware of the wifi seems to be available here. The schematics of WiFi/BT are available here

If I understand correctly, we need a pr for the firmware and a patch(overlay?) of the upcoming DT provided by apritzel.

Is anyone skilled enough to write a patch for the DT?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...