On 9.09.2022 08:11, Sergio Paracuellos wrote:
Device tree blobs for ralink mt7621 SoCs depends on configuration
CONFIG_SOC_MT7621 kernel option. This blobs needs to be properly
builtin into the kernel in order to be able to properly boot the
Gnubee boards. Hence, we need to define specific DTB config options
to know which device tree must be compiled and embeeded into the
kernel for every single board to allow the generated kernel to boot
properly.
Fixes: 7a6ee0bbab25 ("mips: dts: ralink: add MT7621 SoC")
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@xxxxxxxxx>
My original idea was to upstream DTs of every device using the MT7621
SoC on OpenWrt.
Currently, there are only 2 DTs on mainline, so giving each of them an
entry is not a big deal. But doing this for hundreds of devices is not
viable.
This is why I wanted to move away from giving an entry for each device
and leave it to the OS builder SDKs to deal with it. We both use Neil's
gnubee-tools, it should be possible to do this there.
For now, whichever path is taken, I'm fine with it. But I see this more
as a design choice rather than a fix.
Arınç
---
arch/mips/boot/dts/ralink/Makefile | 6 ++----
arch/mips/ralink/Kconfig | 11 ++++++++++-
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/arch/mips/boot/dts/ralink/Makefile b/arch/mips/boot/dts/ralink/Makefile
index 11732b8c8163..b0552bfa555a 100644
--- a/arch/mips/boot/dts/ralink/Makefile
+++ b/arch/mips/boot/dts/ralink/Makefile
@@ -5,9 +5,7 @@ dtb-$(CONFIG_DTB_RT3883_EVAL) += rt3883_eval.dtb
dtb-$(CONFIG_DTB_MT7620A_EVAL) += mt7620a_eval.dtb
dtb-$(CONFIG_DTB_OMEGA2P) += omega2p.dtb
dtb-$(CONFIG_DTB_VOCORE2) += vocore2.dtb
-
-dtb-$(CONFIG_SOC_MT7621) += \
- mt7621-gnubee-gb-pc1.dtb \
- mt7621-gnubee-gb-pc2.dtb
+dtb-$(CONFIG_DTB_GNUBEE1) += mt7621-gnubee-gb-pc1.dtb
+dtb-$(CONFIG_DTB_GNUBEE2) += mt7621-gnubee-gb-pc2.dtb
obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig
index f9fe15630abb..cf2f5cccd2b3 100644
--- a/arch/mips/ralink/Kconfig
+++ b/arch/mips/ralink/Kconfig
@@ -62,7 +62,6 @@ endchoice
choice
prompt "Devicetree selection"
- depends on !SOC_MT7621
default DTB_RT_NONE
help
Select the devicetree.
@@ -100,6 +99,16 @@ choice
depends on SOC_MT7620
select BUILTIN_DTB
+ config DTB_GNUBEE1
+ bool "GnuBee1 2.5inch NAS"
+ depends on SOC_MT7621
+ select BUILTIN_DTB
+
+ config DTB_GNUBEE2
+ bool "GnuBee2 3.5inch NAS"
+ depends on SOC_MT7621
+ select BUILTIN_DTB
+
endchoice
endif