A20 lime2 network driver problem?

Started by wireuser, May 02, 2021, 11:04:36 am

Previous topic - Next topic

wireuser

Hi,
I am a newbie with olinux A20. I have installed to sd card the A20-OLinuXino-focal-base-20210318-122357.img.7z image, and boot with that. Everything works ok, but I cannot connect with ethernet. I am getting
"stmmac-0:01 driver RTL8211E Gigabit"
Failed to reset the dma
stmmac_hw_setup: DMA engine initialization failed
stmmac_open: Hw setup failed

What is wrong I cannot figure out yet, any help would greatly appreciated!!

LubOlimex

Probably wrong config got loaded.

1. What hardware revision of A20-OLinuXino-LIME2 do you have?

2. Show us the bootlog at start to see how the board got recognized. Post the bootlog somewhere and post the link here.

3. Did you use the same card on another board first? Or was it first used on the LIME2 board in question?

If the board got recognized improperly the configuration maybe the configuration can be manually set in u-boot via olinuxino config command.
Technical support and documentation manager at Olimex

wwarczak

Hello

I have exactly the same problem: new system dont start ethernet.
Board: Olimex A20-OLinuXino-LIME2 rev c


[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.60-olimex (root@runner-cpbkaozn-project-1-concurrent-0) (arm-linux-gnueabihf-gcc (Debian 8.3.0-2) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #123632 SMP Sat Aug 21 12:38:05 UTC 2021
[    0.000000] CPU: ARMv7 Processor [410fc074] revision 4 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Olimex A20-OLinuXino-LIME
[    0.000000] Memory policy: Data cache writealloc

['']

[    1.099355] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 54, base_baud = 1500000) is a 16550A
[    1.116220] printk: console [ttyS0] enabled
[    1.117709] STM32 USART driver initialized
[    1.128603] brd: module loaded
[    1.261099] loop: module loaded
[    1.262486] ahci-sunxi 1c18000.sata: supply ahci not found, using dummy regulator
[    1.262786] ahci-sunxi 1c18000.sata: supply phy not found, using dummy regulator
[    1.265430] libphy: Fixed MDIO Bus: probed
[    1.266452] sun4i-pinctrl 1c20800.pinctrl: supply vcc-pa not found, using dummy regulator
[    1.266702] sun7i-dwmac 1c50000.ethernet: IRQ eth_wake_irq not found
[    1.266715] sun7i-dwmac 1c50000.ethernet: IRQ eth_lpi not found
[    1.266921] sun7i-dwmac 1c50000.ethernet: PTP uses main clock
[    1.266937] sun7i-dwmac 1c50000.ethernet: no reset control found
[    1.266978] sun7i-dwmac 1c50000.ethernet: no regulator found
[    1.267420] sun7i-dwmac 1c50000.ethernet: Version ID not available
[    1.267448] sun7i-dwmac 1c50000.ethernet:    DWMAC1000
[    1.267461] sun7i-dwmac 1c50000.ethernet: DMA HW capability register supported
[    1.267473] sun7i-dwmac 1c50000.ethernet: Normal descriptors
[    1.267481] sun7i-dwmac 1c50000.ethernet: Ring mode enabled
[    1.268199] libphy: stmmac: probed
[    1.292466] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.292489] ehci-platform: EHCI generic platform driver
[    1.293469] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.293527] ohci-platform: OHCI generic platform driver
[    1.294609] usbcore: registered new interface driver usb-storage
[    1.296311] sunxi-rtc 1c20d00.rtc: registered as rtc0
[    1.296386] sunxi-rtc 1c20d00.rtc: setting system clock to 1970-01-01T00:09:20 UTC (560)
[    1.296630] i2c /dev entries driver
[    1.298291] axp20x-i2c 0-0034: AXP20x variant AXP209 found
[    1.305776] input: axp20x-pek as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0034/axp20x-pek/input/input0
[    1.314898] ldo1: supplied by regulator-dummy
[    1.315950] ldo2: supplied by regulator-dummy
[    1.316543] vddio-csi1: Bringing 2800000uV into 3300000-3300000uV
[    1.317694] axp20x-i2c 0-0034: unsupported ramp value 1900
[    1.323226] vddio-csi1: failed to set ramp_delay: -EINVAL
[    1.328667] axp20x-regulator axp20x-regulator: Failed to register ldo3
[    1.335783] axp20x-regulator: probe of axp20x-regulator failed with error -22
[    1.337444] axp20x-i2c 0-0034: AXP20X driver loaded
[    1.341882] sunxi-wdt 1c20c90.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.342693] sdhci: Secure Digital Host Controller Interface driver
[    1.342705] sdhci: Copyright(c) Pierre Ossman
[    1.342711] Synopsys Designware Multimedia Card Interface Driver
[    1.343522] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.343981] sun4i-pinctrl 1c20800.pinctrl: supply vcc-pf not found, using dummy regulator
[    1.344868] sun4i-pinctrl 1c20800.pinctrl: supply vcc-ph not found, using dummy regulator
[    1.346639] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[    1.347053] ledtrig-cpu: registered to indicate activity on CPUs
[    1.347229] hid: raw HID events driver (C) Jiri Kosina
[    1.347401] usbcore: registered new interface driver usbhid
[    1.347409] usbhid: USB HID core driver
[    1.350526] Initializing XFRM netlink socket
[    1.351320] NET: Registered protocol family 10
[    1.369673] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.404632] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.406692] mmc0: new high speed SDHC card at address 0001
[    1.408090] mmcblk0: mmc0:0001 JB1RT 29.8 GiB
[    1.411566]  mmcblk0: p1
[    1.418345] Segment Routing with IPv6
[    1.418516] NET: Registered protocol family 17
[    1.418571] NET: Registered protocol family 15
[    1.418833] 8021q: 802.1Q VLAN Support v1.8
[    1.418936] Key type dns_resolver registered
[    1.419089] Registering SWP/SWPB emulation handler
[    1.419574] registered taskstats version 1
[    1.419596] Loading compiled-in X.509 certificates
[    1.419754] zswap: loaded using pool lzo/zbud
[    1.420712] Key type ._fscrypt registered
[    1.420728] Key type .fscrypt registered
[    1.420735] Key type fscrypt-provisioning registered
[    1.450832] Key type encrypted registered
[    1.468160] sun4i-pinctrl 1c20800.pinctrl: supply vcc-pc not found, using dummy regulator
[    1.472827] ahci-sunxi 1c18000.sata: supply ahci not found, using dummy regulator
[    1.473183] ahci-sunxi 1c18000.sata: supply phy not found, using dummy regulator
[    1.533094] ahci-sunxi 1c18000.sata: controller can't do PMP, turning off CAP_PMP
[    1.533120] ahci-sunxi 1c18000.sata: forcing PORTS_IMPL to 0x1
[    1.533211] ahci-sunxi 1c18000.sata: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl platform mode
[    1.533229] ahci-sunxi 1c18000.sata: flags: ncq sntf pm led clo only pio slum part ccc
[    1.534739] scsi host0: ahci-sunxi
[    1.535307] ata1: SATA max UDMA/133 mmio [mem 0x01c18000-0x01c18fff] port 0x100 irq 44
[    1.536498] ehci-platform 1c14000.usb: EHCI Host Controller
[    1.536545] ehci-platform 1c14000.usb: new USB bus registered, assigned bus number 1
[    1.537250] ehci-platform 1c14000.usb: irq 40, io mem 0x01c14000
[    1.553069] ehci-platform 1c14000.usb: USB 2.0 started, EHCI 1.00
[    1.553402] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    1.553417] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.553427] usb usb1: Product: EHCI Host Controller
[    1.553436] usb usb1: Manufacturer: Linux 5.10.60-olimex ehci_hcd
[    1.553445] usb usb1: SerialNumber: 1c14000.usb
[    1.554413] hub 1-0:1.0: USB hub found
[    1.554495] hub 1-0:1.0: 1 port detected
[    1.556053] ehci-platform 1c1c000.usb: EHCI Host Controller
[    1.556123] ehci-platform 1c1c000.usb: new USB bus registered, assigned bus number 2
[    1.556634] ehci-platform 1c1c000.usb: irq 45, io mem 0x01c1c000
[    1.569063] ehci-platform 1c1c000.usb: USB 2.0 started, EHCI 1.00
[    1.569429] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    1.569443] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.569452] usb usb2: Product: EHCI Host Controller
[    1.569461] usb usb2: Manufacturer: Linux 5.10.60-olimex ehci_hcd
[    1.569469] usb usb2: SerialNumber: 1c1c000.usb
[    1.570385] hub 2-0:1.0: USB hub found
[    1.570462] hub 2-0:1.0: 1 port detected
[    1.572008] ohci-platform 1c14400.usb: Generic Platform OHCI controller
[    1.572051] ohci-platform 1c14400.usb: new USB bus registered, assigned bus number 3
[    1.572557] ohci-platform 1c14400.usb: irq 41, io mem 0x01c14400
[    1.633340] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.10
[    1.633360] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.633369] usb usb3: Product: Generic Platform OHCI controller
[    1.633378] usb usb3: Manufacturer: Linux 5.10.60-olimex ohci_hcd
[    1.633386] usb usb3: SerialNumber: 1c14400.usb
[    1.634303] hub 3-0:1.0: USB hub found
[    1.634377] hub 3-0:1.0: 1 port detected
[    1.635931] ohci-platform 1c1c400.usb: Generic Platform OHCI controller
[    1.635973] ohci-platform 1c1c400.usb: new USB bus registered, assigned bus number 4
[    1.636486] ohci-platform 1c1c400.usb: irq 46, io mem 0x01c1c400
[    1.697516] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.10
[    1.697537] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.697547] usb usb4: Product: Generic Platform OHCI controller
[    1.697556] usb usb4: Manufacturer: Linux 5.10.60-olimex ohci_hcd
[    1.697564] usb usb4: SerialNumber: 1c1c400.usb
[    1.698502] hub 4-0:1.0: USB hub found
[    1.698583] hub 4-0:1.0: 1 port detected
[    1.700158] usb_phy_generic usb_phy_generic.0.auto: supply vcc not found, using dummy regulator
[    1.701643] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.701691] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 5
[    1.702141] usb usb5: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    1.702157] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.702166] usb usb5: Product: MUSB HDRC host driver
[    1.702174] usb usb5: Manufacturer: Linux 5.10.60-olimex musb-hcd
[    1.702183] usb usb5: SerialNumber: musb-hdrc.1.auto
[    1.703065] hub 5-0:1.0: USB hub found
[    1.703164] hub 5-0:1.0: 1 port detected
[    1.719612] ALSA device list:
[    1.719635]   No soundcards found.
[    1.851574] ata1: SATA link down (SStatus 0 SControl 300)
[    1.856370] Freeing unused kernel memory: 1024K
[    1.856696] Run /init as init process
[    1.856705]   with arguments:
[    1.856710]     /init
[    1.856715]   with environment:
[    1.856720]     HOME=/
[    1.856725]     TERM=linux
[    1.997184] usb 4-1: new low-speed USB device number 2 using ohci-platform
[    2.227156] random: fast init done
[    2.229257] usb 4-1: New USB device found, idVendor=413c, idProduct=2111, bcdDevice= 1.78
[    2.229284] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.229296] usb 4-1: Product: Dell USB Wired Entry Keyboard
[    2.229305] usb 4-1: Manufacturer: Dell
[    2.242887] input: Dell Dell USB Wired Entry Keyboard as /devices/platform/soc/1c1c400.usb/usb4/4-1/4-1:1.0/0003:413C:2111.0001/input/input1
[    2.302347] hid-generic 0003:413C:2111.0001: input,hidraw0: USB HID v1.10 Keyboard [Dell Dell USB Wired Entry Keyboard] on usb-1c1c400.usb-1/input0
[    2.311290] input: Dell Dell USB Wired Entry Keyboard Consumer Control as /devices/platform/soc/1c1c400.usb/usb4/4-1/4-1:1.1/0003:413C:2111.0002/input/input2
[    2.369680] input: Dell Dell USB Wired Entry Keyboard System Control as /devices/platform/soc/1c1c400.usb/usb4/4-1/4-1:1.1/0003:413C:2111.0002/input/input3
[    2.370142] hid-generic 0003:413C:2111.0002: input,hidraw1: USB HID v1.10 Device [Dell Dell USB Wired Entry Keyboard] on usb-1c1c400.usb-1/input1
[    3.239692] axp20x-gpio axp20x-gpio: DMA mask not set
[    3.250683] axp20x-gpio axp20x-gpio: AXP209 pinctrl and GPIO driver loaded
[    4.165236] process '/usr/bin/fstype' started with executable stack
[    4.357749] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[    5.091939] systemd[1]: System time before build time, advancing clock.
[    5.245905] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
[    5.246730] systemd[1]: Detected architecture arm.
[    5.290627] systemd[1]: Set hostname to <a20-olinuxino>.
[    6.289696] random: systemd: uninitialized urandom read (16 bytes read)
[    6.299911] random: systemd: uninitialized urandom read (16 bytes read)
[    6.301624] systemd[1]: Listening on Journal Socket.
[    6.320929] random: systemd: uninitialized urandom read (16 bytes read)
[    6.332099] systemd[1]: Starting Load Kernel Modules...
[    6.351078] systemd[1]: Listening on udev Control Socket.
[    6.370813] systemd[1]: Listening on fsck to fsckd communication Socket.
[    6.396896] systemd[1]: Starting Nameserver information manager...
[    6.414840] systemd[1]: Starting Create list of required static device nodes for the current kernel...
[    6.445613] systemd[1]: Mounting Kernel Debug File System...
[    6.472263] g_serial gadget: Gadget Serial v2.4
[    6.472288] g_serial gadget: g_serial ready
[    6.650243] EXT4-fs (mmcblk0p1): re-mounted. Opts: commit=600,errors=remount-ro
[    7.902755] systemd-journald[199]: Received request to flush runtime journal from PID 1
[    9.819323] mc: Linux media interface: v0.10
[    9.891407] sun4i-drm display-engine: bound 1e00000.display-frontend (ops 0xc0b67dc8)
[    9.891606] sun4i-drm display-engine: bound 1e20000.display-frontend (ops 0xc0b67dc8)
[    9.892156] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0b67568)
[    9.892179] sun4i-drm display-engine: attempt to add DMA range to existing map
[    9.900200] sun4i-drm display-engine: bound 1e40000.display-backend (ops 0xc0b67568)
[    9.901168] sun4i-drm display-engine: No panel or bridge found... RGB output disabled
[    9.901210] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0b65ec8)
[    9.902154] sun4i-drm display-engine: No panel or bridge found... RGB output disabled
[    9.902197] sun4i-drm display-engine: bound 1c0d000.lcd-controller (ops 0xc0b65ec8)
[    9.950156] sun4i-ss 1c15000.crypto-engine: Die ID 0
[    9.957276] videodev: Linux video capture interface: v2.00
[   10.007801] sun4i-drm display-engine: bound 1c16000.hdmi (ops sun4i_hdmi_ops [sun4i_drm_hdmi])
[   10.041287] checking generic (7f817000 7e9000) vs hw (0 ffffffff)
[   10.041315] fb0: switching to sun4i-drm-fb from simple
[   10.047665] Console: switching to colour dummy device 80x30
[   10.048835] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[   10.063376] sunxi_cedrus: module is from the staging directory, the quality is unknown, you have been warned.
[   10.082031] cedrus 1c0e000.video-codec: Device registered as /dev/video0
[   10.164425] Console: switching to colour frame buffer device 240x67
[   10.209456] sun4i-drm display-engine: [drm] fb0: sun4i-drmdrmfb frame buffer device
[   10.374694] at24 1-0050: supply vcc not found, using dummy regulator
[   10.389206] at24 1-0050: 2048 byte 24c16 EEPROM, writable, 16 bytes/write
[   10.411721] lima 1c40000.gpu: gp - mali400 version major 1 minor 1
[   10.411820] lima 1c40000.gpu: pp0 - mali400 version major 1 minor 1
[   10.411914] lima 1c40000.gpu: pp1 - mali400 version major 1 minor 1
[   10.411981] lima 1c40000.gpu: l2 cache 64K, 4-way, 64byte cache line, 64bit external bus
[   10.463139] lima 1c40000.gpu: bus rate = 300000000
[   10.463167] lima 1c40000.gpu: mod rate = 384000000
[   10.464026] [drm] Initialized lima 1.1.0 20191231 for 1c40000.gpu on minor 1
[   10.551979] axp20x-ac-power-supply axp20x-ac-power-supply: DMA mask not set
[   10.552810] axp20x-battery-power-supply axp20x-battery-power-supply: DMA mask not set
[   10.552817] axp20x-adc axp20x-adc: DMA mask not set
[   12.621898] sun7i-dwmac 1c50000.ethernet eth0: PHY [stmmac-0:01] driver [RTL8211B Gigabit Ethernet] (irq=POLL)
[   12.829215] sun7i-dwmac 1c50000.ethernet: Failed to reset the dma
[   12.835485] sun7i-dwmac 1c50000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
[   12.844411] sun7i-dwmac 1c50000.ethernet eth0: stmmac_open: Hw setup failed






Very old factory image works fine:





[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.4.103-00033-g9a1cd03-dirty (root@debian) (gcc version 4.7.2 (Debian 4.7.2-5) ) #29 SMP PREEMPT Tue Apr 5 08:21:20 EEST 2016
[    0.000000] CPU: ARMv7 Processor [410fc074] revision 4 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

LubOlimex

I can't see how the board is listed at start. Can you post the full boot log somewhere and give me link?

I still think you might need to manually tell the image which board and board revision you are using. Refer to chapter 7 ("U-boot tools") of this guide:

https://github.com/OLIMEX/OLINUXINO/blob/master/DOCUMENTS/OLIMAGE/Olimage-guide.pdf
Technical support and documentation manager at Olimex