openwrt/target/linux/realtek/dts-5.10/rtl8380_engenius_ews2910p.dts

230 lines
4.2 KiB
Plaintext
Raw Normal View History

realtek: add support for EnGenius EWS2910P Add support for the Engenius EWS2910P PoE switch. This is an RTL8380 based switch with two SFP slots, and PoE 802.3af one every RJ-45 port. The specs say 802.3af, but the vendor firmware configures the PSE for a budget of 31W, indicating 802.3at support. Specifications: --------------- * SoC: Realtek RTL8380M * Flash: 32 MiB SPI flash Macronix MX25L25635E * RAM: 256 MiB (As reported by bootloader) * Ethernet: 16x 10/100/1000 Mbps with PoE 2x SFP slots * Buttons: 1 "Reset" button on front panel 1 "LED mode: button on front panel 1 "On/Off" Toggle switch on the back * Power: 48V-54V DC barrel jack * UART: 1 serial header (JP1) with populated 2.54mm pitch header Labeled GRTV for ground, rx, tx, and 3.3V respectively * PoE: 1 STM ST32F100 microcontroller 2 BCM59111 PSE chips Works: ------ - (8) RJ-45 ethernet ports - Switch functions - LEDs and buttons Not yet enabled: ---------------- - SFP ports (will be enabled in a subsequent change) - Power-over-Ethernet (requires realtek-poe package) Install via web interface: ------------------------- The factory firmware will accept and flash the initramfs image. It is recommended to flash to "Partition 0". Flashing to "Partition 1" is not supported at this point. The factory web GUI will show the following warning: " Warning: The firmware version is v0.00.00-c0.0.00 The firmware image you are uploading is older than the current firmware of the switch. The device will reset back to default settings. Are you sure you want to proceed?" This is expected when flashing OpenWrt. After the initramfs image boots, flash the -sysupgrade using either the commandline or LuCI. Install via serial console/tftp: -------------------------------- The u-boot firmware will not stop the boot, regardless of which key is pressed. To access the u-boot console, ground out the CLK (pin 16) of the ROM (U22) when u-boot is reading the linux image. If timed correctly, the image CRC will fail, and u-boot will drop to a shell: > rtk network on > setenv ipaddr <address of tftp server> > tftp $(freemem) <name-of-initramfs-image.bin> > bootm Then flash the -sysupgrade using either the commandline or luci. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> [gpio-led node names, OpenWrt and LuCI capitalization in commit message] Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-05-14 06:34:04 +00:00
// SPDX-License-Identifier: GPL-2.0-or-later
#include "rtl838x.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
/ {
compatible = "engenius,ews2910p", "realtek,rtl838x-soc";
model = "EnGenius EWS2910P";
aliases {
led-boot = &led_power;
led-failsafe = &led_fault;
led-running = &led_power;
led-upgrade = &led_power;
};
memory@0 {
device_type = "memory";
reg = <0x0 0x10000000>;
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
led_mode {
label = "led-mode";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
};
};
gpio1: rtl8231-gpio {
compatible = "realtek,rtl8231-gpio";
#gpio-cells = <2>;
gpio-controller;
indirect-access-bus-id = <0>;
poe_enable {
gpio-hog;
gpios = <1 GPIO_ACTIVE_HIGH>;
output-high;
line-name = "poe-enable";
};
sff_p9_gpios {
gpio-hog;
gpios = < 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>,
< 11 GPIO_ACTIVE_HIGH>, /* los-gpio */
< 12 GPIO_ACTIVE_LOW>; /* mod-def0-gpio */
input;
line-name = "sff-p9-gpios";
};
};
gpio-export {
compatible = "gpio-export";
sff-p9-tx-disable {
gpio-export,name = "sff-p9-tx-disable";
gpio-export,output = <1>;
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
};
realtek: add support for EnGenius EWS2910P Add support for the Engenius EWS2910P PoE switch. This is an RTL8380 based switch with two SFP slots, and PoE 802.3af one every RJ-45 port. The specs say 802.3af, but the vendor firmware configures the PSE for a budget of 31W, indicating 802.3at support. Specifications: --------------- * SoC: Realtek RTL8380M * Flash: 32 MiB SPI flash Macronix MX25L25635E * RAM: 256 MiB (As reported by bootloader) * Ethernet: 16x 10/100/1000 Mbps with PoE 2x SFP slots * Buttons: 1 "Reset" button on front panel 1 "LED mode: button on front panel 1 "On/Off" Toggle switch on the back * Power: 48V-54V DC barrel jack * UART: 1 serial header (JP1) with populated 2.54mm pitch header Labeled GRTV for ground, rx, tx, and 3.3V respectively * PoE: 1 STM ST32F100 microcontroller 2 BCM59111 PSE chips Works: ------ - (8) RJ-45 ethernet ports - Switch functions - LEDs and buttons Not yet enabled: ---------------- - SFP ports (will be enabled in a subsequent change) - Power-over-Ethernet (requires realtek-poe package) Install via web interface: ------------------------- The factory firmware will accept and flash the initramfs image. It is recommended to flash to "Partition 0". Flashing to "Partition 1" is not supported at this point. The factory web GUI will show the following warning: " Warning: The firmware version is v0.00.00-c0.0.00 The firmware image you are uploading is older than the current firmware of the switch. The device will reset back to default settings. Are you sure you want to proceed?" This is expected when flashing OpenWrt. After the initramfs image boots, flash the -sysupgrade using either the commandline or LuCI. Install via serial console/tftp: -------------------------------- The u-boot firmware will not stop the boot, regardless of which key is pressed. To access the u-boot console, ground out the CLK (pin 16) of the ROM (U22) when u-boot is reading the linux image. If timed correctly, the image CRC will fail, and u-boot will drop to a shell: > rtk network on > setenv ipaddr <address of tftp server> > tftp $(freemem) <name-of-initramfs-image.bin> > bootm Then flash the -sysupgrade using either the commandline or luci. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> [gpio-led node names, OpenWrt and LuCI capitalization in commit message] Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-05-14 06:34:04 +00:00
};
gpio-restart {
compatible = "gpio-restart";
gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
};
leds {
compatible = "gpio-leds";
led_power: led-0 {
label = "green:power";
gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
};
led_lan_mode: led-1 {
label = "green:lan-mode";
gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
};
led_fault: led-2 {
label = "amber:fault";
gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
};
led_poe_max: led-3 {
label = "amber:poe-max";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
};
};
i2c1: i2c-gpio-1 {
compatible = "i2c-gpio";
sda-gpios = <&gpio1 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
scl-gpios = <&gpio1 31 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
i2c-gpio,delay-us = <2>;
#address-cells = <1>;
#size-cells = <0>;
};
sfp1: sfp-p10 {
compatible = "sff,sfp";
i2c-bus = <&i2c1>;
tx-disable-gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>;
los-gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
mod-def0-gpio = <&gpio1 21 GPIO_ACTIVE_LOW>;
};
realtek: add support for EnGenius EWS2910P Add support for the Engenius EWS2910P PoE switch. This is an RTL8380 based switch with two SFP slots, and PoE 802.3af one every RJ-45 port. The specs say 802.3af, but the vendor firmware configures the PSE for a budget of 31W, indicating 802.3at support. Specifications: --------------- * SoC: Realtek RTL8380M * Flash: 32 MiB SPI flash Macronix MX25L25635E * RAM: 256 MiB (As reported by bootloader) * Ethernet: 16x 10/100/1000 Mbps with PoE 2x SFP slots * Buttons: 1 "Reset" button on front panel 1 "LED mode: button on front panel 1 "On/Off" Toggle switch on the back * Power: 48V-54V DC barrel jack * UART: 1 serial header (JP1) with populated 2.54mm pitch header Labeled GRTV for ground, rx, tx, and 3.3V respectively * PoE: 1 STM ST32F100 microcontroller 2 BCM59111 PSE chips Works: ------ - (8) RJ-45 ethernet ports - Switch functions - LEDs and buttons Not yet enabled: ---------------- - SFP ports (will be enabled in a subsequent change) - Power-over-Ethernet (requires realtek-poe package) Install via web interface: ------------------------- The factory firmware will accept and flash the initramfs image. It is recommended to flash to "Partition 0". Flashing to "Partition 1" is not supported at this point. The factory web GUI will show the following warning: " Warning: The firmware version is v0.00.00-c0.0.00 The firmware image you are uploading is older than the current firmware of the switch. The device will reset back to default settings. Are you sure you want to proceed?" This is expected when flashing OpenWrt. After the initramfs image boots, flash the -sysupgrade using either the commandline or LuCI. Install via serial console/tftp: -------------------------------- The u-boot firmware will not stop the boot, regardless of which key is pressed. To access the u-boot console, ground out the CLK (pin 16) of the ROM (U22) when u-boot is reading the linux image. If timed correctly, the image CRC will fail, and u-boot will drop to a shell: > rtk network on > setenv ipaddr <address of tftp server> > tftp $(freemem) <name-of-initramfs-image.bin> > bootm Then flash the -sysupgrade using either the commandline or luci. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> [gpio-led node names, OpenWrt and LuCI capitalization in commit message] Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-05-14 06:34:04 +00:00
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x80000>;
read-only;
};
partition@80000 {
label = "u-boot-env";
reg = <0x80000 0x10000>;
read-only;
};
partition@90000 {
label = "u-boot-env2";
reg = <0x90000 0x10000>;
};
partition@a0000 {
label = "rootfs_data";
realtek: add support for EnGenius EWS2910P Add support for the Engenius EWS2910P PoE switch. This is an RTL8380 based switch with two SFP slots, and PoE 802.3af one every RJ-45 port. The specs say 802.3af, but the vendor firmware configures the PSE for a budget of 31W, indicating 802.3at support. Specifications: --------------- * SoC: Realtek RTL8380M * Flash: 32 MiB SPI flash Macronix MX25L25635E * RAM: 256 MiB (As reported by bootloader) * Ethernet: 16x 10/100/1000 Mbps with PoE 2x SFP slots * Buttons: 1 "Reset" button on front panel 1 "LED mode: button on front panel 1 "On/Off" Toggle switch on the back * Power: 48V-54V DC barrel jack * UART: 1 serial header (JP1) with populated 2.54mm pitch header Labeled GRTV for ground, rx, tx, and 3.3V respectively * PoE: 1 STM ST32F100 microcontroller 2 BCM59111 PSE chips Works: ------ - (8) RJ-45 ethernet ports - Switch functions - LEDs and buttons Not yet enabled: ---------------- - SFP ports (will be enabled in a subsequent change) - Power-over-Ethernet (requires realtek-poe package) Install via web interface: ------------------------- The factory firmware will accept and flash the initramfs image. It is recommended to flash to "Partition 0". Flashing to "Partition 1" is not supported at this point. The factory web GUI will show the following warning: " Warning: The firmware version is v0.00.00-c0.0.00 The firmware image you are uploading is older than the current firmware of the switch. The device will reset back to default settings. Are you sure you want to proceed?" This is expected when flashing OpenWrt. After the initramfs image boots, flash the -sysupgrade using either the commandline or LuCI. Install via serial console/tftp: -------------------------------- The u-boot firmware will not stop the boot, regardless of which key is pressed. To access the u-boot console, ground out the CLK (pin 16) of the ROM (U22) when u-boot is reading the linux image. If timed correctly, the image CRC will fail, and u-boot will drop to a shell: > rtk network on > setenv ipaddr <address of tftp server> > tftp $(freemem) <name-of-initramfs-image.bin> > bootm Then flash the -sysupgrade using either the commandline or luci. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> [gpio-led node names, OpenWrt and LuCI capitalization in commit message] Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-05-14 06:34:04 +00:00
reg = <0xa0000 0xd60000>;
};
partition@e00000 {
label = "jffs2-log";
reg = <0xe00000 0x200000>;
};
partition@1000000 {
compatible = "openwrt,uimage";
label = "firmware";
reg = <0x1000000 0x800000>;
openwrt,ih-magic = <0x03802910>;
};
partition@1800000 {
label = "firmware2";
reg = <0x1800000 0x800000>;
};
};
};
};
&ethernet0 {
mdio: mdio-bus {
compatible = "realtek,rtl838x-mdio";
regmap = <&ethernet0>;
#address-cells = <1>;
#size-cells = <0>;
INTERNAL_PHY(8)
INTERNAL_PHY(9)
INTERNAL_PHY(10)
INTERNAL_PHY(11)
INTERNAL_PHY(12)
INTERNAL_PHY(13)
INTERNAL_PHY(14)
INTERNAL_PHY(15)
INTERNAL_PHY(24)
INTERNAL_PHY(26)
realtek: add support for EnGenius EWS2910P Add support for the Engenius EWS2910P PoE switch. This is an RTL8380 based switch with two SFP slots, and PoE 802.3af one every RJ-45 port. The specs say 802.3af, but the vendor firmware configures the PSE for a budget of 31W, indicating 802.3at support. Specifications: --------------- * SoC: Realtek RTL8380M * Flash: 32 MiB SPI flash Macronix MX25L25635E * RAM: 256 MiB (As reported by bootloader) * Ethernet: 16x 10/100/1000 Mbps with PoE 2x SFP slots * Buttons: 1 "Reset" button on front panel 1 "LED mode: button on front panel 1 "On/Off" Toggle switch on the back * Power: 48V-54V DC barrel jack * UART: 1 serial header (JP1) with populated 2.54mm pitch header Labeled GRTV for ground, rx, tx, and 3.3V respectively * PoE: 1 STM ST32F100 microcontroller 2 BCM59111 PSE chips Works: ------ - (8) RJ-45 ethernet ports - Switch functions - LEDs and buttons Not yet enabled: ---------------- - SFP ports (will be enabled in a subsequent change) - Power-over-Ethernet (requires realtek-poe package) Install via web interface: ------------------------- The factory firmware will accept and flash the initramfs image. It is recommended to flash to "Partition 0". Flashing to "Partition 1" is not supported at this point. The factory web GUI will show the following warning: " Warning: The firmware version is v0.00.00-c0.0.00 The firmware image you are uploading is older than the current firmware of the switch. The device will reset back to default settings. Are you sure you want to proceed?" This is expected when flashing OpenWrt. After the initramfs image boots, flash the -sysupgrade using either the commandline or LuCI. Install via serial console/tftp: -------------------------------- The u-boot firmware will not stop the boot, regardless of which key is pressed. To access the u-boot console, ground out the CLK (pin 16) of the ROM (U22) when u-boot is reading the linux image. If timed correctly, the image CRC will fail, and u-boot will drop to a shell: > rtk network on > setenv ipaddr <address of tftp server> > tftp $(freemem) <name-of-initramfs-image.bin> > bootm Then flash the -sysupgrade using either the commandline or luci. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> [gpio-led node names, OpenWrt and LuCI capitalization in commit message] Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-05-14 06:34:04 +00:00
};
};
&switch0 {
ports {
#address-cells = <1>;
#size-cells = <0>;
SWITCH_PORT(8, 1, internal)
SWITCH_PORT(9, 2, internal)
SWITCH_PORT(10, 3, internal)
SWITCH_PORT(11, 4, internal)
SWITCH_PORT(12, 5, internal)
SWITCH_PORT(13, 6, internal)
SWITCH_PORT(14, 7, internal)
SWITCH_PORT(15, 8, internal)
SWITCH_SFP_PORT(24, 9, 1000base-x)
port@26 {
reg = <26>;
label = "lan10";
phy-mode = "1000base-x";
phy-handle = <&phy26>;
managed = "in-band-status";
sfp = <&sfp1>;
};
realtek: add support for EnGenius EWS2910P Add support for the Engenius EWS2910P PoE switch. This is an RTL8380 based switch with two SFP slots, and PoE 802.3af one every RJ-45 port. The specs say 802.3af, but the vendor firmware configures the PSE for a budget of 31W, indicating 802.3at support. Specifications: --------------- * SoC: Realtek RTL8380M * Flash: 32 MiB SPI flash Macronix MX25L25635E * RAM: 256 MiB (As reported by bootloader) * Ethernet: 16x 10/100/1000 Mbps with PoE 2x SFP slots * Buttons: 1 "Reset" button on front panel 1 "LED mode: button on front panel 1 "On/Off" Toggle switch on the back * Power: 48V-54V DC barrel jack * UART: 1 serial header (JP1) with populated 2.54mm pitch header Labeled GRTV for ground, rx, tx, and 3.3V respectively * PoE: 1 STM ST32F100 microcontroller 2 BCM59111 PSE chips Works: ------ - (8) RJ-45 ethernet ports - Switch functions - LEDs and buttons Not yet enabled: ---------------- - SFP ports (will be enabled in a subsequent change) - Power-over-Ethernet (requires realtek-poe package) Install via web interface: ------------------------- The factory firmware will accept and flash the initramfs image. It is recommended to flash to "Partition 0". Flashing to "Partition 1" is not supported at this point. The factory web GUI will show the following warning: " Warning: The firmware version is v0.00.00-c0.0.00 The firmware image you are uploading is older than the current firmware of the switch. The device will reset back to default settings. Are you sure you want to proceed?" This is expected when flashing OpenWrt. After the initramfs image boots, flash the -sysupgrade using either the commandline or LuCI. Install via serial console/tftp: -------------------------------- The u-boot firmware will not stop the boot, regardless of which key is pressed. To access the u-boot console, ground out the CLK (pin 16) of the ROM (U22) when u-boot is reading the linux image. If timed correctly, the image CRC will fail, and u-boot will drop to a shell: > rtk network on > setenv ipaddr <address of tftp server> > tftp $(freemem) <name-of-initramfs-image.bin> > bootm Then flash the -sysupgrade using either the commandline or luci. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> [gpio-led node names, OpenWrt and LuCI capitalization in commit message] Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-05-14 06:34:04 +00:00
port@28 {
ethernet = <&ethernet0>;
reg = <28>;
phy-mode = "internal";
fixed-link {
speed = <1000>;
full-duplex;
};
};
};
};
&uart1 {
status = "okay";
};