U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: AK Sharma <maskachoska@yahoo.com>
To: u-boot@lists.u-boot-project.org
Cc: Tom Rini <trini@konsulko.com>,
	Frieder Schrempf <frieder.schrempf@kontron.de>,
	Christian Marangi <ansuelsmth@gmail.com>,
	Daniel Schwierzeck <daniel.schwierzeck@gmail.com>,
	Dario Binacchi <dario.binacchi@amarulasolutions.com>,
	Jerome Forissier <jerome.forissier@arm.com>,
	Marek Vasut <marex@denx.de>,
	Michael Trimarchi <michael@amarulasolutions.com>,
	AK Sharma <maskachoska@yahoo.com>
Subject: [PATCH v2 0/9] mips: add EcoNet/Airoha EN75xx (EN7512/EN7528) SoC support
Date: Wed, 26 Aug 2026 19:04:34 +0530	[thread overview]
Message-ID: <cover.1787736704.git.maskachoska@yahoo.com> (raw)
In-Reply-To: <20260825222211.712836-1-maskachoska@yahoo.com>

This series adds U-Boot support for the EcoNet/Airoha EN75xx MIPS SoC
family: the big-endian MIPS34Kc EN7512/EN7521 and the little-endian
MIPS1004Kc EN7528, used in many GPON/XPON ONT home gateways. It extends
the existing Airoha SNFI SPI-NAND and GDM Ethernet drivers.

This is a minimal core: SoC bring-up (TPL/SPL, cache/CM init), UART,
SPI-NAND, Ethernet, device trees, EN7512/EN7528 reference boards and
documentation. It boots to the U-Boot prompt with working Ethernet/TFTP
and SPI-NAND. The vendor-specific pieces from v1 (the BMT bad-block
translation, the env/cmd MTD changes, the boot/image decompression hooks
and the R3-hook boot variant) are dropped from this series and will return
as separate, justified changes, as discussed on v1.

The DDR calibration stage is a vendor artifact and is not shipped in-tree.
The reference board packages it as a binman "blob-ext"; build those configs
with BINMAN_ALLOW_MISSING=1 and supply the blob to run (see
doc/board/econet/en7528.rst). A native DDR-init implementation is a known
TODO.

Tested on a Nokia G-2425G-A (EN7528, MT29F2G01 SPI-NAND) via RAM-loaded
U-Boot: boots to the prompt with correct 256 MiB DRAM, working
Ethernet/TFTP and SPI-NAND. All defconfigs build and are in savedefconfig
form; checkpatch reports no errors.

Apart from the usual registration wiring (arch/mips Makefile/Kconfig for
the new SoC, the driver Kconfig/Makefile entries and the DT Makefile),
the only change to generic behaviour is one opt-in Kconfig flag,
MIPS_SKIP_CP0_COUNT_CLEAR in arch/mips/Kconfig (added alongside the
existing MIPS_CACHE_SETUP / ROM_EXCEPTION_VECTORS start.S options), and
the two-line #ifndef guard it gates in arch/mips/cpu/start.S: the
EN7528 CP0 Count register is GIC/CM backed and the reset-time clear in
arch/mips/cpu/start.S stalls the CPU. It defaults off and changes nothing
for other targets; happy to move it to a mach reset path if preferred.

Changes in v2:
 - Reworked from a full vendor port into a minimal bootable core, per
   review feedback (Tom Rini). Dropped from the series, to return as
   separate, justified changes:
   - spi-nand BMT: no chip-specific code in the spinand core; the
     bad-block-table support will go to the Linux kernel first, then sync
     to U-Boot (Frieder Schrempf, Tom Rini).
   - boot/image decompression weak hooks: to be replaced by bootm_size and
     an uncached load address from the environment (Tom Rini).
   - cmd/mtd and env/mtd changes: to be resubmitted standalone as generic
     fixes, not tied to this SoC (Tom Rini).
   - the R3-hook board variant and its image packaging (to return using
     binman and a board default environment).
 - Documentation moved to reStructuredText under doc/ (Tom Rini).
 - MAINTAINERS uses N: en75xx / N: en7528 pattern entries (Tom Rini).
 - Device trees noted as not yet in Linux; the bindings and DTs will be
   submitted to the kernel and kept in sync (Tom Rini).
 - Defconfigs regenerated in savedefconfig form.

Known follow-ups (not in this minimal core; direction welcome):
 - The extended airoha-snfi/airoha-eth drivers use a small CKSEG1 uncached
   shim for DMA buffers instead of a MIPS dma_alloc_coherent(); a proper
   arch DMA-mapping implementation would remove the per-arch #if.
 - The SNFI controller selects its variant from the root-node machine
   compatible; keying off the device's own compatible would be cleaner.
 - A native DDR-init to remove the vendor DDR-blob dependency.
 - USB: the EN7528 xHCI controller and its T-PHY bring-up (reuses the
   existing MediaTek xHCI driver) is left out of this core and will come
   back as a follow-up.

Link to v1:
https://lore.kernel.org/u-boot/20260825222211.712836-1-maskachoska@yahoo.com/

AK Sharma (9):
  mips: en75xx: add EcoNet/Airoha EN75xx SoC support
  mips: en75xx: add TPL and SPL early boot stages
  serial: en75xx: add EcoNet/Airoha EN75xx UART driver
  spi: airoha-snfi: add EN75xx SPI-NAND controller support
  net: airoha-eth: add EN7528 Ethernet support
  mips: dts: add EcoNet EN75xx device trees
  board: econet: add EN7512 reference board
  board: econet: add EN7528 board support
  doc: board: econet: add EN75xx documentation

 arch/mips/Kconfig                             |  29 +
 arch/mips/Makefile                            |   2 +
 arch/mips/cpu/start.S                         |   2 +
 arch/mips/dts/Makefile                        |   2 +
 .../dts/econet,en7512-reference-u-boot.dtsi   |  58 ++
 arch/mips/dts/econet,en7512-reference.dts     |  27 +
 arch/mips/dts/econet,en7512.dtsi              |  88 ++
 arch/mips/dts/econet,en7528-ram-u-boot.dtsi   |   6 +
 arch/mips/dts/econet,en7528-ram.dts           |  72 ++
 .../dts/econet,en7528-reference-u-boot.dtsi   |  62 ++
 arch/mips/dts/econet,en7528-reference.dts     |  25 +
 arch/mips/dts/econet,en7528.dtsi              | 154 ++++
 arch/mips/mach-en75xx/Kconfig                 | 100 +++
 arch/mips/mach-en75xx/Makefile                |  15 +
 arch/mips/mach-en75xx/cache.c                 |  85 ++
 arch/mips/mach-en75xx/cpu.c                   |  95 ++
 arch/mips/mach-en75xx/early_sfc.c             | 352 ++++++++
 arch/mips/mach-en75xx/include/mach/en75xx.h   | 103 +++
 arch/mips/mach-en75xx/spl/Makefile            |   2 +
 arch/mips/mach-en75xx/spl/spl.c               |  47 +
 arch/mips/mach-en75xx/tpl/Makefile            |   3 +
 arch/mips/mach-en75xx/tpl/start.S             | 101 +++
 arch/mips/mach-en75xx/tpl/tpl.c               | 158 ++++
 board/econet/en7512/MAINTAINERS               |   8 +
 board/econet/en7512/Makefile                  |   2 +
 board/econet/en7512/board.c                   |  34 +
 board/econet/en7528/MAINTAINERS               |  13 +
 board/econet/en7528/Makefile                  |   2 +
 board/econet/en7528/board.c                   |  37 +
 configs/en7512_reference_defconfig            |  90 ++
 configs/en7528_ram_defconfig                  |  43 +
 configs/en7528_reference_defconfig            |  38 +
 doc/board/econet/en7512.rst                   |  66 ++
 doc/board/econet/en7528.rst                   |  66 ++
 doc/board/econet/index.rst                    |  10 +
 doc/board/index.rst                           |   1 +
 drivers/net/Kconfig                           |   8 +-
 drivers/net/airoha_eth.c                      | 850 +++++++++++++++++-
 drivers/serial/Kconfig                        |   7 +
 drivers/serial/Makefile                       |   1 +
 drivers/serial/serial_en75xx.c                | 170 ++++
 drivers/spi/Kconfig                           |   3 +-
 drivers/spi/airoha_snfi_spi.c                 | 412 +++++++--
 include/configs/en7512.h                      |   8 +
 include/configs/en7528.h                      |   9 +
 45 files changed, 3339 insertions(+), 127 deletions(-)
 create mode 100644 arch/mips/dts/econet,en7512-reference-u-boot.dtsi
 create mode 100644 arch/mips/dts/econet,en7512-reference.dts
 create mode 100644 arch/mips/dts/econet,en7512.dtsi
 create mode 100644 arch/mips/dts/econet,en7528-ram-u-boot.dtsi
 create mode 100644 arch/mips/dts/econet,en7528-ram.dts
 create mode 100644 arch/mips/dts/econet,en7528-reference-u-boot.dtsi
 create mode 100644 arch/mips/dts/econet,en7528-reference.dts
 create mode 100644 arch/mips/dts/econet,en7528.dtsi
 create mode 100644 arch/mips/mach-en75xx/Kconfig
 create mode 100644 arch/mips/mach-en75xx/Makefile
 create mode 100644 arch/mips/mach-en75xx/cache.c
 create mode 100644 arch/mips/mach-en75xx/cpu.c
 create mode 100644 arch/mips/mach-en75xx/early_sfc.c
 create mode 100644 arch/mips/mach-en75xx/include/mach/en75xx.h
 create mode 100644 arch/mips/mach-en75xx/spl/Makefile
 create mode 100644 arch/mips/mach-en75xx/spl/spl.c
 create mode 100644 arch/mips/mach-en75xx/tpl/Makefile
 create mode 100644 arch/mips/mach-en75xx/tpl/start.S
 create mode 100644 arch/mips/mach-en75xx/tpl/tpl.c
 create mode 100644 board/econet/en7512/MAINTAINERS
 create mode 100644 board/econet/en7512/Makefile
 create mode 100644 board/econet/en7512/board.c
 create mode 100644 board/econet/en7528/MAINTAINERS
 create mode 100644 board/econet/en7528/Makefile
 create mode 100644 board/econet/en7528/board.c
 create mode 100644 configs/en7512_reference_defconfig
 create mode 100644 configs/en7528_ram_defconfig
 create mode 100644 configs/en7528_reference_defconfig
 create mode 100644 doc/board/econet/en7512.rst
 create mode 100644 doc/board/econet/en7528.rst
 create mode 100644 doc/board/econet/index.rst
 create mode 100644 drivers/serial/serial_en75xx.c
 create mode 100644 include/configs/en7512.h
 create mode 100644 include/configs/en7528.h

-- 
2.53.0


       reply	other threads:[~2026-08-26 13:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260825222211.712836-1-maskachoska@yahoo.com>
2026-08-26 13:34 ` AK Sharma [this message]
2026-08-26 13:34   ` [PATCH v2 1/9] mips: en75xx: add EcoNet/Airoha EN75xx SoC support AK Sharma
2026-08-26 13:34   ` [PATCH v2 2/9] mips: en75xx: add TPL and SPL early boot stages AK Sharma
2026-08-26 13:34   ` [PATCH v2 3/9] serial: en75xx: add EcoNet/Airoha EN75xx UART driver AK Sharma
2026-08-26 13:34   ` [PATCH v2 4/9] spi: airoha-snfi: add EN75xx SPI-NAND controller support AK Sharma
2026-08-26 13:34   ` [PATCH v2 5/9] net: airoha-eth: add EN7528 Ethernet support AK Sharma
2026-08-26 13:34   ` [PATCH v2 6/9] mips: dts: add EcoNet EN75xx device trees AK Sharma
2026-08-26 13:34   ` [PATCH v2 7/9] board: econet: add EN7512 reference board AK Sharma
2026-08-26 13:34   ` [PATCH v2 8/9] board: econet: add EN7528 board support AK Sharma
2026-08-26 13:34   ` [PATCH v2 9/9] doc: board: econet: add EN75xx documentation AK Sharma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1787736704.git.maskachoska@yahoo.com \
    --to=maskachoska@yahoo.com \
    --cc=ansuelsmth@gmail.com \
    --cc=daniel.schwierzeck@gmail.com \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=frieder.schrempf@kontron.de \
    --cc=jerome.forissier@arm.com \
    --cc=marex@denx.de \
    --cc=michael@amarulasolutions.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.u-boot-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox