Hasivo RTL93XX switches with internal fans

Hi all,

We're finally making some progress on the Hasivo PoE solution in OpenWRT, and should have something workable shortly (weeks/months).
As part of this, we're digging a bit into the STC8 chip that is found on at least the s1100wp-8gt-se and likely on a number of other Hasivo switches.
The s1100wp-8gt-se appears to have a mounting hole for a TO92 device close to the RTL93XX IC, which I suspect is for a temperature sensor.
There are also two FAN headers and a FET footprint (not populated) which I suspect is for case/CPU fan control.

We'd like to bring in all of the functionality on these STC8 chips, but this would require a bit of information from people with switches that actually use this functionality.

What we'd like is to confirm that the STC8 is located at the same address as we see (0x4d) on the I2C bus. And we'd also like to get some dumps of what the register contents of the STC is (to see if we can identify temperatures or similar from it).

This post has a DTS excerpt that should expose the I2C bus with the STC8 on it (for RTL930X chips anyway, RTL931X chips would have SDA=?, SCL=? instead [will populate tonight])

Items we'd like for you to:

  1. Confirm that STC8 is available on I2C at 0x4d
  2. Get a dump of I2C register values from the STC8 using the i2c_dump_16x16.sh script in that post.
  3. If you have a little TO92 chip mounted next to the main RTL93XX IC, if you could advise of the part number on it.
  4. If you have fans and a little FET on the board next to the fan header, if you could advise of the part number on the FET, and part numbers / current/voltage of the fans.

For visual context, it's these two items that I'm interested in

1 Like

I have both an S1100WP-8XGT-SE (PoE) and an S1100W-8XGT-SE (non-PoE). I use the same OpenWrt build on both right now, since the fans and PoE “work” independently.

The S1100W has two fan headers with a suspected temperature sensor next to the RTL9303 and the FET next to the header reads MY. I don’t currently have the means to take it out and make measurements on it and I’m working off pictures I took a while ago. The suspected temperature sensor does not appear to have any markings on it, but QT2 is on the silkscreen. It is located between the RTL9303 and the RTL8264 PHYs. I don’t see a QT1 like I’d expect (Q? Temperature 1..X), BUT, the PoE version has an additional two fan headers by the power supply. Unfortunately, I don’t have a picture of that side of the board.

Are you able to make a patch to the device tree for this one? https://github.com/openwrt/openwrt/blob/openwrt-25.12/target/linux/realtek/dts/rtl9303_hasivo_s1100w-8xgt-se.dts I can build/flash/test later.

EDIT: The fans were 12V, I think 0.08A. I had to replace them a few weeks ago.

Do you know what board model (e.g. 9300022) that board is?
From the firmware that I've got theres two options for the I2C (both software).
SDA/SCL = 22/23; or
SDA/SCL = 4/3
which would then be:

--- a/target/linux/realtek/dts/rtl9303_hasivo_s1100w-8xgt-se.dts
+++ b/target/linux/realtek/dts/rtl9303_hasivo_s1100w-8xgt-se.dts
@@ -60,10 +60,22 @@
 		* - LED[2](Amber): 1G/100M/10M/LINK/ACT
 		* - LED[3](Green): 2.5G/LINK/ACT
 		*/
 		led_set0 = <0x0a02 0x0a01 0x0ba0 0x0a08>;
 	};
+
+	i2c_scl23_sda22 {
+		compatible = "i2c-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		scl-gpios = <&gpio0 23 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		sda-gpios = <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		status = "okay";
+
+		clock-frequency = <100000>;
+	};

or

--- a/target/linux/realtek/dts/rtl9303_hasivo_s1100w-8xgt-se.dts
+++ b/target/linux/realtek/dts/rtl9303_hasivo_s1100w-8xgt-se.dts
@@ -60,10 +60,22 @@
 		* - LED[2](Amber): 1G/100M/10M/LINK/ACT
 		* - LED[3](Green): 2.5G/LINK/ACT
 		*/
 		led_set0 = <0x0a02 0x0a01 0x0ba0 0x0a08>;
 	};
+
+	i2c_scl3_sda4 {
+		compatible = "i2c-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		scl-gpios = <&gpio0 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		sda-gpios = <&gpio0 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		status = "okay";
+
+		clock-frequency = <100000>;
+	};

If you've got the actual firmware and your board model then you could use Ghidra to find the SDA/SCL references in the code. We should probably start trying to build up a Ghidra library of data types etc from the Realtek SDK. It can really help analyse the firmware.

If you get similar devices on the i2c bus, that'd be good info.

My current belief is that the temperature sensor is a DS18b20 (or very low cost Chinese clone). And that the MOSFET is an N-FET, with 30+V Vds, logic-level gate drive, and about a 1.5A Ids continuous.

I'm confident enough that I'll get a few to install on my unpopulated board to test out.
Would still be good to get register dumps (and confirmation on part IDs) from those with fans installed (and working)...

S1100WP-8XGT-SE:

root@OpenWrt:~# i2cdetect -y 0                                                  
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f                             
00:          -- -- -- -- -- -- -- -- -- -- 0d -- --                             
10: -- -- -- -- -- 15 -- -- -- -- -- -- -- -- -- --                             
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
40: -- -- -- -- -- -- -- -- -- -- -- -- -- 4d -- --                             
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
70: -- -- -- -- -- -- -- -- 

I also realize I posted the output of the script in the other thread… adding here for posterity (sorry for x-post):

root@OpenWrt:~# sh ./i2c_dump_16x16.sh 0x4d                                     
      00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F                           
00:   00 00 00 00 2A 00 00 40 40 91 00 00 00 00 00 00                           
10:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00                           
20:   7E 91 ED 15 06 60 E9 96 12 AA 70 C5 1F B6 3E 02                           
30:   0D 73 FD 43 07 43 8B F9 5E AE 6F 09 FB B3 3D FA                           
40:   E3 4B 23 4D 71 08 5B 63 2C 77 AE 75 7B 50 E0 C8                           
50:   AF 5B FE 72 14 A1 80 94 E0 9C 13 95 7E 39 D3 0B                           
60:   A2 46 F7 FC -- -- -- -- -- -- -- -- -- -- -- --                           
70:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
80:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
90:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
A0:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
B0:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
C0:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
D0:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
E0:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
F0:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
root@OpenWrt:~# sh ./i2c_dump_16x16.sh 0x15                                     
      00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F                           
00:   00 48 14 83 00 6C 00 00 00 00 14 00 3C 40 4F 1E                           
10:   1E 1E 1E AA 4F 02 56 00 00 00 00 00 00 00 00 00                           
20:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00                           
30:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00                           
40:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00                           
50:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00                           
60:   00 00 00 00 -- -- -- -- -- -- -- -- -- -- -- --                           
70:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
80:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
90:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
A0:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
B0:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
C0:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
D0:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
E0:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
F0:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
root@OpenWrt:~# sh ./i2c_dump_16x16.sh 0x0d                                     
      00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F                           
00:   00 45 14 61 00 00 00 63 00 00 04 00 3C 40 4F 1E                           
10:   1E 1E 1E AA 4F 00 00 02 44 00 00 01 5E 00 00 00                           
20:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00                           
30:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00                           
40:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00                           
50:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00                           
60:   00 00 00 00 -- -- -- -- -- -- -- -- -- -- -- --                           
70:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
80:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
90:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
A0:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
B0:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
C0:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
D0:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
E0:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                           
F0:   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
1 Like

That's perfect. Looks like an exact match for the 8GT version. I assume it was 22/23 for the GPIO on this switch also. I think our board layouts are probably almost identical, just with 10GbE PHYs on your board whilst ours have the 2.5GbE RTL8226/RTL8221b (with the more troublesome SGMII/2500baseX serdes changes).

Yes, it was 22/23 for GPIO.

1 Like