You mean the Zero 3 device tree, right? This is not an overlay, but a whole different device tree.
Crazy that the Zero 3 device tree still works better on the Zero 2W than the Zero 2W device tree, for many aspects. It is only some GPIO features which do not work, even onboard WiFi does (based on some older posts I reviewed). The Zero 2W device tree on the other hand has some issues with WiFi and Bluetooth, when enabling the modules in the wrong order, or disabling and re-enabling one within the same session etc. It could be beneficial if someone with enough knowledge would rebuild the Zero 2W device tree from scratch based on the Zero 3 one, leaving everything untouched which does already work well .
Let’s see whether this makes the analogue audio jack on the HAT work as well.
By the way, the android image for banana pi m4 zero is better on Opi zero 2w than their own android image… The only things that don’t work are, again, WiFi and Bluetooth (and possibly some things from the expansion board).
I’d test the expansion board but I have a broken connector.
Yeah, that Zero 2W device tree seems to be some crippled mess, hence the idea to rewrite it from scratch.
With the Zero 3 device tree, WiFi and Bluetooth do work on Zero 2W, don’t they? The chips are different, hence I also thought it wouldn’t, but on the GitHub issue someone reported it does. Drivers and firmware are there, so as long as there is no conflicting device tree node/attribute, there is indeed no reason it wouldn’t.
EDIT: Ah, it is the same WiFi chip, the “20U5622” module from the Zero 2W uses the “AW859A” chip, which is used on Zero 3 as well. The Zero 3 even seems to (does, just checked the PCB) use the same module, but on their wiki, they list the chip instead.
EDIT. It just shows itself as connected (and maybe it is) but no data seems to be able to be transferred). This only connects when there is ethernet connected. Otherwise it refuses to go up. Similar to the 2w dtb.
There are no new images yet, and there were no related commits on Armbian side, so the issue is still the same: No sound with Zero 2W device tree, but it works when switching to the Zero 3 device tree: No sound card detected for Opi zero 2w - #19 by MichaIng
Yesss i’ve sound on the jack 3.5 mm connector with the activation of the dacr and dacl
I use a wav file to test it
root@DietPi:/home/dietpi# aplay -D hw:0,0 ‘VIVALDI - Concerto Pour Basson En do Majeur.wav’
Lecture WAVE ‘VIVALDI - Concerto Pour Basson En do Majeur.wav’ : Signed 16 bit Little Endian, Fréquence 44100 Hz, Stéréo
After some modification i recompile a zero2w.dtb file sun50i-h618-orangepi-zero2w.zip.txt (8,5 Ko)
Just change the txt extension as .zip and extract the dtb file
For me it works as expected with my extension board, i have now two soundcard under dietpi-config with the zero2w tree
after activate the card 1 with dietpi-config
put for my pcm5102a somme connection with the hat
PI0 → I2S SCK–>pin29
PI1 → I2S BCK–>pin12
PI2 → I2S LCK–>pin35
PI3 → I2S DATA–>pin40
3.3V → to VIN power of DAC board–>pin1
GND → to GND power of DAC board-->pin6
You need to adapt the i2s3.dts file from Opi_Zero_3_I2S3_6.1/sun50i-h616-i2s3.dts at ebfc78dd6f6464b2c39d57f3c681559695edf172 · elkoni/Opi_Zero_3_I2S3_6.1 · GitHub, there is also directly the dtbo file if you would try
After you extract your dtb file and make a backup
To combine the two file use the command fdtoverlay like this
fdtoverlay --input sun50i-h616-zero3.dtb --output sun50i-h616-zero3.dtb sun50i-h616-i2s0.dtbo
and after copy it to your sd card
To test it dont forget to put active by the status"okay" your i2s3 part in the dtb file
To see your device tree use
find /proc/device-tree/ -name status -exec echo -ne '\n{}: ’ ; -exec cat {} ;
To see your pins active use
cat /sys/kernel/debug/pinctrl/300b000.pinctrl/pinmux-pins
Can I simply replace this file on top of the dtb in my Armbian /boot/dtb/allwinner? Or do you recommend the second file you created with all outputs working. The name if different and I don’t know how to replace it. Just rename and overwrite?