diff mbox series

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

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

Commit Message

Stijn Segers Jan. 6, 2021, 12:45 a.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 the same
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
------------

* 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 | 14 ++++++++++++++
 target/linux/realtek/image/Makefile                |  9 +++++++++
 3 files changed, 26 insertions(+)
 create mode 100644 target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp.dts

Comments

Adrian Schmutzler Jan. 6, 2021, 1:22 p.m. UTC | #1
Hi,

essentially the same comments as in the 2/3:

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org]
> On Behalf Of Stijn Segers
> Sent: Mittwoch, 6. Januar 2021 01:45
> To: openwrt-devel@lists.openwrt.org
> Subject: [PATCH 3/3] realtek: add support for ZyXEL GS1900-8HP.

Remove the full stop at the end of the title.

> 
> The ZyXEL GS1900-8HP is an 8 port gigabit switch with PoE+ support.
> There are two versions on the market (v1 & v2) which share the same 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.

With different board layout, it might be safer to have separate v1/v2 ...

> 
> 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
> ------------
> 
> * 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 | 14 ++++++++++++++
>  target/linux/realtek/image/Makefile                |  9 +++++++++
>  3 files changed, 26 insertions(+)
>  create mode 100644 target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp.dts
> 
> 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..c5813227ac
> --- /dev/null
> +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp.dts
> @@ -0,0 +1,14 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later /dts-v1/;

Drop dts-v1.

Best

Adrian
Stijn Segers Jan. 6, 2021, 6:25 p.m. UTC | #2
Hi Adrian,


Op woensdag 6 januari 2021 om 14:22 schreef Adrian Schmutzler 
<mail@adrianschmutzler.de>:
> Hi,
> 
> essentially the same comments as in the 2/3:
> 
>>  -----Original Message-----
>>  From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org]
>>  On Behalf Of Stijn Segers
>>  Sent: Mittwoch, 6. Januar 2021 01:45
>>  To: openwrt-devel@lists.openwrt.org
>>  Subject: [PATCH 3/3] realtek: add support for ZyXEL GS1900-8HP.
> 
> Remove the full stop at the end of the title.
> 
>> 
>>  The ZyXEL GS1900-8HP is an 8 port gigabit switch with PoE+ support.
>>  There are two versions on the market (v1 & v2) which share the same 
>> 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.
> 
> With different board layout, it might be safer to have separate v1/v2 
> ...


I have brought this up on the Realtek thread on the forum. The same 
GS1900-8HP image
has been tested by me on a v1 and by user Kroon40 on a v2. Same amount 
of flash and
RAM. Same flash layout. In the forum thread the conclusion seemed to be 
that ZyXEL
uses a unified image for both versions (possibly even for the 
higher-port 10HP, 16,
24HP, ... versions (the HP suffixes indicating PoE support).

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

Let me know what I should do for the v3. I'll happily send in separate 
patches, but
it looks like the boards don't care. You can flash and run e.g. a 10HP 
image on an
8HP. It will work.

Thanks

Stijn

> 
>> 
>>  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
>>  ------------
>> 
>>  * 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 | 14 
>> ++++++++++++++
>>   target/linux/realtek/image/Makefile                |  9 +++++++++
>>   3 files changed, 26 insertions(+)
>>   create mode 100644 
>> target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp.dts
>> 
>>  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..c5813227ac
>>  --- /dev/null
>>  +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp.dts
>>  @@ -0,0 +1,14 @@
>>  +// SPDX-License-Identifier: GPL-2.0-or-later /dts-v1/;
> 
> Drop dts-v1.
> 
> Best
> 
> Adrian
Adrian Schmutzler Jan. 6, 2021, 8:52 p.m. UTC | #3
Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org]
> On Behalf Of Stijn Segers
> Sent: Mittwoch, 6. Januar 2021 19:25
> To: Adrian Schmutzler <mail@adrianschmutzler.de>
> Cc: openwrt-devel@lists.openwrt.org
> Subject: RE: [PATCH 3/3] realtek: add support for ZyXEL GS1900-8HP.
> 
> Hi Adrian,
> 
> 
> Op woensdag 6 januari 2021 om 14:22 schreef Adrian Schmutzler
> <mail@adrianschmutzler.de>:
> > Hi,
> >
> > essentially the same comments as in the 2/3:
> >
> >>  -----Original Message-----
> >>  From: openwrt-devel [mailto:openwrt-devel-
> bounces@lists.openwrt.org]
> >>  On Behalf Of Stijn Segers
> >>  Sent: Mittwoch, 6. Januar 2021 01:45
> >>  To: openwrt-devel@lists.openwrt.org
> >>  Subject: [PATCH 3/3] realtek: add support for ZyXEL GS1900-8HP.
> >
> > Remove the full stop at the end of the title.
> >
> >>
> >>  The ZyXEL GS1900-8HP is an 8 port gigabit switch with PoE+ support.
> >>  There are two versions on the market (v1 & v2) which share the same
> >> 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.
> >
> > With different board layout, it might be safer to have separate v1/v2
> > ...
> 
> 
> I have brought this up on the Realtek thread on the forum. The same
> GS1900-8HP image has been tested by me on a v1 and by user Kroon40 on a
> v2. Same amount of flash and RAM. Same flash layout. In the forum thread

I don't doubt that. I've just watched this too often, where initial tests appear like devices are similar and then somebody discovers a difference half a year later, where it is hard to "split" them again.

> the conclusion seemed to be that ZyXEL uses a unified image for both

"Unified image" could be one image with different instructions or really the same image for both devices. The verdict would be different in each case.

> versions (possibly even for the higher-port 10HP, 16, 24HP, ... versions (the
> HP suffixes indicating PoE support).
> 
> Link:
> https://forum.openwrt.org/t/support-for-rtl838x-based-managed-
> switches/57875/263
> 
> Let me know what I should do for the v3. I'll happily send in separate
> patches, but it looks like the boards don't care. You can flash and run e.g. a
> 10HP image on an 8HP. It will work.

Of course, but how does the ability to flash wrong images help us for this discussion?

I'm probably over-careful here, but I have the idea of images that exactly match one device, and not just some rough general generic image that can be flashed on a variety of devices and will work somehow in the end.

Best

Adrian

> 
> Thanks
> 
> Stijn
> 
> >
> >>
> >>  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
> >>  ------------
> >>
> >>  * 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 | 14
> >> ++++++++++++++
> >>   target/linux/realtek/image/Makefile                |  9 +++++++++
> >>   3 files changed, 26 insertions(+)
> >>   create mode 100644
> >> target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp.dts
> >>
> >>  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..c5813227ac
> >>  --- /dev/null
> >>  +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp.dts
> >>  @@ -0,0 +1,14 @@
> >>  +// SPDX-License-Identifier: GPL-2.0-or-later /dts-v1/;
> >
> > Drop dts-v1.
> >
> > Best
> >
> > Adrian
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Stijn Segers Jan. 6, 2021, 9:07 p.m. UTC | #4
Hi Adrian,


Op woensdag 6 januari 2021 om 21u52 schreef Adrian Schmutzler 
<mail@adrianschmutzler.de>:
> Hi,
> 
>>  -----Original Message-----
>>  From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org]
>>  On Behalf Of Stijn Segers
>>  Sent: Mittwoch, 6. Januar 2021 19:25
>>  To: Adrian Schmutzler <mail@adrianschmutzler.de>
>>  Cc: openwrt-devel@lists.openwrt.org
>>  Subject: RE: [PATCH 3/3] realtek: add support for ZyXEL GS1900-8HP.
>> 
>>  Hi Adrian,
>> 
>> 
>>  Op woensdag 6 januari 2021 om 14:22 schreef Adrian Schmutzler
>>  <mail@adrianschmutzler.de>:
>>  > Hi,
>>  >
>>  > essentially the same comments as in the 2/3:
>>  >
>>  >>  -----Original Message-----
>>  >>  From: openwrt-devel [mailto:openwrt-devel-
>>  bounces@lists.openwrt.org]
>>  >>  On Behalf Of Stijn Segers
>>  >>  Sent: Mittwoch, 6. Januar 2021 01:45
>>  >>  To: openwrt-devel@lists.openwrt.org
>>  >>  Subject: [PATCH 3/3] realtek: add support for ZyXEL GS1900-8HP.
>>  >
>>  > Remove the full stop at the end of the title.
>>  >
>>  >>
>>  >>  The ZyXEL GS1900-8HP is an 8 port gigabit switch with PoE+ 
>> support.
>>  >>  There are two versions on the market (v1 & v2) which share the 
>> same
>>  >> 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.
>>  >
>>  > With different board layout, it might be safer to have separate 
>> v1/v2
>>  > ...
>> 
>> 
>>  I have brought this up on the Realtek thread on the forum. The same
>>  GS1900-8HP image has been tested by me on a v1 and by user Kroon40 
>> on a
>>  v2. Same amount of flash and RAM. Same flash layout. In the forum 
>> thread
> 
> I don't doubt that. I've just watched this too often, where initial 
> tests appear like devices are similar and then somebody discovers a 
> difference half a year later, where it is hard to "split" them again.


Alright, I'll split them out then. Can I refer to the v1 commit for the 
flashing procedure or would you like me to include it in full in the v2 
commit message as well?

Cheers

Stijn

> 
>>  the conclusion seemed to be that ZyXEL uses a unified image for both
> 
> "Unified image" could be one image with different instructions or 
> really the same image for both devices. The verdict would be 
> different in each case.
> 
>>  versions (possibly even for the higher-port 10HP, 16, 24HP, ... 
>> versions (the
>>  HP suffixes indicating PoE support).
>> 
>>  Link:
>>  https://forum.openwrt.org/t/support-for-rtl838x-based-managed-
>>  switches/57875/263
>> 
>>  Let me know what I should do for the v3. I'll happily send in 
>> separate
>>  patches, but it looks like the boards don't care. You can flash and 
>> run e.g. a
>>  10HP image on an 8HP. It will work.
> 
> Of course, but how does the ability to flash wrong images help us for 
> this discussion?
> 
> I'm probably over-careful here, but I have the idea of images that 
> exactly match one device, and not just some rough general generic 
> image that can be flashed on a variety of devices and will work 
> somehow in the end.
> 
> Best
> 
> Adrian
> 
>> 
>>  Thanks
>> 
>>  Stijn
>> 
>>  >
>>  >>
>>  >>  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
>>  >>  ------------
>>  >>
>>  >>  * 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 | 14
>>  >> ++++++++++++++
>>  >>   target/linux/realtek/image/Makefile                |  9 
>> +++++++++
>>  >>   3 files changed, 26 insertions(+)
>>  >>   create mode 100644
>>  >> target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp.dts
>>  >>
>>  >>  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..c5813227ac
>>  >>  --- /dev/null
>>  >>  +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp.dts
>>  >>  @@ -0,0 +1,14 @@
>>  >>  +// SPDX-License-Identifier: GPL-2.0-or-later /dts-v1/;
>>  >
>>  > Drop dts-v1.
>>  >
>>  > Best
>>  >
>>  > Adrian
>> 
>> 
>>  _______________________________________________
>>  openwrt-devel mailing list
>>  openwrt-devel@lists.openwrt.org
>>  https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Adrian Schmutzler Jan. 6, 2021, 9:31 p.m. UTC | #5
Hi,

> 
> Alright, I'll split them out then. Can I refer to the v1 commit for the flashing
> procedure or would you like me to include it in full in the v2 commit message
> as well?

If you make two patches out of it, I'd prefer to have the flashing instructions twice (just copy them).
That's another thing I've learned; once linking is allowed, you will end up with link chains over 10 similar devices ...

In this very simple case I'd also accept a single commit adding v1 and v2, though.
I'd leave you to choose which version (1 or 2 commits) you prefer.

Best

Adrian

> 
> Cheers
> 
> Stijn
> 
> >
> >>  the conclusion seemed to be that ZyXEL uses a unified image for both
> >
> > "Unified image" could be one image with different instructions or
> > really the same image for both devices. The verdict would be different
> > in each case.
> >
> >>  versions (possibly even for the higher-port 10HP, 16, 24HP, ...
> >> versions (the
> >>  HP suffixes indicating PoE support).
> >>
> >>  Link:
> >>  https://forum.openwrt.org/t/support-for-rtl838x-based-managed-
> >>  switches/57875/263
> >>
> >>  Let me know what I should do for the v3. I'll happily send in
> >> separate  patches, but it looks like the boards don't care. You can
> >> flash and run e.g. a  10HP image on an 8HP. It will work.
> >
> > Of course, but how does the ability to flash wrong images help us for
> > this discussion?
> >
> > I'm probably over-careful here, but I have the idea of images that
> > exactly match one device, and not just some rough general generic
> > image that can be flashed on a variety of devices and will work
> > somehow in the end.
> >
> > Best
> >
> > Adrian
> >
> >>
> >>  Thanks
> >>
> >>  Stijn
> >>
> >>  >
> >>  >>
> >>  >>  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
> >>  >>  ------------
> >>  >>
> >>  >>  * 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 | 14
> >>  >> ++++++++++++++
> >>  >>   target/linux/realtek/image/Makefile                |  9
> >> +++++++++
> >>  >>   3 files changed, 26 insertions(+)
> >>  >>   create mode 100644
> >>  >> target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp.dts
> >>  >>
> >>  >>  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..c5813227ac
> >>  >>  --- /dev/null
> >>  >>  +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp.dts
> >>  >>  @@ -0,0 +1,14 @@
> >>  >>  +// SPDX-License-Identifier: GPL-2.0-or-later /dts-v1/;  >  >
> >> Drop dts-v1.
> >>  >
> >>  > Best
> >>  >
> >>  > Adrian
> >>
> >>
> >>  _______________________________________________
> >>  openwrt-devel mailing list
> >>  openwrt-devel@lists.openwrt.org
> >>  https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Stijn Segers Jan. 6, 2021, 9:47 p.m. UTC | #6
Hi Adrian,

Op woensdag 6 januari 2021 om 22u31 schreef Adrian Schmutzler 
<mail@adrianschmutzler.de>:
> Hi,
> 
>> 
>>  Alright, I'll split them out then. Can I refer to the v1 commit for 
>> the flashing
>>  procedure or would you like me to include it in full in the v2 
>> commit message
>>  as well?
> 
> If you make two patches out of it, I'd prefer to have the flashing 
> instructions twice (just copy them).
> That's another thing I've learned; once linking is allowed, you will 
> end up with link chains over 10 similar devices ...
> 
> In this very simple case I'd also accept a single commit adding v1 
> and v2, though.
> I'd leave you to choose which version (1 or 2 commits) you prefer.

Thanks, single commit it is. v3 is on the way, I think I addressed your 
concerns with it, also the minor ones.

Thanks!

Stijn

> 
> Best
> 
> Adrian
> 
>> 
>>  Cheers
>> 
>>  Stijn
>> 
>>  >
>>  >>  the conclusion seemed to be that ZyXEL uses a unified image for 
>> both
>>  >
>>  > "Unified image" could be one image with different instructions or
>>  > really the same image for both devices. The verdict would be 
>> different
>>  > in each case.
>>  >
>>  >>  versions (possibly even for the higher-port 10HP, 16, 24HP, ...
>>  >> versions (the
>>  >>  HP suffixes indicating PoE support).
>>  >>
>>  >>  Link:
>>  >>  https://forum.openwrt.org/t/support-for-rtl838x-based-managed-
>>  >>  switches/57875/263
>>  >>
>>  >>  Let me know what I should do for the v3. I'll happily send in
>>  >> separate  patches, but it looks like the boards don't care. You 
>> can
>>  >> flash and run e.g. a  10HP image on an 8HP. It will work.
>>  >
>>  > Of course, but how does the ability to flash wrong images help us 
>> for
>>  > this discussion?
>>  >
>>  > I'm probably over-careful here, but I have the idea of images that
>>  > exactly match one device, and not just some rough general generic
>>  > image that can be flashed on a variety of devices and will work
>>  > somehow in the end.
>>  >
>>  > Best
>>  >
>>  > Adrian
>>  >
>>  >>
>>  >>  Thanks
>>  >>
>>  >>  Stijn
>>  >>
>>  >>  >
>>  >>  >>
>>  >>  >>  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
>>  >>  >>  ------------
>>  >>  >>
>>  >>  >>  * 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 | 14
>>  >>  >> ++++++++++++++
>>  >>  >>   target/linux/realtek/image/Makefile                |  9
>>  >> +++++++++
>>  >>  >>   3 files changed, 26 insertions(+)
>>  >>  >>   create mode 100644
>>  >>  >> target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp.dts
>>  >>  >>
>>  >>  >>  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..c5813227ac
>>  >>  >>  --- /dev/null
>>  >>  >>  +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp.dts
>>  >>  >>  @@ -0,0 +1,14 @@
>>  >>  >>  +// SPDX-License-Identifier: GPL-2.0-or-later /dts-v1/;  >  
>> >
>>  >> Drop dts-v1.
>>  >>  >
>>  >>  > Best
>>  >>  >
>>  >>  > Adrian
>>  >>
>>  >>
>>  >>  _______________________________________________
>>  >>  openwrt-devel mailing list
>>  >>  openwrt-devel@lists.openwrt.org
>>  >>  https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>> 
>> 
>> 
>>  _______________________________________________
>>  openwrt-devel mailing list
>>  openwrt-devel@lists.openwrt.org
>>  https://lists.openwrt.org/mailman/listinfo/openwrt-devel
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..c5813227ac
--- /dev/null
+++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8hp.dts
@@ -0,0 +1,14 @@ 
+// 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";
+
+	memory@0 {
+		device_type = "memory";
+		reg = <0x0 0x8000000>;
+	};
+};
diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile
index 765e516a0a..2d18f0ce4f 100644
--- a/target/linux/realtek/image/Makefile
+++ b/target/linux/realtek/image/Makefile
@@ -65,6 +65,15 @@  define Device/netgear_gs110tpp-v1
 endef
 TARGET_DEVICES += netgear_gs110tpp-v1
 
+define Device/zyxel_gs1900-8hp
+  SOC := rtl8380
+  IMAGE_SIZE := 6976k
+  DEVICE_VENDOR := ZyXEL
+  DEVICE_MODEL := GS1900-8HP
+  DEVICE_PACKAGES += lua-rs232
+endef
+TARGET_DEVICES += zyxel_gs1900-8hp
+
 define Device/zyxel_gs1900-10hp
   SOC := rtl8380
   IMAGE_SIZE := 6976k