realtek: rtl931x: add support for Sirivision SR-ST31212F - #25202
huiChen9517 wants to merge 1 commit into
Conversation
jonasjelonek
left a comment
There was a problem hiding this comment.
In the commit message, please adjust the formatting of the table. Markdown is not parsed in commit messages.
| los-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; | ||
| mod-def0-gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; | ||
| tx-disable-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; | ||
| maximum-power-milliwatt = <2000>; |
There was a problem hiding this comment.
Is this confirmed/given by the vendor?
There was a problem hiding this comment.
The LOS / MOD_ABS / TX_DISABLE pins were determined by inserting and
removing modules in each cage and watching the GPIO lines. They are
not from a vendor schematic.
maximum-power-milliwatt is not from the vendor. I set 2000 mW from SFP+ class-3 practice and
because a ~2 W 10GBASE-T module works on this board. Same value as
SR-ST3408F.
23af311 to
b820e7a
Compare
already changed to text version. |
|
Please squash all changes into a single commit and force-push your PR branch. |
openwrt-ai
left a comment
There was a problem hiding this comment.
Commit checks
- b3166ab, ddd3fde, 623ed77 "Update target/linux/realtek/dts/rtl9313_sirivision_sr-st31212f.dts" — GitHub's default suggestion-apply subject, missing the
<prefix>:scope (this is what failsFormalityCheck / Git & Commits). Squash all three into b820e7a so the series stays a singlerealtek: rtl931x: add support for Sirivision SR-ST31212Fcommit.
Generated by Claude Code
623ed77 to
9ea21b0
Compare
Squashed and force-pushed. |
This commit adds support for the Sirivision SR-ST31212F, a 12-port 10G
switch with 12x SFP+.
- SoC: Realtek RTL9313
- RAM: 512 MiB DDR3 (Micron D9PXV)
- Flash: SPI-NOR 16 MiB (Winbond W25Q128)
- Ethernet: 12x SFP+
- LEDs: 1x power (hardware blink), 1x system green (SYS_LED/GPIO),
1x SFP+ LED/port (link/act)
- Button: none
- Console: Cisco-style RJ45, 115200 8n1
- Fan: 2x 12V 2pin fan, always full speed
- Power: 12V DC from internal PSU, input AC 100-240V 50/60Hz
Board Layout
-----------
PCB ST31212F_V1.0, front, power side on the right:
SFP1-12 along the left. SoC RTL9313 and RAM (Micron D9PXV) center.
W25Q128 near SFP5/6. Two RTL8231 near SFP10-11.
Console, PWR/SYS LEDs, 74HC125, MA3232, HC164 near front-bottom.
12V header, two 2-pin fan headers, empty 14-pin and 6-pin headers.
MAC address is read from u-boot-env ethaddr.
U-Boot image magic is 0x93000000.
SFP cage sideband uses GPIOs from the SoC and 2x RTL8231.
Those pads are shared with the generic SPI master;
QSPI NOR uses a separate controller.
So pinmux_disable_spi0 / pinmux_disable_spi0_cs0 /
pinmux_disable_spi0_cs1 are required to release the pins to be GPIOs.
SerDes TX polarity is inverted on all SFP cages;
without this, port LEDs work but traffic does not.
System LED is controlled via SYS_LED by default,
here I use pinmux_disable_sys_led to switch it to GPIO0 from SoC
to make it more functional in openwrt.
OpenWrt installation
--------------------
1. Serial console, 115200 8n1, press Esc to stop U-Boot
2. Load initramfs-kernel.bin via YMODEM (loady) or TFTP and bootm.
Optional for tftpboot:
Use "printenv" to check the network settings of U-Boot.
You can change the ip address of the device by
"setenv ipaddr XXX.XXX.XXX.XXX" /
"setenv netmask XXX.XXX.XXX.XXX".
And you also need "setenv serverip XXX.XXX.XXX.XXX" to setup
your tftp server ip.
Then initialize the network by running "rtk network on".
And you may need the "rtk 10g PORT ..." command for
different SFP modules. Use "help rtk" for more details.
3. Backup the whole flash if you have not yet. Since there's no backup
runtime partition in this tiny flash, you will lose your original
runtime once you write openwrt in it.
Then sysupgrade the squashfs-sysupgrade.bin image.
Signed-off-by: Hui Chen <[email protected]>
9ea21b0 to
dea3f2c
Compare
| lan_mac_start=$lan_mac | ||
| ;; | ||
| d-link,dgs-1250-28x|\ | ||
| draytek,g2282x|\ |
There was a problem hiding this comment.
This shouldn't be dropped.
This commit adds support for the Sirivision SR-ST31212F, a 12-port 10G switch with 12x SFP+.
1x SFP+ LED/port (link/act)
Board Layout
The following is a simplified view of the board "ST31212F_V1.0" layout:
MAC address is read from u-boot-env ethaddr.
U-Boot image magic is 0x93000000.
SFP cage sideband uses GPIOs from the SoC and 2x RTL8231. Those pads are shared with the generic SPI master;
QSPI NOR uses a separate controller.
So pinmux_disable_spi0 / pinmux_disable_spi0_cs0 / pinmux_disable_spi0_cs1 are required to release the pins to be GPIOs. SerDes TX polarity is inverted on all SFP cages; without this, port LEDs work but traffic does not.
System LED is controlled via SYS_LED by default, here I use pinmux_disable_sys_led to switch it to GPIO0 from SoC to make it more functional in openwrt.
OpenWrt installation
Optional for tftpboot:
Use "printenv" to check the network settings of U-Boot.
You can change the ip address of the device by "setenv ipaddr XXX.XXX.XXX.XXX" / "setenv netmask XXX.XXX.XXX.XXX".
And you also need "setenv serverip XXX.XXX.XXX.XXX" to setup your tftp server ip.
Then initialize the network by running "rtk network on".
And you may need the "rtk 10g PORT ..." command for different SFP modules. Use "help rtk" for more details.
original runtime once you write openwrt in it. Then sysupgrade the squashfs-sysupgrade.bin image.