Skip to content

Commit 24ac5f1

Browse files
committed
realtek: rtl930x: Add Hasivo s1100wp-8gt-se (excl. PoE)
This commit adds support for Hasivo S1100WP-8GT-SE switch. Device specification -------------------- SoC Type: Realtek RTL9303 RAM: Samsung K4B2G1646F-BYMA (256MB DDR3 SDRAM) Flash: Fudan FM25Q128A (16 MB) Ethernet: 8x RTL8221B 10/100/1000/2500Mbps PHY LEDs: 2 LEDs + 4 LEDs/port 1x power green (no control) 1x system green (via RLT9303 GPIO) 3x RJ45 LEDs/port (via HC595 shift registers on LED spi) 1x Green 1x Green/Orange 1x Orange LED/port for PoE status (below RJ45, on STC8) Button: Reset USB ports: None Bootloader: Realtek U-Boot 2011.12.(3.6.6.55087) (Nov 13 2022 - 14:37:31) Fan: None installed (but board provision for temp/FET/fan) POE: 2x HS104PTI for 802.3af/at/bt PoE (Not yet working) Installing OpenWrt ------------------ 1. UART RJ45 requires soldering a connector to the empty footprint (RJ1). (Amphenol RJHSEE380 or similar) 2. Connect to UART 38400@8n1, using Cisco Console Rollover cable (RS232) 3. Set computer IP to 192.168.0.111, and plug in with 2.5Gbps 4. Enter bootloader by pressing esc key during boot 5. Enter password `Hs2021cfgmg` 6. Type `XXXX` to get into U-Boot 7. Type `rtk network on` 8. Use tftp if you have a 2.5G link (other speeds won't work). If serial, you can increase baudrate in uboot with `setenv baudrate 115200` 9.1. `tftpboot 0x84f00000 <openwrt-initramfs-filename>` 9.2. Otherwise use serial transfer (Y modem): `loady 0x84f00000` 10. `bootm 0x84f00000` Now you should be in OpenWRT, and can use sysupgrade to install. Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
1 parent 1c62e21 commit 24ac5f1

File tree

3 files changed

+344
-0
lines changed

3 files changed

+344
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ realtek_setup_macs()
7575
lan_mac_start=$(macaddr_add $lan_mac 2)
7676
lan_mac_end=$(macaddr_add $lan_mac $((mac_count2-mac_count1)))
7777
;;
78+
hasivo,s1100wp-8gt-se|\
7879
plasmacloud,esx28|\
7980
plasmacloud,mcx3|\
8081
plasmacloud,psx8|\
Lines changed: 334 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,334 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later
2+
/dts-v1/;
3+
4+
#include "rtl930x.dtsi"
5+
6+
#include <dt-bindings/input/input.h>
7+
#include <dt-bindings/gpio/gpio.h>
8+
#include <dt-bindings/leds/common.h>
9+
10+
/ {
11+
compatible = "hasivo,s1100wp-8gt-se";
12+
model = "Hasivo S1100WP-8GT-SE";
13+
14+
memory@0 {
15+
device_type = "memory";
16+
reg = <0x00000000 0x10000000>; /* 256 MiB */
17+
};
18+
19+
aliases {
20+
led-boot = &led_sys;
21+
led-failsafe = &led_sys;
22+
led-running = &led_sys;
23+
led-upgrade = &led_sys;
24+
label-mac-device = &ethernet0;
25+
};
26+
27+
chosen {
28+
stdout-path = "serial0:38400n8";
29+
};
30+
31+
keys {
32+
compatible = "gpio-keys";
33+
34+
button-reset {
35+
label = "reset";
36+
gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
37+
linux,code = <KEY_RESTART>;
38+
};
39+
};
40+
41+
leds {
42+
compatible = "gpio-leds";
43+
44+
pinctrl-names = "default";
45+
pinctrl-0 = <&pinmux_disable_sys_led>;
46+
47+
led_sys: led-0 {
48+
label = "green:system";
49+
gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
50+
linux,default-trigger = "heartbeat";
51+
};
52+
};
53+
54+
led_set: led_set {
55+
compatible = "realtek,rtl9300-leds";
56+
pinctrl-names = "default";
57+
pinctrl-0 = <&pinmux_enable_led_sync>;
58+
59+
led_set0 = <
60+
( // GREEN LEFT RJ45 - 1G link, blink on activity
61+
RTL93XX_LED_SET_1G |
62+
RTL93XX_LED_SET_LINK |
63+
RTL93XX_LED_SET_ACT
64+
)
65+
( // GREEN RIGHT RJ45 - 10M/100M link, blink on activity
66+
RTL93XX_LED_SET_10M |
67+
RTL93XX_LED_SET_100M |
68+
RTL93XX_LED_SET_LINK |
69+
RTL93XX_LED_SET_ACT
70+
)
71+
( // ORANGE LEFT RJ45 - 2.5G link, blink on activity
72+
RTL93XX_LED_SET_2P5G |
73+
RTL93XX_LED_SET_LINK |
74+
RTL93XX_LED_SET_ACT
75+
)
76+
>;
77+
};
78+
79+
i2c_scl23_sda22 {
80+
compatible = "i2c-gpio";
81+
#address-cells = <1>;
82+
#size-cells = <0>;
83+
84+
scl-gpios = <&gpio0 23 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
85+
sda-gpios = <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
86+
status = "okay";
87+
88+
clock-frequency = <100000>;
89+
};
90+
};
91+
92+
&spi0 {
93+
status = "okay";
94+
95+
flash@0 {
96+
compatible = "fudan,fm25q128", "jedec,spi-nor";
97+
reg = <0>;
98+
spi-max-frequency = <10000000>;
99+
100+
partitions {
101+
compatible = "fixed-partitions";
102+
#address-cells = <1>;
103+
#size-cells = <1>;
104+
105+
/* stock is LOADER */
106+
partition@0 {
107+
label = "u-boot";
108+
reg = <0x0000000 0x00e0000>;
109+
read-only;
110+
};
111+
112+
/* stock is BDINFO */
113+
partition@e0000 {
114+
label = "u-boot-env";
115+
reg = <0x00e0000 0x0010000>;
116+
117+
nvmem-layout {
118+
compatible = "u-boot,env";
119+
120+
macaddr_ubootenv_ethaddr: ethaddr {
121+
#nvmem-cell-cells = <1>;
122+
};
123+
serialnumber_ubootenv: serialnumber {
124+
#nvmem-cell-cells = <1>;
125+
};
126+
pse_bt_port_no_ubootenv: pse_bt_port_no {
127+
#nvmem-cell-cells = <1>;
128+
};
129+
pse_existed_flag_ubootenv: pse_existed_flag {
130+
#nvmem-cell-cells = <1>;
131+
};
132+
pse_power_bank_ubootenv: pse_power_bank {
133+
#nvmem-cell-cells = <1>;
134+
};
135+
};
136+
};
137+
138+
/* stock is SYSINFO */
139+
partition@f0000 {
140+
label = "u-boot-env2";
141+
reg = <0x00f0000 0x0010000>;
142+
read-only;
143+
};
144+
145+
/* stock is JFFS2_CFG */
146+
partition@100000 {
147+
label = "jffs";
148+
reg = <0x0100000 0x0100000>;
149+
};
150+
151+
/* stock is JFFS2_LOG */
152+
partition@200000 {
153+
label = "jffs2";
154+
reg = <0x0200000 0x0100000>;
155+
};
156+
157+
/* stock is RUNTIME */
158+
partition@300000 {
159+
compatible = "openwrt,uimage", "denx,uimage";
160+
label = "firmware";
161+
reg = <0x0300000 0x0c00000>;
162+
};
163+
164+
/* stock is OEMINFO */
165+
partition@f00000 {
166+
label = "oeminfo";
167+
reg = <0x0f00000 0x0100000>;
168+
read-only;
169+
};
170+
};
171+
};
172+
};
173+
174+
&ethernet0 {
175+
nvmem-cells = <&macaddr_ubootenv_ethaddr 0>;
176+
nvmem-cell-names = "mac-address";
177+
};
178+
179+
&mdio_bus0 {
180+
/* External RTL8221B PHY */
181+
phy0: ethernet-phy@0 {
182+
reg = <0>;
183+
compatible = "ethernet-phy-ieee802.3-c45";
184+
realtek,smi-address = <0 1>;
185+
};
186+
187+
/* External RTL8221B PHY */
188+
phy8: ethernet-phy@8 {
189+
reg = <8>;
190+
compatible = "ethernet-phy-ieee802.3-c45";
191+
realtek,smi-address = <0 2>;
192+
};
193+
194+
/* External RTL8221B PHY */
195+
phy16: ethernet-phy@16 {
196+
reg = <16>;
197+
compatible = "ethernet-phy-ieee802.3-c45";
198+
realtek,smi-address = <0 3>;
199+
};
200+
201+
/* External RTL8221B PHY */
202+
phy20: ethernet-phy@20 {
203+
reg = <20>;
204+
compatible = "ethernet-phy-ieee802.3-c45";
205+
realtek,smi-address = <0 4>;
206+
};
207+
208+
/* External RTL8221B PHY */
209+
phy24: ethernet-phy@24 {
210+
reg = <24>;
211+
compatible = "ethernet-phy-ieee802.3-c45";
212+
realtek,smi-address = <1 1>;
213+
};
214+
215+
/* External RTL8221B PHY */
216+
phy25: ethernet-phy@25 {
217+
reg = <25>;
218+
compatible = "ethernet-phy-ieee802.3-c45";
219+
realtek,smi-address = <1 2>;
220+
};
221+
222+
/* External RTL8221B PHY */
223+
phy26: ethernet-phy@26 {
224+
reg = <26>;
225+
compatible = "ethernet-phy-ieee802.3-c45";
226+
realtek,smi-address = <1 3>;
227+
};
228+
229+
/* External RTL8221B PHY */
230+
phy27: ethernet-phy@27 {
231+
reg = <27>;
232+
compatible = "ethernet-phy-ieee802.3-c45";
233+
realtek,smi-address = <1 4>;
234+
};
235+
};
236+
237+
&switch0 {
238+
ports {
239+
#address-cells = <1>;
240+
#size-cells = <0>;
241+
242+
port@0 {
243+
reg = <0>;
244+
label = "lan1";
245+
pcs-handle = <&serdes2>;
246+
phy-handle = <&phy0>;
247+
phy-mode = "sgmii";
248+
managed = "in-band-status";
249+
led-set = <0>;
250+
};
251+
252+
port@8 {
253+
reg = <8>;
254+
label = "lan2";
255+
pcs-handle = <&serdes3>;
256+
phy-handle = <&phy8>;
257+
phy-mode = "sgmii";
258+
managed = "in-band-status";
259+
led-set = <0>;
260+
};
261+
262+
port@16 {
263+
reg = <16>;
264+
label = "lan3";
265+
pcs-handle = <&serdes4>;
266+
phy-handle = <&phy16>;
267+
phy-mode = "sgmii";
268+
managed = "in-band-status";
269+
led-set = <0>;
270+
};
271+
272+
port@20 {
273+
reg = <20>;
274+
label = "lan4";
275+
pcs-handle = <&serdes5>;
276+
phy-handle = <&phy20>;
277+
phy-mode = "sgmii";
278+
managed = "in-band-status";
279+
led-set = <0>;
280+
};
281+
282+
port@24 {
283+
reg = <24>;
284+
label = "lan5";
285+
pcs-handle = <&serdes6>;
286+
phy-handle = <&phy24>;
287+
phy-mode = "sgmii";
288+
managed = "in-band-status";
289+
led-set = <0>;
290+
};
291+
292+
port@25 {
293+
reg = <25>;
294+
label = "lan6";
295+
pcs-handle = <&serdes7>;
296+
phy-handle = <&phy25>;
297+
phy-mode = "sgmii";
298+
managed = "in-band-status";
299+
led-set = <0>;
300+
};
301+
302+
port@26 {
303+
reg = <26>;
304+
label = "lan7";
305+
pcs-handle = <&serdes8>;
306+
phy-handle = <&phy26>;
307+
phy-mode = "sgmii";
308+
managed = "in-band-status";
309+
led-set = <0>;
310+
};
311+
312+
port@27 {
313+
reg = <27>;
314+
label = "lan8";
315+
pcs-handle = <&serdes9>;
316+
phy-handle = <&phy27>;
317+
phy-mode = "sgmii";
318+
managed = "in-band-status";
319+
led-set = <0>;
320+
};
321+
322+
/* Internal SoC */
323+
port@28 {
324+
ethernet = <&ethernet0>;
325+
reg = <28>;
326+
phy-mode = "internal";
327+
328+
fixed-link {
329+
speed = <10000>;
330+
full-duplex;
331+
};
332+
};
333+
};
334+
};

target/linux/realtek/image/rtl930x.mk

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ define Device/hasivo_s1100w-8xgt-se
1616
endef
1717
TARGET_DEVICES += hasivo_s1100w-8xgt-se
1818

19+
define Device/hasivo_s1100wp-8gt-se
20+
SOC := rtl9303
21+
DEVICE_VENDOR := Hasivo
22+
DEVICE_MODEL := S1100WP-8GT-SE
23+
IMAGE_SIZE := 12288k
24+
$(Device/kernel-lzma)
25+
endef
26+
TARGET_DEVICES += hasivo_s1100wp-8gt-se
27+
1928
define Device/plasmacloud-common
2029
SOC := rtl9302
2130
UIMAGE_MAGIC := 0x93000000

0 commit comments

Comments
 (0)