From patchwork Wed Oct 19 11:43:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= X-Patchwork-Id: 1691902 X-Patchwork-Delegate: gch981213@gmail.com 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=U+3eF9wj; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=arinc9.com header.i=arinc.unal@arinc9.com header.a=rsa-sha256 header.s=zmail header.b=COUeZv51; 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 4MspsM1f5kz23k2 for ; Wed, 19 Oct 2022 22:48:38 +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: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:In-Reply-To:References: List-Owner; bh=sq5Q56KRzT+p5yLDcm1qyapwkyXV5pcb+7dYXAhO1Qc=; b=U+3eF9wjU5m7Fs hy9KnZI4J8KDRTO+4nFf9g/fmtGfp8GHZ9I17nBz3A8IjJcEHCMxjZWQjtgV4JOTZ+ZLj0Xx7G+2E qnuRckTBSfl1qGMaX8jEPtUtVRwiPm4mzXlt5yHUUJKUU1y94SngE5TyUyzFTQXhAVQTClqSvIpUf LBewU6wdoO2pmBsXJt0P4UL1f6/wW+9kIAvHdvUiseFTrByv3uqftK36C5mngC4Fk3yHbwXuFXvW4 UcbmFevOxoVXZywhWlwxvwvZhArDqYgYPHHritCnhi2UGjRZEyX+QgWBHYkt2Vx4V4MftoBOzjAFs qXy32/gRgjAO7qHVYEag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol7W6-000zJh-NC; Wed, 19 Oct 2022 11:45:47 +0000 Received: from sender4-op-o14.zoho.com ([136.143.188.14]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol7Uy-000yDQ-JB for openwrt-devel@lists.openwrt.org; Wed, 19 Oct 2022 11:44:38 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1666179854; cv=none; d=zohomail.com; s=zohoarc; b=fhSSa9/GFY7WFN8gjYb4+rFiG8bzEc9SKOJ/qcvWqwuIwRwrdHjstSStRs2aMTzs2VFmCITp9b7JRG0oDPBJubH6XXD0K865eWG/5c0xdH2Mo+otEWbKZYJQq02WG1irg1TIQmnDvz8N2TgDABj+N6NCm/oACqIw5u1c9iR4G0Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666179854; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=Zpt79h67PFGFBgMHDVe0r+24qb8rGSIXff5rfd5YNUo=; b=TZojMHVov+fgo0r8k6aR2emg6xNU4hBVCDsiQEPjd0me20GAm0eScbRJmkGPfPBDBsH9niEaDUdIVMQ762s6BgjjDUobZU2VotjEwenrNtdcGP9cVFaD6HwkdarLM6hPowYBIkAfltAUwhumqmCPdAkvAoVtfzhIXoxqct/O/PM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=arinc9.com; spf=pass smtp.mailfrom=arinc.unal@arinc9.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1666179854; s=zmail; d=arinc9.com; i=arinc.unal@arinc9.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:MIME-Version:Content-Type:Content-Transfer-Encoding:Reply-To; bh=Zpt79h67PFGFBgMHDVe0r+24qb8rGSIXff5rfd5YNUo=; b=COUeZv517T6YiRmu5+9t9zkHhb8nplg3HkalI4pYXMy5fa/txHcFbEwyBmYLB7Oa 6Jq75YJzdLJGYfA0tAEKvTamJ5Qw7YfEcxrZ2SHK9oJ3a50CpNI1iGLu2KIRaWSBpa8 mt0bwLrc0jvGFCSKs30CmmBLSQGDmyWkq8kOtLj4= Received: from arinc9-Xeront.xeront.local (94.78.94.216 [94.78.94.216]) by mx.zohomail.com with SMTPS id 1666179852659406.77835230651976; Wed, 19 Oct 2022 04:44:12 -0700 (PDT) From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= To: Hauke Mehrtens , Rosen Penev , Alexander Horner Cc: openwrt-devel@lists.openwrt.org, =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= Subject: [PATCH] ramips: do not use GPIO function on switch pins on certain devices Date: Wed, 19 Oct 2022 14:43:00 +0300 Message-Id: <20221019114259.11694-1-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-ZohoMailClient: External X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221019_044436_698804_C1E6926D X-CRM114-Status: UNSURE ( 8.58 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) 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 pins of the MT7530 switch that translate to GPIO 0, 3, 6, 9 and 12 has got a function, by default, which does the same thing as the netdev trigger. Because of bridge offloading on DSA, the netdev [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [136.143.188.14 listed in list.dnswl.org] -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_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 pins of the MT7530 switch that translate to GPIO 0, 3, 6, 9 and 12 has got a function, by default, which does the same thing as the netdev trigger. Because of bridge offloading on DSA, the netdev trigger won't see the frames between the switch ports whilst the default function will. Do not use the GPIO function on switch pins on devices that fall under this category. Keep it for: mt7621_belkin_rt1800.dts: There's only one LED which is for the wan interface and there's no bridge offloading between the "wan" interface and other interfaces. mt7621_yuncore_ax820.dts: There's no bridge offloading between the "wan" and "lan" interfaces. Signed-off-by: Arınç ÜNAL --- .../linux/ramips/dts/mt7621_linksys_e7350.dts | 37 ------------------- .../ramips/dts/mt7621_netgear_wax202.dts | 18 --------- .../ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi | 37 ------------------- .../mt7621/base-files/etc/board.d/01_leds | 17 --------- 4 files changed, 109 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_linksys_e7350.dts b/target/linux/ramips/dts/mt7621_linksys_e7350.dts index d7b8c214b9..ea8a684148 100644 --- a/target/linux/ramips/dts/mt7621_linksys_e7350.dts +++ b/target/linux/ramips/dts/mt7621_linksys_e7350.dts @@ -57,40 +57,6 @@ function = LED_FUNCTION_WAN; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; - - led-wan2 { - color = ; - function = LED_FUNCTION_WAN; - gpios = <&switch0 0 GPIO_ACTIVE_LOW>; - }; - - led-lan4 { - color = ; - function = LED_FUNCTION_LAN; - function-enumerator = <4>; - gpios = <&switch0 3 GPIO_ACTIVE_LOW>; - }; - - led-lan3 { - color = ; - function = LED_FUNCTION_LAN; - function-enumerator = <3>; - gpios = <&switch0 6 GPIO_ACTIVE_LOW>; - }; - - led-lan2 { - color = ; - function = LED_FUNCTION_LAN; - function-enumerator = <2>; - gpios = <&switch0 9 GPIO_ACTIVE_HIGH>; - }; - - led-lan1 { - color = ; - function = LED_FUNCTION_LAN; - function-enumerator = <1>; - gpios = <&switch0 12 GPIO_ACTIVE_LOW>; - }; }; }; @@ -185,9 +151,6 @@ }; &switch0 { - gpio-controller; - #gpio-cells = <2>; - ports { port@1 { status = "okay"; diff --git a/target/linux/ramips/dts/mt7621_netgear_wax202.dts b/target/linux/ramips/dts/mt7621_netgear_wax202.dts index f17a805363..02f540d743 100644 --- a/target/linux/ramips/dts/mt7621_netgear_wax202.dts +++ b/target/linux/ramips/dts/mt7621_netgear_wax202.dts @@ -53,31 +53,16 @@ gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; - led_lan1_green: lan1_green { - label = "green:lan1"; - gpios = <&switch0 3 GPIO_ACTIVE_LOW>; - }; - led_lan1_orange: lan1_orange { label = "orange:lan1"; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; - led_lan2_green: lan2_green { - label = "green:lan2"; - gpios = <&switch0 6 GPIO_ACTIVE_LOW>; - }; - led_lan2_orange: lan2_orange { label = "orange:lan2"; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; - led_lan3_green: lan3_green { - label = "green:lan3"; - gpios = <&switch0 12 GPIO_ACTIVE_LOW>; - }; - led_lan3_orange: lan3_orange { label = "orange:lan3"; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; @@ -256,9 +241,6 @@ }; &switch0 { - gpio-controller; - #gpio-cells = <2>; - ports { port@1 { status = "okay"; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi index f19cb4db17..59fab90ed1 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi @@ -51,40 +51,6 @@ gpios = <&gpio 14 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy1tpt"; }; - - lan1 { - color = ; - function = LED_FUNCTION_LAN; - function-enumerator = <1>; - gpios = <&switch0 0 GPIO_ACTIVE_LOW>; - }; - - lan2 { - color = ; - function = LED_FUNCTION_LAN; - function-enumerator = <2>; - gpios = <&switch0 3 GPIO_ACTIVE_LOW>; - }; - - lan3 { - color = ; - function = LED_FUNCTION_LAN; - function-enumerator = <3>; - gpios = <&switch0 6 GPIO_ACTIVE_LOW>; - }; - - lan4 { - color = ; - function = LED_FUNCTION_LAN; - function-enumerator = <4>; - gpios = <&switch0 9 GPIO_ACTIVE_HIGH>; - }; - - wan { - color = ; - function = LED_FUNCTION_WAN; - gpios = <&switch0 12 GPIO_ACTIVE_LOW>; - }; }; }; @@ -186,9 +152,6 @@ }; &switch0 { - gpio-controller; - #gpio-cells = <2>; - ports { port@0 { status = "okay"; diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index 5ffa4ecb3a..b98cc623a6 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -73,13 +73,6 @@ gnubee,gb-pc2) linksys,e5600) ucidef_set_led_netdev "wan" "wan link" "blue:wan" "wan" "link" ;; -linksys,e7350) - ucidef_set_led_netdev "lan1" "lan1" "blue:lan-1" "lan1" - ucidef_set_led_netdev "lan2" "lan2" "blue:lan-2" "lan2" - ucidef_set_led_netdev "lan3" "lan4" "blue:lan-3" "lan3" - ucidef_set_led_netdev "lan4" "lan4" "blue:lan-4" "lan4" - ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan" - ;; linksys,ea6350-v4|\ linksys,ea7300-v1|\ linksys,ea7300-v2|\ @@ -127,9 +120,6 @@ netgear,r7450) ;; netgear,wax202) ucidef_set_led_netdev "internet" "Internet" "green:net" "wan" - ucidef_set_led_netdev "lan1" "LAN1" "green:lan1" "lan1" - ucidef_set_led_netdev "lan2" "LAN2" "green:lan2" "lan2" - ucidef_set_led_netdev "lan3" "LAN3" "green:lan3" "lan3" ;; oraybox,x3a) ucidef_set_led_netdev "wan" "wan link" "red:status" "wan" @@ -174,13 +164,6 @@ yuncore,ax820) ucidef_set_led_netdev "lan" "LAN" "green:lan" "lan" ucidef_set_led_netdev "wan" "WAN" "green:wan" "wan" ;; -zbtlink,zbt-wg1608-16m) - ucidef_set_led_netdev "lan1" "LAN1" "green:lan-1" "lan1" - ucidef_set_led_netdev "lan2" "LAN2" "green:lan-2" "lan2" - ucidef_set_led_netdev "lan3" "LAN3" "green:lan-3" "lan3" - ucidef_set_led_netdev "lan4" "LAN4" "green:lan-4" "lan4" - ucidef_set_led_netdev "wan" "WAN" "green:wan" "wan" - ;; zyxel,lte3301-plus) ucidef_set_led_netdev "internet" "internet" "white:internet" "wwan0" ;;