From patchwork Wed Apr 13 12:05:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reinhard Max X-Patchwork-Id: 1616732 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=dnaCvOYw; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4KdhG56mhjz9sG5 for ; Wed, 13 Apr 2022 22:09:01 +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=rrbMPnpaLj4aENGQHa17GBKneM0SF0jXXJcu+8o1mtU=; b=dnaCvOYwi+h7Ls Rn7RGcIxWd6A2KKiLrq522Bfqh/TBBTmaGaWB0FgWEypiJzWCT0aIktKqYUqL1hay0A04+bvlWja9 ctDSvi10hkTHg60kJc/xwZ52my3g/4hZpzcn/K0zBWbnW4b2KfYbOxDnrtXOo2JM2GCmRCtx61v/d 2eZqwsT2JgEwsSWcL+isOGgiSc3UfOVuQTkJwnroD0PVt6GNCVuklCAr+uVZSlWiyeIKSM+mFUoUa L4ctyDKhzjJtQ8QnU9aLgbFV4AlA+hJm+P52PvR6qs8uueJz/24oH7Bb70U8w6I2XxjpM52K3bZS1 wOyzWcqx+f4vst3bdv3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1neblP-000uMd-QQ; Wed, 13 Apr 2022 12:06:25 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1neblG-000uJI-9p for openwrt-devel@lists.openwrt.org; Wed, 13 Apr 2022 12:06:16 +0000 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id A736F1F38D; Wed, 13 Apr 2022 12:06:09 +0000 (UTC) Received: from f232.suse.de (nitsch.suse.de [10.160.4.250]) by relay2.suse.de (Postfix) with ESMTP id 9E748A3B89; Wed, 13 Apr 2022 12:06:09 +0000 (UTC) Received: by f232.suse.de (Postfix, from userid 312) id 279DC6ECD; Wed, 13 Apr 2022 14:06:10 +0200 (CEST) From: Reinhard Max To: openwrt-devel@lists.openwrt.org Cc: Reinhard Max Subject: [PATCH 1/3] ramips: hlk-7621a-evb: remove WiFi support Date: Wed, 13 Apr 2022 14:05:52 +0200 Message-Id: <20220413120554.9355-1-reinhard@m4x.de> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220413_050614_539180_E113D393 X-CRM114-Status: UNSURE ( 8.57 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.1 (--) 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 HiLink HLK-7621A evaluation board[1] contains no on-board WiFi hardware and its Mini PCIe slot can be used for arbitrary extension cards. So it makes no sense for a default build to assume that an [...] Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.29 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.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 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 HiLink HLK-7621A evaluation board[1] contains no on-board WiFi hardware and its Mini PCIe slot can be used for arbitrary extension cards. So it makes no sense for a default build to assume that any particular type of WiFi chip is present. [1] http://hlktech.net/index.php?id=436 Signed-off-by: Reinhard Max --- target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts | 8 -------- target/linux/ramips/image/mt7621.mk | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts index 9776f43e02..b96436e03d 100644 --- a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts +++ b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts @@ -94,14 +94,6 @@ status = "okay"; }; -&pcie2 { - wifi@0,0 { - compatible = "mediatek,mt76"; - reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; - }; -}; - &state_default { gpio { groups = "wdt"; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index cd28e36917..b90851c323 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -680,7 +680,7 @@ define Device/hilink_hlk-7621a-evb $(Device/uimage-lzma-loader) DEVICE_VENDOR := HiLink DEVICE_MODEL := HLK-7621A evaluation board - DEVICE_PACKAGES += kmod-mt76x2 kmod-usb3 + DEVICE_PACKAGES += kmod-usb3 IMAGE_SIZE := 32448k endef TARGET_DEVICES += hilink_hlk-7621a-evb From patchwork Wed Apr 13 12:05:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reinhard Max X-Patchwork-Id: 1616733 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=yuJ3+R4d; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4KdhGD36cyz9sG5 for ; Wed, 13 Apr 2022 22:09:08 +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=GUD9pVsKyNCZRaTZlgS8ptn94KuuXHXLXRB6D1A3TC0=; b=yuJ3+R4d380Di7 lffBTK8MxINX695hXvrju9DJL66WA4maCjLYByU/M2mFfwMaDdpz8jIWahEodRnHVW4Cg/fnpj7L6 fld8SD+Yx4kDKdHDryMhOeQFzOJPTN0SURdh+F8YrwGHsN6aFY7UCFpHg832jUM8UNDQdgp6cfVn/ 1tF2X9WIG3DQQ+DTxS1WrkHoCc+tBiRVlHZB0+UXR1RjQ3NMr6G6Yi80NbRMC0YitirZy29CKOCCM KOY5G942s0ChX6zJ23K8ewT2Z29X1kcRziUf67ebagIFn2DrEpK1yma1j/1ht/NxSzxLVDy5yDqZ6 mmm6BdwFryKF9p5siCtQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nebm5-000ubg-Bh; Wed, 13 Apr 2022 12:07:05 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1neblJ-000uLs-W4 for openwrt-devel@lists.openwrt.org; Wed, 13 Apr 2022 12:06:19 +0000 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id B82DD1F856; Wed, 13 Apr 2022 12:06:16 +0000 (UTC) Received: from f232.suse.de (nitsch.suse.de [10.160.4.250]) by relay2.suse.de (Postfix) with ESMTP id B1532A3B82; Wed, 13 Apr 2022 12:06:16 +0000 (UTC) Received: by f232.suse.de (Postfix, from userid 312) id 43F7B6ECF; Wed, 13 Apr 2022 14:06:17 +0200 (CEST) From: Reinhard Max To: openwrt-devel@lists.openwrt.org Cc: Reinhard Max Subject: [PATCH 2/3] ramips: hlk-7621a-evb: read MAC address from flash Date: Wed, 13 Apr 2022 14:05:53 +0200 Message-Id: <20220413120554.9355-2-reinhard@m4x.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220413120554.9355-1-reinhard@m4x.de> References: <20220413120554.9355-1-reinhard@m4x.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220413_050618_217911_DF324E0E X-CRM114-Status: UNSURE ( 7.35 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.1 (--) 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: Two MAC addresses are apparently located at offsets 0xe000 and 0xe006 in the factory partition on these devices. Change the dts to use the first one. See also: https://github.com/openwrt/openwrt/pull/4046#issuecomment-1091596559 Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.29 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.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 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 Two MAC addresses are apparently located at offsets 0xe000 and 0xe006 in the factory partition on these devices. Change the dts to use the first one. See also: https://github.com/openwrt/openwrt/pull/4046#issuecomment-1091596559 Signed-off-by: Reinhard Max --- .../ramips/dts/mt7621_hilink_hlk-7621a-evb.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts index b96436e03d..20e99352f3 100644 --- a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts +++ b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts @@ -100,3 +100,18 @@ function = "gpio"; }; }; + +&gmac0 { + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; From patchwork Wed Apr 13 12:05:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reinhard Max X-Patchwork-Id: 1616734 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=4HLk+6tO; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4KdhH3416nz9sG5 for ; Wed, 13 Apr 2022 22:09:51 +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=ML0aKMAOX0veFTQ4N9ZRjkAaxJWycEUlFKXt+VGFpOs=; b=4HLk+6tOPszz4c vuBJJN40huT4D9NRDvNLotBQ3FES/hCknNs48CLjgirlhSmudQWKj4USTrEo4EoTajTCiHsxNZ7nl 0NEGgG6gtFryphPLN3l2YhmGDoYRM2uBxjSNZ47ufT4KbsPqL3givc/hSTpJAnTkPHb4XKbCS/JEe e6bFkxBA8FCZHGOKMNf3OfiAntf7aU4LECnJSwjg++FIZo6yoKOmAEG4jEz8Jhj5tL3SlwloVcbWm ZuUN8YF1NtIF+BXx0h52YoYefWzTie9IbKDQjOleE9tRfKXqPljHz9iAdmjmdUxUpAsZXDPltcdhO XiO+EKstuRBqN/Z9ePDA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nebmb-000umh-Na; Wed, 13 Apr 2022 12:07:37 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1neblN-000uN6-TN for openwrt-devel@lists.openwrt.org; Wed, 13 Apr 2022 12:06:26 +0000 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 6C9A8210DE; Wed, 13 Apr 2022 12:06:19 +0000 (UTC) Received: from f232.suse.de (nitsch.suse.de [10.160.4.250]) by relay2.suse.de (Postfix) with ESMTP id 66681A3B82; Wed, 13 Apr 2022 12:06:19 +0000 (UTC) Received: by f232.suse.de (Postfix, from userid 312) id EDEF66ED1; Wed, 13 Apr 2022 14:06:19 +0200 (CEST) From: Reinhard Max To: openwrt-devel@lists.openwrt.org Cc: Reinhard Max Subject: [PATCH 3/3] ramips: hlk-7621a-evb: rename switch ports Date: Wed, 13 Apr 2022 14:05:54 +0200 Message-Id: <20220413120554.9355-3-reinhard@m4x.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220413120554.9355-1-reinhard@m4x.de> References: <20220413120554.9355-1-reinhard@m4x.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220413_050622_516661_99AAE400 X-CRM114-Status: GOOD ( 10.43 ) X-Spam-Score: -2.1 (--) 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: Rename the switch ports from 'lan[1..4]' and 'wan' to 'p[0..4]'. This matches the SoC documentation and the silkscreen for the port LEDs on the module. There is no LAN/WAN labeling on the board itself [...] Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.28 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.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 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 Rename the switch ports from 'lan[1..4]' and 'wan' to 'p[0..4]'. This matches the SoC documentation and the silkscreen for the port LEDs on the module. There is no LAN/WAN labeling on the board itself. This eval board is so universal (many additional interfaces broken out on pin headers, mPCIe slot, USB, etc.) that chances are high that is being used for other things than a traditional LAN/WAN router, and then the 'wan' naming of the 5th port might get into the way, so better stick with the SoC naming. Signed-off-by: Reinhard Max --- .../linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts | 10 +++++----- .../ramips/mt7621/base-files/etc/board.d/02_network | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts index 20e99352f3..6b22e04b35 100644 --- a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts +++ b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts @@ -65,27 +65,27 @@ ports { port@0 { status = "okay"; - label = "lan1"; + label = "p0"; }; port@1 { status = "okay"; - label = "lan2"; + label = "p1"; }; port@2 { status = "okay"; - label = "lan3"; + label = "p2"; }; port@3 { status = "okay"; - label = "lan4"; + label = "p3"; }; port@4 { status = "okay"; - label = "wan"; + label = "p4"; }; }; }; 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 1fc0ccdd5b..eb931defaa 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -55,6 +55,9 @@ ramips_setup_interfaces() gnubee,gb-pc2) ucidef_set_interface_lan "lan1 lan2" ;; + hilink,hlk-7621a-evb) + ucidef_set_interface_lan "p0 p1 p2 p3 p4" + ;; linksys,re6500|\ netgear,wac104) ucidef_set_interface_lan "lan1 lan2 lan3 lan4"