0
guidol

[Experiment] armbian on NanoPi A64

Recommended Posts

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

Share this post


Link to post
Share on other sites
15 minutes ago, guidol said:

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


Yes. DEV is probably too fragile atm - 4.19.y has good enough support for A64 in general and probably with the correct DTB everything should work. (but temperature sensor IIRC)

Share this post


Link to post
Share on other sites
1 hour ago, Igor said:


Yes. DEV is probably too fragile atm - 4.19.y has good enough support for A64 in general and probably with the correct DTB everything should work. (but temperature sensor IIRC)

@Igor astonished  - with Armbian_5.71_Nanopia64_Debian_stretch_dev_4.20.0 it does seem to work better....

I did compile

Armbian_5.71_Nanopia64_Debian_stretch_next_4.19.13

Armbian_5.71_Nanopia64_Debian_stretch_next_4.19.13_desktop

with my hijacked configuration

but with 4.19.13

- there is no WiFi wlan0

- MicroSDcard read/write is much slower

- black screen (No Signal) after starting kernel (while the system is running in the backgorund and accessable via SSH)

- also no HDMI or analog soundcard

 

With

Armbian_5.71_Nanopia64_Debian_stretch_dev_4.20.0

Armbian_5.71_Nanopia64_Debian_stretch_dev_4.20.0_desktop
+ got WiFi wlan0

+ better read/write rates on the MicroSDcard

+ no black screen after starting kernel - can see boot-messages AND the Desktop-GUI is coming up

/sys/class/leds/nanopi-a64:blue:status/trigger is available as heartbeat-led

+ temperature sensor seems to give a correct output

root@npi-a64(192.168.6.64):~# armbianmonitor -m
Stop monitoring using [ctrl]-[c]
Time      CPU n/a    load %cpu %sys %usr %nice %io %irq   CPU

22:58:03:   ---      2.07   7%   0%   2%   0%   3%   0% 42.9°C
22:58:08:   ---      2.06  19%   0%   0%   0%  17%   0% 43.1°C
22:58:13:   ---      1.98  21%   0%   0%   0%  19%   0% 42.2°C
22:58:18:   ---      1.98  11%   0%   0%   0%  10%   0% 43.1°C

 

- BUT also no soundcard (HDMI or analog) which seems to be available in the Pine64-image when started on NanoPi A64

root@pine64:~# uname -a
Linux pine64 4.19.13-sunxi64 #5.69 SMP Wed Jan 9 18:10:00 CET 2019 aarch64 GNU/Linux
root@pine64:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sun50ia64audio [sun50i-a64-audio], device 0: 1c22c00.dai-sun8i sun8i-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: allwinnerhdmi [allwinner,hdmi], device 0: 1c22800.i2s-i2s-hifi i2s-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

console boot-/system-information for Armbian_5.71_Nanopia64_Debian_stretch_dev_4.20.0 

root@npi-a64(192.168.6.64):~# armbianmonitor -u
System diagnosis information will now be uploaded to http://ix.io/1ylE
 

Share this post


Link to post
Share on other sites
25 minutes ago, guidol said:


+- BUT also no soundcard (HDMI or analog) which seems to be available in the Pine64-image when started on NanoPi A64
 

That's right analog sound seems available (as shown by /proc/asound/cards) when using  a pine64 5.70 next image with nanopi a64 but no sound ever comes out of the connection, wifi does work.

Share this post


Link to post
Share on other sites

Here is what i found so far,  there are three patches floating around about audio on A64.

for dai compatible string:

"allwinner,sun50i-a64-codec-i2s",

"allwinner,sun50i-a64-acodec-i2s",

"allwinner,sun50i-a64-i2s",

 

I tried to match the code with the compatible string, but i still have issues, no one claims the sun50i-a64-audio and i get this errors:

Spoiler

[    3.359115] sun4i-i2s 1c22000.i2s: Could not register PCM
[    3.370971] sun4i-i2s 1c22400.i2s: Could not register PCM
[    3.378280] sun4i-i2s 1c22000.i2s: Could not register PCM
[    3.385779] sun4i-i2s 1c22c00.dai: Could not register PCM
[    3.401731] sun4i-i2s 1c22000.i2s: Could not register PCM
[    3.413992] sun4i-i2s 1c22400.i2s: Could not register PCM
[    3.434398] sun4i-i2s 1c22c00.dai: Could not register PCM
[    3.486167] sun4i-i2s 1c22000.i2s: Could not register PCM
[    3.495499] sun4i-i2s 1c22400.i2s: Could not register PCM
[    3.508288] sun4i-i2s 1c22c00.dai: Could not register PCM
[    3.594785] sun4i-i2s 1c22000.i2s: Could not register PCM
[    3.604127] sun4i-i2s 1c22400.i2s: Could not register PCM
[    3.613145] sun4i-i2s 1c22c00.dai: Could not register PCM
[    4.135455] sun4i-i2s 1c22000.i2s: Could not register PCM
[    4.136740] sun4i-i2s 1c22400.i2s: Could not register PCM
[    4.138001] sun4i-i2s 1c22c00.dai: Could not register PCM
[    4.173378] sun4i-i2s 1c22000.i2s: Could not register PCM
[    4.174195] sun4i-i2s 1c22400.i2s: Could not register PCM
[    4.174859] sun4i-i2s 1c22c00.dai: Could not register PCM
[    4.184634] sun4i-i2s 1c22000.i2s: Could not register PCM
[    4.185563] sun4i-i2s 1c22400.i2s: Could not register PCM
[    4.186316] sun4i-i2s 1c22c00.dai: Could not register PCM


 

 

Share this post


Link to post
Share on other sites

My last update on this issue in case someone is working to get sound on A64 (>= 4.20).

I tried every patch out there,  triple checked the code , same situation, no sound. 

I must have missed something or overlooked something.

I finally tried Vasily's kernel and for my surprise no sound. Last hope, i tried Vasily ARCH img, no luck, no sound even on Pine64.

Maybe it works on Pinebook,.... 

 

Share this post


Link to post
Share on other sites
17 minutes ago, martinayotte said:

I will probably check with an Ayufan image later ...

I hope you mean "mainline kernel"...;)

Please, try that on Pine64+ too.

Share this post


Link to post
Share on other sites
14 hours ago, @lex said:

I hope you mean "mainline kernel"...;)

Always ! :P

14 hours ago, @lex said:

Please, try that on Pine64+ too.

Already did, and audio no working there too ...

Looking quickly at Vasily and Wens patches, and comparing with Armbian, it seems that there are some missing power regulator.

Share this post


Link to post
Share on other sites

Hello. I compiled armbian 5.73 with kernel 4.20(bionic dev) and with my patch. I have only sound on output HDMI work perfect. Audio jack not work. aplay -l show me only one device:

card 0: allwinnerhdmi [allwinner,hdmi], device 0: 1c22800.i2s-i2s-hifi i2s-hifi-0 []

+/- I see sometimes that WiFi have problem with signal quality. Maybe it is only problem with signal.

I didn't found in dtb (kernel megous) and other patches armbian support for i2s2 and sound_hdmi. My patch.

I'm a beginner and i don't know linux kernel well. I wan't to only help us.  

Edited by wolacinio
explanation

Share this post


Link to post
Share on other sites

hello, i tried to build kernel for Nanopi A64 as @guidol suggested, but i can't get ethernet work.

 

Wifi works correctly. Tried 4.19 even 5.0.7-sunxi64, but no luck.

 

Any ideas ?

 

Thanks

Share this post


Link to post
Share on other sites
27 minutes ago, kamma said:

i tried to build kernel for Nanopi A64

Although I'm seeing some patches for NanoPi-A64 in Armbian, I don't see any board config to build an image.

 

EDIT : Oh ! I've just saw the OP, you are copying the pinea64.conf into nanopia64.conf and tweak it ?

Maybe it requires more if both boards don't have the same ethernet wiring ...

Share this post


Link to post
Share on other sites
1 hour ago, martinayotte said:

EDIT : Oh ! I've just saw the OP, you are copying the pinea64.conf into nanopia64.conf and tweak it ?

Maybe it requires more if both boards don't have the same ethernet wiring ...

as BOOFCONFIG I do use the file

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

(at the start of the thread)

now the defconfig is at

./build/cache/sources/u-boot/v2019.01/configs/nanopi_a64_defconfig

 

Ethernet does work Out-of-the-Box - last I did compile was 

Welcome to ARMBIAN 5.77 user-built Debian GNU/Linux 9 (stretch) 5.0.4-sunxi64
package bsp-kernel[5.77] u-boot[5.77] dtb[5.77] firmware[5.77] config[5.77]

Linux npi-a64 5.0.4-sunxi64 #5.77 SMP Wed Mar 27 19:59:03 +03 2019 aarch64 GNU/Linux

root@npi-a64(192.168.6.116):~# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.6.116  netmask 255.255.255.0  broadcast 192.168.6.255
        inet6 fd23:b12c:50db:0:ba:e4ff:fe72:fa2b  prefixlen 64  scopeid 0x0<global>
        inet6 fdb2:ce14:5c9b:0:ba:e4ff:fe72:fa2b  prefixlen 64  scopeid 0x0<global>
        inet6 fd76:b3ff:82c8:0:ba:e4ff:fe72:fa2b  prefixlen 64  scopeid 0x0<global>
        inet6 fdac:41b6:984c:0:ba:e4ff:fe72:fa2b  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::ba:e4ff:fe72:fa2b  prefixlen 64  scopeid 0x20<link>
        inet6 fdef:a3ae:c416:0:ba:e4ff:fe72:fa2b  prefixlen 64  scopeid 0x0<global>
        inet6 fd85:16d5:23d8:0:ba:e4ff:fe72:fa2b  prefixlen 64  scopeid 0x0<global>
        ether 02:ba:e4:72:fa:2b  txqueuelen 1000  (Ethernet)
        RX packets 1562577  bytes 218750965 (208.6 MiB)
        RX errors 0  dropped 17958  overruns 0  frame 0
        TX packets 919514  bytes 717638610 (684.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 22

  root@npi-a64(192.168.6.116):~# dmesg |grep eth0
[    5.251652] dwmac-sun8i 1c30000.ethernet eth0: No Safety Features support found
[    5.251666] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[    5.251673] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
[    5.253915] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[    5.253958] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

I could check tomorrow for newer image - but because I has to reinstall my armbian-build-system (problems because of trying to built for the Opi i96 on the same PC) - when recraeting the board-config-file for the NanoPi A64

 

Board-config-file-content is the same as above ;)

but I have to compile it tomorrow with the new u-boot 01/2019

Share this post


Link to post
Share on other sites
Welcome to ARMBIAN 5.78 user-built Debian GNU/Linux 9 (stretch) 4.19.25-sunxi64                          
System load:   0.12 0.29 0.15   Up time:       4 min
Memory usage:  7 % of 993MB     IP:            10.0.0.19
CPU temp:      42°C
Usage of /:    8% of 15G

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

Last login: Tue Apr  9 21:15:26 2019

kamma@nanopia64:~$ uname -a
Linux nanopia64 4.19.25-sunxi64 #5.78 SMP Tue Apr 9 21:01:55 UTC 2019 aarch64 GNU/Linux
kamma@nanopia64:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 02:ba:bf:d6:b9:12 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.19/24 brd 10.0.0.255 scope global dynamic eth0
       valid_lft 86229sec preferred_lft 86229sec
    inet6 2a00:1028:8382:9332:9a9a:a8ae:7e74:bbc/64 scope global noprefixroute dynamic
       valid_lft 86374sec preferred_lft 3574sec
    inet6 fe80::a3fd:bc26:a018:e979/64 scope link
       valid_lft forever preferred_lft forever
kamma@nanopia64:~$

it's working... thanks a lot.

 

Share this post


Link to post
Share on other sites

unfortunately, reason, why i tried to get armbian work was, that in official distribution one of two USB ports won't work.

and this issue is still here... :(

 

USB HDD Dock (with 2 disks) is connected to one port and it's working, but device on the second port is not visible at all (Prusa3D printer)

 

can someone help me ?

 

thanks a lot

 

 dmesg | grep usb
[    1.832048] ehci-platform 1c1b000.usb: EHCI Host Controller
[    1.832075] ehci-platform 1c1b000.usb: new USB bus registered, assigned bus number 3
[    1.832723] ehci-platform 1c1b000.usb: irq 14, io mem 0x01c1b000
[    1.844876] ehci-platform 1c1b000.usb: USB 2.0 started, EHCI 1.00
[    1.845033] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    1.845040] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.845046] usb usb3: Product: EHCI Host Controller
[    1.845052] usb usb3: Manufacturer: Linux 4.19.25-sunxi64 ehci_hcd
[    1.845057] usb usb3: SerialNumber: 1c1b000.usb
[    1.846271] ohci-platform 1c1b400.usb: Generic Platform OHCI controller
[    1.846291] ohci-platform 1c1b400.usb: new USB bus registered, assigned bus number 4
[    1.846541] ohci-platform 1c1b400.usb: irq 15, io mem 0x01c1b400
[    1.909099] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 4.19
[    1.909106] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.909112] usb usb4: Product: Generic Platform OHCI controller
[    1.909117] usb usb4: Manufacturer: Linux 4.19.25-sunxi64 ohci_hcd
[    1.909123] usb usb4: SerialNumber: 1c1b400.usb
[    2.185085] usb 3-1: new high-speed USB device number 2 using ehci-platform
[    2.351020] usb 3-1: New USB device found, idVendor=152d, idProduct=8561, bcdDevice= 1.01
[    2.351033] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[    2.351038] usb 3-1: Product: AXAGON USB3.0 HDD DOCK
[    2.351044] usb 3-1: Manufacturer: AXAGON
[    2.351050] usb 3-1: SerialNumber: 00A567A0
[    2.368469] usbcore: registered new interface driver uas

 

Share this post


Link to post
Share on other sites
9 hours ago, kamma said:

can someone help me ?

I think it a problem with the sun50i-a64-nanopi-a64.dtb because we are getting in dmesg the error

[    1.856548] sun4i-usb-phy 1c19400.phy: failed to get clock usb0_phy
 

So only usb1_phy is working :(

 

We need a specialist for dtb or the user avafinger

from https://github.com/avafinger/nanopi-a64-firmware

because for his image with the old kernel 3.10 he did get both usb-ports working:
 

Quote

Nano Pi A64 firmware ( u-boot, kernel 3.10.104 / kernel 3.10.105 )

Build v2 (works all USB receptacules)

 

At the github-page there are also old-style .dtb-files, but I didnt understand to convert the informaton for our new file :(

 

Share this post


Link to post
Share on other sites
13 hours ago, kamma said:

it's working... thanks a lot.

I got here from the lst compile
 

Welcome to ARMBIAN 5.78 user-built Debian GNU/Linux 9 (stretch) 5.0.7-sunxi64
package bsp-kernel[5.78] u-boot[5.78] dtb[5.78] firmware[5.77] config[5.78]

Linux npi-a64 5.0.7-sunxi64 #5.78 SMP Wed Apr 10 09:20:27 +03 2019 aarch64 GNU/Linux

defconfig for this image seems to come from 

./build/cache/sources/u-boot/pinebook-wip-20181109/configs/nanopi_a64_defconfig

 

but also here only the lower usb-port does work :(

 

also upper-port-usb doesnt work at the normal mainline-image

ARMBIAN 5.78 user-built Debian GNU/Linux 9 (stretch) 4.19.25-sunxi64
Linux nanopia64 4.19.25-sunxi64 #5.78 SMP Wed Apr 10 13:20:03 +03 2019 aarch64 GNU/Linux

 

Share this post


Link to post
Share on other sites
3 hours ago, guidol said:

but also here only the lower usb-port does work :(

 

also upper-port-usb doesnt work at the normal mainline-image

I've look at the schematic, and both upper/lower USB are hook up the same way on the A64, no switchable VBUS .

So, I presume it is only question of DT, but I don't see why it doesn't behave like PineA64...

Share this post


Link to post
Share on other sites
7 minutes ago, martinayotte said:

I've look at the schematic, and both upper/lower USB are hook up the same way on the A64, no switchable VBUS .

So, I presume it is only question of DT, but I don't see why it doesn't behave like PineA64...

 

There are 2x EHCI (USB 2.0?) and 2x OHCI (USB 1.1?) Busses:
 

[    1.880534] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[    1.897365] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[    2.048787] ehci-platform 1c1b000.usb: new USB bus registered, assigned bus number 3
[    2.065253] ohci-platform 1c1b400.usb: new USB bus registered, assigned bus number 4

when I connect a USB 2.0/3.0-Stick to the lower port the EHCI  1c1b000.usb is activated:
 

[ 7716.395733] usb 3-1: new high-speed USB device number 2 using ehci-platform
[ 7716.565611] usb-storage 3-1:1.0: USB Mass Storage device detected
[ 7716.576145] scsi host0: usb-storage 3-1:1.0

The first problem seems to be the dmesg-error-message:

[    1.857705] sun4i-usb-phy 1c19400.phy: failed to get clock usb0_phy

Strange for me is that only usb@1c1b000 and usb@1c1b400 have the following lines in the .dts:
 

                        phys = <0x21 0x1>;
                        phy-names = "usb";

but this phy-names is only in the deactivated usb@1c19000 compatible = "allwinner,sun8i-a33-musb"
anot not in usb@1c1a000 or  usb@1c1a400

 

usb0_phy is declared in phy@1c19400 compatible = "allwinner,sun50i-a64-usb-phy"
as clocks names clock-names = "usb0_phy", "usb1_phy"; 

clocks = <0x2 0x56 0x2 0x57>;

BUT the usb-ports do have the phandle <0x55> through <0x58>

So - do we need usb2_phy and usb3_phy or only more clocks names clocks = <0x2 0x55 0x2 0x58>;  ?

 

The same - I didnt understand - for the reset-handles:
 

                        resets = <0x2 0x0 0x2 0x1>;
                        reset-names = "usb0_reset", "usb1_reset";

 

Share this post


Link to post
Share on other sites

i found out, that with Pine64 defconfig both USBs are working properly

 

Linux pine64 4.19.25-sunxi64 #5.78 SMP Wed Apr 10 13:20:40 UTC 2019 aarch64 GNU/Linux

root@pine64:~# lsusb
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0781:b7b1 SanDisk Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@pine64:~# lsusb
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0781:b7b1 SanDisk Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

probably some diff between nanopia64 and pine64 should help...

Share this post


Link to post
Share on other sites
25 minutes ago, guidol said:

[ 1.857705] sun4i-usb-phy 1c19400.phy: failed to get clock usb0_phy

I have that too on Pine64, but "musb" is the microUSB, so nothing related to normal USBs .

9 minutes ago, kamma said:

i found out, that with Pine64 defconfig both USBs are working properly

Ah ! That is interesting... But how are the differ ? Can you diff them ?

Share this post


Link to post
Share on other sites
28 minutes ago, martinayotte said:

Ah ! That is interesting... But how are the differ ? Can you diff them ?

 

Hah :) I did found something....after @kamma did tell it would be OK with the PineA64-deconfig....

It seems that the deactivated usb@1c19000 allwinner,sun8i-a33-musb has to be activated as status = "okay";

and in dr_mode = "host"; like on the pine64

 

I changed the sun50i-a64-nanopi-a64.dts and compiled it back to .dtb and did put it in /boot/dtb/allwinner and reboot.

 

see config here in hidden spoiler:

Spoiler

NanoPi A64 (standard)
=====================

                usb@1c19000 {
                        compatible = "allwinner,sun8i-a33-musb";
                        reg = <0x1c19000 0x400>;
                        clocks = <0x2 0x29>;
                        resets = <0x2 0x12>;
                        interrupts = <0x0 0x47 0x4>;
                        interrupt-names = "mc";
                        phys = <0x21 0x0>;
                        phy-names = "usb";
                        extcon = <0x21 0x0>;
                        status = "disabled";
                        phandle = <0x54>;
                };


Pine A64
=====================

                usb@1c19000 {
                        compatible = "allwinner,sun8i-a33-musb";
                        reg = <0x1c19000 0x400>;
                        clocks = <0x2 0x29>;
                        resets = <0x2 0x12>;
                        interrupts = <0x0 0x47 0x4>;
                        interrupt-names = "mc";
                        phys = <0x22 0x0>;
                        phy-names = "usb";
                        extcon = <0x22 0x0>;
                        status = "okay";
                        dr_mode = "host";
                        phandle = <0x5b>;
                };
            
            
NanoPi A64 (activated / changed)
================================

                usb@1c19000 {
                        compatible = "allwinner,sun8i-a33-musb";
                        reg = <0x1c19000 0x400>;
                        clocks = <0x2 0x29>;
                        resets = <0x2 0x12>;
                        interrupts = <0x0 0x47 0x4>;
                        interrupt-names = "mc";
                        phys = <0x21 0x0>;
                        phy-names = "usb";
                        extcon = <0x21 0x0>;
                        status = "okay";
                        dr_mode = "host";
                        phandle = <0x54>;
                };            

 

Now the NanoPi A64 does recognize the USB-Stick at the upper port.

 

[    1.856580] sun4i-usb-phy 1c19400.phy: failed to get clock usb0_phy
[    2.129298] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    2.129351] usb_phy_generic usb_phy_generic.0.auto: Linked as a consumer to regulator.0

[    2.129630] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    2.129639] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 5
[    2.129813] usb usb5: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.00
[    2.129821] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.129826] usb usb5: Product: MUSB HDRC host driver
[    2.129832] usb usb5: Manufacturer: Linux 5.0.7-sunxi64 musb-hcd
[    2.129837] usb usb5: SerialNumber: musb-hdrc.1.auto
[   82.404779] usb 3-1: new high-speed USB device number 2 using ehci-platform
[   82.562191] usb 3-1: New USB device found, idVendor=0930, idProduct=6545, bcdDevice= 1.10
[   82.562202] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   82.562206] usb 3-1: Product: TransMemory-Mx
[   82.562211] usb 3-1: Manufacturer: TOSHIBA
[   82.562215] usb 3-1: SerialNumber: C03FD55EAF4CEFC050138484
[   82.563032] usb-storage 3-1:1.0: USB Mass Storage device detected
[   82.570592] scsi host0: usb-storage 3-1:1.0
[   89.518200] usb 3-1: USB disconnect, device number 2
[   92.721680] usb 1-1: new high-speed USB device number 3 using ehci-platform
[   92.879376] usb 1-1: New USB device found, idVendor=0930, idProduct=6545, bcdDevice= 1.10
[   92.879387] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   92.879391] usb 1-1: Product: TransMemory-Mx
[   92.879395] usb 1-1: Manufacturer: TOSHIBA
[   92.879400] usb 1-1: SerialNumber: C03FD55EAF4CEFC050138484
[   92.880125] usb-storage 1-1:1.0: USB Mass Storage device detected
[   92.883967] scsi host0: usb-storage 1-1:1.0
[ 1054.498911] usb 1-1: USB disconnect, device number 3

Share this post


Link to post
Share on other sites
1 minute ago, martinayotte said:

Good ! So, you will probably submit a PR now ? :thumbup:

I dont know how to do that - and how to submit a PR for a less than unsupported board?

Share this post


Link to post
Share on other sites
3 minutes ago, guidol said:

I dont know how to do that - and how to submit a PR for a less than unsupported board?

 

can you post at least diff here ?

Share this post


Link to post
Share on other sites
10 minutes ago, kamma said:

 

can you post at least diff here ?

its already there :) see above and open the spoiler or here formated:

 

NanoPi A64 (standard)
=====================

                usb@1c19000 {
                        compatible = "allwinner,sun8i-a33-musb";
                        reg = <0x1c19000 0x400>;
                        clocks = <0x2 0x29>;
                        resets = <0x2 0x12>;
                        interrupts = <0x0 0x47 0x4>;
                        interrupt-names = "mc";
                        phys = <0x21 0x0>;
                        phy-names = "usb";
                        extcon = <0x21 0x0>;
                        status = "disabled";
                        phandle = <0x54>;
                };

 

NanoPi A64 (activated / changed)
================================

                usb@1c19000 {
                        compatible = "allwinner,sun8i-a33-musb";
                        reg = <0x1c19000 0x400>;
                        clocks = <0x2 0x29>;
                        resets = <0x2 0x12>;
                        interrupts = <0x0 0x47 0x4>;
                        interrupt-names = "mc";
                        phys = <0x21 0x0>;
                        phy-names = "usb";
                        extcon = <0x21 0x0>;
                        status = "okay";
                        dr_mode = "host";

                        phandle = <0x54>;
                };    

 

 

My first diff ;)
 

root@npi-a64(192.168.6.116):/home/guido# diff sun50i-a64-nanopi-a64.dts sun50i-a64-nanopi-a64_guido3.dts
572c572,573
<                       status = "disabled";
---
>                         status = "okay";
>                         dr_mode = "host";
 

DTC-decompile .dtb to .dts

dtc -I dtb -O dts ./sun50i-a64-nanopi-a64.dtb -o sun50i-a64-nanopi-a64.dts
 

saved as sun50i-a64-nanopi-a64_guido3.dts
after it has been edited

 

DTC-compile .dts to .dtb

dtc -I dts -O dtb ./sun50i-a64-nanopi-a64_guido3.dts -o sun50i-a64-nanopi-a64_guido3.dtb

 

then copy it to /boot/dtb/allwinner and reboot

cp sun50i-a64-nanopi-a64_guido3.dtb /boot/dtb/allwinner/sun50i-a64-nanopi-a64.dtb

(please make backup of original sun50i-a64-nanopi-a64.dtb before copying)

 

Share this post


Link to post
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
Reply to this topic...

×   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...
0