I’ve notice starting with Linux Kernel 6.17 a new patch into mtk_soc_eth using SRAM. But if you complie the kernel without CONFIG_SRAM, everything is compiled but when you boot the kernel you get this error:
[ 0.000000] psci: probing for conduit method from DT.
[ 1.847587] mtk_soc_eth 15100000.ethernet: Could not get SRAM pool
[ 1.857263] mtk_soc_eth 15100000.ethernet: probe with driver mtk_soc_eth failed with error -22
Looking into arch/arm64/boot/dts for mt7988a and in arch/arm64/configs I saw new dependency of SRAM. But when you select the driver in Kernel sources, it doesn’t automatically selects CONFIG_SRAM.
So if understood correctly multiple SoC are using the same driver but just some of them needs SRAM driver.
But this driver affects somehow the performance or anything else on other SoC if is enabled by default?
From what I saw Linux Kernel doesn’t have a specific selection of the SoC, just generic Mediatek.
Soc selection is done by compatible in used devicetree. Some socs have no dedicated sram (should bind on specific node and we did some changes for other socs…at least mt7986). Not sure if this is completely save to enable SRAM driver to all socs
OK, than make sens. Because there is no way to know which SoC is selected, because is just a generic Mediatek SoC, then is difficult to select SRAM when mtk_soc_eth is selected.
Unfortunately this can lead to some issues if somebody doesn’t know this small detail.
It should not as sram depends on MTK_SRAM capability which should be only set for filogic SoCs (mt798x). But sending patch to mainline requires intensive testing on all targets.
For myself I find it easier to maintain only 1 defconfig for all the bpi-mtk boards. The downside is that the kernel is a tiny bit larger then necessary for that specific board, but the difference is small. For me this outweighs the hassle if multiple defcoonfigs.
So I just have this config set to yes for all boards.