From patchwork Tue Mar 9 21:12:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Mork?= X-Patchwork-Id: 1450202 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) 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=desiato.20200630 header.b=dqe+Fss1; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=mork.no header.i=@mork.no header.a=rsa-sha256 header.s=b header.b=GPJqVCEb; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (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 4Dw7L12Nb5z9sW5 for ; Wed, 10 Mar 2021 08:16:09 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=APrPytL2cl8uMGqCcYpif/UIBQYSx8CWy2YlwyGc/nM=; b=dqe+Fss1HsMjslLI1oXOfbauS H5Qa9E07MSFdiEweDx/DaROXtpWFg8N/lY3ahTGdgs4HbLoaf+WwN0APSi2mwntq234CnSQUZhXH5 KBrW9gqJV9vOlz+1RZDEKD6NMJmeL4ERUO676hHStVndIlu3Htxk280t4dxNNf2fcQEgX5CAdoKyF 21cRUU7aQ1YLWc+f9Xfr33+gxzlPwzTJk5zvM2mpHHDzLitMotQQ7qDKqXb+vzjWTejN05vvN9Fnr AAklA+4Ok7zpTiexYDZbdlRm82NxRdzjr50K7lVhDIPWvaUsS6k+H0WkvY/+HMjIMWtTDV0vkUMPs IwGWenBAg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJjfd-005QK0-P5; Tue, 09 Mar 2021 21:13:37 +0000 Received: from canardo.mork.no ([2001:4641::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJjez-005QE1-BT for openwrt-devel@lists.openwrt.org; Tue, 09 Mar 2021 21:13:04 +0000 Received: from canardo.mork.no (ip6-localhost [IPv6:0:0:0:0:0:0:0:1]) by canardo.mork.no (8.15.2/8.15.2) with ESMTPS id 129LCrMT022757 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK); Tue, 9 Mar 2021 22:12:53 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1615324373; bh=QuR9q1Et20Arsp0c0PHy4blFlqLc/7oOC8PoBMsEhdc=; h=From:To:Cc:Subject:Date:Message-Id:References:From; b=GPJqVCEbCLKHfThYPalQVj0yKZEBovy1R/WsG0rgYR++r4eKXfPuwxBosEAuKAHAJ Q2qtGgm2d3HdiIdvp3uSDjKjFtwOv1EGRCbBxXDaJvNE6rm4OzrmoVnPapKOn+ZQOd jLTdsYeVaBYHQsrl05VlbJ7z8W0VpHqvloJdZcXc= Received: (from bjorn@localhost) by canardo.mork.no (8.15.2/8.15.2/Submit) id 129LCrp0022750; Tue, 9 Mar 2021 22:12:53 +0100 From: =?utf-8?q?Bj=C3=B8rn_Mork?= To: openwrt-devel@lists.openwrt.org Cc: =?utf-8?q?Bj=C3=B8rn_Mork?= Subject: [PATCH 1/6] realtek: fix link-state interrupt Date: Tue, 9 Mar 2021 22:12:39 +0100 Message-Id: <20210309211244.22684-2-bjorn@mork.no> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210309211244.22684-1-bjorn@mork.no> References: <20210309211244.22684-1-bjorn@mork.no> MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on canardo.mork.no X-Virus-Scanned: clamav-milter 0.102.4 at canardo X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210309_211259_133562_5EF4E6E5 X-CRM114-Status: UNSURE ( 9.60 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) X-Spam-Report: =?unknown-8bit?q?Spam_detection_software=2C_running_on_the_sy?= =?unknown-8bit?q?stem_=22desiato=2Einfradead=2Eorg=22=2C?= =?unknown-8bit?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_ori?= =?unknown-8bit?q?ginal?= =?unknown-8bit?q?_message_has_been_attached_to_this_so_you_can_view_it_or_la?= =?unknown-8bit?q?bel?= =?unknown-8bit?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?unknown-8bit?q?_the_administrator_of_that_system_for_details=2E?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_preview=3A__This_bug_was_the_root_cause_for_the_fa?= =?unknown-8bit?q?iling_sfp_driver=2E_Signed-off-by=3A?= =?unknown-8bit?q?_Bj=C3=B8rn_Mork_=3Cbjorn=40mork=2Eno=3E_---_=2E=2E=2E/real?= =?unknown-8bit?q?tek/files-5=2E4/drivers/net/dsa/rtl83xx/common=2Ec?= =?unknown-8bit?q?_=7C_7_+++----_1_file_changed=2C_3_insertions=28+=29=2C_4_d?= =?unknown-8bit?q?eletions=28-=29_?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=28-2=2E5_points=2C_5=2E0_re?= =?unknown-8bit?q?quired=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_pts_rule_name______________description?= =?unknown-8bit?q?_----_----------------------_------------------------------?= =?unknown-8bit?q?--------------------?= =?unknown-8bit?q?_-2=2E3_RCVD=5FIN=5FDNSWL=5FMED______RBL=3A_Sender_listed_a?= =?unknown-8bit?q?t_https=3A//www=2Ednswl=2Eorg/=2C?= =?unknown-8bit?q?_medium_trust?= =?unknown-8bit?b?IFsyMDAxOjQ2NDE6MDowOjA6MDowOjEgbGlzdGVkIGluXQ==?= =?unknown-8bit?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?unknown-8bit?q?_-0=2E0_SPF=5FHELO=5FPASS__________SPF=3A_HELO_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID_____________Message_has_at_least_one_v?= =?unknown-8bit?q?alid_DKIM_or_DK_signature?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FEF__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_envelope-from_domain?= =?unknown-8bit?q?_0=2E1_DKIM=5FSIGNED____________Message_has_a_DKIM_or_DK_si?= =?unknown-8bit?q?gnature=2C_not_necessarily?= =?unknown-8bit?q?_valid?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FAU__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_author=27s_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 This bug was the root cause for the failing sfp driver. Signed-off-by: Bjørn Mork --- .../realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c index 698f2892ea1e..197a96f8ad13 100644 --- a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c +++ b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c @@ -555,7 +555,6 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev) int err = 0, i; struct rtl838x_switch_priv *priv; struct device *dev = &pdev->dev; - u64 irq_mask; u64 bpdu_mask; pr_debug("Probing RTL838X switch device\n"); @@ -650,9 +649,9 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev) /* Enable link and media change interrupts. Are the SERDES masks needed? */ sw_w32_mask(0, 3, priv->r->isr_glb_src); - - priv->r->set_port_reg_le(irq_mask, priv->r->isr_port_link_sts_chg); - priv->r->set_port_reg_le(irq_mask, priv->r->imr_port_link_sts_chg); + + priv->r->set_port_reg_le(priv->irq_mask, priv->r->isr_port_link_sts_chg); + priv->r->set_port_reg_le(priv->irq_mask, priv->r->imr_port_link_sts_chg); priv->link_state_irq = platform_get_irq(pdev, 0); pr_info("LINK state irq: %d\n", priv->link_state_irq); From patchwork Tue Mar 9 21:12:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Mork?= X-Patchwork-Id: 1450200 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) 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=desiato.20200630 header.b=LXWBeyrX; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=mork.no header.i=@mork.no header.a=rsa-sha256 header.s=b header.b=Oem88ew8; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (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 4Dw7KS3Myfz9sWL for ; Wed, 10 Mar 2021 08:15:40 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=IHW1lIR6tUSLdOZFM8M46hJRD8K2PKhdoInLyAh5BD4=; b=LXWBeyrX/2YvWcDIusGpn27UX XCYKNKPiJ3vfJAvcdhbRkMGQkZrGThlb532OE2T+m91d1ec/nv5eDoMtH7uAJyEMg3kbhmt4zG++s NJNjMhM2qHqCWo6g7DsrUrmMSS5Ma5pXiSjJC+nDHjM5XCXdBgpIXr4vByomn2ILvzvV3CXXtlIua MorInuTcdqWrAfSkAPfRgTN+qidWE16rJQRbyiRWaHgsMgKP8GiPsCK+6KcwlTARb/o4c/rv9XOB0 u4AIWkYO6BrfEenG0TyhdtIiuYb09vagf2GSjOypq4S2/1z2FKMmF9LrJwiT1zHWe3dnoQHGQ8zfQ C7mo01s2Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJjfP-005QIE-OP; Tue, 09 Mar 2021 21:13:24 +0000 Received: from canardo.mork.no ([2001:4641::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJjf0-005QE4-BI for openwrt-devel@lists.openwrt.org; Tue, 09 Mar 2021 21:13:03 +0000 Received: from canardo.mork.no (ip6-localhost [IPv6:0:0:0:0:0:0:0:1]) by canardo.mork.no (8.15.2/8.15.2) with ESMTPS id 129LCrIj022769 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK); Tue, 9 Mar 2021 22:12:54 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1615324374; bh=A2GZJ+kL/E6m9uMYTDXGRmNwtio07LENnlvhmOEN/6c=; h=From:To:Cc:Subject:Date:Message-Id:References:From; b=Oem88ew8uffe8eo77OsCREkBkcMQxM0G9T77Qq7YF4Cj9ynIeb1n/tEKGhU0M5kvU u29GXIylAoSBwogVNK9nVg614EDCQqPChGRZ5Fz8P4BS34jbT15DmbxTbra4Qjw+a5 gKTIlcA2ezsYXBbWrsHhUnuRsJ9GEHG2vfrsRuW4= Received: (from bjorn@localhost) by canardo.mork.no (8.15.2/8.15.2/Submit) id 129LCrSt022762; Tue, 9 Mar 2021 22:12:53 +0100 From: =?utf-8?q?Bj=C3=B8rn_Mork?= To: openwrt-devel@lists.openwrt.org Cc: =?utf-8?q?Bj=C3=B8rn_Mork?= Subject: [PATCH 2/6] realtek: re-enable sfp driver for ZyXEL GS1900-10HP Date: Tue, 9 Mar 2021 22:12:40 +0100 Message-Id: <20210309211244.22684-3-bjorn@mork.no> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210309211244.22684-1-bjorn@mork.no> References: <20210309211244.22684-1-bjorn@mork.no> MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on canardo.mork.no X-Virus-Scanned: clamav-milter 0.102.4 at canardo X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210309_211259_137847_65E63063 X-CRM114-Status: UNSURE ( 8.65 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) X-Spam-Report: Spam detection software, running on the system "desiato.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: There is no need to define a static link or a phy for the sfp ports. Using phy-mode and managed properties to describe the link to the sfp phy. We have to keep the now unconnected virtual "phys" because the switch driver uses their "phy-is-integrated" property to figure out which ports to enable as fibre ports. 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 [2001:4641:0:0:0:0:0:1 listed in] [list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's 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 There is no need to define a static link or a phy for the sfp ports. Using phy-mode and managed properties to describe the link to the sfp phy. We have to keep the now unconnected virtual "phys" because the switch driver uses their "phy-is-integrated" property to figure out which ports to enable as fibre ports. Signed-off-by: Bjørn Mork --- .../realtek/dts/rtl8380_zyxel_gs1900-10hp.dts | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts index 92d0e25fc477..c16028788ea4 100644 --- a/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts @@ -17,7 +17,7 @@ }; sfp0: sfp-p9 { - compatible = "_sff,sfp"; + compatible = "sff,sfp"; i2c-bus = <&i2c0>; los-gpio = <&gpio1 27 GPIO_ACTIVE_HIGH>; tx-fault-gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>; @@ -36,7 +36,7 @@ }; sfp1: sfp-p10 { - compatible = "_sff,sfp"; + compatible = "sff,sfp"; i2c-bus = <&i2c1>; los-gpio = <&gpio1 33 GPIO_ACTIVE_HIGH>; tx-fault-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>; @@ -55,29 +55,17 @@ port@24 { reg = <24>; label = "lan9"; - phy-mode = "rgmii-id"; - phy-handle = <&phy24>; + phy-mode = "1000base-x"; + managed = "in-band-status"; sfp = <&sfp0>; - - fixed-link { - speed = <1000>; - full-duplex; - pause; - }; }; port@26 { reg = <26>; label = "lan10"; - phy-mode = "rgmii-id"; - phy-handle = <&phy26>; + phy-mode = "1000base-x"; + managed = "in-band-status"; sfp = <&sfp1>; - - fixed-link { - speed = <1000>; - full-duplex; - pause; - }; }; }; }; From patchwork Tue Mar 9 21:12:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Mork?= X-Patchwork-Id: 1450207 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) 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=desiato.20200630 header.b=FoXr6IhI; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=mork.no header.i=@mork.no header.a=rsa-sha256 header.s=b header.b=Vv4kdYab; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (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 4Dw7NB34LGz9sWR for ; Wed, 10 Mar 2021 08:18:02 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=6dFJ4iEBKBVsEpHSZzqgVgnR1/UWJLSh7xNKl8rINqE=; b=FoXr6IhImcbPZNUwX/7gAFXh7 oApRkUQ+1kwOeWDi3g/mGMyGjLYctK6amBYTSaI41eox39metQMOjl8+O9EACKxB6NhYjBkpoHGO6 YYz4tV1CQgXV5NhOhKeUFeMooChU9D2PcfuTdPvjKZxupB7PP8QShGIPKtBGStgn8PLrzEXb/imnr sSEjNIxXV6bLKONKhZYLEszK6NzGAESpl87B5II1Wsz4IYT22SznKqChMOdz10bf3auGBc979COm2 Z5Ae926CQgltyv1sjW0uE+mVL+uwCnt3lvUGvgVjtCH1QP8RGhKO07VGZSQBRx142O2qCFI17kBGj rhVi++8DQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJjho-005QhA-TN; Tue, 09 Mar 2021 21:15:54 +0000 Received: from canardo.mork.no ([2001:4641::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJjf0-005QE5-QJ for openwrt-devel@lists.openwrt.org; Tue, 09 Mar 2021 21:13:04 +0000 Received: from canardo.mork.no (ip6-localhost [IPv6:0:0:0:0:0:0:0:1]) by canardo.mork.no (8.15.2/8.15.2) with ESMTPS id 129LCsJx022779 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK); Tue, 9 Mar 2021 22:12:54 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1615324374; bh=CClN4wplKamFR+RUx1khFVysPglnNjyzsa4w3frOS6o=; h=From:To:Cc:Subject:Date:Message-Id:References:From; b=Vv4kdYabr18Y9/ce+D9xUPnFFMD8eA4yUnob5ywWCG1wGh9Elq790AgcVyebwyram gbNQnNLiIr3btTkTS8gluxELi5vagVSL+629mngDcU6+eTIJSpQcT+O2VTlwXKtrEK b50Cr5wvQ51y+hQFGdaertKTl0OtDCv9opoCXC3Q= Received: (from bjorn@localhost) by canardo.mork.no (8.15.2/8.15.2/Submit) id 129LCs3k022772; Tue, 9 Mar 2021 22:12:54 +0100 From: =?utf-8?q?Bj=C3=B8rn_Mork?= To: openwrt-devel@lists.openwrt.org Cc: =?utf-8?q?Bj=C3=B8rn_Mork?= Subject: [PATCH 3/6] realtek: need to handle PHY_INTERFACE_MODE_NA for sfps Date: Tue, 9 Mar 2021 22:12:41 +0100 Message-Id: <20210309211244.22684-4-bjorn@mork.no> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210309211244.22684-1-bjorn@mork.no> References: <20210309211244.22684-1-bjorn@mork.no> MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on canardo.mork.no X-Virus-Scanned: clamav-milter 0.102.4 at canardo X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210309_211259_456923_1BCD820E X-CRM114-Status: UNSURE ( 6.90 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) X-Spam-Report: =?unknown-8bit?q?Spam_detection_software=2C_running_on_the_sy?= =?unknown-8bit?q?stem_=22desiato=2Einfradead=2Eorg=22=2C?= =?unknown-8bit?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_ori?= =?unknown-8bit?q?ginal?= =?unknown-8bit?q?_message_has_been_attached_to_this_so_you_can_view_it_or_la?= =?unknown-8bit?q?bel?= =?unknown-8bit?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?unknown-8bit?q?_the_administrator_of_that_system_for_details=2E?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_preview=3A__Signed-off-by=3A_Bj=C3=B8rn_Mork_=3Cbj?= =?unknown-8bit?q?orn=40mork=2Eno=3E_---_target/linux/realtek/files-5=2E4/dr?= =?unknown-8bit?q?ivers/net/dsa/rtl83xx/dsa=2Ec?= =?unknown-8bit?q?_=7C_1_+_1_file_changed=2C_1_insertion=28+=29_diff_--git_a/?= =?unknown-8bit?q?target/linux/realtek/files-5=2E4/drivers/net/dsa/rtl83xx/d?= =?unknown-8bit?q?sa=2Ec?= =?unknown-8bit?q?_b/target/linux/realtek/files-5=2E4/drivers/net/dsa/rtl83xx?= =?unknown-8bit?q?/dsa=2Ec_index_e0832c42b887=2E=2E512f5351bf17?= =?unknown-8bit?q?_100644_---_a/target/linux/real_=5B=2E=2E=2E=5D_?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=28-2=2E5_points=2C_5=2E0_re?= =?unknown-8bit?q?quired=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_pts_rule_name______________description?= =?unknown-8bit?q?_----_----------------------_------------------------------?= =?unknown-8bit?q?--------------------?= =?unknown-8bit?q?_-2=2E3_RCVD=5FIN=5FDNSWL=5FMED______RBL=3A_Sender_listed_a?= =?unknown-8bit?q?t_https=3A//www=2Ednswl=2Eorg/=2C?= =?unknown-8bit?q?_medium_trust?= =?unknown-8bit?b?IFsyMDAxOjQ2NDE6MDowOjA6MDowOjEgbGlzdGVkIGluXQ==?= =?unknown-8bit?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?unknown-8bit?q?_-0=2E0_SPF=5FHELO=5FPASS__________SPF=3A_HELO_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID_____________Message_has_at_least_one_v?= =?unknown-8bit?q?alid_DKIM_or_DK_signature?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FEF__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_envelope-from_domain?= =?unknown-8bit?q?_0=2E1_DKIM=5FSIGNED____________Message_has_a_DKIM_or_DK_si?= =?unknown-8bit?q?gnature=2C_not_necessarily?= =?unknown-8bit?q?_valid?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FAU__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_author=27s_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 Signed-off-by: Bjørn Mork --- target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c index e0832c42b887..512f5351bf17 100644 --- a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c +++ b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c @@ -245,6 +245,7 @@ static void rtl83xx_phylink_validate(struct dsa_switch *ds, int port, pr_debug("In %s port %d", __func__, port); if (!phy_interface_mode_is_rgmii(state->interface) && + state->interface != PHY_INTERFACE_MODE_NA && state->interface != PHY_INTERFACE_MODE_1000BASEX && state->interface != PHY_INTERFACE_MODE_MII && state->interface != PHY_INTERFACE_MODE_REVMII && From patchwork Tue Mar 9 21:12:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Mork?= X-Patchwork-Id: 1450204 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) 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=desiato.20200630 header.b=MbKciGxB; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=mork.no header.i=@mork.no header.a=rsa-sha256 header.s=b header.b=McaLYJ+Y; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (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 4Dw7M36js6z9sWL for ; Wed, 10 Mar 2021 08:17:03 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=dNOYUXbkYu4ztbUlHlpaWtQ+S7iMS4B1VAo9bBbzaJo=; b=MbKciGxBb4hkIT/QgNmVe80Ue 4BfAiLCBoMXE2ZWtFCxj1rStmd5uBHIWx8fdbOhxst28PV4zZLYUsMD10Qct5KTu4idDbGMVqAgPj 5WsnMH5XO8UkQxPia0fiTvSPBhkOB40lG8YU7bkX75dFptr5XgPAFYomYtl8hHUg4J2yqTVIC0dlE oI1BfpqEuLFNh6NSs+WUl0AHrwOf6kjOmnIt4d6xrAoyN5bjJ69DNRkDhRgW+l5Ra1B2uEPJ3QKDe J7YM6k6LAffYKOodLiiUecjN4T6FHDbDUDWHiSLeiwBGRgOi/YX54IzJN8Oee7rig19jgg4bAMi3b QdEB0UGRA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJjgR-005QRG-I0; Tue, 09 Mar 2021 21:14:28 +0000 Received: from canardo.mork.no ([2001:4641::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJjez-005QEA-BU for openwrt-devel@lists.openwrt.org; Tue, 09 Mar 2021 21:13:04 +0000 Received: from canardo.mork.no (ip6-localhost [IPv6:0:0:0:0:0:0:0:1]) by canardo.mork.no (8.15.2/8.15.2) with ESMTPS id 129LCs2n022789 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK); Tue, 9 Mar 2021 22:12:54 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1615324374; bh=DyoUquLemcAhP7M6sh0W8OjP5Mma7wTDQ2Pyk2hxEPk=; h=From:To:Cc:Subject:Date:Message-Id:References:From; b=McaLYJ+YJLThRAP95rP1V/O6pO4+DLxip+jqQ/HQGOKjW2jDUrbXGTHiC8ZIU6/W4 BA2ZRcFMEBR99h2MS3E5ca2YOF+RXdgSofADmR8VSgR7Rq5no7uerxwa2/HD4d2yY9 XbJQ1XvzctlSKHmvnWRUgNmIrMqsTDpKVR0MHAW4= Received: (from bjorn@localhost) by canardo.mork.no (8.15.2/8.15.2/Submit) id 129LCsqV022782; Tue, 9 Mar 2021 22:12:54 +0100 From: =?utf-8?q?Bj=C3=B8rn_Mork?= To: openwrt-devel@lists.openwrt.org Cc: =?utf-8?q?Bj=C3=B8rn_Mork?= Subject: [PATCH 4/6] realtek: enable HWMON for SFP sensors Date: Tue, 9 Mar 2021 22:12:42 +0100 Message-Id: <20210309211244.22684-5-bjorn@mork.no> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210309211244.22684-1-bjorn@mork.no> References: <20210309211244.22684-1-bjorn@mork.no> MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on canardo.mork.no X-Virus-Scanned: clamav-milter 0.102.4 at canardo X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210309_211259_243801_109F873C X-CRM114-Status: UNSURE ( 6.93 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) X-Spam-Report: =?unknown-8bit?q?Spam_detection_software=2C_running_on_the_sy?= =?unknown-8bit?q?stem_=22desiato=2Einfradead=2Eorg=22=2C?= =?unknown-8bit?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_ori?= =?unknown-8bit?q?ginal?= =?unknown-8bit?q?_message_has_been_attached_to_this_so_you_can_view_it_or_la?= =?unknown-8bit?q?bel?= =?unknown-8bit?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?unknown-8bit?q?_the_administrator_of_that_system_for_details=2E?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_preview=3A__Signed-off-by=3A_Bj=C3=B8rn_Mork_=3Cbj?= =?unknown-8bit?q?orn=40mork=2Eno=3E_---_target/linux/realtek/config-5=2E4?= =?unknown-8bit?q?_=7C_1_+_1_file_changed=2C_1_insertion=28+=29_diff_--git_a/?= =?unknown-8bit?q?target/linux/realtek/config-5=2E4?= =?unknown-8bit?q?_b/target/linux/realtek/config-5=2E4_index_2fbd904376fc=2E?= =?unknown-8bit?q?=2Eed8c6023377f_100644?= =?unknown-8bit?q?_---_a/target/linux/realtek/config-5=2E4_+++_b/target/linux?= =?unknown-8bit?q?/realtek/config-5=2E4?= =?unknown-8bit?b?IEBAIC04IFsuLi5dIA==?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=28-2=2E5_points=2C_5=2E0_re?= =?unknown-8bit?q?quired=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_pts_rule_name______________description?= =?unknown-8bit?q?_----_----------------------_------------------------------?= =?unknown-8bit?q?--------------------?= =?unknown-8bit?q?_-2=2E3_RCVD=5FIN=5FDNSWL=5FMED______RBL=3A_Sender_listed_a?= =?unknown-8bit?q?t_https=3A//www=2Ednswl=2Eorg/=2C?= =?unknown-8bit?q?_medium_trust?= =?unknown-8bit?b?IFsyMDAxOjQ2NDE6MDowOjA6MDowOjEgbGlzdGVkIGluXQ==?= =?unknown-8bit?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?unknown-8bit?q?_-0=2E0_SPF=5FHELO=5FPASS__________SPF=3A_HELO_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID_____________Message_has_at_least_one_v?= =?unknown-8bit?q?alid_DKIM_or_DK_signature?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FEF__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_envelope-from_domain?= =?unknown-8bit?q?_0=2E1_DKIM=5FSIGNED____________Message_has_a_DKIM_or_DK_si?= =?unknown-8bit?q?gnature=2C_not_necessarily?= =?unknown-8bit?q?_valid?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FAU__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_author=27s_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 Signed-off-by: Bjørn Mork --- target/linux/realtek/config-5.4 | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/realtek/config-5.4 b/target/linux/realtek/config-5.4 index 2fbd904376fc..ed8c6023377f 100644 --- a/target/linux/realtek/config-5.4 +++ b/target/linux/realtek/config-5.4 @@ -82,6 +82,7 @@ CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y # CONFIG_HIGH_RES_TIMERS is not set +CONFIG_HWMON=y CONFIG_HZ=250 CONFIG_HZ_250=y CONFIG_HZ_PERIODIC=y From patchwork Tue Mar 9 21:12:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Mork?= X-Patchwork-Id: 1450206 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) 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=desiato.20200630 header.b=GoO2qITf; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=mork.no header.i=@mork.no header.a=rsa-sha256 header.s=b header.b=XVGYk52R; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (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 4Dw7MY1061z9sW5 for ; Wed, 10 Mar 2021 08:17:29 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=uLg7LZ7EDCjXIJh9WziGkkRtaJPYxAYFj6U0ObPMUv0=; b=GoO2qITfGOi3dlli86TkKEfvG kdn76vCARuArmYGMd3a3wfWj9M/cRNQBob034CIg9qM7bI1Uc9zQLff17uXB5yh9JoI5begLcM7lp 6x6ycY2goFu8s6irVVjlbbZhER7jyWIVL6c1SCTL47MyTV2JqHJlWw4D6oWN1mjl3KqPevwJ2ZyJJ GpLV0EjyiGH8hCKZGKV/+X7Cvbhpw3pO/yZqSZuNQT4CPkZ064o/2uLKVlQdnLGFiQEiWw27vlTk1 VK/svrg5GJ/giK+P8Z4AIBNLlYsjStK3Xg65t+3ZwgRl6EMe51gBhjesj9twPNS9jxBkR7WE3olX6 0lcGyQVUA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJjh8-005QZ0-Ni; Tue, 09 Mar 2021 21:15:11 +0000 Received: from canardo.mork.no ([2001:4641::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJjf0-005QEC-U8 for openwrt-devel@lists.openwrt.org; Tue, 09 Mar 2021 21:13:04 +0000 Received: from canardo.mork.no (ip6-localhost [IPv6:0:0:0:0:0:0:0:1]) by canardo.mork.no (8.15.2/8.15.2) with ESMTPS id 129LCtMo022801 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK); Tue, 9 Mar 2021 22:12:55 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1615324375; bh=8nMzPP1g09AkQWO6KQHNQ5IgadEwhi1v/L2ZrrPXvRw=; h=From:To:Cc:Subject:Date:Message-Id:References:From; b=XVGYk52RI+xTqlePKDDfpdB6uWqCWzXQfDXHxgRLmUmF52Tw4zFebBzEjv848sA0y 4SSoTmKiByc2Qo/fdBNL7nDAtflyDOcdPoQPSQSF3b94RuOGVXw+O4p4gECNXDtlRR Suz7SaVIXeE77/8r746v3EfxB2mICcdfyDpByC6o= Received: (from bjorn@localhost) by canardo.mork.no (8.15.2/8.15.2/Submit) id 129LCtE9022794; Tue, 9 Mar 2021 22:12:55 +0100 From: =?utf-8?q?Bj=C3=B8rn_Mork?= To: openwrt-devel@lists.openwrt.org Cc: =?utf-8?q?Bj=C3=B8rn_Mork?= Subject: [PATCH 5/6] realtek: enabled Marvell and Realtek PHYs Date: Tue, 9 Mar 2021 22:12:43 +0100 Message-Id: <20210309211244.22684-6-bjorn@mork.no> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210309211244.22684-1-bjorn@mork.no> References: <20210309211244.22684-1-bjorn@mork.no> MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on canardo.mork.no X-Virus-Scanned: clamav-milter 0.102.4 at canardo X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210309_211259_252796_E0261ECF X-CRM114-Status: UNSURE ( 7.44 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) X-Spam-Report: Spam detection software, running on the system "desiato.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 rtl83xx-phy driver is necessary for proper configuration of the PHYs if U-Boot hasn't done that. 1000Base-T SFPs often contains a Marvell 88E1111 and will not work without this driver. Include it by default to support copper SFPs. 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 [2001:4641:0:0:0:0:0:1 listed in] [list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's 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 rtl83xx-phy driver is necessary for proper configuration of the PHYs if U-Boot hasn't done that. 1000Base-T SFPs often contains a Marvell 88E1111 and will not work without this driver. Include it by default to support copper SFPs. Signed-off-by: Bjørn Mork --- target/linux/realtek/config-5.4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/realtek/config-5.4 b/target/linux/realtek/config-5.4 index ed8c6023377f..51025d5d890c 100644 --- a/target/linux/realtek/config-5.4 +++ b/target/linux/realtek/config-5.4 @@ -102,6 +102,7 @@ CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 CONFIG_LIBFDT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_MARVELL_PHY=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y CONFIG_MDIO_I2C=y @@ -160,6 +161,7 @@ CONFIG_PINCTRL=y CONFIG_POWER_RESET=y CONFIG_POWER_RESET_SYSCON=y CONFIG_PSB6970_PHY=y +CONFIG_REALTEK_PHY=y CONFIG_REGMAP=y CONFIG_REGMAP_MMIO=y CONFIG_RESET_CONTROLLER=y From patchwork Tue Mar 9 21:12:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Mork?= X-Patchwork-Id: 1450203 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) 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=desiato.20200630 header.b=O904RRZ0; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=mork.no header.i=@mork.no header.a=rsa-sha256 header.s=b header.b=j1C+Rhf4; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (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 4Dw7Ll0Frzz9sW5 for ; Wed, 10 Mar 2021 08:16:47 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=4/cSnAHd1NxbAxuN1U/7+t6N10c+so10j/eoCIsPl98=; b=O904RRZ0QYj9pkcwk6a8akU5F u9dxBfWz30tRFK+paXjefTDfL+hDn/DIDIADf9tAreTKhoQDwL5dZqqKKrG4+IWF5n05xkYSqU0rL Hq7M7bz2w7Z2N1NQAnpa9km6dmGf4HgISffcAMfjzoE2A5gLzIGEa+ff0jVtHSd8c4FLnd2u/fZnr VB+H3HLbNkOSRW20+VSC3r7o6VOhNiZUu6G/cqqXd6c/3sTFlbyZxDcz0xhi9T2xK62alvC9cr4CH 2IK0ELo8Z32EMY4mx18k4LqwDNwGCLTyb1DRNj3fTAfq7eYX8/HdvPISXgrpl1/tWJ0cxY8I6kQXw +hgvIy91A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJjg0-005QNC-Ja; Tue, 09 Mar 2021 21:14:01 +0000 Received: from canardo.mork.no ([2001:4641::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJjf0-005QEF-BJ for openwrt-devel@lists.openwrt.org; Tue, 09 Mar 2021 21:13:03 +0000 Received: from canardo.mork.no (ip6-localhost [IPv6:0:0:0:0:0:0:0:1]) by canardo.mork.no (8.15.2/8.15.2) with ESMTPS id 129LCt5d022812 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK); Tue, 9 Mar 2021 22:12:55 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1615324375; bh=8/zTJ3FpKHFj9HavQiKIatuz5NHOjmXrPW7vpsFmBBk=; h=From:To:Cc:Subject:Date:Message-Id:References:From; b=j1C+Rhf4VoGSSzPGwfFGgEyvzyplRSh3MB7oeqgvuX/Rpy/CHn22fprWtYRgB/XU3 YD9a0TsG9iWRi3E7JLjxEKroOzBJ4EsH8ke8mLAPu6+Xh/AhOiVGMycsrhGr/pv0mz HzeildQ/3sdhXmcwfBdUErF5fHBJlALPgnI+kLBU= Received: (from bjorn@localhost) by canardo.mork.no (8.15.2/8.15.2/Submit) id 129LCtpg022805; Tue, 9 Mar 2021 22:12:55 +0100 From: =?utf-8?q?Bj=C3=B8rn_Mork?= To: openwrt-devel@lists.openwrt.org Cc: =?utf-8?q?Bj=C3=B8rn_Mork?= Subject: [PATCH 6/6] realtek: enable SerDes NWAY and SGMII negotiation Date: Tue, 9 Mar 2021 22:12:44 +0100 Message-Id: <20210309211244.22684-7-bjorn@mork.no> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210309211244.22684-1-bjorn@mork.no> References: <20210309211244.22684-1-bjorn@mork.no> MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on canardo.mork.no X-Virus-Scanned: clamav-milter 0.102.4 at canardo X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210309_211259_102324_DA637F56 X-CRM114-Status: GOOD ( 12.35 ) X-Spam-Score: -2.5 (--) X-Spam-Report: =?unknown-8bit?q?Spam_detection_software=2C_running_on_the_sy?= =?unknown-8bit?q?stem_=22desiato=2Einfradead=2Eorg=22=2C?= =?unknown-8bit?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_ori?= =?unknown-8bit?q?ginal?= =?unknown-8bit?q?_message_has_been_attached_to_this_so_you_can_view_it_or_la?= =?unknown-8bit?q?bel?= =?unknown-8bit?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?unknown-8bit?q?_the_administrator_of_that_system_for_details=2E?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_preview=3A__This_allows_copper_SFPs_to_negotiate_s?= =?unknown-8bit?q?peeds_lower_than_1gig=2E?= =?unknown-8bit?q?_Signed-off-by=3A_Bj=C3=B8rn_Mork_=3Cbjorn=40mork=2Eno=3E_-?= =?unknown-8bit?q?--_=2E=2E=2E/drivers/net/dsa/rtl83xx/common=2Ec?= =?unknown-8bit?q?_=7C_4_+-_=2E=2E=2E/files-5=2E4/drivers/net/dsa/rtl83xx/dsa?= =?unknown-8bit?q?=2Ec_=7C_41_++++++++++++++++++-?= =?unknown-8bit?b?IDIgZmlsZXMgY2hhbmdlZCwgNDIgaW5zZXJ0aW9ucygrKSwgMyBkZWwg?= =?unknown-8bit?b?Wy4uLl0g?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=28-2=2E5_points=2C_5=2E0_re?= =?unknown-8bit?q?quired=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_pts_rule_name______________description?= =?unknown-8bit?q?_----_----------------------_------------------------------?= =?unknown-8bit?q?--------------------?= =?unknown-8bit?q?_-2=2E3_RCVD=5FIN=5FDNSWL=5FMED______RBL=3A_Sender_listed_a?= =?unknown-8bit?q?t_https=3A//www=2Ednswl=2Eorg/=2C?= =?unknown-8bit?q?_medium_trust?= =?unknown-8bit?b?IFsyMDAxOjQ2NDE6MDowOjA6MDowOjEgbGlzdGVkIGluXQ==?= =?unknown-8bit?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?unknown-8bit?q?_-0=2E0_SPF=5FHELO=5FPASS__________SPF=3A_HELO_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID_____________Message_has_at_least_one_v?= =?unknown-8bit?q?alid_DKIM_or_DK_signature?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FEF__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_envelope-from_domain?= =?unknown-8bit?q?_0=2E1_DKIM=5FSIGNED____________Message_has_a_DKIM_or_DK_si?= =?unknown-8bit?q?gnature=2C_not_necessarily?= =?unknown-8bit?q?_valid?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FAU__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_author=27s_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 This allows copper SFPs to negotiate speeds lower than 1gig. Signed-off-by: Bjørn Mork --- .../drivers/net/dsa/rtl83xx/common.c | 4 +- .../files-5.4/drivers/net/dsa/rtl83xx/dsa.c | 41 ++++++++++++++++++- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c index 197a96f8ad13..6940afa7f2a1 100644 --- a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c +++ b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/common.c @@ -368,8 +368,8 @@ static int __init rtl83xx_mdio_probe(struct rtl838x_switch_priv *priv) /* Enable PHY control via SoC */ if (priv->family_id == RTL8380_FAMILY_ID) { - /* Enable PHY control via SoC */ - sw_w32_mask(0, BIT(15), RTL838X_SMI_GLB_CTRL); + /* Enable SerDes NWAY and PHY control via SoC */ + sw_w32_mask(BIT(7), BIT(15), RTL838X_SMI_GLB_CTRL); } else { /* Disable PHY polling via SoC */ sw_w32_mask(BIT(7), 0, RTL839X_SMI_GLB_CTRL); diff --git a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c index 512f5351bf17..f7b9aca7a7c0 100644 --- a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c +++ b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c @@ -344,6 +344,44 @@ static int rtl83xx_phylink_mac_link_state(struct dsa_switch *ds, int port, return 1; } + +static void rtl83xx_config_interface(int port, phy_interface_t interface) +{ + u32 old, int_shift, sds_shift; + + switch (port) { + case 24: + int_shift = 0; + sds_shift = 5; + break; + case 26: + int_shift = 3; + sds_shift = 0; + break; + default: + return; + } + + old = sw_r32(RTL838X_SDS_MODE_SEL); + switch (interface) { + case PHY_INTERFACE_MODE_1000BASEX: + if ((old >> sds_shift & 0x1f) == 4) + return; + sw_w32_mask(0x7 << int_shift, 1 << int_shift, RTL838X_INT_MODE_CTRL); + sw_w32_mask(0x1f << sds_shift, 4 << sds_shift, RTL838X_SDS_MODE_SEL); + break; + case PHY_INTERFACE_MODE_SGMII: + if ((old >> sds_shift & 0x1f) == 2) + return; + sw_w32_mask(0x7 << int_shift, 2 << int_shift, RTL838X_INT_MODE_CTRL); + sw_w32_mask(0x1f << sds_shift, 2 << sds_shift, RTL838X_SDS_MODE_SEL); + break; + default: + return; + } + pr_debug("configured port %d for interface %s\n", port, phy_modes(interface)); +} + static void rtl83xx_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode, const struct phylink_link_state *state) @@ -377,10 +415,11 @@ static void rtl83xx_phylink_mac_config(struct dsa_switch *ds, int port, reg = sw_r32(priv->r->mac_force_mode_ctrl(port)); /* Auto-Negotiation does not work for MAC in RTL8390 */ if (priv->family_id == RTL8380_FAMILY_ID) { - if (mode == MLO_AN_PHY) { + if (mode == MLO_AN_PHY || phylink_autoneg_inband(mode)) { pr_debug("PHY autonegotiates\n"); reg |= BIT(2); sw_w32(reg, priv->r->mac_force_mode_ctrl(port)); + rtl83xx_config_interface(port, state->interface); return; } }