diff mbox series

[v2,3/3] realtek: add support for ZyXEL GS1900-8HP.

Message ID 20210106125340.30708-4-foss@volatilesystems.org
State Superseded
Headers show
Series [v2,1/3] realtek: set PoE power budget for ZyXEL GS1900-10HP | expand

Commit Message

Stijn Segers Jan. 6, 2021, 12:53 p.m. UTC
The ZyXEL GS1900-8HP is an 8 port gigabit switch with PoE+ support.
There are two versions on the market (v1 & v2) which share similar
specs (same flash size and flash layout, same RAM size, same PoE+ power
envelope) but each have a different case and board layout that they
share with other GS1900 siblings. As such, adding support for the
non-PoE GS1900-8 would probably be trivial.

The v1 seems to share its PCB and case with non-PoE GS1900-8; the v2
with its already supported bigger brother, the GS1900-10HP - its board
looks the same, except for two holes where the GS1900-10 has its SFP
ports.

Like their 10 port sibling, both devices have a dual firmware layout.
Both GS1900-8HP boards have the same 70W PoE+ power budget.

Specifications (v1)
-------------------
* SoC:       Realtek RTL8380M 500 MHz MIPS 4KEc
* Flash:     Macronix MX25L12835F 16 MiB
* RAM:       Nanya NT5TU128M8HE-AC 128 MiB DDR2 SDRAM
* Ethernet:  8x 10/100/1000 Mbit
* PoE+:      Broadcom BCM59111KMLG (IEEE 802.3at-2009 compliant, 2x)
* UART:      1 serial header with populated standard pin connector on the
             left side of the PCB, towards the bottom. Pins are labeled:
             + VCC (3.3V)
             + TX
             + RX
             + GND

Specifications (v2)
-------------------
* SoC:       Realtek RTL8380M 500 MHz MIPS 4KEc
* Flash:     Macronix MX25L12835F 16 MiB
* RAM:       Samsung K4B1G0846G 128 MiB DDR3 SDRAM
* Ethernet:  8x 10/100/1000 Mbit
* PoE+:      Broadcom BCM59121B0KMLG (IEEE 802.3at-2009 compliant)
* UART:      1 angled serial header with populated standard pin connector
             accessible from outside through the ventilation slits on the
             side. Pins from top to bottom are clearly marked on the PCB:
             + VCC (3.3V)
             + TX
             + RX
             + GND

Connection parameters for serial on both devices: 115200 8N1.

Installation
------------
Instructions are identical to those for the GS1900-10HP.
* Configure your client with a static 192.168.1.x IP (e.g. 192.168.1.10).
* Set up a TFTP server on your client and make it serve the initramfs
  image.
* Connect serial, power up the switch, interrupt U-boot by hitting the
  space bar, and enable the network:
  # rtk network on
* Since the GS1900-10HP is a dual-partition device, you want to keep the
  OEM firmware on the backup partition for the time being. OpenWrt can
  only boot off the first partition anyway (hardcoded in the DTS). To
  make sure we are manipulating the first partition, issue the following
  commands:
  # setsys bootpartition 0
  # savesys
* Download the image onto the device and boot from it:
  # tftpboot 0x84f00000 192.168.1.10:openwrt-realtek-generic-zyxel_gs1900-8hp-initramfs-kernel.bin
  # bootm
* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:
  # sysupgrade /tmp//tmp/openwrt-realtek-generic-zyxel_gs1900-8hp-squashfs-sysupgrade.bin

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
---
 .../realtek/base-files/etc/board.d/02_network      |  3 +++
 .../linux/realtek/dts/rtl8380_zyxel_gs1900-8hp.dts |  9 +++++++++
 target/linux/realtek/image/Makefile                | 14 +++++++++++++-
 3 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp.dts

Comments

Stijn Segers Jan. 6, 2021, 4:35 p.m. UTC | #1
Hi Michael,


Op woensdag 6 januari 2021 om 11u22 schreef Michael Richardson 
<mcr@sandelman.ca>:
> The 1900-8/8HP are discontinued by ZyXEL, but the GS1900-16 and 24E 
> seem to
> still be in production.

How do you know? At least the 8 and 8HP are still being sold (doesn't 
say anything
about production). They aren't listed as discontinued on their sit 
either, from
what I can tell.


> Do you think that they might be similar?
> How is the switch function managed?  DSA?  or?

Realtek is a DSA target on OpenWrt. On my 10HP e.g. I have lan1 through 
lan10 and
a bridge interface for the LAN.

Cheers

Stijn
Michael Richardson Jan. 6, 2021, 5:23 p.m. UTC | #2
Stijn Segers <foss@volatilesystems.org> wrote:
    > Op woensdag 6 januari 2021 om 11u22 schreef Michael Richardson
    > <mcr@sandelman.ca>:
    >> The 1900-8/8HP are discontinued by ZyXEL, but the GS1900-16 and 24E seem to
    >> still be in production.

    > How do you know? At least the 8 and 8HP are still being sold (doesn't say
    > anything
    > about production). They aren't listed as discontinued on their sit either,
    > from
    > what I can tell.

https://www.zyxelguard.com/GS1900-8HP.asp says so.      (was first google hit)
https://www.zyxel.com/us/en/products_services/8-10-16-24-48-port-GbE-Smart-Managed-Switch-GS1900-Series/specification
does not say anything though.
I can find the GS1900-10HP on amazon still though.

    >> Do you think that they might be similar?
    >> How is the switch function managed?  DSA?  or?

    > Realtek is a DSA target on OpenWrt. On my 10HP e.g. I have lan1 through lan10
    > and
    > a bridge interface for the LAN.

Cool, this is exactly the view that I'm looking for, as I need to do
different L3 things on each interface.

I am acquring a device... so I'll be able to give you feedback on the code.

--
]               Never tell me the odds!                 | ipv6 mesh networks [
]   Michael Richardson, Sandelman Software Works        |    IoT architect   [
]     mcr@sandelman.ca  http://www.sandelman.ca/        |   ruby on rails    [
Stijn Segers Jan. 6, 2021, 5:32 p.m. UTC | #3
Hi,

Op woensdag 6 januari 2021 om 18:23 schreef Michael Richardson 
<mcr@sandelman.ca>:
> 
> Stijn Segers <foss@volatilesystems.org> wrote:
>     > Op woensdag 6 januari 2021 om 11u22 schreef Michael Richardson
>     > <mcr@sandelman.ca>:
>     >> The 1900-8/8HP are discontinued by ZyXEL, but the GS1900-16 
> and 24E seem to
>     >> still be in production.
> 
>     > How do you know? At least the 8 and 8HP are still being sold 
> (doesn't say
>     > anything
>     > about production). They aren't listed as discontinued on their 
> sit either,
>     > from
>     > what I can tell.
> 
> https://www.zyxelguard.com/GS1900-8HP.asp says so.      (was first 
> google hit)
> https://www.zyxel.com/us/en/products_services/8-10-16-24-48-port-GbE-Smart-Managed-Switch-GS1900-Series/specification
> does not say anything though.

That's not ZyXEL's own website but a reseller. They list the 10HP as 
discontinued
as well, which is pretty weird given I bought it new a week ago here in 
Europe.

> I can find the GS1900-10HP on amazon still though.
> 
>     >> Do you think that they might be similar?
>     >> How is the switch function managed?  DSA?  or?
> 
>     > Realtek is a DSA target on OpenWrt. On my 10HP e.g. I have lan1 
> through lan10
>     > and
>     > a bridge interface for the LAN.
> 
> Cool, this is exactly the view that I'm looking for, as I need to do
> different L3 things on each interface.
> 
> I am acquring a device... so I'll be able to give you feedback on the 
> code.

Cool! What I'm doing is trivial though, compared to the people who 
actually ported the
target to OpenWrt. Check the forum thread for more info on that:

https://forum.openwrt.org/t/support-for-rtl838x-based-managed-switches/57875/

Cheers

Stijn

> 
> --
> ]               Never tell me the odds!                 | ipv6 mesh 
> networks [
> ]   Michael Richardson, Sandelman Software Works        |    IoT 
> architect   [
> ]     mcr@sandelman.ca  http://www.sandelman.ca/        |   ruby on 
> rails    [
> 
> 
> 
> 
>
Bjørn Mork Jan. 6, 2021, 7:01 p.m. UTC | #4
Stijn Segers <foss@volatilesystems.org> writes:

> That's not ZyXEL's own website but a reseller. They list the 10HP as
> discontinued
> as well, which is pretty weird given I bought it new a week ago here
> in Europe.

I can confirm the same.  Bought a GS1900-10HP new from a local reseller
a couple of months ago, manufactured in week 28 of 2020 according to the
serial number.

The GS1900-8, GS1900-8HP and GS1900-10HP are all still available and in
stock at a number of local shops.  No signs that any of these are
discontinued.  And there is no reason they should be.  These are as
modern as these things get, designed around a single SoC with integrated
switch and 8 phys. With all the hardware features and more than enough
memory and flash to do anything a switch can possibly be expected to do.

The only thing that will eventually make these obsolete is that they are
limited to gig ports.



Bjørn
diff mbox series

Patch

diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network
index 84fefa536d..8054adc60a 100755
--- a/target/linux/realtek/base-files/etc/board.d/02_network
+++ b/target/linux/realtek/base-files/etc/board.d/02_network
@@ -52,6 +52,9 @@  case $board in
 netgear,gs110tpp-v1)
 	ucidef_set_poe 130 "$lan_list"
 	;;
+zyxel,gs1900-8hp)
+	ucidef_set_poe 70 "$lan_list"
+	;;
 zyxel,gs1900-10hp)
 	ucidef_set_poe 77 "$lan_list"
 	;;
diff --git a/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp.dts b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp.dts
new file mode 100644
index 0000000000..52441b5f5f
--- /dev/null
+++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp.dts
@@ -0,0 +1,9 @@ 
+// SPDX-License-Identifier: GPL-2.0-or-later
+/dts-v1/;
+
+#include "rtl8380_zyxel_gs1900.dtsi"
+
+/ {
+	compatible = "zyxel,gs1900-8hp", "realtek,rtl838x-soc";
+	model = "ZyXEL GS1900-8HP Switch";
+};
diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile
index 765e516a0a..5edf7f3c52 100644
--- a/target/linux/realtek/image/Makefile
+++ b/target/linux/realtek/image/Makefile
@@ -65,11 +65,23 @@  define Device/netgear_gs110tpp-v1
 endef
 TARGET_DEVICES += netgear_gs110tpp-v1
 
-define Device/zyxel_gs1900-10hp
+define Device/zyxel_gs1900
   SOC := rtl8380
   IMAGE_SIZE := 6976k
   DEVICE_VENDOR := ZyXEL
+endef
+
+define Device/zyxel_gs1900-8hp
+  $(Device/zyxel_gs1900)
+  DEVICE_MODEL := GS1900-8HP
+  DEVICE_PACKAGES += lua-rs232
+endef
+TARGET_DEVICES += zyxel_gs1900-8hp
+
+define Device/zyxel_gs1900-10hp
+  $(Device/zyxel_gs1900)
   DEVICE_MODEL := GS1900-10HP
+  DEVICE_PACKAGES += lua-rs232
 endef
 TARGET_DEVICES += zyxel_gs1900-10hp