bmips: Add Inteno XG6846 target
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 30 Jun 2023 20:22:17 +0000 (22:22 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 25 Apr 2024 13:51:56 +0000 (15:51 +0200)
commitf36ddb66de284c607ec179d3038cd7bcf41f4e80
treecc1eace6b764db0fe1720eca263d47624893d3a7
parentc5f0f5482cf677f5575a120627f03d812eec7664
bmips: Add Inteno XG6846 target

This add a device tree and build options for the XG6846
switch/router to the BMIPS target.

Hardware:
 - SoC: Broadcom BCM6328
 - CPU: BMIPS4350 V7.5
 - RAM: 64 MB DDR
 - NOR Flash: 16 MB parallel (CFE and OS)
 - Ethernet LAN: 4x 1Gbit
 - Ethernet WAN: 2x 1Gbit, fiber and TP
 - Buttons: reset
 - LEDs: 7 or 8, power and USB LEDs are GPIO-based, the
   LAN LEDs are controlled by the Marvell DSA Switch.
 - USB: on some versions
 - UART: yes

The device ODM (original device manufacturer) is XAVi
http://www.xavi.com.tw/

It is possible to boot the initramfs version
openwrt-bmips-bcm6328-inteno_xg6846-initramfs.elf from
CFE by breaking the boot on the UART console and download
it from a TFTP server such as:
CFE> r 192.168.1.2:openwrt-bmips-bcm6328-inteno_xg6846-initramfs.elf

Installation to target flash is not possible using CFE because
the image becomes too big for the CFE version found in these
devices. A separate U-Boot two-stage solution exists for
actually booting the device.

This device is called a "managed ethernet switch" by the vendor
and "media converter" or "fiber modem" by some of the ISPs
using it: the main purpose is to convert fiber connections to
ethernet, most devices just act as switches bridging the
fiber SFP to ethernet TP.

The device has a Marvell MV88E6352 DSA switch managed by
a BCM6328 BMIPS SoC.

This port makes it possible to use the XG6846 to grab an IP
number from the fiber connection and use all four LAN
connections out, turning it into a proper router.

This support is based mostly on the observations by the people on
the forum thread "Help with Inteno XG6846" where users NPeca75,
mrhaav, systemcrash and csom helped out to reverse engineer the
device. Then I made it work on the BMIPS target, figured out
the two-level switch hierarchy and settings.

Link: https://forum.openwrt.org/t/help-with-inteno-xg6846/68276/14
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
target/linux/bmips/bcm6328/base-files/etc/board.d/02_network
target/linux/bmips/dts/bcm6328-inteno-xg6846.dts [new file with mode: 0644]
target/linux/bmips/image/bcm6328.mk