From patchwork Wed Feb 24 22:43:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1444078 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=j5SOm1O2; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=hauke-m.de header.i=@hauke-m.de header.a=rsa-sha256 header.s=MBO0001 header.b=1j1/GYaQ; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dm9xW4QqDz9sBJ for ; Thu, 25 Feb 2021 09:45:51 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=tF2mP7uxN8hBSlNzIeu47sPYv+HUEupluDxtM/gK9Sc=; b=j5SOm1O25DjvwPa/v/rhYXrnmN n03Kvo7vbmTpCk8Xd5RXQ3acjIgHDg3MwTWWVUn9nP5KwmCgGUpD9g47KPx0T3TXv+D7clsrORT8o A83mQjfbqrernhVK7v0HvyhOinXWeea64mFuatbPH2DP4i3KSiGBl7nsed1rXlyBeIj80eh4qo+yS ktPmGRJH7YcWtlJA3J8wzJIxd5KYTOat9oy3ipvuoiEY2L01NHHqxLm62Qg3vwE9jLZ3X+9L/24hT DBXFn3kG1rkVo5zTfqlvsDBxV6ZptY3MgGaXl7q3iOdQbrEaMfXBZ5KiYkgWMuM/lleo/T8JlpmQS N2zEn+jQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lF2sr-0005ZF-57; Wed, 24 Feb 2021 22:43:53 +0000 Received: from mout-p-101.mailbox.org ([80.241.56.151]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lF2sn-0005Xe-C4 for openwrt-devel@lists.openwrt.org; Wed, 24 Feb 2021 22:43:50 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4Dm9v60mwhzQl8w; Wed, 24 Feb 2021 23:43:46 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hauke-m.de; s=MBO0001; t=1614206624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=mp+yQwCTCtjEYek862fwSwVz6ukoFjcsSRjfTnhA9Do=; b=1j1/GYaQ71w31lcCVEyMwnf4hOBIysduqWrPh+kfjy4+1R4jbFnLP6STYZcFmvNlopx4mM POjyZT8TpMZAPBotYGJGq5oQTZrdgN4/G+/nOuUS1GdizPPc1nf7h8tvDzYdUcBTcySjDq 2GgELavCwBulYe4WRT6hM2ATIvpaMTdwmTjT4Ul+0YcESo9heiNlK0MbpTJFhUFXOMuHM0 0vA/TUM53xL1Yra8+KgOfY+C7mPnT6Ht7if/xtRuEgrtaLNItZP49hVQgkr3nMeK+GdBzg tZNeTOfUm0XC82OH4sO9p7SayEtlbKmFyNShvnXYMW3eDSUccyrlWDUWs+SYww== Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id 7UbeWPdEqW-4; Wed, 24 Feb 2021 23:43:43 +0100 (CET) From: Hauke Mehrtens To: openwrt-devel@lists.openwrt.org Subject: [PATCH 1/2] realtek: Add generic zyxel_gs1900 image definition Date: Wed, 24 Feb 2021 23:43:30 +0100 Message-Id: <20210224224331.1019961-1-hauke@hauke-m.de> MIME-Version: 1.0 X-MBO-SPAM-Probability: X-Rspamd-Score: -5.92 / 15.00 / 15.00 X-Rspamd-Queue-Id: 3A29B17BD X-Rspamd-UID: 89e0de X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210224_174349_603617_F84ADE7C X-CRM114-Status: GOOD ( 10.90 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.151 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [80.241.56.151 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Add a new common device definition for the Zyxel GS1900 line of switches. Signed-off-by: Hauke Mehrtens --- target/linux/realtek/image/Makefile | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index 424726c8a9fb..fcb5e55e7ab6 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -84,37 +84,35 @@ 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 DEVICE_MODEL := GS1900-10HP UIMAGE_MAGIC := 0x83800000 + KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | zyxel-vers AAHI | uImage gzip +endef + +define Device/zyxel_gs1900-10hp + $(Device/zyxel_gs1900) + DEVICE_MODEL := GS1900-10HP KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | zyxel-vers AAZI | uImage gzip endef TARGET_DEVICES += zyxel_gs1900-10hp define Device/zyxel_gs1900-8hp-v1 - SOC := rtl8380 - IMAGE_SIZE := 6976k - DEVICE_VENDOR := ZyXEL + $(Device/zyxel_gs1900) DEVICE_MODEL := GS1900-8HP DEVICE_VARIANT := v1 DEVICE_PACKAGES += lua-rs232 - UIMAGE_MAGIC := 0x83800000 - KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | zyxel-vers AAHI | uImage gzip endef TARGET_DEVICES += zyxel_gs1900-8hp-v1 define Device/zyxel_gs1900-8hp-v2 - SOC := rtl8380 - IMAGE_SIZE := 6976k - DEVICE_VENDOR := ZyXEL + $(Device/zyxel_gs1900) DEVICE_MODEL := GS1900-8HP DEVICE_VARIANT := v2 DEVICE_PACKAGES += lua-rs232 - UIMAGE_MAGIC := 0x83800000 - KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | zyxel-vers AAHI | uImage gzip endef TARGET_DEVICES += zyxel_gs1900-8hp-v2 From patchwork Wed Feb 24 22:43:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1444079 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=sgUlIT4s; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=hauke-m.de header.i=@hauke-m.de header.a=rsa-sha256 header.s=MBO0001 header.b=Bj36o072; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dm9xX2g0fz9sRN for ; Thu, 25 Feb 2021 09:45:52 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oP7n5YQ4iqCw2Rz7s3tYY3xHjO9HI/EQT32cDPkw5MQ=; b=sgUlIT4svvF6MxClPtkqnp296 dxz587UPK0dVjj2nXsb4umLG9R3Ey9N8d2u8/MhjBVnSO+QIcDKaOEdAGntA7BzRnyeLmoL4lf9Hh RhJQ6aUNAcge+bhNsaL1AUtAxnrGdQjfPit8m4ltMoFEEa6sMkAx6r09nuphGrK4ewVSvpiYEBXSm w0wNb3n+Ntc9CbPZk3OPiKsOyfxwl2Svt3cHxVyvC8HRQ5Do5WWsYFpSebxSIaZOTxTwd6AFYXrr+ vLVT/xq37oTdNJbaJ2kfuNd4JiP7TfbcH3DfZspKXK6fp5eR81QqkiWW3luj7cwXlQTJVuY4Z1PWc pi4BPSEvA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lF2st-0005Zo-KX; Wed, 24 Feb 2021 22:43:55 +0000 Received: from mout-p-102.mailbox.org ([80.241.56.152]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lF2sp-0005YM-6e for openwrt-devel@lists.openwrt.org; Wed, 24 Feb 2021 22:43:52 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4Dm9v92B0CzQjlm; Wed, 24 Feb 2021 23:43:49 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hauke-m.de; s=MBO0001; t=1614206627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gnz6j9nDwfzixepV5q5PmCUr4+9qocKfzD48T6aSFVc=; b=Bj36o072HxIeDOPzOSebKT4kZlpoAnn1MBx31v0NJhhPrpAFsosuey0pHZBeCIjnLbdNHX bVUSVuz1KR6jLXq8oZPnLhPW9aFLv+WowjQ6oCMBItZxKvBQqELee7zPEsOhiAz3FgJH9u 7snr6AdDAmOzM1YIy8Z4HOHjhZN3BOU3skTkqqQyAVcoq7NoKnVGABPNZmrNKZdTKLPXUZ PcfdpB1xjaiNYwHYsKpc8e49dc8McLy+c4J2NNlkEk8psk+GT5z2lLII6a0wCHkQh8mkYg JgqGSb091HLqnfGjVIdcPUOSQI1QBQ0pAOQUIfZtjEDGjAE94TlXEk0HGjE9DQ== Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id bKMbBJLzFlmp; Wed, 24 Feb 2021 23:43:46 +0100 (CET) From: Hauke Mehrtens To: openwrt-devel@lists.openwrt.org Subject: [PATCH 2/2] realtek: Add ZyXEL GS1900-8 Date: Wed, 24 Feb 2021 23:43:31 +0100 Message-Id: <20210224224331.1019961-2-hauke@hauke-m.de> In-Reply-To: <20210224224331.1019961-1-hauke@hauke-m.de> References: <20210224224331.1019961-1-hauke@hauke-m.de> MIME-Version: 1.0 X-MBO-SPAM-Probability: X-Rspamd-Score: -5.93 / 15.00 / 15.00 X-Rspamd-Queue-Id: 67876171D X-Rspamd-UID: c2df30 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210224_174351_377260_7958473E X-CRM114-Status: GOOD ( 18.29 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.152 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [80.241.56.152 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The ZyXEL GS1900-8 is a 8 port switch without any PoE functionality or SFP ports, but otherwise similar to the other GS1900 switches. Serial connection parameters for the device: 115200 8N1. Installation ------------ Instructions are identical to those for the GS1900-10HP and GS1900-8HP. * 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-8-initramfs-kernel.bin > bootm * Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it: > sysupgrade /tmp/openwrt-realtek-generic-zyxel_gs1900-8-squashfs-sysupgrade.bin Signed-off-by: Hauke Mehrtens --- package/boot/uboot-envtools/files/realtek | 1 + target/linux/realtek/dts/rtl8380_zyxel_gs1900-8.dts | 12 ++++++++++++ target/linux/realtek/image/Makefile | 6 ++++++ 3 files changed, 19 insertions(+) create mode 100644 target/linux/realtek/dts/rtl8380_zyxel_gs1900-8.dts diff --git a/package/boot/uboot-envtools/files/realtek b/package/boot/uboot-envtools/files/realtek index 9573e8944f54..a91ca826044e 100644 --- a/package/boot/uboot-envtools/files/realtek +++ b/package/boot/uboot-envtools/files/realtek @@ -11,6 +11,7 @@ case "$board" in d-link,dgs-1210-16|\ d-link,dgs-1210-28|\ d-link,dgs-1210-10p|\ +zyxel,gs1900-8|\ zyxel,gs1900-8hp-v1|\ zyxel,gs1900-8hp-v2|\ zyxel,gs1900-10hp) diff --git a/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8.dts b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8.dts new file mode 100644 index 000000000000..e9c5efe60392 --- /dev/null +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-8.dts @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "rtl8380_zyxel_gs1900.dtsi" + +/ { + compatible = "zyxel,gs1900-8", "realtek,rtl838x-soc"; + model = "ZyXEL GS1900-8 Switch"; +}; + +&gpio1 { + /delete-node/ poe_enable; +}; diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index fcb5e55e7ab6..0a3292119c3a 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -100,6 +100,12 @@ define Device/zyxel_gs1900-10hp endef TARGET_DEVICES += zyxel_gs1900-10hp +define Device/zyxel_gs1900-8 + $(Device/zyxel_gs1900) + DEVICE_MODEL := GS1900-8 +endef +TARGET_DEVICES += zyxel_gs1900-8 + define Device/zyxel_gs1900-8hp-v1 $(Device/zyxel_gs1900) DEVICE_MODEL := GS1900-8HP