Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2306445rwi; Fri, 21 Oct 2022 02:13:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6i5UwsHgDull2+bqbSR+koMZupoQRDqeV3F+aLFbA4GKx4cKowX9cIS3/zblP5SEAAY1ei X-Received: by 2002:a63:874a:0:b0:46e:bcc0:c69d with SMTP id i71-20020a63874a000000b0046ebcc0c69dmr1333319pge.89.1666343622216; Fri, 21 Oct 2022 02:13:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666343622; cv=none; d=google.com; s=arc-20160816; b=OFZj/McrxgaxgS3JCA74Pshyn4pQL2WLB0iNIe5CF3kTSbMCUZKEWcSbvoqZidX5Na /aGzztg2HuZkvCs0dKYkeJRZJz0F47Bny/KI17IMrjZao87dOoZQ4Mu5bITeZQ9dtgyC IB6Gre6Iv3zC5tLnIJOHvDMVJbrTk9hW90BuYhbyK23zGKZJ26Ng8nCjGH2oHQhmeLCk YwRLv8XWoOQ+yM22Pc6yKAGU/deBjD9pyWNgt31RozAdcNOMoXaijp4tkpT8QcBdzpud +8lpvpgUXDDaLCVH2ZkF9zITUG86VJPlYmZBwijckTQ2DbdEK6h5GUuuevvPQnee2Wmm t8ng== 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=Btl6lB7/jBAwJDOo52HZvR/bEdbyeTvFLPuY3K4Zko0=; b=DDpnr59mqv2E9pCn6WjxsItFAQwNIdm4/d85Ui6zIhHkSx5PgpGvU4RELO/L3WsMLC 42LgYMINzXz8aWd9DD8p16pAVJ0s6L9yMsy8X2t26tpdUYdrCTAOr8sb1nRd018KeLX8 Sll2iZK+CxlHuOCldkXUvQxdpkycx0Ft5KieQ11tDq51gW35p6sOZBJgic1K2DLSgRUn BFM1wNPfitftFGMEeh6TOIePfFkQXkGexhTefSYWm3tHjjtEEZp+tkhd87VPwPkHy+Ly jVHudPbIeiiB/7IDGbCI8/gXLoI9kt/613nXO3MgoBv1SahsX91F953uW49eaE/54a6K /Vbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=pyplzieD; 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 e2-20020a170902cf4200b001852d369de4si7071256plg.478.2022.10.21.02.13.30; Fri, 21 Oct 2022 02:13:42 -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=pyplzieD; 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 S230459AbiJUJGs (ORCPT + 99 others); Fri, 21 Oct 2022 05:06:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230434AbiJUJGp (ORCPT ); Fri, 21 Oct 2022 05:06:45 -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 A914A1B65D4; Fri, 21 Oct 2022 02:06:43 -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=Btl6lB7/jBAwJDOo52HZvR/bEdbyeTvFLPuY3K4Zko0=; b=pyplzieDCI1Jkh1GoGLbvsYVVx uHCqQJzf9myydjTTCZyJlfAgIL1Ad0QHfgNBMrbpvkz7KgN1NltByM6anYZbVpEgik+sT8GiBRbAT 003jASt0qJW3q47hyaUXY64m2CxLNu4WQ7Emdhdc804IodgwWCgGWPPZN6k0zHLCnvWsiAGQf5Ue8 V/plhE17pQYby+ANZNCJzfQM3Bk0iBn/UjzZcx62Xbi8kABllHXJLFTR+reIcdzdrFJHv5LHpqIi6 hJLuuJb6YzhZpjpzeiql/TKGeFMOoYRkwlvDaqIW6SALh19LUTHxkNhnXwgZKfqymljlkOrHSfqOF NU6e4DpQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:34856) 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 1olnz3-0008Q4-Ka; Fri, 21 Oct 2022 10:06:29 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1olnyz-00042A-Dw; Fri, 21 Oct 2022 10:06:25 +0100 Date: Fri, 21 Oct 2022 10:06:25 +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: [PATCH v2] net: mtk_sgmii: implement mtk_pcs_ops Message-ID: References: <20221020144431.126124-1-linux@fw-web.de> <02A54E45-2084-440A-A643-772C0CC9F988@public-files.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <02A54E45-2084-440A-A643-772C0CC9F988@public-files.de> 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, URIBL_BLOCKED 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 Fri, Oct 21, 2022 at 08:04:51AM +0200, Frank Wunderlich wrote: > I have no register documentation to check if there is any way to read out pause/duplex setting. Maybe MTK can answer this or extend function later. I suspect we can probably guess. Looking at SGMSYS_PCS_CONTROL_1, this is actually the standard BMCR in the low 16 bits, and BMSR in the upper 16 bits, so: At address 4, I'd expect the PHYSID. At address 8, I'd expect the advertisement register in the low 16 bits and the link partner advertisement in the upper 16 bits. Can you try an experiment, and in mtk_sgmii_init() try accessing the regmap at address 0, 4, and 8 and print their contents please? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!