Support for OrangePi Zero2(H616/DDR3), Zero3 and Zero 2W (H618/LPDDR4)

Let’s add information about boards to a separate thread
Image for opi-zero3 (zero2w should require changing DT in extlinux, eth will not work): zero3 – Google Drive
Image for orangepi zero2 are in a separate folder, link above.
U-boot makefile: https://github.com/iuncuim/manjaro-h616/tree/main/uboot-opi-zero3
Kernel makefile (based on warpme’s minimyth2): https://github.com/iuncuim/manjaro-h616/tree/main/linux-minimyth2
FW (wifi+bt): https://github.com/iuncuim/manjaro-h616/tree/main/uwe5622-firmware-new
For smooth youtube video you need to install freetube-bin, mpv, yt-dlp, ffmpeg-v4l2-request (don’t forget about aur). Then add to mpv config (~/.config/mpv/mpv.conf):

--vo=gpu
--hwdec=drm
--ytdl-format="bestvideo[vcodec^=avc1]+bestaudio/best"

In the freetube app set an external player to mpv, after that youtube 1080p50fps videos will play smoothly with ~20% cpu load.
If there are freezes in some videos, try increasing the size of the cma buffer. In the /boot/extlinux/extlinux.conf add to cmdline cma=256M

Does not work:

  1. tv-out
  2. expansion board usb

To boot from USB need to flash the bootloader to the SPI. To do this, you need to switch the processor to FEL mode. Then with sunxi-tools load u-boot to SPI with command from linux PC:
sudo sunxi-fel -p spiflash-write 0 u-boot-sunxi-with-spl-opi-zero3.bin
U-boot image: u-boot-sunxi-with-spl-opi-zero3.bin - Google Drive
More information about u-boot flashing (please use a google.translate from Russian to English): https://4pda.to/forum/index.php?showtopic=1073025&st=720#entry127597333

4 Likes

Hello

Awesome support, Your welcome to join Manjaro ARM team if you have time you can contribute to the project.

Thanks.

Normally we have 256M is set in the kernel as most arm device need it for HEVC support.

1 Like

Thank you very much for the offer, I would really like to be part of the Manjaro ARM team, but at the moment full-time work and life circumstances do not allow me to accept it and provide substantial support to the project

2 Likes

Just a FYI:
I can confirm that the provided image boots on a Zero 2W.
As mentioned above the device tree reference had to be changed to sun50i-h618-orangepi-zero2w.dtb in extlinux.conf.
For first tests I do not start into a graphical target by adding systemd.unit=multi-user.target to the bootline.
I have a stable text console, and perfectly working WIFI and am able to SSH into this little guy.

Sadly I cannot build the kernel from your github, as the .conf file is missing for makepkg.

I am in the process to compile the Kernel (actually just playing around a bit with it) using Manjaro’s linux PKGBUILD and freshly released 6.7 kernel sources.
If anybody has some pointers as to which patches are still necessary on a H616/H618 system I would be very grateful.

1 Like

oops, forgot about that, now I added the missing files.
I don’t understand from your message, hdmi output is not working?

That is a misunderstanding. HDMI output works just fine.
Sorry about that.

And thanks for the config file.

1 Like

If you can wait till this weekend then I plan to update the latest kernel with the patches and update the Zero3 images with the same.

So hopefully things should just work on future images.

3 Likes

Hi there,

i’m thinking of flashing my Orange Pi Zero 2w with this version, is everything running smoothly as a server for you?

Are you using the Ethernet shield?

Thanks!

1 Like

I am using WIFI only atm. And it runs nicely as a server.

@ Spikerguy:
Oh good. I am having problems understanding some of the patches. Without a data-sheet and an errata sheet, especially.
Would you please double-check that the device tree components for the 02W are included in that build?

Thanks for the response!

Could you report on the thermal stats? Are they reasonable?

Would be nice to know if the device tree components is indeed in the latest build they’ve released, otherwise i’d probably have to build Manjaro myself right?

@pebblefish , @skelter
I don’t understand, are you having some kind of problem with my build?
If so, please let me know and I’ll try to fix it.

I updated the u-boot PKGBUILD, this reduced the number of patches

First of all , thank you for your hard work, its really appreciated, and secondly, sorry for the misunderstanding, i was asking due to having read reports on DietPi’s distro making the 2w extremely hot, and hindering performance due to overheat. Personally, i’m still waiting for the 2w to be delivered.

Will definitely try your build as soon as i receive the 2ws (Receiving soon with and without shield) and will report here later on.

Regarding patches you’ve asked for, have you wandered around the Arch-based distro from OPi themselves?

With respect to hardware optimization, i found this that does reference zero3 and zero2w:

Probably nothing worth looking at, but as it referenced both models, it could be…

My work was just to get the T507/H618 cpus early init and prepare the openwrt/manjaro images for it. The rest of the work was done by the linux-sunxi community.
About temperature: if Dietpi uses the vendor’s kernel, the processor will “overheat” due to incorrect settings of the temperature sensor, it will give inflated readings.
they should find this patch series linux-minimyth2: h616: update thermal · iuncuim/manjaro-h616@3fcfcb5 · GitHub

It doesn’t affect

If you’re going to use Zero, don’t buy the 1.5GB version, it can be made to work right away, but it will require a separate bootloader image, making it of little use compared to other versions of the board

100mbps ethernet can be made to work using hacks, if I have time I can add patches for this. I have h616 tvbox for this experiments

I’ve responded earlier with a link to a wiki from Orange Pi describing the 24pin cable, for some reason the moderation decided to remove it…

Anyway, a user from another forum said the cable would work out of the box, which i remain sceptic about…

I’ll try to find out what is it that OrangePi OS does wrt the 24pin cable in the 2w’s . If you have some pointers or tips, feel free to leave them here.

Thank you very much once again.

The H618 soc has a multiphy chip inside (named as AC300), which allows to use 100 mbps ethernet without the need to connect an external PHY.
AC300 to implement ethernet requires additional clocking, which is supplied from the main die via PWM GPIO connected internally. There is no driver in the Linux kernel that supports this yet. PWM setting is done by writing magic numbers to magic registers in u-boot, which is wrong way. But we can do the same and add this hack to u-boot. Warpme, which collected patches for the operation of devices on h616/h618, also has this patch for u-boot: https://github.com/warpme/minimyth2/blob/master/script/bootloaders/u-boot-h616/files/01-hack-add-h313-int.emac.phy-support.patch#L66
I think adding this patch will add 100 mbps ethernet work.

2 Likes

Don’t have orangepi zero 2, but some users reported that it work. Download link in first post. Minimal images broken, do not allow to pass the initialization script.

I’ll have a look at that patch , i’m a developer, but not a systems’ one, but i’ll try my best.

I wonder if there’s the possibility of hard bricking the devices playing around with u-boot and all?

Hard brick - no, because microsd has the highest boot priority. But you can damage the device by high voltage when programming pmic AXP313

No idea what is the difference between Z2 and Z2W.

I will start working on Z2 and get it to work on upstream pkgs using @junari work.

It does not have to be full time or anything regular. you can spend time on manjaro arm device support during your free time. You can also share your expertise in manjaro arm chat group.

DM me if this sounds interesting @junari