#1037281 Please add support for MediaTek MT7986 in U-Boot

#1037281#5
Date:
2023-06-10 05:01:01 UTC
From:
To:
Hello Vagrant

I'm interested in the Router BANANA Pi R3 from Sinovoip:
https://wiki.banana-pi.org/Banana_Pi_BPI-R3

This Banana Pi has MediaTek MT7986 (Filogic 830).

Is it possible, to support this SoC within U-Boot?
In case you say, YES, I intend to buy this new BananaPi R3 Router.

Best regards and thank you for your great support
Bernhard

#1037281#10
Date:
2023-06-10 21:45:28 UTC
From:
To:
I cannot say what it will take to support it in debian for sure...

There does appear to be a target for it in upstream u-boot 2023.07-rc3
or newer, but I have not tried building it yet ... sometimes boards
require firmware that is not distributable by debian or other components
to build that are impractical to package for debian.

The doc/README.mediatek file seems to only address older variants...

The other main thing is to check what support is needed in the linux
kernel...

live well,
  vagrant

#1037281#15
Date:
2023-08-29 17:15:58 UTC
From:
To:
The bad new starts with this:
$ grep -r MEDIATEK debian/config/
debian/config/config:CONFIG_WLAN_VENDOR_MEDIATEK=y
debian/config/arm64/config.cloud-arm64:# CONFIG_ARCH_MEDIATEK is not set

Which is not relevant for the Banana Pi BPI-R3 ...

$ grep MEDIATEK /boot/config-6.1.0-11-arm64
# CONFIG_ARCH_MEDIATEK is not set
# CONFIG_MEDIATEK_GE_PHY is not set
CONFIG_WLAN_VENDOR_MEDIATEK=y

... "CONFIG_ARCH_MEDIATEK is not set" means that there (essentially) isn't
*anything* wrt MEDIATEK enabled in the Debian kernel ... (same for 6.5 btw)

I have a script which helps with identifying which kernel modules would be
needed based on the "compatible" strings in the dts file and running it on the
mt7986a-bananapi-bpi-r3.dts revealed 1 missing component ... but a rather
important one, which AFAICT is related to ARCH_MEDIATEK not being enabled.

The dts file also includes a .dtsi file and scanning that file revealed mostly
missing "Debian config settings:" lines and thus also any enabled modules in
the Debian kernel.

My script is very crude and will only give a starting point which I then would
enhance by filling in the missing parts. But I'm not motivated enough to do
that for a board which I don't have (as it's quite a bit of work) ;-)

Hope it still helps.

#1037281#20
Date:
2024-01-11 02:48:47 UTC
From:
To:
There are now two board configs in u-boot 2024.01 that might be
relevent:

configs/mt7986a_bpir3_emmc_defconfig  configs/mt7986a_bpir3_sd_defconfig
...

CONFIG_ARCH_MEDIATEK is now enabled in the Debian kernel configuration,
although there are probably still other kernel configurations needed.

Is this script available anywhere? :)


Still outstanding is arm-trusted-firmwawre, only mediatek 81xx platforms
so far:

plat/mediatek/mt8173/  plat/mediatek/mt8186/  plat/mediatek/mt8192/
plat/mediatek/mt8183/  plat/mediatek/mt8188/  plat/mediatek/mt8195/

live well,
  vagrant

#1037281#25
Date:
2024-01-11 11:30:11 UTC
From:
To:
Alper Nebi Yasak made a modified version based off of that:
https://salsa.debian.org/kernel-team/linux/-/merge_requests/906#note_442903

From that version I added `--include="Kconfig"` on various `grep -r` lines to
my script to speed it up significantly.

HTH

#1037281#30
Date:
2024-08-09 09:23:02 UTC
From:
To:
I don't have an answer to any of your questions, but due to
https://bugs.debian.org/1072968 the BPI-R3 is now properly supported in the
Debian kernel since version 6.10.

For the rest I suggest to search and/or participate in the BananaPi and
OpenWrt forums where they likely know (a lot) more about BPI-R3 then I do.