Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5866806rwi; Sun, 23 Oct 2022 13:34:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM54IoLnW+5cRp0SFkdfBFdDFItlKAwjzvdXjkS+syXApNnsOG5BL/gVOml4Af3bpV7O/Gy9 X-Received: by 2002:a05:6402:1348:b0:461:c056:bf65 with SMTP id y8-20020a056402134800b00461c056bf65mr2232627edw.414.1666557240141; Sun, 23 Oct 2022 13:34:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666557240; cv=none; d=google.com; s=arc-20160816; b=h6hOFUMMDBpdspR+UgkqcVHopisgJYg+ZEK3jVoV9/b8LgGuUhFi5wZHqHZgZ0FMXC xX6j4Bx9OOLCf4a+mXls/ZQsMa2jImqL2+x8ingc4qiiLk9Ml+0cBzOTOD2ZgfMM0O41 N5RjgaVq54agtfA7CH83kPpwwenB0qia+cwED++iSv6TDBcE2yYKIbiZt7t4Cm6Wu1Mp Gy7Zqr1Dhpsgc79S5p5qaXZZ0nw28N1ILQoObaJ+BT3G9BEQnbW9jPwC4uYLaw6JK6Qi T+bLnrV+2fXJX9aCiu64RygpIIEWZ6rBmRH4mDlitV53mfqfgnDXTE5Pz7dcjh8TgpoW MLUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=/JdFeK5UqtCYSbJ/pLvnPqPwekVxocfsCax4PKOecpI=; b=D7C3SKyXHZrKO4t05eYijfjfqAmqxLoHFL8zXea9SpI4jU9/uD3TrFVhCDrOfUhzsI wKrEXNejl01sd/fLMVJt2DyI7N/T3Wou9LscMmtHdeEohtIXS+RkxvwuW34WrAQKzbyN xE/o9tG0EI14eKB5juw9qnfQDX8yoQ59I3sm/6WdxMOZluu/2/3FO0THEbdxS2oO/EWK bAnxQOflEbIJ80OrAWWzGVLCplMkCgaUwvgGnCLnr83W+sit6T16QU24kr6gM3NGIw8Z XkFOqHsuN2HCXqGugM/2vPB0lIIUaXZswbTIY0fvkgaxk0MQZrFEim4RQrVKFcJ80kGe BwQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=1SSq7k+w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he6-20020a1709073d8600b0078d9c781853si27015786ejc.607.2022.10.23.13.33.35; Sun, 23 Oct 2022 13:34:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=1SSq7k+w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230514AbiJWUKK (ORCPT + 99 others); Sun, 23 Oct 2022 16:10:10 -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) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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!