Skip to content

Commit 741ac49

Browse files
halmartinsvanheule
authored andcommitted
realtek: add support for Datto L8
Add support for Datto L8 with 8 copper ports. POE+ support with 55W power budget. Specifications: --------------- * SoC: Realtek RTL8380M * Flash: 32MiB Flash * RAM: 256MiB * Ethernet: 8x 10/100/1000 Mbps * PoE: 8x * Serial: UART 3.3V TTL logic, 115200 8N1 * pinout: G(ND) R(x) T(x) V(cc) * Buttons: 1x Reset, 1x LED Mode (noop in OpenWrt) Note: OpenWrt combines the stock dual firmware partitions for more overlay capacity, however the OpenWrt image cannot exceed 13504k Installation: ------------- > When connected to CloudTrax, the local management login will be disabled to prevent settings conflicts. Ensure the switch does not have a working internet connection or the local web management interface is disabled. Go to the web management page of the switch (may require factory reset). By default the switch will use DHCP to obtain an IP address. The default login user is `admin` with password `0p3nm3$h!` On the left menu, click "Management" and then "Dual Image" and ensure that "Partition 0" is selected as the active partition. If it is not, select "Partition 0" and click "Apply" to save changes. Click on "Upgrade" in the top right of the web interface. Select the Active boot partition to update. Select the OpenWrt file ending in `-initramfs-kernel.bin` as the update file to upload. Upload the file and follow the prompts to upgrade the firmware. Reboot the switch from the web UI after the firmware update is completed. Wait for OpenWrt to finish booting (~2 minutes) Use SSH or the Luci UI (if available) to perform the sysupgrade. Copy the sysupgrade file ending in `-squashfs-sysupgrade.bin` to the switch: ``` scp -O openwrt-realtek-rtl838x-datto_l8-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/ ``` SSH to the switch and run `sysupgrade`: ``` ssh root@192.168.1.1 $ sysupgrade -n /tmp/openwrt-realtek-rtl838x-datto_l8-squashfs-sysupgrade.bin ``` OpenWrt will be installed. Note that first boot after installing requires ~3 minutes for the JFFS2 overlay to be formatted. When the Power LED stops blinking in the first boot after `sysupgrade`, JFFS2 formatting is completed. ---- Revert back to stock firmware: You will need a tftp server and the original Datto firmware. Download the firmware for the S8-L/L8 from Datto: https://networkinghelp.datto.com/help/Content/kb/Networking/Switches/KB360023113291.html Rename `s8-l_fw_01.03.24_180823-1639.bix` to `vmlinux.bix`, put `vmlinux.bix` in the root directory of your tftp server. Connect a serial console to the UART header and power on the switch. Interrupt U-Boot by typing `pac` when you see `Enter correct key to stop autoboot:` Run the following commands: ``` setenv serverip <tftp_server_ip> setenv ipaddr <ip_on_same_subnet> setenv netmask 255.255.255.0 run rtkon run update_linux run update_linux2 reset ``` The switch will boot the Datto firmware. Signed-off-by: Hal Martin <hal.martin@gmail.com> Tested-By: Raylynn Knight <rayknight@me.com> Signed-off-by: Sander Vanheule <sander@svanheule.net>
1 parent d32d9ec commit 741ac49

3 files changed

Lines changed: 229 additions & 0 deletions

File tree

target/linux/realtek/base-files/etc/board.d/02_network

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ realtek_setup_macs()
5252
local label_mac=""
5353

5454
case $board in
55+
datto,l8|\
5556
edgecore,ecs4100-12ph|\
5657
linksys,lgs310c|\
5758
linksys,lgs328c|\
@@ -186,6 +187,9 @@ realtek_setup_poe()
186187
netgear,gs110tpp-v1)
187188
ucidef_set_poe 130 "$(filter_port_list "$lan_list" "lan9 lan10")"
188189
;;
190+
datto,l8)
191+
ucidef_set_poe 55 "lan5 lan6 lan7 lan8 lan4 lan3 lan2 lan1"
192+
;;
189193
engenius,ews2910p-v1|\
190194
engenius,ews2910p-v3)
191195
ucidef_set_poe 60 "$(filter_port_list "$lan_list" "lan9 lan10")"
Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2+
3+
#include <dt-bindings/gpio/gpio.h>
4+
#include <dt-bindings/input/input.h>
5+
#include <dt-bindings/leds/common.h>
6+
7+
#include "rtl838x.dtsi"
8+
9+
/ {
10+
compatible = "datto,l8", "realtek,rtl838x-soc";
11+
12+
model = "Datto L8";
13+
14+
aliases {
15+
label-mac-device = &ethernet0;
16+
led-boot = &led_power;
17+
led-failsafe = &led_fault;
18+
led-running = &led_power;
19+
led-upgrade = &led_power;
20+
};
21+
22+
memory@0 {
23+
device_type = "memory";
24+
reg = <0x0 0x10000000>;
25+
};
26+
27+
leds: leds {
28+
pinctrl-names = "default";
29+
pinctrl-0 = <&pinmux_disable_sys_led>;
30+
compatible = "gpio-leds";
31+
32+
led_power: led-0 {
33+
function = LED_FUNCTION_POWER;
34+
color = <LED_COLOR_ID_GREEN>;
35+
gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
36+
};
37+
38+
/* high: LAN Mode, low: PoE Mode */
39+
led_lan_mode: led-1 {
40+
label = "green:lan-mode";
41+
gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
42+
};
43+
44+
led_fault: led-2 {
45+
function = LED_FUNCTION_FAULT;
46+
color = <LED_COLOR_ID_AMBER>;
47+
gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
48+
};
49+
50+
led_poe_max: led-3 {
51+
label = "amber:poe-max";
52+
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
53+
};
54+
};
55+
56+
keys {
57+
compatible = "gpio-keys";
58+
59+
reset {
60+
label = "reset";
61+
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
62+
linux,code = <KEY_RESTART>;
63+
};
64+
65+
mode {
66+
label = "mode";
67+
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
68+
linux,code = <KEY_LIGHTS_TOGGLE>;
69+
};
70+
};
71+
72+
gpio-restart {
73+
compatible = "gpio-restart";
74+
gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
75+
open-source;
76+
};
77+
78+
virtual_flash {
79+
compatible = "mtd-concat";
80+
81+
devices = <&fwconcat0>, <&fwconcat1>;
82+
83+
partitions {
84+
compatible = "fixed-partitions";
85+
#address-cells = <1>;
86+
#size-cells = <1>;
87+
88+
partition@0 {
89+
label = "firmware";
90+
reg = <0x0 0x1a60000>;
91+
compatible = "openwrt,uimage", "denx,uimage";
92+
openwrt,ih-magic = <0x00703400>;
93+
};
94+
};
95+
};
96+
};
97+
98+
&mdio_aux {
99+
status = "okay";
100+
101+
gpio1: expander@0 {
102+
compatible = "realtek,rtl8231";
103+
reg = <0>;
104+
105+
gpio-controller;
106+
#gpio-cells = <2>;
107+
gpio-ranges = <&gpio1 0 0 37>;
108+
109+
led-controller {
110+
compatible = "realtek,rtl8231-leds";
111+
status = "disabled";
112+
};
113+
};
114+
};
115+
116+
&uart1 {
117+
status = "okay";
118+
};
119+
120+
&mdio_bus0 {
121+
INTERNAL_PHY(8)
122+
INTERNAL_PHY(9)
123+
INTERNAL_PHY(10)
124+
INTERNAL_PHY(11)
125+
INTERNAL_PHY(12)
126+
INTERNAL_PHY(13)
127+
INTERNAL_PHY(14)
128+
INTERNAL_PHY(15)
129+
};
130+
131+
&switch0 {
132+
ports {
133+
#address-cells = <1>;
134+
#size-cells = <0>;
135+
136+
SWITCH_PORT(8, 1, internal)
137+
SWITCH_PORT(9, 2, internal)
138+
SWITCH_PORT(10, 3, internal)
139+
SWITCH_PORT(11, 4, internal)
140+
SWITCH_PORT(12, 5, internal)
141+
SWITCH_PORT(13, 6, internal)
142+
SWITCH_PORT(14, 7, internal)
143+
SWITCH_PORT(15, 8, internal)
144+
145+
port@28 {
146+
ethernet = <&ethernet0>;
147+
reg = <28>;
148+
phy-mode = "internal";
149+
fixed-link {
150+
speed = <1000>;
151+
full-duplex;
152+
};
153+
};
154+
};
155+
};
156+
157+
&ethernet0 {
158+
nvmem-cells = <&macaddr_ubootenv_ethaddr 0>;
159+
nvmem-cell-names = "mac-address";
160+
};
161+
162+
&spi0 {
163+
status = "okay";
164+
flash@0 {
165+
compatible = "jedec,spi-nor";
166+
reg = <0>;
167+
spi-max-frequency = <10000000>;
168+
169+
partitions {
170+
compatible = "fixed-partitions";
171+
#address-cells = <1>;
172+
#size-cells = <1>;
173+
174+
partition@0 {
175+
label = "u-boot";
176+
reg = <0x0 0x80000>;
177+
read-only;
178+
};
179+
partition@80000 {
180+
label = "u-boot-env";
181+
reg = <0x80000 0x10000>;
182+
nvmem-layout {
183+
compatible = "u-boot,env";
184+
185+
macaddr_ubootenv_ethaddr: ethaddr {
186+
#nvmem-cell-cells = <1>;
187+
};
188+
};
189+
};
190+
partition@90000 {
191+
label = "u-boot-env2";
192+
reg = <0x90000 0x20000>;
193+
};
194+
partition@a0000 {
195+
label = "cfg";
196+
reg = <0xa0000 0x400000>;
197+
};
198+
partition@4a0000 {
199+
label = "log";
200+
reg = <0x4a0000 0x100000>;
201+
};
202+
fwconcat0: partition@5a0000 {
203+
label = "runtime";
204+
reg = <0x5a0000 0xd30000>;
205+
};
206+
fwconcat1: partition@12d0000 {
207+
label = "runtime2";
208+
reg = <0x12d0000 0xd30000>;
209+
};
210+
};
211+
};
212+
};

target/linux/realtek/image/rtl838x.mk

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,19 @@ define Device/d-link_dgs-1210-28p-f
9191
endef
9292
TARGET_DEVICES += d-link_dgs-1210-28p-f
9393

94+
define Device/datto_l8
95+
$(Device/uimage-rt-loader)
96+
SOC := rtl8380
97+
DEVICE_VENDOR := Datto
98+
DEVICE_MODEL := L8
99+
DEVICE_ALT0_VENDOR := Open Mesh
100+
DEVICE_ALT0_MODEL := S8-L
101+
DEVICE_PACKAGES += realtek-poe
102+
UIMAGE_MAGIC := 0x00703400
103+
IMAGE_SIZE := 13504k
104+
endef
105+
TARGET_DEVICES += datto_l8
106+
94107
define Device/engenius_ews2910p-v1
95108
$(Device/engenius_ews2910p)
96109
SOC := rtl8380

0 commit comments

Comments
 (0)