Jump to content
  • 0

[Experiment] armbian on NanoPi A64


guidol
 Share

Question

In the FriendlyARM thread
http://www.friendlyarm.com/Forum/viewtopic.php?f=53&t=1427&p=5685#p5685

we did try to use A64 images from the Pine64 or the BananaPi M64 with the NanoPi A64.

 

The last times we did that with less success - OK Sytem is running but Network/Sound has to added via USB.
No suppport for the onboard devices :(

But today a user did wrote that - with the actual stable Pine64-image ( Armbian_5.69_Pine64_Debian_stretch_next_4.19.13 )
WiFi is useable.

 

So I flasded the Pine64-image to a MicroSDCard and did boot.

Additiionally I did see with "aplay -l" the HDMI and the analog Sound-device.

But ethernet isnt "connected" right via the .dtb

 

armbian inside can see the ethernet-part of the SoC (set IP and see MAC) and the external RTL8122E Phy blinks the Link and Transfered-Packets via LED....

 

My first idea was to edit the Pine64 DTB to match the NanoPI A64 DTB in the ethernet-part - but with these Pins & PHandle's I did get stuck :(

 

BUT my second idea did work  much better, because in the armbian-build-system I also did see the

sun50i-a64-nanopi-a64.dtb

 

So I checked the board-config-file for the pine64.conf ( under ./build/config/boards/ ) - there is an entry for a defconfig file

and the armbin-build-system has also a defonfig file for the nanopi-a64

./build/cache/sources/u-boot/v2018.11/configs/nanopi_a64_defconfig

 while  the NanoPi A64 isnt (official) supported by the Meneu-System of the armbian-build-system.

 

So I copied ./build/config/boards/pine64.conf to ./build/config/boards/nanopia64.conf and did edit it like in the following way:
 

# A64 quad core 512MB-2GB SoC GBE
BOARD_NAME="NanoPiA64"
BOARDFAMILY="sun50iw1"
BOOTCONFIG_DEFAULT="sun50iw1p1_config"
BOOTCONFIG="nanopi_a64_defconfig"
#
MODULES="sunxi_codec sunxi_i2s sunxi_sndcodec 8723bs"
MODULES_NEXT=""
#
KERNEL_TARGET="default,next,dev"
CLI_TARGET="bionic,stretch:next"
DESKTOP_TARGET="xenial:default"
#
CLI_BETA_TARGET=""
DESKTOP_BETA_TARGET=""

and did compile for the NanoPi A64 with

./compile.sh EXPERT="yes"

in ./build/

 

Now I could select the NanoPi A64 (falsely) as supported board and did select DEV (armbian 5.71 with Kernel 4.20)

I did build the console and the Desktop-version.

 

In the console-version I was happy to see eth0 & wlan0 working, but the HDMI and analog soundsystem is missing (which was visible in Pine64 next 4.19.13)

So there was no need for a RTL8211E-driver (because its only a PHY) like I did read before at

http://linux-sunxi.org/Ethernet#Realtek_RTL8211E

Quote

Realtek RTL8211E

The Realtek RTL8211E is a RGMII 10/100/1000 Ethernet PHY, which is gigabit capable. It is commonly paired with GMAC for gigabit speeds.

Generic PHY support is enough to make it work.

 

In the Desktop-version the GUI did start without problems (not fast, but useable) - like on a older pinebook (a64) build

 

Maybe DEV was "too much"? I will try the NEXT for my NanoPi A64 File :)

 

Or maybe the nanopi A64 dtb isnt correct on the "sound-part"?

 

NPi-A64-armbian.boot-logo.jpg

Link to comment
Share on other sites

Recommended Posts

  • 0
16 minutes ago, guidol said:

@5kft @Hannes Worst
it seems that current 5.8.7 is missing some modules for the analog audio (or they are named in a other way) than 

legacy 5.4.63, because with the legacy image analog-audio does work.

 

I do see much more sound-modules loaded than in current 5.8.7:

 

Part of this difference could be that in the newer kernel more audio modules built in.  What I'm seeing is that when I try analog audio it works fine - e.g., I don't see the "no soundcards" error, and I can play audio, etc. (e.g., I tested on a NEO Core2 but don't get any audio errors on any of the other boards either).  So it seems that there is something different for the A64, and I agree with you it's likely the DT configuration.

Link to comment
Share on other sites

When discussing a problem make sure to provide full logs!

  • 0
2 minutes ago, Hannes Worst said:

It works on the kernel 5.7.15.


dmesg|grep -i sound
[    8.338780] asoc-simple-card sound: sun8i-codec-aif1 <-> 1c22c00.dai mapping ok
[    9.015640] asoc-simple-card hdmi-sound: i2s-hifi <-> 1c22800.i2s mapping ok

 

got this dmesg-output alos in 5.8.7, but no output from analog-audio from the NPi A64

Link to comment
Share on other sites

  • 0
On 9/6/2020 at 5:16 PM, 5kft said:

 

Part of this difference could be that in the newer kernel more audio modules built in. 

So it seems that there is something different for the A64, and I agree with you it's likely the DT configuration.

@5kft @Hannes Worst @@lex

somebody did hear us :) the analog sound is back in dev kernel/dtb 5.9.1

and now - I think - we have found the missing link:
sound was playing but we didnt hear anything on analog-audio because - as I remember right -  the option

AIF1 Slot 0 Digital DAC

was missing. So it couldnt be enabled :( 

 

Now the option is back and the DAC could now enabled again - so no more silence anymore :) 

 

BUT be advised to set AIF DA0 not higher than 17, because then the sound will very fast be distorted/overdriven :( 

 

So here is my kernel-information als alsamixer-setting for analog-audio (sun50i-a64-audio):

 _   _ ____  _      _    __   _  _
| \ | |  _ \(_)    / \  / /_ | || |
|  \| | |_) | |   / _ \| '_ \| || |_
| |\  |  __/| |  / ___ \ (_) |__   _|
|_| \_|_|   |_| /_/   \_\___/   |_|

Welcome to Debian GNU/Linux 10 (buster) with Linux 5.9.1-sunxi64

No end-user support: built from trunk

package bsp-kernel[20.11.0-trunk] u-boot[20.11.0-trunk] dtb   [20.11.0-trunk]
firmware          [20.11.0-trunk] config[20.11.0-trunk] branch[dev]


root@npi-a64-116(192.168.6.116):~# uname -a
Linux npi-a64-116 5.9.1-sunxi64 #trunk SMP Mon Oct 26 18:14:55 +03 2020 aarch64 GNU/Linux

root@npi-a64-116(192.168.6.116):~# more /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

root@npi-a64-116(192.168.6.116):~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sun50ia64audio [sun50i-a64-audio], device 0: 1c22c00.dai-sun8i-codec-aif1 sun8i-codec-aif1-0 [1c22c00.dai-sun8i-codec-aif1 sun8i-codec-aif1-0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: sun50ia64hdmi [sun50i-a64-hdmi], device 0: 1c22800.i2s-i2s-hifi i2s-hifi-0 [1c22800.i2s-i2s-hifi i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


root@npi-a64-116(192.168.6.116):~# alsamixer

Card: sun50i-a64-audio 

Value:      Item:

83          Headphone [dB gain: -8.00]
Mixer       Headphone Source [Mixer]
15          AIF1 DA0 [dB gain: -24.00, -24.00]
Stereo      AIF1 DA0 Stereo [Stereo]
Enable      AIF1 Slot 0 Digital DAC
82          DAC [dB gain: 18.75, 18.75]
Enable      DAC Reversed

 

Link to comment
Share on other sites

  • 0
14 hours ago, Levent Erenler said:

Hi, do you have a chance to test it? I could not get sound from audio jack. Could you share your dts if the analog audio working? Thank you

For me it does work, but I dont know if @Hannes Worst did had success ;)

Here are the "warnings" while decompiling the .dtb to .dts (see attachment) :
 

root@npi-a64-116(192.168.6.116):/boot/dtb/allwinner# dtc -I dtb -O dts /boot/dtb/allwinner/sun50i-a64-nanopi-a64.dtb -o /boot/dtb/allwinner/sun50i-a64-nanopi-a64_kernel_591.dts

/boot/dtb/allwinner/sun50i-a64-nanopi-a64_kernel_591.dts: Warning (unit_address_vs_reg): /sound/simple-audio-card,dai-link@0: node has a unit name, but no reg property

/boot/dtb/allwinner/sun50i-a64-nanopi-a64_kernel_591.dts: Warning (avoid_unnecessary_addr_size): /sound: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

/boot/dtb/allwinner/sun50i-a64-nanopi-a64_kernel_591.dts: Warning (avoid_unnecessary_addr_size): /soc/dsi@1ca0000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

 

I dont know if this .dts will work with lower kernel numbers :(

root@npi-a64-116(192.168.6.116):/boot# uname -a
Linux npi-a64-116 5.9.1-sunxi64 #trunk SMP Mon Oct 26 18:14:55 +03 2020 aarch64 GNU/Linux
OR
Linux npi-a64-116 5.10.0-rc2-sunxi64 #trunk SMP Sat Nov 7 14:11:13 +03 2020 aarch64 GNU/Linux

 

sun50i-a64-nanopi-a64_kernel_591.dts

sun50i-a64-nanopi-a64_kernel_510rc2.dts

Link to comment
Share on other sites

  • 0

Thanks @guidol I am testing with pine64+ A64 kernel 5.9.5 i have same warnings in original dtb. I try many things but i could not figure whats wrong! I try to compare my dts file with yours.Do you have source, i mean dts files before compiled(easy to read) or is that https://github.com/megous/linux/tree/orange-pi-5.9  Thank you

i try to gave more information 

 

UPDATE:  I found a solution

 

Edited by Levent Erenler
solution
Link to comment
Share on other sites

  • 0

@guidolI wasn't able yet to try out the 5.9 kernel. I tested the dts file you posted as a dtb file on the present (lower) 5.8 kernel and found out it doesn't work to activate analog sound. 

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sun50ia64hdmi [sun50i-a64-hdmi], device 0: 1c22800.i2s-i2s-hifi i2s-hifi-0 [1c22800.i2s-i2s-hifi i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Device [USB Audio Device], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

 

Link to comment
Share on other sites

  • 0

I compiled Hirsute Hippo [edge] for the NanoPi A64 and got out of the compile a Kernel 5.12.x

There was analog-audio but no control for the blue led.

 

After updateing I got the Kernel 5.13.9 - now there was a control for the blue led, but no analog audio :(

 

So I did decompile the .dtb to .dts /edited it/recompiled the .dts to .dtb - now analog audio is working again :)

 

Spoiler

sound {
            status = "okay";

i2s@1c22000 {
            status = "okay";

dai@1c22c00 {
            status = "okay";

codec@1c22e00 {
            status = "okay";
            
codec-analog@1f015c0 {
            status = "okay";

 

 _   _ ____  _      _    __   _  _
| \ | |  _ \(_)    / \  / /_ | || |
|  \| | |_) | |   / _ \| '_ \| || |_
| |\  |  __/| |  / ___ \ (_) |__   _|
|_| \_|_|   |_| /_/   \_\___/   |_|

Welcome to Armbian 21.08.0-trunk Hirsute with bleeding edge Linux 5.13.9-sunxi64

No end-user support: built from trunk

package bsp-kernel[21.08.0-trunk.114] u-boot[21.08.1] dtb   [21.08.0-trunk.114]
firmware          [21.08.0-trunk] config[21.08.0-trunk] branch[edge]

uname -a
Linux npi-a64-116 5.13.9-sunxi64 #trunk.114 SMP Sun Aug 8 22:12:23 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sun50ia64audio [sun50i-a64-audio], device 0: 1c22c00.dai-sun8i-codec-aif1 sun8i-codec-aif1-0 [1c22c00.dai-sun8i-codec-aif1 sun8i-codec-aif1-0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: sun9ihdmi [sun9i-hdmi], device 0: SUN9I-HDMI PCM i2s-hifi-0 [SUN9I-HDMI PCM i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

 

 

sun50i-a64-nanopi-a64.dtb_5_13_9_analog_audio_enabled sun50i-a64-nanopi-a64.dtb_5_13_9_org sun50i-a64-nanopi-a64.dts

Link to comment
Share on other sites

  • 0

Here is a working (USB-ports & analog Sound) patched

sun50i-a64-nanopi-a64 .DTS/.DTB

for Kernel 5.18.15 under armbian bullseye

 

Dont know why these arent automatically configured at armbian/kernel-compile :(

 

 _   _ ____  _      _    __   _  _
| \ | |  _ \(_)    / \  / /_ | || |
|  \| | |_) | |   / _ \| '_ \| || |_
| |\  |  __/| |  / ___ \ (_) |__   _|
|_| \_|_|   |_| /_/   \_\___/   |_|

Welcome to Armbian 22.08.0-trunk Bullseye with Linux 5.18.15-sunxi64

No end-user support: community creations

System load:   2%               Up time:       16 min   Local users:   2
Memory usage:  14% of 984M      IP:            192.168.6.116
CPU temp:      27°C             Usage of /:    24% of 15G
RX today:      23.9 MiB

[ General system configuration (beta): armbian-config ]

Last login: Wed Sep  7 14:05:25 2022 from 192.168.6.17

root@npi-a64-116:~# uname -a
Linux npi-a64-116 5.18.15-sunxi64 #trunk SMP Thu Aug 4 12:51:25 +03 2022 aarch64 GNU/Linux

root@npi-a64-116:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sun50ia64audio [sun50i-a64-audio], device 0: 1c22c00.dai-sun8i-codec-aif1 sun8i-codec-aif1-0 [1c22c00.dai-sun8i-codec-aif1 sun8i-codec-aif1-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sun9ihdmi [sun9i-hdmi], device 0: SUN9I-HDMI PCM i2s-hifi-0 [SUN9I-HDMI PCM i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

 

sun50i-a64-nanopi-a64_5_18_15.zip

DTS_Changes_NPI_A64.doc DTS_Changes_NPi_A64.pdf

Edited by guidol
Link to comment
Share on other sites

  • 0
39 minutes ago, guidol said:

Dont know why these arent automatically configured


This is the diff between your device tree and the one shipped with (latest 5.19.y) kernel:
 

Spoiler
@@ -172,7 +172,7 @@
 		simple-audio-card,name = "sun50i-a64-audio";
 		simple-audio-card,aux-devs = <0x10>;
 		simple-audio-card,routing = "Left DAC\0DACL\0Right DAC\0DACR\0ADCL\0Left ADC\0ADCR\0Right ADC";
-		status = "disabled";
+		status = "okay";
 		phandle = <0x4f>;
 
 		simple-audio-card,dai-link@0 {
@@ -661,8 +661,8 @@
 			phys = <0x2c 0x00>;
 			phy-names = "usb";
 			extcon = <0x2c 0x00>;
-			dr_mode = "otg";
-			status = "disabled";
+			dr_mode = "host";
+			status = "okay";
 			phandle = <0x68>;
 		};
 
@@ -963,7 +963,7 @@
 			resets = <0x02 0x27>;
 			dma-names = "rx\0tx";
 			dmas = <0x30 0x03 0x30 0x03>;
-			status = "disabled";
+			status = "okay";
 			phandle = <0x7d>;
 		};
 
@@ -1005,7 +1005,7 @@
 			resets = <0x02 0x24>;
 			dmas = <0x30 0x0f 0x30 0x0f>;
 			dma-names = "rx\0tx";
-			status = "disabled";
+			status = "okay";
 			phandle = <0x12>;
 		};
 
@@ -1016,7 +1016,7 @@
 			interrupts = <0x00 0x1c 0x04>;
 			clocks = <0x02 0x38 0x02 0x6b>;
 			clock-names = "bus\0mod";
-			status = "disabled";
+			status = "okay";
 			phandle = <0x13>;
 		};
 
@@ -1232,7 +1232,7 @@
 		};
 
 		pwm@1c21400 {
-			compatible = "allwinner,sun50i-a64-pwm\0allwinner,sun5i-a13-pwm";
+			compatible = "allwinner,sun50i-a64-pwm";
 			reg = <0x1c21400 0x400>;
 			clocks = <0x2d>;
 			pinctrl-names = "default";
@@ -1401,7 +1401,7 @@
 		codec-analog@1f015c0 {
 			compatible = "allwinner,sun50i-a64-codec-analog";
 			reg = <0x1f015c0 0x04>;
-			status = "disabled";
+			status = "okay";
 			phandle = <0x10>;
 		};
 
@@ -1431,7 +1431,7 @@
 		};
 
 		pwm@1f03800 {
-			compatible = "allwinner,sun50i-a64-pwm\0allwinner,sun5i-a13-pwm";
+			compatible = "allwinner,sun50i-a64-pwm";
 			reg = <0x1f03800 0x400>;
 			clocks = <0x2d>;
 			pinctrl-names = "default";
@@ -1767,7 +1767,7 @@
 
 	hdmi-connector {
 		compatible = "hdmi-connector";
-		type = "a";
+		type = [61 00];
 
 		port {

 


Everything is there, just disabled by default. Don't we have overlays for enabling this via armbian-config -> system -> hardware?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...