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

2024-01-11 Thread Diederik de Haas
On Thursday, 11 January 2024 03:48:47 CET Vagrant Cascadian wrote:
> > 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.
> 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? :)

https://salsa.debian.org/kernel-team/linux/-/merge_requests/717#note_401554

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

signature.asc
Description: This is a digitally signed message part.


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

2024-01-10 Thread Vagrant Cascadian
On 2023-08-29, Diederik de Haas wrote:
> On 10 Jun 2023-06-10 Vagrant Cascadian  wrote:
>> On 2023-06-10, Bernhard wrote:
>> > 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).

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

>> I cannot say what it will take to support it in debian for sure...
>> ...
>> The other main thing is to check what support is needed in the linux
>> kernel...
>
> The good news is that it appears to be supported in the upstream kernel.
...
> 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.

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


signature.asc
Description: PGP signature


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

2023-08-29 Thread Diederik de Haas
On 10 Jun 2023-06-10 Vagrant Cascadian  wrote:
> On 2023-06-10, Bernhard wrote:
> > 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).
> 
> I cannot say what it will take to support it in debian for sure...
> ...
> The other main thing is to check what support is needed in the linux
> kernel...

The good news is that it appears to be supported in the upstream kernel.

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.compatible: "arm,armv8-timer"
source file: drivers/clocksource/arm_arch_timer.c
drivers/clocksource/Kconfig: ARM_ARCH_TIMER (bool)

compatible: "arm,cortex-a53"

compatible: "arm,gic-v3"

compatible: "arm,psci-0.2"
source file: drivers/firmware/psci/psci.c
drivers/firmware/psci/Kconfig: ARM_PSCI_FW (bool)

compatible: "fixed-clock"
source file: drivers/clk/clk-fixed-rate.c
drivers/clk/Kconfig: COMMON_CLK (bool)
Debian config settings:
debian/config/arm64/config:CONFIG_COMMON_CLK=y

compatible: "inside-secure,safexcel-eip97"
source file: drivers/crypto/inside-secure/safexcel.c
drivers/crypto/Kconfig: CRYPTO_DEV_SAFEXCEL (tristate)
Debian config settings:
debian/config/arm64/config:CONFIG_CRYPTO_DEV_SAFEXCEL=m

compatible: "mediatek,mt7986a"

compatible: "mediatek,mt7986a-pinctrl"
source file: drivers/pinctrl/mediatek/pinctrl-mt7986.c
drivers/pinctrl/mediatek/Kconfig: PINCTRL_MT7986 (bool)

compatible: "mediatek,mt7986-apmixedsys"
source file: drivers/clk/mediatek/clk-mt7986-apmixed.c
drivers/clk/mediatek/Kconfig: COMMON_CLK_MT7986 (tristate)

compatible: "mediatek,mt7986-auxadc"

compatible: "mediatek,mt7986-efuse"

compatible: "mediatek,mt7986-eth"
source file: drivers/net/ethernet/mediatek/mtk_eth_soc.c

compatible: "mediatek,mt7986-ethsys"
source file: drivers/clk/mediatek/clk-mt7986-eth.c
drivers/clk/mediatek/Kconfig: COMMON_CLK_MT7986_ETHSYS (tristate)

compatible: "mediatek,mt7986-i2c"
source file: drivers/i2c/busses/i2c-mt65xx.c
drivers/i2c/busses/Kconfig: I2C_MT65XX (tristate)

compatible: "mediatek,mt7986-infracfg"
source file: drivers/clk/mediatek/clk-mt7986-infracfg.c
drivers/clk/mediatek/Kconfig: COMMON_CLK_MT7986 (tristate)

compatible: "mediatek,mt7986-mmc"
source file: drivers/mmc/host/mtk-sd.c
drivers/mmc/host/Kconfig: MMC_MTK (tristate)
Debian config settings:
debian/config/config:# CONFIG_MMC_MTK is not set

compatible: "mediatek,mt7986-pcie"

compatible: "mediatek,mt7986-pwm"
source file: drivers/pwm/pwm-mediatek.c
drivers/pwm/Kconfig: PWM_MEDIATEK (tristate)

compatible: "mediatek,mt7986-rng"
source file: drivers/char/hw_random/mtk-rng.c
drivers/char/hw_random/Kconfig: HW_RANDOM_MTK (tristate)

compatible: "mediatek,mt7986-sgmiisys_0"
source file: drivers/clk/mediatek/clk-mt7986-eth.c
drivers/clk/mediatek/Kconfig: COMMON_CLK_MT7986_ETHSYS (tristate)

compatible: "mediatek,mt7986-sgmiisys_1"
source file: drivers/clk/mediatek/clk-mt7986-eth.c
drivers/clk/mediatek/Kconfig: COMMON_CLK_MT7986_ETHSYS (tristate)

compatible: "mediatek,mt7986-spi-ipm"

compatible: "mediatek,mt7986-thermal"
source file: drivers/thermal/mediatek/auxadc_thermal.c
drivers/thermal/mediatek/Kconfig: MTK_SOC_THERMAL (tristate)

compatible: "mediatek,mt7986-topckgen"
source file: drivers/clk/mediatek/clk-mt7986-topckgen.c
drivers/clk/mediatek/Kconfig: COMMON_CLK_MT7986 (tristate)

compatible: "mediatek,mt7986-tphy"

compatible: "mediatek,mt7986-uart"

compatible: "mediatek,mt7986-wdt"
source file: drivers/watchdog/mtk_wdt.c
drivers/watchdog/Kconfig: MEDIATEK_WATCHDOG (tristate)

compatible: "mediatek,mt7986-wed"

compatible: "mediatek,mt7986-wed-pcie"

compatible: "mediatek,mt7986-wmac"
source file: drivers/net/wireless/mediatek/mt76/mt7915/soc.c
drivers/net/wireless/mediatek/mt76/mt7915/Kconfig: M

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

2023-06-10 Thread Vagrant Cascadian
On 2023-06-10, Bernhard wrote:
> 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.

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


signature.asc
Description: PGP signature


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

2023-06-09 Thread Bernhard
Package: src:u-boot
Severity: wishlist

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




signature.asc
Description: This is a digitally signed message part