Add Onion Omega2/2+ board support
Subsystems (3)
cover Add Onion Omega2/2+ board support
Add support for the MediaTek based boards by Onion. Whereas the second commit adds the actual board support, the first commit handles a tight flash size constraint for the u-boot-with-spl.bin image.
Philip Oberfichtner (2):
spl: Add size check for u-boot-with-spl.bin
mips: mt7628: Add Onion Omega2/2+ board support
Makefile | 7 ++ 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/Makefile | 3 + board/onion/omega2p/board.c | 134 +++++++++++++++++++++++++++ board/onion/omega2p/omega2p.env | 18 ++++ common/spl/Kconfig | 7 ++ configs/onion-omega2p_defconfig | 81 ++++++++++++++++ include/configs/onion-omega2p.h | 15 +++ 11 files changed, 343 insertions(+) create mode 100644 arch/mips/dts/onion-omega2p.dts create mode 100644 board/onion/omega2p/Kconfig create mode 100644 board/onion/omega2p/Makefile create mode 100644 board/onion/omega2p/board.c create mode 100644 board/onion/omega2p/omega2p.env create mode 100644 configs/onion-omega2p_defconfig create mode 100644 include/configs/onion-omega2p.h
Signature · 1 line
2.39.5
PATCH 1/2 spl: Add size check for u-boot-with-spl.bin
Introduce another SIZE_CHECK macro for u-boot-with-spl.bin.
--- Makefile | 7 +++++++ common/spl/Kconfig | 7 +++++++ 2 files changed, 14 insertions(+)
Makefile +7 -0
@@ -951,6 +951,12 @@ else SPL_SIZE_CHECK = endif +ifneq ($(CONFIG_UBOOT_WITH_SPL_SIZE_LIMIT),0x0) +UBOOT_WITH_SPL_SIZE_CHECK = @$(call size_check,$@,$(CONFIG_UBOOT_WITH_SPL_SIZE_LIMIT)) +else +UBOOT_WITH_SPL_SIZE_CHECK = +endif + ifneq ($(CONFIG_TPL_SIZE_LIMIT),0x0) TPL_SIZE_CHECK = @$(call size_check,$@,$(CONFIG_TPL_SIZE_LIMIT)) else
@@ -1535,6 +1541,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) + $(UBOOT_WITH_SPL_SIZE_CHECK) ifeq ($(CONFIG_ARCH_LPC32XX)$(CONFIG_SPL),yy) MKIMAGEFLAGS_lpc32xx-spl.img = -T lpc32xximage -a $(CONFIG_SPL_TEXT_BASE)
common/spl/Kconfig +7 -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. + config SPL_SIZE_LIMIT hex "Maximum size of SPL image" default 0x11000 if ARCH_MX6 && !MX6_OCRAM_256KB
Signature · 1 line
2.39.5
PATCH 2/2 mips: mt7628: Add Onion Omega2/2+ board support
In reply to Philip OberfichtnerThe 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
--- 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/Makefile | 3 + board/onion/omega2p/board.c | 134 +++++++++++++++++++++++++++ board/onion/omega2p/omega2p.env | 18 ++++ configs/onion-omega2p_defconfig | 81 ++++++++++++++++ include/configs/onion-omega2p.h | 15 +++ 9 files changed, 329 insertions(+) create mode 100644 arch/mips/dts/onion-omega2p.dts create mode 100644 board/onion/omega2p/Kconfig create mode 100644 board/onion/omega2p/Makefile create mode 100644 board/onion/omega2p/board.c create mode 100644 board/onion/omega2p/omega2p.env create mode 100644 configs/onion-omega2p_defconfig create mode 100644 include/configs/onion-omega2p.h
arch/mips/dts/Makefile +1 -0
@@ -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_OMEGA2P) += 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
@@ -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
@@ -0,0 +1,12 @@ +if BOARD_ONION_OMEGA2P + +config SYS_BOARD + default "omega2p" + +config SYS_VENDOR + default "onion" + +config SYS_CONFIG_NAME + default "onion-omega2p" + +endif
board/onion/omega2p/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0+ + +obj-y += board.o
board/onion/omega2p/board.c new file +134 -0
134 lines not on this page · raw message
board/onion/omega2p/omega2p.env new file +18 -0
@@ -0,0 +1,18 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2025 DENX Software Engineering GmbH, Philip Oberfichtner <[email protected]> + +# Boot options +bootargs=console=ttyS0,115200 rootfstype=squashfs,jffs2 +bootfile=firmware.bin +boot_linux=sf probe && mtd read firmware 81800000 0 400000 && bootm 81800000 +enter_shell=env set reset_pressed # unset variable +bootcmd= if test -z "${reset_pressed}"; then run boot_linux; else run enter_shell; fi + +# Network configuration +serverip=192.168.8.100 +ipaddr=192.168.8.8 +loadaddr=0x81800000 + +# MTD settings +mtdids=nor0=spi0.0 +# mtdparts will be set at runtime, according to the specific board variant.
configs/onion-omega2p_defconfig new file +81 -0
81 lines not on this page · raw message
include/configs/onion-omega2p.h new file +15 -0
@@ -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