From 9715beb04c74a918697945b3e2d23a139bd04b70 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Mon, 29 May 2017 11:24:49 +0200 Subject: ramips: add support for Ubiquiti EdgeRouter X-SFP This patch adds support for the Ubiquiti EdgeRouter X-SFP and improves support for the EdgeRouter X (PoE-passthrough). Specification: - SoC: MediaTek MT7621AT - Flash: 256 MiB - RAM: 265 MiB - Ethernet: 5 x LAN (1000 Mbps) - UART: 1 x UART on PCB (3.3V, RX, TX, GND) - 57600 8N1 - EdgeRouter X: - 1 x PoE-Passtrough (Eth4) - powered by Wallwart or passive PoE - EdgeRouter X-SFP: - 5 x PoE-Out (24V, passive) - 1 x SFP (unknown status) - powered by Wallwart (24V) Doesn't work: * SoC has crypto engine but no open driver. * SoC has nat acceleration, but no open driver. * This router has 2MB spi flash soldered in but MT nand/spi drivers do not support pin sharing, so it is not accessable and disabled. Stock firmware could read it and it was empty. Installation via vendor firmware: - build an Initrd-image (> 3MiB) and upload the factory-image - initrd can have luci-mod-failsafe - flash final firmware via LuCI / sysupgrade on rebooted system via TFTP: - stop uboot into tftp-load into option "1" - upload factory.bin image Signed-off-by: Sven Roederer --- .../linux/ramips/base-files/etc/board.d/02_network | 1 + .../ramips/base-files/etc/board.d/03_gpio_switches | 25 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100755 target/linux/ramips/base-files/etc/board.d/03_gpio_switches (limited to 'target/linux/ramips/base-files/etc') diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 9dd5823..3cd7ff6 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -170,6 +170,7 @@ ramips_setup_interfaces() rb750gr3|\ rt-n14u|\ ubnt-erx|\ + ubnt-erx-sfp|\ ur-326n4g|\ wrtnode|\ wrtnode2p | \ diff --git a/target/linux/ramips/base-files/etc/board.d/03_gpio_switches b/target/linux/ramips/base-files/etc/board.d/03_gpio_switches new file mode 100755 index 0000000..859dfb3 --- /dev/null +++ b/target/linux/ramips/base-files/etc/board.d/03_gpio_switches @@ -0,0 +1,25 @@ +#!/bin/sh + +. /lib/functions/uci-defaults.sh +. /lib/ramips.sh + +board_config_update + +board=$(ramips_board_name) + +case "$board" in +ubnt-erx) + ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "0" + ;; +ubnt-erx-sfp) + ucidef_add_gpio_switch "poe_power_port0" "PoE Power Port0" "496" + ucidef_add_gpio_switch "poe_power_port1" "PoE Power Port1" "497" + ucidef_add_gpio_switch "poe_power_port2" "PoE Power Port2" "498" + ucidef_add_gpio_switch "poe_power_port3" "PoE Power Port3" "499" + ucidef_add_gpio_switch "poe_power_port4" "PoE Power Port4" "500" + ;; +esac + +board_config_flush + +exit 0 -- cgit v1.1