Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

realtek: add ZyXEL GS1900-24HPv2 support #4477

Closed
wants to merge 1 commit into from

Conversation

zambelly
Copy link
Contributor

This patch adds support for the RTL8382 based GS1900-24HPv2 from ZyXEL.

Signed-off-by: Soma Zambelly zambelly.soma@gmail.com

@pkgadd
Copy link
Contributor

pkgadd commented Aug 24, 2021

The commit message should contain information about the device and how to install OpenWrt on it, feel free to borrow from #3860.

@pkgadd
Copy link
Contributor

pkgadd commented Aug 24, 2021

I'm pretty sure #3860 (comment) applies to this device as well, to set up uboot-envtools.

@zambelly
Copy link
Contributor Author

I'm pretty sure #3860 (comment) applies to this device as well, to set up uboot-envtools.

I'm not sure I understand. My commit contains the package/boot/uboot-envtools/files/realtek modification.
All uboot-envtools commands work correctly

@zambelly
Copy link
Contributor Author

I updated the commit message per your request

@pkgadd
Copy link
Contributor

pkgadd commented Aug 25, 2021

I'm not sure I understand. My commit contains the package/boot/uboot-envtools/files/realtek modification.

Sorry, I somehow missed that part.

The ZyXEL GS1900-24HPv2 is a 24 port PoE switch with two SFP ports, similar to the other GS1900 switches.

Specifications
--------------
* Device:    ZyXEL GS1900-24HPv2
* SoC:       Realtek RTL8382M 500 MHz MIPS 4KEc
* Flash:     16 MiB
* RAM:       W631GG8MB-12 128 MiB DDR3 SDRAM
             (stock firmware is configured to use only 64 MiB)
* Ethernet:  24x 10/100/1000 Mbps, 2x SFP 100/1000 Mbps
* LEDs:      1 PWR LED (green, not configurable)
             1 SYS LED (green, configurable)
             24 ethernet port link/activity LEDs (green, SoC controlled)
             24 ethernet port PoE status LEDs
             2 SFP status/activity LEDs (green, SoC controlled)
* Buttons:   1 "RESTORE" button on front panel
             1 "RESET" button on front panel
* Power      120-240V AC C13
* UART:      1 serial header (J41) with populated standard pin connector on
             the left edge of the PCB, angled towards the side.
             The casing has a rectangular cutout on the side that provides
             external access to these pins.
             Pinout (front to back):
             + GND
             + TX
             + RX
             + VCC

Serial connection parameters for both devices: 115200 8N1.

Installation
------------

OEM upgrade method:

(Possible on master once https://patchwork.ozlabs.org/project/openwrt/patch/20210624210408.19248-1-bjorn@mork.no/ is merged)

* Log in to OEM management web interface
* Navigate to Maintenance > Firmware > Management
* If "Active Image" has the first option selected, OpenWrt will need to be
  flashed to the "Active" partition. If the second option is selected,
  OpenWrt will need to be flashed to the "Backup" partition.
* Navigate to Maintenance > Firmware > Upload
* Upload the openwrt-realtek-generic-zyxel_gs1900-24hp-v2-initramfs-kernel.bin
  file by your preferred method to the previously determined partition.
  When prompted, select to boot from the newly flashed image, and reboot the switch.
* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:
   > sysupgrade -n /tmp/openwrt-realtek-generic-zyxel_gs1900-24hp-v2-squashfs-sysupgrade.bin
   it may be necessary to restart the network (/etc/init.d/network restart) on
   the running initramfs image.

U-Boot TFTP method:

* 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-24HPv2 is a dual-partition device, you want to keep the OEM
  firmware on the backup partition for the time being. OpenWrt can only boot
  from 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-24hp-v2-initramfs-kernel.bin
   > bootm
* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:
   > sysupgrade -n /tmp/openwrt-realtek-generic-zyxel_gs1900-24hp-v2-squashfs-sysupgrade.bin
   it may be necessary to restart the network (/etc/init.d/network restart) on
   the running initramfs image.

Signed-off-by: Soma Zambelly <zambelly.soma@gmail.com>
@zambelly
Copy link
Contributor Author

Based on the stock firmware's configuration, and other people's experience with the GS1900-24HP (v1), I originally configured the memory as only 64 MiB in the device tree.
Only while writing the full commit message for this commit did I realize that this switch actually has 128 MiB.
I adjusted the device tree according to this.

@pkgadd
Copy link
Contributor

pkgadd commented Aug 25, 2021

There could be different hardware revisions with different RAM chips/ sizes, with the OEM firmware unifying that to 64 MB (the plain/ non-PoE gs1900-24 indeed seems to ship with only 64 MB RAM, winbond w9751g8kb-25); in the best case just the differentiator between gs1900-24hpv1 and gs1900-24hpv2.

@walterav1984
Copy link
Contributor

@pkgadd
The GS1900-24HP like its non-PoE GS1900-24 both ship with 64 MB RAM using a w9751g8kb-25 see pcb:
https://wikidevi.wi-cat.ru/images/c/c1/GS1900-24HP-main-pcb.JPG

About the version differentiator the earlier GS1900-24HP doesn't come with a v1 mention anywhere on the case nor its sticker(s) compared to the v2 in this case.

@zambelly
Are you interested in the early GS1900-24HP (v1) console output of "show tech-support info" to compare it against your v2, if so should I sent it to your sign-off email address?

@adschm adschm added the target/realtek pull request/issue for realtek target label Aug 29, 2021
@hauke
Copy link
Member

hauke commented Sep 13, 2021

Thank you for the patch, I applied it to master.

@hauke hauke closed this Sep 13, 2021
@Neustradamus
Copy link

Merged commit is:

@hauke: Not possible into 21.02.x branch?

@zambelly zambelly deleted the Zyxel_GS1900-24HPv2_PR branch September 23, 2021 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
target/realtek pull request/issue for realtek target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants