From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7A25C3A59D for ; Sun, 23 Oct 2022 20:10:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230486AbiJWUKI (ORCPT ); Sun, 23 Oct 2022 16:10:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230298AbiJWUKG (ORCPT ); Sun, 23 Oct 2022 16:10:06 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50230367BB; Sun, 23 Oct 2022 13:10:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=/JdFeK5UqtCYSbJ/pLvnPqPwekVxocfsCax4PKOecpI=; b=1SSq7k+wJpBurFDYPIDbQdlDgz 77y4+U4FgH6oIyqAcjeDy2F22LUM24UJJDyKRwTgfd0Zlbyg9hKU5o0VNPBe8tGuOrasxyI9I4fo5 AGIfWkDzf3IYcrmiNsTY5/vUEUl6uBKQ7yjApIfbgi3sKxbo+YtSUev2PRNJu0OySkRum4RF7hwxb LJXDrjrvuuFUsYKUPP4pppU6TlFIy+iWG30ThEWuNUwj1Ayj9Bhrc/olMxhiMrIWK40TACFc3RRHj j62ugn3OVaogAn35DnvNbGc+02VjnD9iAAOE+IDuvHPIr/eJxWFgvgkGwHtnQf1r8fQX1jqiPjwUu oiJJ2SPQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:34916) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1omhHr-0002GD-R1; Sun, 23 Oct 2022 21:09:35 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1omhHf-0006NE-Ap; Sun, 23 Oct 2022 21:09:23 +0100 Date: Sun, 23 Oct 2022 21:09:23 +0100 From: "Russell King (Oracle)" To: Frank Wunderlich Cc: Frank Wunderlich , linux-mediatek@lists.infradead.org, Alexander Couzens , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: Re: Re: [PATCH v2] net: mtk_sgmii: implement mtk_pcs_ops Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sun, Oct 23, 2022 at 09:21:37PM +0200, Frank Wunderlich wrote: > > Gesendet: Sonntag, 23. Oktober 2022 um 21:03 Uhr > > Von: "Frank Wunderlich" > > > if you fix this typo you can send the patch and add my tested-by: > > > > regmap_read(mpcs->regmap, SGMSYS_SGMII_MODE, &val); > > - if (interface = == PHY_INTERFACE_MODE_SGMII) > > + if (interface == PHY_INTERFACE_MODE_SGMII) > > val |= SGMII_IF_MODE_BIT0; > > else > > val &= ~SGMII_IF_MODE_BIT0; > > > > should i send an update for my patch including this: > > > > state->duplex = DUPLEX_FULL; > > > > or do you want to read the duplex from the advertisement like stated before? > > > > regmap_read(mpcs->regmap, SGMSYS_PCS_CONTROL_1, &bm); > > regmap_read(mpcs->regmap, SGMSYS_PCS_CONTROL_1 + 8, &adv); > > > > phylink_mii_c22_pcs_decode_state(state, bm >> 16, adv >> 16); > > with the phylink-helper it works too > > https://github.com/frank-w/BPI-R2-4.14/commits/6.1-r3-sgmii2 This is amazingly great news - we now know how to configure this hardware! Let me cook up a proper set of patches for tomorrow - if that's okay. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!