From patchwork Wed Sep 14 16:01:27 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: 1677974 X-Patchwork-Delegate: hauke@hauke-m.de 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=WoynxPh5; 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=bSuAD/4v; 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 4MSQBV50ddz1yhR for ; Thu, 15 Sep 2022 02:04:18 +1000 (AEST) 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=+fuYf/FOThw7+7+UqZSsK5+pRvCGpDRK9V9+M39yACI=; b=WoynxPh5rcscMa 3ocR5gVxSY3ftvXfJfoW1TcMvai9FOTC8ZrT8FndTJbKFRAhe/ljJ5lLIBGqPWSNx8LoJWztgmx9k tKqM8EuMSdFG92uufEippiDbT517KXXeuMskxRWrfXLGJsSYxArwuZxYpAMTjAxKNbyK26OcBs3Zm hyj5HZzhiiwESM58DgLr/sKtt1nUMqQjsTz9OJZXsZ47SXem59E7mGnzUtiHyP+cCgnHt8p+BdLQp K2zbB/l0JkA57wMnrymTxF1WifM/PeMsrVXxSuAAx+2v/rGb8BSAsDjkZEbNwtl4iVfwGPZRWBFDv qpj+3TTGfqp8qkzql8iA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYUq4-004ajf-Ub; Wed, 14 Sep 2022 16:02:13 +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 1oYUq0-004aYm-8S for openwrt-devel@lists.openwrt.org; Wed, 14 Sep 2022 16:02:10 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1663171309; cv=none; d=zohomail.com; s=zohoarc; b=FEiB1ZxKTRVT3QNgc+8HrvKY9wQEfsIqrfbR+PAb98rs5m3BszL8scJTn0ljcdTpmzrFHQrUqAjT2QT8l4GZQ92yonPkQK/eBDnKnTGzSn6HZn1THxrq6UzeR1qZ9UTMh1tb9HZUpmo/izU7SfKKg+kN/B7F9ZaQ6jLA9sikuzA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663171309; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=ZgDspH5cMroBReSh6edcJA8WjQ5XFIaBi7xftfVzn0w=; b=C3A9jKDatd+roAhxWAJEpYIJopE50UYQQ813WWxbhY5cBJy+Jb8VPPgtEAoD1pLVR0dOWgy5D7jjZna9Np9ba/DAlWiKYIYQqhk4sw5eb65ATHTtCGLF6fbH02eBt525GRIB3txUR1lz3idGnO6n8B6X7ESUaYwaA9BnAybkMJ8= 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=1663171309; 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=ZgDspH5cMroBReSh6edcJA8WjQ5XFIaBi7xftfVzn0w=; b=bSuAD/4vwCKsdTGDm3ccnp/l6GzudtYgB8NeZoNa7z8IS2cGBIOTHhiYlWn6mR5X tARzyMGLq5D9WwB9bs6Pt/zbnO4slcuPZwJuCP9RuDc0G9hQsHxu0Q/U/8yFsmhLDU9 MR2BK8WPUkReti2gh47Oo9wFB0PnVgTfxIrwUGoQ= Received: from arinc9-PC.lan (37.120.152.236 [37.120.152.236]) by mx.zohomail.com with SMTPS id 1663171307676516.3385801933908; Wed, 14 Sep 2022 09:01:47 -0700 (PDT) From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= To: Hauke Mehrtens Cc: openwrt-devel@lists.openwrt.org, =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= , Petr Louda Subject: [PATCH 21.02 1/2] ramips: fix GB-PC1 and GB-PC2 device support Date: Wed, 14 Sep 2022 19:01:27 +0300 Message-Id: <20220914160127.37960-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-20220914_090208_410431_E1CD8372 X-CRM114-Status: GOOD ( 11.59 ) 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: Change switch port labels to ethblack & ethblue. Change lan1 & lan2 LEDs to ethblack_act & ethblue_act and fix GPIO pins. Add the external phy with ethyellow label on the GB-PC2 devicetree. Do not cla [...] 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 Change switch port labels to ethblack & ethblue. Change lan1 & lan2 LEDs to ethblack_act & ethblue_act and fix GPIO pins. Add the external phy with ethyellow label on the GB-PC2 devicetree. Do not claim rgmii2 as gpio, it's used for ethernet with rgmii2 function. Enable ICPlus PHY driver for IP1001 which GB-PC2 has got. Update interface name and change netdev function. Enable lzma compression to make up for the increased size of the kernel. Make spi flash bindings on par with mainline Linux to fix read errors. Tested on GB-PC2 by Petr. Tested-by: Petr Louda Signed-off-by: Arınç ÜNAL --- .../linux/ramips/dts/mt7621_gnubee_gb-pc1.dts | 43 ++++++------ .../linux/ramips/dts/mt7621_gnubee_gb-pc2.dts | 69 ++++++++++--------- target/linux/ramips/image/mt7621.mk | 2 + .../mt7621/base-files/etc/board.d/01_leds | 4 +- .../mt7621/base-files/etc/board.d/02_network | 6 +- target/linux/ramips/mt7621/config-5.4 | 1 + 6 files changed, 69 insertions(+), 56 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts index c218521c03..28601445e5 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts @@ -8,10 +8,10 @@ model = "GB-PC1"; aliases { - led-boot = &led_status; - led-failsafe = &led_status; - led-running = &led_status; - led-upgrade = &led_status; + led-boot = &led_system; + led-failsafe = &led_system; + led-running = &led_system; + led-upgrade = &led_system; }; keys { @@ -27,24 +27,26 @@ leds { compatible = "gpio-leds"; - system { - label = "green:system"; - gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + ethblack_act { + label = "green:ethblack_act"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; - led_status: status { - label = "green:status"; - gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + ethblue_act { + label = "green:ethblue_act"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; - lan1 { - label = "green:lan1"; - gpios = <&gpio 24 GPIO_ACTIVE_LOW>; + power { + label = "green:power"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + linux,default-trigger = "default-on"; }; - lan2 { - label = "green:lan2"; - gpios = <&gpio 25 GPIO_ACTIVE_LOW>; + led_system: system { + label = "green:system"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + linux,default-trigger = "disk-activity"; }; }; }; @@ -59,9 +61,8 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; broken-flash-reset; - m25p,fast-read; partitions { compatible = "fixed-partitions"; @@ -107,19 +108,19 @@ ports { port@0 { status = "okay"; - label = "lan1"; + label = "ethblack"; }; port@4 { status = "okay"; - label = "lan2"; + label = "ethblue"; }; }; }; &state_default { gpio { - groups = "jtag", "rgmii2", "uart3", "wdt"; + groups = "jtag", "uart3", "wdt"; function = "gpio"; }; }; diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts index 613524d1da..c25ca886ae 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts @@ -8,10 +8,10 @@ model = "GB-PC2"; aliases { - led-boot = &led_status; - led-failsafe = &led_status; - led-running = &led_status; - led-upgrade = &led_status; + led-boot = &led_system; + led-failsafe = &led_system; + led-running = &led_system; + led-upgrade = &led_system; }; keys { @@ -27,34 +27,26 @@ leds { compatible = "gpio-leds"; - system { - label = "green:system"; - gpios = <&gpio 6 GPIO_ACTIVE_LOW>; - }; - - led_status: status { - label = "green:status"; - gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + ethblack_act { + label = "green:ethblack_act"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; - lan1 { - label = "green:lan1"; - gpios = <&gpio 24 GPIO_ACTIVE_LOW>; + ethblue_act { + label = "green:ethblue_act"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; - lan2 { - label = "green:lan2"; - gpios = <&gpio 25 GPIO_ACTIVE_LOW>; - }; - - lan3-yellow { - label = "yellow:lan3"; - gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + power { + label = "green:power"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + linux,default-trigger = "default-on"; }; - lan3-green { - label = "green:lan3"; - gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + led_system: system { + label = "green:system"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + linux,default-trigger = "disk-activity"; }; }; }; @@ -69,9 +61,8 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; broken-flash-reset; - m25p,fast-read; partitions { compatible = "fixed-partitions"; @@ -113,23 +104,39 @@ mtd-mac-address = <&factory 0xe000>; }; +&gmac1 { + status = "okay"; + label = "ethyellow"; + phy-handle = <ðphy5>; + + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy5: ethernet-phy@5 { + reg = <5>; + phy-mode = "rgmii-rxid"; + }; +}; + &switch0 { ports { port@0 { status = "okay"; - label = "lan1"; + label = "ethblack"; }; port@4 { status = "okay"; - label = "lan2"; + label = "ethblue"; }; }; }; &state_default { gpio { - groups = "jtag", "rgmii2", "uart3", "wdt"; + groups = "jtag", "uart3", "wdt"; function = "gpio"; }; }; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index c62087d870..36a03e872f 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -594,6 +594,7 @@ TARGET_DEVICES += glinet_gl-mt1300 define Device/gnubee_gb-pc1 $(Device/dsa-migration) + $(Device/uimage-lzma-loader) DEVICE_VENDOR := GnuBee DEVICE_MODEL := Personal Cloud One DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic-wolfssl @@ -603,6 +604,7 @@ TARGET_DEVICES += gnubee_gb-pc1 define Device/gnubee_gb-pc2 $(Device/dsa-migration) + $(Device/uimage-lzma-loader) DEVICE_VENDOR := GnuBee DEVICE_MODEL := Personal Cloud Two DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic-wolfssl 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 95cf120f2d..5234a773ef 100755 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -44,8 +44,8 @@ dlink,dir-882-r1) ;; gnubee,gb-pc1|\ gnubee,gb-pc2) - ucidef_set_led_netdev "lan1" "lan1" "green:lan1" "lan1" - ucidef_set_led_netdev "lan2" "lan2" "green:lan2" "lan2" + ucidef_set_led_netdev "ethblack_act" "ethblack act" "green:ethblack_act" "ethblack" "tx rx" + ucidef_set_led_netdev "ethblue_act" "ethblue act" "green:ethblue_act" "ethblue" "tx rx" ;; linksys,e5600) ucidef_set_led_netdev "wan" "wan link" "blue:wan" "wan" "link" diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index 4d081bed8c..9ebe652f83 100755 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -45,9 +45,11 @@ ramips_setup_interfaces() xiaomi,mi-router-4a-gigabit) ucidef_set_interfaces_lan_wan "lan1 lan2" "wan" ;; - gnubee,gb-pc1|\ + gnubee,gb-pc1) + ucidef_set_interface_lan "ethblack ethblue" + ;; gnubee,gb-pc2) - ucidef_set_interface_lan "lan1 lan2" + ucidef_set_interface_lan "ethblack ethblue ethyellow" ;; linksys,re6500|\ netgear,wac104) diff --git a/target/linux/ramips/mt7621/config-5.4 b/target/linux/ramips/mt7621/config-5.4 index 057c782760..269628411d 100644 --- a/target/linux/ramips/mt7621/config-5.4 +++ b/target/linux/ramips/mt7621/config-5.4 @@ -107,6 +107,7 @@ CONFIG_HZ_PERIODIC=y CONFIG_I2C=y CONFIG_I2C_BOARDINFO=y CONFIG_I2C_MT7621=y +CONFIG_ICPLUS_PHY=y CONFIG_INITRAMFS_SOURCE="" CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y From patchwork Wed Sep 14 16:01:28 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: 1677976 X-Patchwork-Delegate: hauke@hauke-m.de 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=i3MAqzo/; 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=B5leh2RO; 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 4MSQC610C7z1yhR for ; Thu, 15 Sep 2022 02:04:50 +1000 (AEST) 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=TxFzOmGBQA5PDtKTCAF79pXz9GyKqA5l07k5mrXc7q4=; b=i3MAqzo/4+3vTW 02xHu0VO8SHzgrkWSiLCbqdaunXswJ0LvgVpIF1bHLBh9VuLFYgJNN13VthKbZSAvciHPGflPoKII +xfn6M+FLhsLqafahiLenfFPU/tPCOxg6JSs0kDKSHrs8MAdPQOTZzekPQEvx0GltL3RZVcQz/zXm uwS8KZVvuUegx5DH9kI8lPVjsvZWMzZKaTY6xBVdmlvAjzwwYI/uTAKWybHvSAlpDqBJKhQ9abVtE 94J2pL2ViFgBWTzWkX9mt3GZNA51ilsHlOHthTYOAjLoNh8CCJVEulkostGiy4C2kyFQNYBLmZ35Q +8uvTFAiViY5p6S2BFDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYUqZ-004bKW-H8; Wed, 14 Sep 2022 16:02:43 +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 1oYUq4-004alZ-Qa for openwrt-devel@lists.openwrt.org; Wed, 14 Sep 2022 16:02:14 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1663171311; cv=none; d=zohomail.com; s=zohoarc; b=m5AviiWcD40q+KHJJqDPfC/SMePJjN7BGNCwMXUMqqcvo+/uEkRWKxp8HvUZ4HjCnp/yotZPwrNwdcFzwd2oXCO1RuBR1Fz0tLhvZEzv/0p+NXXOwX8RKBzjz5GKZNTlPLtqevg2wJVQLpGfUnixjwom+NWtB9zXKjcCaEaU3EY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663171311; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=OmjyIH4YdAZEuxj9v2qmxxCkZQ9P8KUSg9w01oeK3XE=; b=h0ELobI25DBsFtPyQ7rjXiI+/moS4E754XAdZlSPRT1oVbkRHEJ1ioRWVxTI7QB3isLYZF8LmcXOfO+TwvJLTSHAuq/0FzYa9U3uOh4WGygNWRJPQIoBK6Nvu8BYTBkHYB/aHKejY8bG1exTh0GVsyiNK6V9i7L7ZVMxIU7ftd4= 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=1663171311; 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:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding:Reply-To; bh=OmjyIH4YdAZEuxj9v2qmxxCkZQ9P8KUSg9w01oeK3XE=; b=B5leh2ROMvsqHqIcKSX24OixcwbhMlYuw/ZPFQ7I/mvcmOKngifkBrwfNsmiUT7M q6LyHTjsmcy0ZX7/8Cqny+NnM+a2KOBHkLyLm16Jcs1b/Rt3qzzXSMy+joWxuHfgqnE opBY4kbBINTS1Qruq9X2UzG/DTohrFo6ehq5Q/FU= Received: from arinc9-PC.lan (37.120.152.236 [37.120.152.236]) by mx.zohomail.com with SMTPS id 1663171309221317.56782138102915; Wed, 14 Sep 2022 09:01:49 -0700 (PDT) From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= To: Hauke Mehrtens Cc: openwrt-devel@lists.openwrt.org, =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= , Petr Louda Subject: [PATCH 21.02 2/2] ramips: fix GB-PC1 and GB-PC2 LEDs Date: Wed, 14 Sep 2022 19:01:28 +0300 Message-Id: <20220914160127.37960-2-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220914160127.37960-1-arinc.unal@arinc9.com> References: <20220914160127.37960-1-arinc.unal@arinc9.com> MIME-Version: 1.0 X-ZohoMailClient: External X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220914_090212_939529_9DFBA8E9 X-CRM114-Status: UNSURE ( 8.48 ) 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: Add the missing LEDs for GB-PC2. Some of these LEDs don't exist on the device schematics. Tests on a GB-PC2 by me and Petr proved otherwise. Remove ethblack-green and ethblue-green LEDs for GB-PC1. They are wired to the switch pins and have their own function for link state and activity. 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 Add the missing LEDs for GB-PC2. Some of these LEDs don't exist on the device schematics. Tests on a GB-PC2 by me and Petr proved otherwise. Remove ethblack-green and ethblue-green LEDs for GB-PC1. They are wired to the switch pins and have their own function for link state and activity. Set ethyellow-orange to display link state and activity of the ethyellow interface for GB-PC2. Link: https://github.com/ngiger/GnuBee_Docs/blob/master/GB-PCx/Documents/GB-PC2_V1.1_schematic.pdf Tested-by: Petr Louda Signed-off-by: Arınç ÜNAL --- .../linux/ramips/dts/mt7621_gnubee_gb-pc1.dts | 10 ---------- .../linux/ramips/dts/mt7621_gnubee_gb-pc2.dts | 18 ++++++++++++++---- .../mt7621/base-files/etc/board.d/01_leds | 4 +--- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts index 28601445e5..5910f112f6 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts @@ -27,16 +27,6 @@ leds { compatible = "gpio-leds"; - ethblack_act { - label = "green:ethblack_act"; - gpios = <&gpio 3 GPIO_ACTIVE_LOW>; - }; - - ethblue_act { - label = "green:ethblue_act"; - gpios = <&gpio 4 GPIO_ACTIVE_LOW>; - }; - power { label = "green:power"; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts index c25ca886ae..8d0eaee1d4 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts @@ -27,16 +27,26 @@ leds { compatible = "gpio-leds"; - ethblack_act { - label = "green:ethblack_act"; + ethblack-green { + label = "green:ethblack"; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; - ethblue_act { - label = "green:ethblue_act"; + ethblue-green { + label = "green:ethblue"; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; + ethyellow-green { + label = "green:ethyellow"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + ethyellow-orange { + label = "orange:ethyellow"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + power { label = "green:power"; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; 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 5234a773ef..d9df98c63f 100755 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -42,10 +42,8 @@ dlink,dir-882-a1|\ dlink,dir-882-r1) ucidef_set_led_netdev "wan" "wan" "green:net" "wan" ;; -gnubee,gb-pc1|\ gnubee,gb-pc2) - ucidef_set_led_netdev "ethblack_act" "ethblack act" "green:ethblack_act" "ethblack" "tx rx" - ucidef_set_led_netdev "ethblue_act" "ethblue act" "green:ethblue_act" "ethblue" "tx rx" + ucidef_set_led_netdev "ethyellow" "ethyellow" "orange:ethyellow" "ethyellow" "link tx rx" ;; linksys,e5600) ucidef_set_led_netdev "wan" "wan link" "blue:wan" "wan" "link"