From patchwork Wed Jan 6 12:53:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stijn Segers X-Patchwork-Id: 1422927 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; dmarc=fail (p=none dis=none) header.from=volatilesystems.org 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=un4Saq2w; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=volatilesystems.org header.i=@volatilesystems.org header.a=rsa-sha256 header.s=mail header.b=WlfPnJIf; dkim=fail reason="signature verification failed" (1024-bit key) header.d=volatilesystems.org header.i=@volatilesystems.org header.a=rsa-sha256 header.s=mail header.b=RnZLwigD; 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 4D9qBV4kTdz9sWK for ; Wed, 6 Jan 2021 23:56:50 +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: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:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=U10iHmObkR2txXVMYffi6Lnv004DebUIOVtWszbB7L0=; b=un4Saq2w20UBwTfO/rHqEc5q+i SVILnb0UvWaJnGqQ+yQ44hO6GdgKnBxIPjlYWEA0B8oOIn77Qx4tWzJQerq8i26ndeD3zV723e5Kf 2TgeNCDq/9P2CJjSeKzGs3jdaE14+SNST2jnbfLqwbt42GlODE7Rk+yLjZIFm3lYSZjbmzm7vy2Ga cGHSQAYaPPa5YjEhcqaf0ei7CSJ+ndqrwuaUrErJnKlp7Z9y0VJ6/d5nYK3yOd74YmPwyoB+fH5Vc cNtqtJdDMCk4EaijqMBHmrrp387YkzddLHEGWbAa/DRPWNooFCckcS9shui7z2pUhf52WTuGwGoDm lrOei5Xw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kx8Kf-0002Fg-Nv; Wed, 06 Jan 2021 12:54:33 +0000 Received: from volatilesystems.org ([51.91.248.52]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kx8Kb-0002Eq-K7 for openwrt-devel@lists.openwrt.org; Wed, 06 Jan 2021 12:54:30 +0000 Received: by volatilesystems.org (Postfix, from userid 112) id B9F65FA2D3; Wed, 6 Jan 2021 13:54:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=volatilesystems.org; s=mail; t=1609937662; bh=tsomG/VI3FvAT7bJ8uDp9w1IC7G1bOLCQ6n5KdEtXgw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WlfPnJIfov+gbSO2vSTz/16Ap2NlHc8t4SkQMf/Oq/E0wrWLuf95FxyDI0UbZqeWg cie/ym6PeeTr4f8nwMVyMLxa0S0xTBVl/3u6j+K4uUj7WVascrpiQx524DCCN+HESn SpSkJ6RBce31Dff6tJRvSbe49T9skZlZwmOo0wSo= X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on atalanta X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from okeanos.lan (213.219.168.47.adsl.dyn.edpnet.net [213.219.168.47]) by volatilesystems.org (Postfix) with ESMTPSA id 71BA2FA2CD for ; Wed, 6 Jan 2021 13:54:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=volatilesystems.org; s=mail; t=1609937660; bh=tsomG/VI3FvAT7bJ8uDp9w1IC7G1bOLCQ6n5KdEtXgw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RnZLwigDDTy1bae5Dtf07E3ssYJhVuGEuomxkAjT1IRx3Z4Zea9p777eped+R/QPy FaYseKooaplphPvcyOu/Nbqo7wkJuQHIoSLu0HaF/AB7Qk8F9CSzmG9ayO+DWNG4H5 YWYKxEBsy8kAgj63RHdcTvR00EZ8Hz7+TvEBSMJU= From: Stijn Segers To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2 1/3] realtek: set PoE power budget for ZyXEL GS1900-10HP Date: Wed, 6 Jan 2021 13:53:38 +0100 Message-Id: <20210106125340.30708-2-foss@volatilesystems.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210106125340.30708-1-foss@volatilesystems.org> References: <20210106125340.30708-1-foss@volatilesystems.org> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at atalanta X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210106_075429_786669_563E2435 X-CRM114-Status: GOOD ( 11.40 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -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.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 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: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org As per the manufacturer's specifications, set the GS1900-10HP PoE power budget to 77W. Signed-off-by: Stijn Segers --- target/linux/realtek/base-files/etc/board.d/02_network | 3 +++ 1 file changed, 3 insertions(+) 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 84980c8982..84fefa536d 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-10hp) + ucidef_set_poe 77 "$lan_list" + ;; esac board_config_flush From patchwork Wed Jan 6 12:53:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stijn Segers X-Patchwork-Id: 1422926 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; dmarc=fail (p=none dis=none) header.from=volatilesystems.org 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=J2aRBlCS; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=volatilesystems.org header.i=@volatilesystems.org header.a=rsa-sha256 header.s=mail header.b=o85TuyXf; dkim=fail reason="signature verification failed" (1024-bit key) header.d=volatilesystems.org header.i=@volatilesystems.org header.a=rsa-sha256 header.s=mail header.b=CtHjDq62; 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 4D9qBN5sfcz9sW8 for ; Wed, 6 Jan 2021 23:56:44 +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: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:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Lup7gaKTFKW3II7mhLjrjIskBoFLSMJ+34W69nl3cLI=; b=J2aRBlCSbNEf9MMt/2cQ+tRlDJ SdrXpSm4xtMqhb+inLJ5rAMZ2MhC51snDVaxXaQtyk8NxjmkKQ+mHcRWJ5UDtECh5CdREVGSr0ns3 OKlroJGNky3H40O1gaOZ230EwcP+hey/fhMGRnDOoSF0SIP9LQJFjlW2Iy8h4GLY4vyD/Ev30Qqzr GsEXdzsqoJM63uM5dqWav66hVLToJJpTTfsqvDDz10Srm+mC1FYxqhvWrbeda0Vyh83lJQRygdedc hGQKwqJev7fuZ+0tmlHk66U7hGdHJA89uGYI27syzJm7WeYnGQqyog6EzV+y1fYQvD91ivo6z63Me ExwFyHSQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kx8Ki-0002Fu-An; Wed, 06 Jan 2021 12:54:36 +0000 Received: from volatilesystems.org ([51.91.248.52]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kx8Kb-0002Er-K7 for openwrt-devel@lists.openwrt.org; Wed, 06 Jan 2021 12:54:30 +0000 Received: by volatilesystems.org (Postfix, from userid 112) id 0FB61FA2DA; Wed, 6 Jan 2021 13:54:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=volatilesystems.org; s=mail; t=1609937662; bh=S6rbTKjWoeB5mkcI6CZM9CsKqzqKAeEg0Zb8hMZfAN0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=o85TuyXfEhH5hceTLnzweVLVRmE2F+s/WR2pUDIRS784WJSpykpjw0SujL7coKk1g kJejiISBtAivfxuHBrOlwm5K9T7O5Oc/q+x7wX+toW9licU5ZnHfEaN83tAFCxz6Vc MXl+FuXTYY5lgRllILlhkE/I8D28urSbeUwdnkcI= X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on atalanta X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from okeanos.lan (213.219.168.47.adsl.dyn.edpnet.net [213.219.168.47]) by volatilesystems.org (Postfix) with ESMTPSA id 40195FA2D1 for ; Wed, 6 Jan 2021 13:54:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=volatilesystems.org; s=mail; t=1609937661; bh=S6rbTKjWoeB5mkcI6CZM9CsKqzqKAeEg0Zb8hMZfAN0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CtHjDq62J+tQ9OnOVr4Si1gCAj4GZZEWniy4hh6ZfMjvTQTlUMEIPQetgcJ1BMtyQ TsXVXMBgL2zIbSkq9r5U7kn+4VDvIfKgYGy464pAOugHGSwVg11KKgw0eabiDQc6Ga fCYmA4NsHy+u7WxqdkV9d70U3WaSPOcRFkvLfPhk= From: Stijn Segers To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2 3/3] realtek: add support for ZyXEL GS1900-8HP. Date: Wed, 6 Jan 2021 13:53:40 +0100 Message-Id: <20210106125340.30708-4-foss@volatilesystems.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210106125340.30708-1-foss@volatilesystems.org> References: <20210106125340.30708-1-foss@volatilesystems.org> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at atalanta X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210106_075429_880255_61682453 X-CRM114-Status: GOOD ( 20.80 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -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.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 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: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org 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 --- .../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 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