From patchwork Sun Oct 30 18:31:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Vanheule X-Patchwork-Id: 1696851 X-Patchwork-Delegate: sander@svanheule.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=VWbqeNHi; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=svanheule.net header.i=@svanheule.net header.a=rsa-sha256 header.s=mail1707 header.b=pEjcowbC; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4N0lSt4ZYbz23kv for ; Mon, 31 Oct 2022 05:39:58 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=N6VG/q9EcB72OTntFqn12bU8fVPwN3C5tRikgU77PQU=; b=VWbqeNHiWgITF8 vTG0ndjnOAWnz2GjJZc1cmzXdAKsGEmPw2ZcCaTjE5RQsT+/0a8GCddF5QU2KfbcuUcY+ClzEE46v kFq3E7FHuvcFsV6W2g2Gl0MXwSAbf4QNYo+qlV/NIbSScz9BM8NLUdwa9RAcZNXFykBwTN4RJgIOe rsJvttGb58PFAtndVnK/3yCIcyySrt2m6lZcAenVZWjhUtilVkQMY115HptuR5JBgBDX4Sx20fB6I vGJBdqHlW1Ba4Iu4zPTGVvVdvL+ZN/j4B15ev1GkznX/MfEQebQwlexVL9zKEXuyehcCuIi12WQ5S tr1Mnlor83WE4HtfrUeQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1opDBk-001pyF-04; Sun, 30 Oct 2022 18:37:40 +0000 Received: from polaris.svanheule.net ([2a00:c98:2060:a004:1::200]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1opD5l-001n8o-PU for openwrt-devel@lists.openwrt.org; Sun, 30 Oct 2022 18:31:32 +0000 Received: from terra.. (unknown [IPv6:2a02:a03f:eaf9:8401:aa9f:5d01:1b2a:e3cd]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sander@svanheule.net) by polaris.svanheule.net (Postfix) with ESMTPSA id 39B7833BF28; Sun, 30 Oct 2022 19:31:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1667154678; 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=DovAa3WZ5COxad/50pQiDsNQ1yMUzTn+mN1na7Ys040=; b=pEjcowbCoXkC99tXNkpA7Udt++880v8ObqlQfDqEpd6/Fxup+g6cWsgKNE9iVP/MiXPnnh VmyMvy9tRPFBeaRpEUKNeo0U0IYFn23pSL0eKGWimXcPvF6tduMOk9tX4YSMfdoW5/RsnQ i8Z55NUHjlZZn+a0OsGufcWFgoJOmwvkml2JR3Tyns99ePdwQlfEZcTkTC47c1BBy0ZfnP yWffk5NhqYmsXu4SS3gCa77S4UVepDrz6Wo246OKcjPEPNjGr/4Sp/JmUmMDLc6VQleMTo shajQ0TWYnuSUzQd8pWkurbMZNwhq0wETHItE4PKbr2eirZf16KAFDLXtaZTFg== From: Sander Vanheule To: openwrt-devel@lists.openwrt.org, Olliver Schinagl , Alexandru Gagniuc Cc: INAGAKI Hiroshi , Markus Stockhausen , Stijn Segers , Sander Vanheule Subject: [PATCH v3 09/13] realtek: Netgear GS110TPPv1: define port LEDs Date: Sun, 30 Oct 2022 19:31:02 +0100 Message-Id: <39a1c9e5db81116b69662e8b13d7abe43101ea32.1667154408.git.sander@svanheule.net> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221030_113130_157280_9A010638 X-CRM114-Status: UNSURE ( 7.86 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The GS110TPPv1 has a green and amber bi-color status LED per port. To reproduce the same behaviour as stock firmware, the green LEDs need to light up on gigabit link speeds, and the amber LEDs on 100M [...] Content analysis details: (-2.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [2a00:c98:2060:a004:1:0:0:200 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 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 GS110TPPv1 has a green and amber bi-color status LED per port. To reproduce the same behaviour as stock firmware, the green LEDs need to light up on gigabit link speeds, and the amber LEDs on 100M/10M link speeds. For all link speeds, the LEDs should blink on link activity. Signed-off-by: Sander Vanheule --- .../dts-5.10/rtl8380_netgear_gs110tpp-v1.dts | 192 ++++++++++++++++++ 1 file changed, 192 insertions(+) diff --git a/target/linux/realtek/dts-5.10/rtl8380_netgear_gs110tpp-v1.dts b/target/linux/realtek/dts-5.10/rtl8380_netgear_gs110tpp-v1.dts index b61af62ea536..d9ce5d317213 100644 --- a/target/linux/realtek/dts-5.10/rtl8380_netgear_gs110tpp-v1.dts +++ b/target/linux/realtek/dts-5.10/rtl8380_netgear_gs110tpp-v1.dts @@ -2,6 +2,7 @@ #include "rtl8380_netgear_gigabit_1xx.dtsi" #include +#include / { compatible = "netgear,gs110tpp-v1", "realtek,rtl838x-soc"; @@ -55,3 +56,194 @@ SWITCH_PORT(17, 10, qsgmii) }; }; + +&switchcore { + port-leds { + compatible = "realtek,maple-port-led"; + #address-cells = <3>; + #size-cells = <0>; + + realtek,output-mode = "serial"; + + led@8.0.0 { + reg = <8 0 0>; + label = "green:lan-1"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <1>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + led@8.1.0 { + reg = <8 1 0>; + label = "amber:lan-1"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <1>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + led@9.0.0 { + reg = <9 0 0>; + label = "green:lan-2"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <2>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + led@9.1.0 { + reg = <9 1 0>; + label = "amber:lan-2"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <2>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + led@10.0.0 { + reg = <10 0 0>; + label = "green:lan-3"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <3>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + led@10.1.0 { + reg = <10 1 0>; + label = "amber:lan-3"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <3>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + led@11.0.0 { + reg = <11 0 0>; + label = "green:lan-4"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <4>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + led@11.1.0 { + reg = <11 1 0>; + label = "amber:lan-4"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <4>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + led@12.0.0 { + reg = <12 0 0>; + label = "green:lan-5"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <5>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + led@12.1.0 { + reg = <12 1 0>; + label = "amber:lan-5"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <5>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + led@13.0.0 { + reg = <13 0 0>; + label = "green:lan-6"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <6>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + led@13.1.0 { + reg = <13 1 0>; + label = "amber:lan-6"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <6>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + led@14.0.0 { + reg = <14 0 0>; + label = "green:lan-7"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <7>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + led@14.1.0 { + reg = <14 1 0>; + label = "amber:lan-7"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <7>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + led@15.0.0 { + reg = <15 0 0>; + label = "green:lan-8"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <8>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + led@15.1.0 { + reg = <15 1 0>; + label = "amber:lan-8"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <8>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + led@16.0.0 { + reg = <16 0 0>; + label = "green:lan-9"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <9>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + led@16.1.0 { + reg = <16 1 0>; + label = "amber:lan-9"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <9>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + led@17.0.0 { + reg = <17 0 0>; + label = "green:lan-10"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <10>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_1000)>; + }; + led@17.1.0 { + reg = <17 1 0>; + label = "amber:lan-10"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <10>; + linux,default-trigger = "realtek-switchport"; + realtek,port-led-trigger = <(RTL_LED_ACT | RTL_LED_LINK_10_100)>; + }; + }; +};