Missing Mediatek Ethernet drivers

Bug #2069001 reported by Leith Bade
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-meta-hwe-6.5 (Ubuntu)
New
Undecided
Unassigned

Bug Description

I booted up the Ubuntu Server ARM64 installer USB stick on my Bananapi BPI-R3 board which has a Mediatek MT7986 SoC CPU.

I used the device tree from https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts and with U-boot's bootefi support to boot the USB stick.

After booting up I noticed the installer had no Internet connection.

I did some investigation and ended up checking:
cat /boot/config-6.5.0-18-generic | grep MEDIATEK
...
# CONFIG_NET_VENDOR_MEDIATEK is not set
...

So the Mediatek Ethernet drivers are not configured to be compiled.

So can the Ubuntu 22.04 ARM64 HWE kernel be updated to support Mediatek SoC Ethernet devices? Also check the other LTS Ubuntus releases for this kernel module as well.

I checked all the other devices from the device tree file and they all have the relevant kernel modules configured for compilation, so the Ethernet device is the only one not working.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: linux-generic-hwe-22.04 6.5.0.18.18~22.04.10
Uname: Linux 6.5.0-18-generic aarch64
Architecture: arm64
Date: Tue Nov 21 21:06:40 2023
ProcEnviron:
 LANG=C.UTF-8
 TERM=vt220
 XDG_RUNTIME_DIR=<set>
 PATH=(custom, no user)
SourcePackage: linux-meta-hwe-6.5

Revision history for this message
Leith Bade (ljbade) wrote :
Revision history for this message
Leith Bade (ljbade) wrote :

I tested the Ubuntu 24.04 Server installer and that has the same issue - the CONFIG_NET_VENDOR_MEDIATEK is not configured in it's 6.8 kernel.

Revision history for this message
Leith Bade (ljbade) wrote :

I re-compiled the Ubuntu 6.8 kernel with the Mediatek net module enabled.

However I ran into problems with the MDIO port which was preventing the mt7530-mdio driver from setting up the MT7531 switch chip on the board.

I was seeing errors like:
[ 17.353755] mt7530-mdio mdio-bus:1f: failed to read mt7530 register
[ 18.360696] mtk_soc_eth 15100000.ethernet: mdio: MDIO timeout
[ 18.367009] mt7530-mdio mdio-bus:1f: failed to read mt7530 register
[ 18.374606] mt7530-mdio mdio-bus:1f: reset timeout
[ 18.380775] mt7530-mdio: probe of mdio-bus:1f failed with error -110

From the information in https://forum.banana-pi.org/t/sfp-oem-sfp-2-5g-t-kernel-phy/15872/116 there appears to be an issue with some clocks that get disabled by the kernel.

Reported work arounds are to compile mtk-eth as built-in driver, or to stop the kernel from disabling clocks via the kernel parameter "clk_ignore_unused".

I used the kernel parameter work around and the mt7530 driver now loads:
[ 14.969089] mt7530-mdio mdio-bus:1f: configuring for fixed/2500base-x link mode
[ 14.972329] mt7530-mdio mdio-bus:1f: Link is Up - 2.5Gbps/Full - flow control rx/tx

I am not sure if this clock bug has been fixed in a more recent kernel release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.