openwrt/target/linux/bmips/image/bcm6328.mk
Linus Walleij 212da4dd48 bmips: Add Inteno XG6846 target
This adds 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 interrupting the boot on the UART console and downloading
it from a TFTP server e.g.:
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: Paul Donald <newtwen+github@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-05-01 21:30:26 +02:00

98 lines
2.3 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0-or-later
define Device/arcadyan_ar7516
$(Device/bcm63xx-cfe)
DEVICE_VENDOR := Arcadyan
DEVICE_MODEL := AR7516
CHIP_ID := 6328
CFE_BOARD_ID := AR7516AAW
FLASH_MB := 8
DEVICE_PACKAGES += $(USB2_PACKAGES) \
$(B43_PACKAGES) broadcom-43227-sprom \
kmod-leds-bcm6328
endef
TARGET_DEVICES += arcadyan_ar7516
define Device/comtrend_ar-5381u
$(Device/bcm63xx-cfe)
DEVICE_VENDOR := Comtrend
DEVICE_MODEL := AR-5381u
CHIP_ID := 6328
CFE_BOARD_ID := 96328A-1241N
FLASH_MB := 16
DEVICE_PACKAGES += $(USB2_PACKAGES) \
$(B43_PACKAGES) broadcom-43225-sprom \
kmod-leds-bcm6328
endef
TARGET_DEVICES += comtrend_ar-5381u
define Device/comtrend_ar-5387un
$(Device/bcm63xx-cfe)
DEVICE_VENDOR := Comtrend
DEVICE_MODEL := AR-5387un
CHIP_ID := 6328
CFE_BOARD_ID := 96328A-1441N1
FLASH_MB := 16
DEVICE_PACKAGES += $(USB2_PACKAGES) \
$(B43_PACKAGES) broadcom-43225-sprom \
kmod-leds-bcm6328
endef
TARGET_DEVICES += comtrend_ar-5387un
define Device/innacomm_w3400v6
$(Device/bcm63xx-cfe)
DEVICE_VENDOR := Innacomm
DEVICE_MODEL := W3400V6
CHIP_ID := 6328
CFE_BOARD_ID := 96328ang
FLASH_MB := 8
DEVICE_PACKAGES += $(B43_PACKAGES) \
broadcom-4318-sprom kmod-leds-bcm6328
endef
TARGET_DEVICES += innacomm_w3400v6
define Device/inteno_xg6846
$(Device/bcm63xx-cfe-legacy)
DEVICE_VENDOR := Inteno
DEVICE_MODEL := XG6846
CHIP_ID := 6328
CFE_BOARD_ID := 96328avng
FLASH_MB := 16
DEVICE_PACKAGES := $(USB2_PACKAGES) \
kmod-i2c-core kmod-i2c-gpio \
kmod-leds-bcm6328 kmod-dsa-mv88e6xxx \
kmod-sfp
endef
TARGET_DEVICES += inteno_xg6846
define Device/nucom_r5010unv2
$(Device/bcm63xx-cfe)
DEVICE_VENDOR := NuCom
DEVICE_MODEL := R5010UNv2
CHIP_ID := 6328
CFE_BOARD_ID := 96328ang
FLASH_MB := 16
DEVICE_PACKAGES += $(USB2_PACKAGES) \
$(B43_PACKAGES) broadcom-43217-sprom \
kmod-leds-bcm6328
endef
TARGET_DEVICES += nucom_r5010unv2
define Device/sercomm_ad1018
$(Device/sercomm-nand)
DEVICE_VENDOR := Sercomm
DEVICE_MODEL := AD1018
CHIP_ID := 6328
BLOCKSIZE := 128k
PAGESIZE := 2048
SUBPAGESIZE := 512
VID_HDR_OFFSET := 2048
DEVICE_PACKAGES += $(USB2_PACKAGES) \
$(B43_PACKAGES) broadcom-43217-sprom \
kmod-leds-bcm6328
SERCOMM_FSVER := 1001
SERCOMM_HWVER := 1415153
SERCOMM_SWVER := 3013
endef
TARGET_DEVICES += sercomm_ad1018