Jump to content

Ethernet Broken in Rev.K Olimex Lime2 board


Suvhm

Recommended Posts

Hello Team,

 

I am worked on Olimex Lime2 rev.G2 board  but now olimex start delivering Rev.K board.

I used the same Armbian Rev 5.35 image which is having kernel version (4.13.16-sunxi) & u-boot version v2017.09.

On Rev.G2 Ethernet speed was as expected but in rev.K it is not working.

By default board booted and comes with ethernet speed 100Mbps, but in this case Ethernet is not working (DHCP server unable to assign ipv4 address to eth0).

Later i reduce the eth0 speed to 10Mbps it start working as expected but spped is 10Mbps


Some more info about the ethernet issue which will help to understand the issue more clearly -

Quote

 

Ethernet controller Id : KSZ9031

Kernel Revision : 4.13.16-sunxi

U-boot Revision : v2017.09

 

Dmesg log : [  513.274671] Micrel KSZ9031 Gigabit PHY stmmac-0:01: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=stmmac-0:01, irq=-1)
[  513.276751] sun7i-dwmac 1c50000.ethernet eth0: RX IPC Checksum Offload disabled
[  513.276767] sun7i-dwmac 1c50000.ethernet eth0: No MAC Management Counters available
[  513.276777] sun7i-dwmac 1c50000.ethernet eth0: PTP not supported by HW
[  513.277069] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  515.363349] sun7i-dwmac 1c50000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[  515.363397] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

 

Command to reduce the speed : "ethtool --change eth0 speed 10 duplex full autoneg on"

eth0 info : Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Full
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
        Link partner advertised pause frame use: Symmetric Receive-only
        Link partner advertised auto-negotiation: Yes
        Speed: 10Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: d
        Wake-on: d
        Current message level: 0x0000003f (63)
                               drv probe link timer ifdown ifup
        Link detected: yes
 

iperf3 log : Connecting to host 10.42.0.1, port 5201
[  4] local 10.42.0.89 port 54528 connected to 10.42.0.1 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  1.18 MBytes  9.89 Mbits/sec    0   29.7 KBytes       
[  4]   1.00-2.00   sec  1.06 MBytes  8.92 Mbits/sec    0   29.7 KBytes       
[  4]   2.00-3.00   sec  1.03 MBytes  8.66 Mbits/sec    0   29.7 KBytes       
[  4]   3.00-4.00   sec  1.12 MBytes  9.43 Mbits/sec    0   29.7 KBytes       
[  4]   4.00-5.00   sec  1.09 MBytes  9.18 Mbits/sec    0   29.7 KBytes       
[  4]   5.00-6.00   sec  1.09 MBytes  9.17 Mbits/sec    0   29.7 KBytes       
[  4]   6.00-7.00   sec  1.15 MBytes  9.68 Mbits/sec    0   29.7 KBytes       
[  4]   7.00-8.00   sec  1.09 MBytes  9.17 Mbits/sec    0   29.7 KBytes       
[  4]   8.00-9.00   sec  1.09 MBytes  9.17 Mbits/sec    0   29.7 KBytes       
[  4]   9.00-10.00  sec  1.09 MBytes  9.17 Mbits/sec    0   29.7 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  11.0 MBytes  9.25 Mbits/sec    0             sender
[  4]   0.00-10.00  sec  11.0 MBytes  9.20 Mbits/sec                  receiver

iperf Done.

 

Quote

Ethernet not working so unable to contact server to upload the debug log

 

sudo armbianmonitor -U logs

 

  4155  ### Loaded modules:
  4156   
  4157  Module                  Size  Used by
  4158  bnep                   20480  2
  4159  bluetooth             262144  7 bnep
  4160  ecdh_generic           24576  1 bluetooth
  4161  rfkill                 20480  3 bluetooth
  4162  ip6_tunnel             24576  0
  4163  tunnel6                16384  1 ip6_tunnel
  4164  tun                    28672  2
  4165  xfrm_user              28672  0
  4166  xfrm4_tunnel           16384  0
  4167  tunnel4                16384  1 xfrm4_tunnel
  4168  ipcomp                 16384  0
  4169  xfrm_ipcomp            16384  1 ipcomp
  4170  esp4                   20480  0
  4171  ah4                    16384  0
  4172  af_key                 28672  0
  4173  xfrm_algo              16384  5 xfrm_user,esp4,ah4,af_key,xfrm_ipcomp
  4174  sun4i_gpadc_iio        16384  0
  4175  zram                   20480  2
  4176  at24                   16384  0
  4177  evdev                  20480  1
  4178  nvmem_sunxi_sid        16384  0
  4179  sun4i_ts               16384  0
  4180  sun4i_gpadc            16384  0
  4181  sun4i_ss               24576  0
  4182  uio_pdrv_genirq        16384  0
  4183  uio                    16384  1 uio_pdrv_genirq
  4184  squashfs               32768  8
  4185  micrel                 16384  1
  4186  bonding                94208  0

  4187  pwrseq_emmc            16384  1
 

  4139   
  4140  ### Installed packages:
  4141   
  4142  ii  armbian-config                 5.35                                       all          Armbian configuration utility
  4143  ii  armbian-firmware               5.35                                       all          Linux firmware
  4144  ii  armbian-tools-xenial           5.35                                       armhf        Armbian tools, temper, Cubie bt utils
  4145  ii  hostapd                        3:2.7-99~armbian5.73+1                     armhf        IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator
  4146  ii  linux-base                     4.0ubuntu1                                 all          Linux image base package
  4147  hi  linux-dtb-next-sunxi           5.35                                       armhf        Linux DTB, version 4.13.16-sunxi
  4148  ii  linux-firmware                 1.157.16                                   all          Firmware for Linux kernel drivers
  4149  hi  linux-image-next-sunxi         5.35                                       armhf        Linux kernel, version 4.13.16-sunxi
  4150  ii  linux-libc-dev:armhf           4.4.0-112.135                              armhf        Linux Kernel Headers for development
  4151  hi  linux-u-boot-lime2-next        5.35                                       armhf        Uboot loader 2017.09
  4152  ii  linux-xenial-root-next-lime2   5.35                                       armhf        Armbian tweaks for xenial on lime2 (next branch)
  4153  ii  sunxi-tools                    1.4.2-2~armbian5.73+1                      armhf        tools for working with Allwinner (sunxi) ARM processors
  4154  

 
  4007  ### ip addr:
  4008   
  4009  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
  4010      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  4011      inet XXX.XXX.0.1/8 scope host lo
  4012         valid_lft forever preferred_lft forever
  4013      inet6 ::1/128 scope host 
  4014         valid_lft forever preferred_lft forever
  4015  2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
  4016      link/ether 02:96:07:42:e5:36 brd ff:ff:ff:ff:ff:ff
  4017  3: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
  4018      link/ether 2a:6c:f1:e5:49:61 brd ff:ff:ff:ff:ff:ff
 

 3923  ### lscpu:
  3924   
  3925  Architecture:          armv7l
  3926  Byte Order:            Little Endian
  3927  CPU(s):                2
  3928  On-line CPU(s) list:   0,1
  3929  Thread(s) per core:    1
  3930  Core(s) per socket:    2
  3931  Socket(s):             1
  3932  Model name:            ARMv7 Processor rev 4 (v7l)
  3933  CPU max MHz:           960.0000
  3934  CPU min MHz:           144.0000
  3935  Hypervisor vendor:     (null)
  3936  Virtualization type:   full
  3937   
  3938  ### cpuinfo:
  3939   
  3940  processor       : 0
  3941  model name      : ARMv7 Processor rev 4 (v7l)
  3942  BogoMIPS        : 50.52
  3943  Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm 
  3944  CPU implementer : 0x41
  3945  CPU architecture: 7
  3946  CPU variant     : 0x0
  3947  CPU part        : 0xc07
  3948  CPU revision    : 4
  3949   
  3950  processor       : 1
  3951  model name      : ARMv7 Processor rev 4 (v7l)
  3952  BogoMIPS        : 50.52
  3953  Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm 
  3954  CPU implementer : 0x41
  3955  CPU architecture: 7
  3956  CPU variant     : 0x0
  3957  CPU part        : 0xc07
  3958  CPU revision    : 4
  3959   
  3960  Hardware        : Allwinner sun7i (A20) Family
  3961  Revision        : 0000
  3962  Serial          : 165166960742e536
 

  3890  ### armbian-release:
  3891   
  3892  # PLEASE DO NOT EDIT THIS FILE
  3893  BOARD=lime2
  3894  BOARD_NAME="Lime 2"
  3895  VERSION=5.35
  3896  LINUXFAMILY=sunxi
  3897  BRANCH=next
  3898  ARCH=arm
  3899  IMAGE_TYPE=user-built
  3900  BOARD_TYPE=conf
  3901  INITRD_ARCH=arm
  3902  KERNEL_IMAGE_TYPE=zImage

 

Any help is really appreciated.

Thank You !

Suvhm 

Quote

 

  

 

Link to comment
Share on other sites

18 minutes ago, Suvhm said:

Any help is really appreciated.


For start, please use most recent build from the download section. It is also possible to upgrade.

Link to comment
Share on other sites

Thanks Igro for your prompt respond and sorry for delay in my side.

Actually i have decided to change the base code and update the ubuntu version from xenial to bionic, similarly for kernel and uboot version .

Now i had pulled the latest armbian SD-card image that works for me, but when i tried to port my application i found GPIO 67 is showing that device is already busy.

 

I had used GPIO 67 in my application for rev.G board it was working fine, but when i try to port the same application on latest revision of board(rev.L) it through an error that device is busy.

Steps :

 

  1. Tried to expose the control of gpio 67 from kernel to user space (echo 67 > /sys/class/gpio/export)
  2. Trying to set the direction, but unfortunately in the above step it shows device is busy

 

Quote

root@suvhm:~# cat /sys/kernel/debug/gpio                                                                               
gpiochip0: GPIOs 0-287, parent: platform/1c20800.pinctrl, 1c20800.pinctrl:                                               
 gpio-67  (                    |ahci-5v             ) out hi                                                             
 gpio-80  (                    |reset               ) out hi ACTIVE LOW                                                 
 gpio-81  (                    |usb0-vbus           ) out lo
 gpio-192 (                    |sysfs               ) out lo
 gpio-193 (                    |sysfs               ) out lo
 gpio-225 (                    |cd                  ) in  lo IRQ ACTIVE LOW
 gpio-226 (                    |a20-olinuxino-lime2:) out hi
 gpio-227 (                    |usb2-vbus           ) out hi
 gpio-228 (                    |usb0_id_det         ) in  hi IRQ
 gpio-229 (                    |usb0_vbus_det       ) in  lo IRQ
 gpio-230 (                    |usb1-vbus           ) out hi

It seems GPIO 67 is already taken by some module/driver.

 


here we can check some "ahci-5v" is taken the 67 no GPIO.
Any help to understand what all changes had been done in latest rev.l board in GPIO perspective.

 

Additional info :

  • Linux suvhm 5.2.21-sunxi #5.92.4 SMP Thu Dec 12 08:46:22 EET 2019 armv7l armv7l armv7l GNU/Linux
  • Armbian version : 5.92.4

I appreciate your support here :)

Regards,
suvhm

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines