Skip to content

Commit 4fd4ebc

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 9d1f6ec commit 4fd4ebc

File tree

2 files changed

+320
-0
lines changed

2 files changed

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

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)