Skip to contentSkip to conversation

Add Onion Omega2/2+ board support

PATCH In review Philip Oberfichtner 3 participants 10 messages Aug 7, 2025 – Aug 11, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v6 cover Add Onion Omega2/2+ board support

Add support for the MediaTek based boards by Onion. Commit one to three are rather generic, whereas the last commit adds the actual board support.

Changes in v6:
- Remove all vendor specific code from the board files.

Changes in v5:
- Reimplement the Makefile size check.

Changes in v4:
- Rebase board support to v2025.07
- Add new commit to silence warning in arch/mips/

Changes in v3:
- Simplify image size check.

Changes in v2:
- I forgot to run checkpatch in v1. Fix some style issues in v2.

Philip Oberfichtner (4):
Makefile: Simplify size check
Makefile: Add size check for u-boot-with-spl.bin
mips: serial: Silence "unused variable" warning
mips: mt7628: Add Onion Omega2/2+ board support

 Makefile                                  | 45 ++++----------
 arch/mips/dts/Makefile                    |  1 +
 arch/mips/dts/onion-omega2p.dts           | 58 ++++++++++++++++++
 arch/mips/mach-mtmips/mt7620/serial.c     |  2 +-
 arch/mips/mach-mtmips/mt7621/spl/serial.c |  2 +-
 arch/mips/mach-mtmips/mt7628/Kconfig      |  7 +++
 arch/mips/mach-mtmips/mt7628/serial.c     |  2 +-
 board/onion/omega2p/Kconfig               | 12 ++++
 board/onion/omega2p/MAINTAINERS           |  6 ++
 common/spl/Kconfig                        |  7 +++
 configs/onion-omega2p_defconfig           | 73 +++++++++++++++++++++++
 include/configs/onion-omega2p.h           | 15 +++++
 tools/spl_size_limit.c                    |  2 +-
 13 files changed, 194 insertions(+), 38 deletions(-)
 create mode 100644 arch/mips/dts/onion-omega2p.dts
 create mode 100644 board/onion/omega2p/Kconfig
 create mode 100644 board/onion/omega2p/MAINTAINERS
 create mode 100644 configs/onion-omega2p_defconfig
 create mode 100644 include/configs/onion-omega2p.h
Signature · 1 line
2.39.5
#1 lore raw

PATCH v6 1/4 Makefile: Simplify size check

Deduplicate some redundancies within the SIZE_CHECK code in the toplevel Makefile. No functional changes.

---

Notes:
Changes in v6: none

Changes in v5:
- Fix for broken boards reported in v4
- See https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

 Makefile               | 44 ++++++++++--------------------------------
 tools/spl_size_limit.c |  2 +-
 2 files changed, 11 insertions(+), 35 deletions(-)
Makefile +10 -34
index 6ec2ce05928..69c37082610 100644
@@ -432,7 +432,7 @@ KBUILD_HOSTLDLIBS   := $(HOST_LFS_LIBS) $(HOSTLDLIBS)
 define size_check
 	actual=$$( wc -c $1 | awk '{print $$1}'); \
 	limit=$$( printf "%d" $2 ); \
-	if test $$actual -gt $$limit; then \
+	if test $$limit -gt 0 && test $$actual -gt $$limit; then \
 		echo "$1 exceeds file size limit:" >&2; \
 		echo "  limit:  $$(printf %#x $$limit) bytes" >&2; \
 		echo "  actual: $$(printf %#x $$actual) bytes" >&2; \
@@ -1103,30 +1103,6 @@ LDPPFLAGS += \
 #########################################################################
 #########################################################################
 
-ifneq ($(CONFIG_BOARD_SIZE_LIMIT),)
-BOARD_SIZE_CHECK= @ $(call size_check,$@,$(CONFIG_BOARD_SIZE_LIMIT))
-else
-BOARD_SIZE_CHECK =
-endif
-
-ifneq ($(CONFIG_SPL_SIZE_LIMIT),0x0)
-SPL_SIZE_CHECK = @$(call size_check,$@,$$(tools/spl_size_limit))
-else
-SPL_SIZE_CHECK =
-endif
-
-ifneq ($(CONFIG_TPL_SIZE_LIMIT),0x0)
-TPL_SIZE_CHECK = @$(call size_check,$@,$(CONFIG_TPL_SIZE_LIMIT))
-else
-TPL_SIZE_CHECK =
-endif
-
-ifneq ($(CONFIG_VPL_SIZE_LIMIT),0x0)
-VPL_SIZE_CHECK = @$(call size_check,$@,$(CONFIG_VPL_SIZE_LIMIT))
-else
-VPL_SIZE_CHECK =
-endif
-
 # Statically apply RELA-style relocations (currently arm64 only)
 # This is useful for arm64 where static relocation needs to be performed on
 # the raw binary, but certain simulators only accept an ELF file (but don't
@@ -1470,7 +1446,7 @@ endif
 
 %.imx: $(IMX_DEPS) %.bin
 	$(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
-	$(BOARD_SIZE_CHECK)
+	@ $(call size_check,$@,$(CONFIG_BOARD_SIZE_LIMIT))
 
 %.vyb: %.imx
 	$(Q)$(MAKE) $(build)=arch/arm/cpu/armv7/vf610 $@
@@ -1571,11 +1547,11 @@ endif
 
 u-boot-nodtb.bin: u-boot FORCE
 	$(call if_changed,objcopy_uboot)
-	$(BOARD_SIZE_CHECK)
+	@ $(call size_check,$@,$(CONFIG_BOARD_SIZE_LIMIT))
 
 u-boot.ldr:	u-boot
 		$(LDR) -T $(CONFIG_LDR_CPU) -c $@ $< $(LDR_FLAGS)
-		$(BOARD_SIZE_CHECK)
+		@ $(call size_check,$@,$(CONFIG_BOARD_SIZE_LIMIT))
 
 # binman
 # ---------------------------------------------------------------------------
@@ -1702,7 +1678,7 @@ u-boot-dtb.img u-boot.img u-boot.kwb u-boot.pbl u-boot-ivt.img: \
 			$(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_SANDBOX),dts/dt.dtb) \
 		,$(UBOOT_BIN)) FORCE
 	$(call if_changed,mkimage)
-	$(BOARD_SIZE_CHECK)
+	@ $(call size_check,$@,$(CONFIG_BOARD_SIZE_LIMIT))
 
 ifeq ($(CONFIG_SPL_LOAD_FIT_FULL),y)
 MKIMAGEFLAGS_u-boot.itb =
@@ -1717,12 +1693,12 @@ u-boot.itb: u-boot-nodtb.bin \
 		$(if $(CONFIG_MULTI_DTB_FIT),$(FINAL_DTB_CONTAINER)) \
 		$(U_BOOT_ITS) FORCE
 	$(call if_changed,mkfitimage)
-	$(BOARD_SIZE_CHECK)
+	@ $(call size_check,$@,$(CONFIG_BOARD_SIZE_LIMIT))
 endif
 
 u-boot-with-spl.kwb: u-boot.bin spl/u-boot-spl.bin FORCE
 	$(call if_changed,mkimage)
-	$(BOARD_SIZE_CHECK)
+	@ $(call size_check,$@,$(CONFIG_BOARD_SIZE_LIMIT))
 
 u-boot.dis:	u-boot
 		$(OBJDUMP) -d $< > $@
@@ -2346,7 +2322,7 @@ u-boot.lds: $(LDSCRIPT) prepare FORCE
 
 spl/u-boot-spl.bin: spl/u-boot-spl
 	@:
-	$(SPL_SIZE_CHECK)
+	@$(call size_check,$@,$$(tools/spl_size_limit))
 
 spl/u-boot-spl-dtb.bin: spl/u-boot-spl
 	@:
@@ -2371,14 +2347,14 @@ spl/boot.bin: spl/u-boot-spl
 
 tpl/u-boot-tpl.bin: tpl/u-boot-tpl
 	@:
-	$(TPL_SIZE_CHECK)
+	@$(call size_check,$@,$(CONFIG_TPL_SIZE_LIMIT))
 
 tpl/u-boot-tpl: tools prepare $(if $(CONFIG_TPL_OF_CONTROL),dts/dt.dtb)
 	$(Q)$(MAKE) obj=tpl -f $(srctree)/scripts/Makefile.xpl all
 
 vpl/u-boot-vpl.bin: vpl/u-boot-vpl
 	@:
-	$(VPL_SIZE_CHECK)
+	@$(call size_check,$@,$(CONFIG_VPL_SIZE_LIMIT))
 
 vpl/u-boot-vpl: tools prepare $(if $(CONFIG_TPL_OF_CONTROL),dts/dt.dtb)
 	$(Q)$(MAKE) obj=vpl -f $(srctree)/scripts/Makefile.xpl all
tools/spl_size_limit.c +1 -1
index c6c139e834f..137f0fca898 100644
@@ -28,6 +28,6 @@ int main(int argc, char *argv[])
 #endif
 #endif
 
-	printf("%d", spl_size_limit);
+	printf("%d", spl_size_limit > 0 ? spl_size_limit : 0);
 	return 0;
 }
Signature · 1 line
2.39.5
#2 lore raw

PATCH v6 2/4 Makefile: Add size check for u-boot-with-spl.bin

In reply to Philip Oberfichtner

Introduce another SIZE_CHECK macro for u-boot-with-spl.bin.

Note that we cannot reuse BOARD_SIZE_LIMIT here, as this also applies to intermediate u-boot*bin images, which, before being compressed, may be larger than the final combined image.

Also SPL_SIZE_LIMIT has to be a separate option, as some boards might just want to restrict SPL size while still allowing u-boot-with-spl.bin to be bigger.

---

Notes:
Changes in v6: none

Changes in v5:
- Fix for broken boards reported in v4
- See https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Changes in v4: none

Changes in v3:
Reuse existing SPL_SIZE_LIMIT instead of implementing a new option

Changes in v2: none

 Makefile           | 1 +
 common/spl/Kconfig | 7 +++++++
 2 files changed, 8 insertions(+)
Makefile +1 -0
index 69c37082610..70d963a5724 100644
@@ -1715,6 +1715,7 @@ OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \
 				   --pad-to=$(CONFIG_SPL_PAD_TO)
 u-boot-with-spl.bin: $(SPL_IMAGE) $(SPL_PAYLOAD) FORCE
 	$(call if_changed,pad_cat)
+	@$(call size_check,$@,$(CONFIG_UBOOT_WITH_SPL_SIZE_LIMIT))
 
 ifeq ($(CONFIG_ARCH_LPC32XX)$(CONFIG_SPL),yy)
 MKIMAGEFLAGS_lpc32xx-spl.img = -T lpc32xximage -a $(CONFIG_SPL_TEXT_BASE)
common/spl/Kconfig +7 -0
index ab05536bd02..b5c0c60ff6b 100644
@@ -36,6 +36,13 @@ config SPL_FRAMEWORK_BOARD_INIT_F
 	  - initialize the serial (preloader_console_init)
 	  Unless you want to provide your own board_init_f, you should say Y.
 
+config UBOOT_WITH_SPL_SIZE_LIMIT
+	hex "Maximum size of u-boot-with-spl.bin"
+	default 0x0
+	help
+	  Specifies the maximum length of the u-boot-with-spl.bin image.
+	  If this value is zero, it is ignored.
+
 config SPL_SIZE_LIMIT
 	hex "Maximum size of SPL image"
 	default 0x11000 if ARCH_MX6 && !MX6_OCRAM_256KB
Signature · 1 line
2.39.5
#3 lore raw

Re: [PATCH v6 2/4] Makefile: Add size check for u-boot-with-spl.bin

On 8/7/25 9:56 AM, Philip Oberfichtner wrote:

[...]

Makefile OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \ · line 1718

Quoted 6 lines

+++ b/Makefile

Makefile +1 -0
@@ -1715,6 +1715,7 @@ OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \
  				   --pad-to=$(CONFIG_SPL_PAD_TO)
  u-boot-with-spl.bin: $(SPL_IMAGE) $(SPL_PAYLOAD) FORCE
  	$(call if_changed,pad_cat)
+	@$(call size_check,$@,$(CONFIG_UBOOT_WITH_SPL_SIZE_LIMIT))

It seems other size checks are not called unconditionally, see Makefile around line 1100 . Why is this one called unconditionally ? Won't this break boards which default this new option to 0 ?

Quoted 7 lines
Makefile +0 -0
  ifeq ($(CONFIG_ARCH_LPC32XX)$(CONFIG_SPL),yy)
  MKIMAGEFLAGS_lpc32xx-spl.img = -T lpc32xximage -a $(CONFIG_SPL_TEXT_BASE)
common/spl/Kconfig +0 -0
index ab05536bd02..b5c0c60ff6b 100644

common/spl/Kconfig config SPL_FRAMEWORK_BOARD_INIT_F · line 44

Quoted 9 lines
common/spl/Kconfig +6 -0
@@ -36,6 +36,13 @@ config SPL_FRAMEWORK_BOARD_INIT_F
  	  - initialize the serial (preloader_console_init)
  	  Unless you want to provide your own board_init_f, you should say Y.
 
+config UBOOT_WITH_SPL_SIZE_LIMIT
+	hex "Maximum size of u-boot-with-spl.bin"
+	default 0x0
+	help
+	  Specifies the maximum length of the u-boot-with-spl.bin image.
+	  If this value is zero, it is ignored.

Why not set SPL_SIZE_LIMIT and BOARD_SIZE_LIMIT ?

#4 lore raw

Re: [PATCH v6 2/4] Makefile: Add size check for u-boot-with-spl.bin

Quoted 4 lines · Marek Vasut

On 8/7/25 9:56 AM, Philip Oberfichtner wrote:

[...]

Quoted 10 lines

Makefile OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \ · line 1718

Quoted 6 lines

+++ b/Makefile

Makefile +1 -0
@@ -1715,6 +1715,7 @@ OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \
  				   --pad-to=$(CONFIG_SPL_PAD_TO)
  u-boot-with-spl.bin: $(SPL_IMAGE) $(SPL_PAYLOAD) FORCE
  	$(call if_changed,pad_cat)
+	@$(call size_check,$@,$(CONFIG_UBOOT_WITH_SPL_SIZE_LIMIT))

It seems other size checks are not called unconditionally, see Makefile around line 1100 . Why is this one called unconditionally ? Won't this break boards which default this new option to 0 ?

No. Please see the

	"test $$limit -gt 0"

in [PATCH 1/4].

Quoted 17 lines
Quoted 8 lines
Makefile +0 -0
  ifeq ($(CONFIG_ARCH_LPC32XX)$(CONFIG_SPL),yy)
  MKIMAGEFLAGS_lpc32xx-spl.img = -T lpc32xximage -a $(CONFIG_SPL_TEXT_BASE)
common/spl/Kconfig +0 -0
index ab05536bd02..b5c0c60ff6b 100644

common/spl/Kconfig config SPL_FRAMEWORK_BOARD_INIT_F · line 43

Quoted 8 lines
common/spl/Kconfig +6 -0
@@ -36,6 +36,13 @@ config SPL_FRAMEWORK_BOARD_INIT_F
  	  - initialize the serial (preloader_console_init)
  	  Unless you want to provide your own board_init_f, you should say Y.
+config UBOOT_WITH_SPL_SIZE_LIMIT
+	hex "Maximum size of u-boot-with-spl.bin"
+	default 0x0
+	help
+	  Specifies the maximum length of the u-boot-with-spl.bin image.
+	  If this value is zero, it is ignored.

Why not set SPL_SIZE_LIMIT and BOARD_SIZE_LIMIT ?

Please refer to the commit message above, where I explained my rationale.

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,
Managing Director: Johanna Denk, Tabea Lutz
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
=====================================================================
#5 lore raw

PATCH v6 3/4 mips: serial: Silence "unused variable" warning

In reply to Philip Oberfichtner

Before this commit, mtmips_spl_serial_init() caused the following warning:

  arch/mips/mach-mtmips/mt7628/serial.c:14:23: warning: unused variable ‘base’ [-Wunused-variable]
     14 |         void __iomem *base = ioremap_nocache(SYSCTL_BASE, SYSCTL_SIZE);
        |                       ^~~~

This happens whenever CONFIG_SPECIFY_CONSOLE_INDEX is unset, which leads to an effectively empty function:

void mtmips_spl_serial_init(void)

  {
	  void __iomem *base = ioremap_nocache(SYSCTL_BASE, SYSCTL_SIZE);

}

Add the __maybe_unused attribute to silence this warning.

---

Notes:
Changes in v6: none

Changes in v5: none

Changes in v4: new

 arch/mips/mach-mtmips/mt7620/serial.c     | 2 +-
 arch/mips/mach-mtmips/mt7621/spl/serial.c | 2 +-
 arch/mips/mach-mtmips/mt7628/serial.c     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/mips/mach-mtmips/mt7620/serial.c +1 -1
index 35544b8537e..a6915865e27 100644
@@ -24,7 +24,7 @@ void board_debug_uart_init(void)
 void mtmips_spl_serial_init(void)
 {
 #ifdef CONFIG_SPL_SERIAL
-	void __iomem *base = ioremap_nocache(SYSCTL_BASE, SYSCTL_SIZE);
+	void __iomem __maybe_unused *base = ioremap_nocache(SYSCTL_BASE, SYSCTL_SIZE);
 
 #if CONFIG_CONS_INDEX == 1
 	clrbits_32(base + SYSCTL_GPIOMODE_REG, UARTL_GPIO_MODE);
arch/mips/mach-mtmips/mt7621/spl/serial.c +1 -1
index 5cf093a078a..3f600d778e7 100644
@@ -11,7 +11,7 @@
 void mtmips_spl_serial_init(void)
 {
 #ifdef CONFIG_SPL_SERIAL
-	void __iomem *base = ioremap_nocache(SYSCTL_BASE, SYSCTL_SIZE);
+	void __iomem __maybe_unused *base = ioremap_nocache(SYSCTL_BASE, SYSCTL_SIZE);
 
 #if CONFIG_CONS_INDEX == 1
 	clrbits_32(base + SYSCTL_GPIOMODE_REG, UART1_MODE);
arch/mips/mach-mtmips/mt7628/serial.c +1 -1
index 11a2149e127..88d63f3825b 100644
@@ -11,7 +11,7 @@
 void mtmips_spl_serial_init(void)
 {
 #ifdef CONFIG_SPL_SERIAL
-	void __iomem *base = ioremap_nocache(SYSCTL_BASE, SYSCTL_SIZE);
+	void __iomem __maybe_unused *base = ioremap_nocache(SYSCTL_BASE, SYSCTL_SIZE);
 
 #if CONFIG_CONS_INDEX == 1
 	clrbits_32(base + SYSCTL_GPIO_MODE1_REG, UART0_MODE_M);
Signature · 1 line
2.39.5
Reviewed-by on v6 3/4
#6 lore raw

Re: [PATCH v6 3/4] mips: serial: Silence "unused variable" warning

Quoted 23 lines · Philip Oberfichtner

Before this commit, mtmips_spl_serial_init() caused the following warning:

   arch/mips/mach-mtmips/mt7628/serial.c:14:23: warning: unused variable ‘base’ [-Wunused-variable]
      14 |         void __iomem *base = ioremap_nocache(SYSCTL_BASE, SYSCTL_SIZE);
         |                       ^~~~

This happens whenever CONFIG_SPECIFY_CONSOLE_INDEX is unset, which leads to an effectively empty function:

   void mtmips_spl_serial_init(void)
   {
	  void __iomem *base = ioremap_nocache(SYSCTL_BASE, SYSCTL_SIZE);
   }

Add the __maybe_unused attribute to silence this warning.

---

Notes:
Changes in v6: none

Quoted 9 lines

Changes in v5: none

Changes in v4: new

  arch/mips/mach-mtmips/mt7620/serial.c     | 2 +-
  arch/mips/mach-mtmips/mt7621/spl/serial.c | 2 +-
  arch/mips/mach-mtmips/mt7628/serial.c     | 2 +-
  3 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
- Daniel
#7 lore raw

PATCH v6 4/4 mips: mt7628: Add Onion Omega2/2+ board support

In reply to Philip Oberfichtner

The Omega2 / Omega2+ are based on the MediaTek MT7688 SoC with the following features:
- 64 / 128MB of DDR2 memory
- 16 / 32MB of SPI NOR flash
- USB, WiFi and many more peripherals

---

Notes:
Changes in v6:
As Daniel pointed out in his review, vendor specific configurations should be kept in the downstream sources. All of this non-generic code has been removed in v6. Most notably, that is:
- custom environment and bootcommand
- network settings
- mtd partitioning

Apart from that, there are a few more simplifications, like the removal of gpio_init() and superfluous spi drivers.

Changes in v5: none

Changes in v4:
- Adapt bootcmd
- Rebase defconfig

Changes in v3:
- Adapt defconfig to [PATCH 1/2] (SPL_SIZE_LIMIT)

Changes in v2:
- Fix style issues as reported by checkpatch
- Add MAINTAINERS file

 arch/mips/dts/Makefile               |  1 +
 arch/mips/dts/onion-omega2p.dts      | 58 ++++++++++++++++++++++
 arch/mips/mach-mtmips/mt7628/Kconfig |  7 +++
 board/onion/omega2p/Kconfig          | 12 +++++
 board/onion/omega2p/MAINTAINERS      |  6 +++
 configs/onion-omega2p_defconfig      | 73 ++++++++++++++++++++++++++++
 include/configs/onion-omega2p.h      | 15 ++++++
 7 files changed, 172 insertions(+)
 create mode 100644 arch/mips/dts/onion-omega2p.dts
 create mode 100644 board/onion/omega2p/Kconfig
 create mode 100644 board/onion/omega2p/MAINTAINERS
 create mode 100644 configs/onion-omega2p_defconfig
 create mode 100644 include/configs/onion-omega2p.h
arch/mips/dts/Makefile +1 -0
index 7c4ee8b668b..cb33f96edee 100644
@@ -21,6 +21,7 @@ dtb-$(CONFIG_BOARD_MT7621_NAND_RFB) += mediatek,mt7621-nand-rfb.dtb
 dtb-$(CONFIG_BOARD_MT7628_RFB) += mediatek,mt7628-rfb.dtb
 dtb-$(CONFIG_BOARD_GARDENA_SMART_GATEWAY_MT7688) += gardena-smart-gateway-mt7688.dtb
 dtb-$(CONFIG_BOARD_LINKIT_SMART_7688) += linkit-smart-7688.dtb
+dtb-$(CONFIG_BOARD_ONION_OMEGA2) += onion-omega2p.dtb
 dtb-$(CONFIG_TARGET_OCTEON_EBB7304) += mrvl,octeon-ebb7304.dtb
 dtb-$(CONFIG_TARGET_OCTEON_NIC23) += mrvl,octeon-nic23.dtb
 dtb-$(CONFIG_BOARD_NETGEAR_CG3100D) += netgear,cg3100d.dtb
arch/mips/dts/onion-omega2p.dts new file +58 -0

58 lines not on this page · raw message

arch/mips/mach-mtmips/mt7628/Kconfig +7 -0
index 79b2ddc6692..a75196eaefd 100644
@@ -27,6 +27,12 @@ config BOARD_MT7628_RFB
 	  SPI-NOR flash, 1 built-in switch with 5 ports, 1 UART, 1 USB host,
 	  1 SDXC, 1 PCIe socket and JTAG pins.
 
+config BOARD_ONION_OMEGA2
+	bool "Onion Omega2/2+"
+	help
+	  Onion Omega2/2+ IoT computer. Has a MT7688 SoC with 64/128 MiB of DDR2
+	  RAM and 16/32 MiB of SPI flash.
+
 config BOARD_VOCORE2
 	bool "VoCore2"
 	select SPL_SERIAL
@@ -52,6 +58,7 @@ config SYS_CONFIG_NAME
 	default "mt7628" if BOARD_MT7628_RFB
 
 source "board/gardena/smart-gateway-mt7688/Kconfig"
+source "board/onion/omega2p/Kconfig"
 source "board/seeed/linkit-smart-7688/Kconfig"
 source "board/vocore/vocore2/Kconfig"
 
board/onion/omega2p/Kconfig new file +12 -0
new file mode 100644
index 00000000000..45c18ee27ef
@@ -0,0 +1,12 @@
+if BOARD_ONION_OMEGA2
+
+config SYS_BOARD
+	default "omega2p"
+
+config SYS_VENDOR
+	default "onion"
+
+config SYS_CONFIG_NAME
+	default "onion-omega2p"
+
+endif
board/onion/omega2p/MAINTAINERS new file +6 -0
new file mode 100644
index 00000000000..aaa0214a681
@@ -0,0 +1,6 @@
+ONION OMEGA2/2+
+M:	Philip Oberfichtner <[email protected]>
+S:	Maintained
+F:	arch/mips/dts/onion-omega2p.dts
+F:	configs/onion-omega2p_defconfig
+F:	include/configs/onion-omega2p.h
configs/onion-omega2p_defconfig new file +73 -0

73 lines not on this page · raw message

include/configs/onion-omega2p.h new file +15 -0
new file mode 100644
index 00000000000..ca170b22a40
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2024 Zheng Han <[email protected]>, Lazar Demin <[email protected]>
+ */
+#ifndef __CONFIG_ONION_OMEGA2P_H
+#define __CONFIG_ONION_OMEGA2P_H
+
+/* RAM */
+#define CFG_SYS_SDRAM_BASE      0x80000000
+#define CFG_SYS_INIT_SP_OFFSET  0x400000
+
+/* Dummy value */
+#define CFG_SYS_UBOOT_BASE      0
+
+#endif /* __CONFIG_ONION_OMEGA2P_H */
Signature · 1 line
2.39.5
Reviewed-by on v6 4/4
#8 lore raw

Re: [PATCH v6 4/4] mips: mt7628: Add Onion Omega2/2+ board support

Quoted 43 lines · Philip Oberfichtner

The Omega2 / Omega2+ are based on the MediaTek MT7688 SoC with the following features:
- 64 / 128MB of DDR2 memory
- 16 / 32MB of SPI NOR flash
- USB, WiFi and many more peripherals

---

Notes:
Changes in v6:
As Daniel pointed out in his review, vendor specific configurations should be kept in the downstream sources. All of this non-generic code has been removed in v6. Most notably, that is:
- custom environment and bootcommand
- network settings
- mtd partitioning

Apart from that, there are a few more simplifications, like the removal of gpio_init() and superfluous spi drivers.

Changes in v5: none

Changes in v4:
- Adapt bootcmd
- Rebase defconfig

Changes in v3:
- Adapt defconfig to [PATCH 1/2] (SPL_SIZE_LIMIT)

Changes in v2:
- Fix style issues as reported by checkpatch
- Add MAINTAINERS file

  arch/mips/dts/Makefile               |  1 +
  arch/mips/dts/onion-omega2p.dts      | 58 ++++++++++++++++++++++
  arch/mips/mach-mtmips/mt7628/Kconfig |  7 +++
  board/onion/omega2p/Kconfig          | 12 +++++
  board/onion/omega2p/MAINTAINERS      |  6 +++
  configs/onion-omega2p_defconfig      | 73 ++++++++++++++++++++++++++++
  include/configs/onion-omega2p.h      | 15 ++++++
  7 files changed, 172 insertions(+)
Quoted 6 lines

create mode 100644 arch/mips/dts/onion-omega2p.dts create mode 100644 board/onion/omega2p/Kconfig create mode 100644 board/onion/omega2p/MAINTAINERS create mode 100644 configs/onion-omega2p_defconfig create mode 100644 include/configs/onion-omega2p.h

Signature · 1 line
- Daniel
#9 lore raw
In reply to Philip Oberfichtner
Quoted 2 lines · Philip Oberfichtner

Add support for the MediaTek based boards by Onion. Commit one to three are rather generic, whereas the last commit adds the actual board support.

Please don't pull any of this board support series before my "Simplify image size checks" series [1].

I inadvertently made the two series cross-dependent. I'll make the separation more clear in the next versions.

Best regards,
Philip

[1] https://patchwork.ozlabs.org/project/uboot/list/?series=468251&archive=both&state=*