Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp468956rdb; Thu, 30 Nov 2023 09:18:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IETlw3l3JVvvve+26MvPhlKUCdj6LYc9S8hBa8gOepwCScOeX1mGYDvWBwVnXx0lEQRARVv X-Received: by 2002:a05:6a20:8403:b0:18a:d7a8:5e5a with SMTP id c3-20020a056a20840300b0018ad7a85e5amr34333170pzd.58.1701364688012; Thu, 30 Nov 2023 09:18:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701364688; cv=none; d=google.com; s=arc-20160816; b=FL38hBvTO5XbaGdsuwt5xMpkA9+d17omlWlI8tA48zHOg16sZDIytz61Xv0xNxPGDf YZlcapM/kdNBupdLaHjXHYfr8+rq95fmPaoEhdp5woJdTWEPdQs+bmp6BH3ocwJCp9N2 cUtHa7Bmw8kfFBYVRN1y2SLxE12uMrK8zSy09xSyCimR4bABd6D2PiKC47WqN0qTp2IX Kjep0DwyK1xfa8l7ELQpLeIzjbB4o9OR57F7KNZ9Q+Kiz7/6n+9XaBGTHWALKkMkCVg4 xOvE9AI8WeJYz/KkVZxj6qaX1R6G7Pr6aDUdzMmUP6NgIfLKnSOs4Rr3hs0gYYXXkTEv 5h6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=S4ItrsGzT/WvTQH/WrTuyHNbLnHImVbBz/zIs/Lb/tg=; fh=Ro4G+9lvn+KGg51C9N8KXvAXm3ZGou9+X/eOgDc9YmQ=; b=ZKbt+EPK3ZqLcGhEKivmimrR3ytbW4OzFKQEfUfsjfb0cYm6Rnp8DLB/u7Fdt/MAms YVvcQ4DCF/0bnHS94FqMBR7D6/Hbq9wgwkJMaOMsLrLrq94fsnLlmZE02AeFNwgYNX/a 4bj/BY/pp1j47BIrAEseSnuZP8KjveO/BvA9aNd1//BxY53muqcvJC0UB/w0Zq4ZJxoX 7Kny2K7pEOg3x0KGaIC8xRcXSy5j2U40mu8MbTxc2TZS0YYMUOddy1VY7qxaHtTOe2xB CylpCN0aahwTC2Eqdhytpsfv0jtT4KeYUChwa9ex7RVM/3f9CC5vBKsg+Bkk7rl5MQGB RSEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=D2FEZlcJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id x12-20020a17090a9dcc00b00283a1123a02si3996413pjv.96.2023.11.30.09.18.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 09:18:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=D2FEZlcJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 9F3C780D15B2; Thu, 30 Nov 2023 09:18:04 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345795AbjK3RRt (ORCPT + 99 others); Thu, 30 Nov 2023 12:17:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235300AbjK3RRi (ORCPT ); Thu, 30 Nov 2023 12:17:38 -0500 Received: from mail-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5A6C1996; Thu, 30 Nov 2023 09:17:34 -0800 (PST) Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-5d05ff42db0so13790077b3.2; Thu, 30 Nov 2023 09:17:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701364654; x=1701969454; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=S4ItrsGzT/WvTQH/WrTuyHNbLnHImVbBz/zIs/Lb/tg=; b=D2FEZlcJWvOhJwSUEllnY2RaHaeX8OZfOZQLJ5Z5sknSuwjswt2HHR3PN1DF5hfwzl UbtX7PSxHGHh5LFsB6ZdtPIW3LIQNHp6Aip7lsazOOEYBP/pNqvaVDdSBxokEmh3hKp2 KkEcIUAXFzCnp/hzWWrKREjwPuVudeOkVg8JcK7fxWXTT9aB+ua1tSHBcrBtjTH2G2ux OGHS8p4uEbr3DqZON9iOVEZ/Pqrk0p6/jr0mSt0pFUYqVR3fZVGo7r/BQU+I1EJfyDA3 Q74Id7NgMsQRNyDXJrCvaMbOwzgtga0/98/MAxSqX+r/ICSv/NmAi9skxoQ/6v0KTASt jkog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701364654; x=1701969454; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=S4ItrsGzT/WvTQH/WrTuyHNbLnHImVbBz/zIs/Lb/tg=; b=EuBsZRKLZIY3QTmptgRROHNxT6mYeeObhU+k530HoqlnUJnLQkglAMvXs6qs8UbX2Z 7jTa8gWiYqfoDBGYGZlnDx0RWWmtT4lKoi8IPO73TWh6UbitkpMNWuVU+1YX4ZV8oWii bn3riWe+cXEjsbrzCSpyecpg9YZ8OH0T28C+3kiLBNxf5/V8a1KdCfPvT7VZwUeYDL8a A7XRTdjjx9yB/Ewp6uBGQBkPo6kKET2oNqc8jEnpbHcB61jAQe7xDpEYwfSJcC1nPAxD AS/bM7Unc495l5zybtglBlOC8Qr1g3FgFGG4CMn8qm+M/5FdHncT0cJGvKz5mom41QUF uZwQ== X-Gm-Message-State: AOJu0YxDZdnBSQ/+VgyG/aJmWKWiJ68R89IkczUpzL8AfORtkASKlbKb 3AtUgzhrv0fyVza2GeOcV3y6PsLa75OgAU6krzI= X-Received: by 2002:a0d:f2c7:0:b0:5cd:3d82:1ac6 with SMTP id b190-20020a0df2c7000000b005cd3d821ac6mr21961033ywf.42.1701364653930; Thu, 30 Nov 2023 09:17:33 -0800 (PST) MIME-Version: 1.0 References: <20231121151733.2015384-1-tmaimon77@gmail.com> <20231121151733.2015384-3-tmaimon77@gmail.com> <6aeb28f5-04c2-4723-9da2-d168025c307c@lunn.ch> <9ad42fef-b210-496a-aafc-eb2a7416c4df@lunn.ch> In-Reply-To: From: Tomer Maimon Date: Thu, 30 Nov 2023 19:17:22 +0200 Message-ID: Subject: Re: [PATCH v1 2/2] net: stmmac: Add NPCM support To: Andrew Lunn Cc: alexandre.torgue@foss.st.com, tali.perry1@gmail.com, edumazet@google.com, krzysztof.kozlowski+dt@linaro.org, linux-stm32@st-md-mailman.stormreply.com, benjaminfair@google.com, openbmc@lists.ozlabs.org, joabreu@synopsys.com, joel@jms.id.au, devicetree@vger.kernel.org, j.neuschaefer@gmx.net, robh+dt@kernel.org, peppe.cavallaro@st.com, linux-arm-kernel@lists.infradead.org, avifishman70@gmail.com, venture@google.com, linux-kernel@vger.kernel.org, mcoquelin.stm32@gmail.com, netdev@vger.kernel.org, davem@davemloft.net Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 30 Nov 2023 09:18:04 -0800 (PST) Hi Andrew, On Wed, 29 Nov 2023 at 01:31, Andrew Lunn wrote: > > On Mon, Nov 27, 2023 at 05:19:15PM +0200, Tomer Maimon wrote: > > Hi Andrew, > > > > I took a look at the xpcs driver and the stmmac driver and it doesn't > > cover NPCM use. > > > > in the NPCM case the stmmac ID=0x37 therefore the driver is linked to DWMAC1000 > > https://elixir.bootlin.com/linux/v6.7-rc2/source/drivers/net/ethernet/stmicro/stmmac/hwif.c#L139 > > > > to enable the xpcs, the stmmac should support xgmac or gmac4 and in > > the NPCM is support only gmac. > > https://elixir.bootlin.com/linux/v6.7-rc2/source/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c#L555 > > https://elixir.bootlin.com/linux/v6.7-rc2/source/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c#L573 > > > > and the most important thing is that the XPCS is handled through an > > indirect register access and not through MDIO. the MDIO is connected > > to the external PHY and not to the XPCS. > > What really matters here is, is the PCS hardware block you have an > XPCS? We don't want two drivers for the same block of hardware. > > MDIO vs indirect register access can be solved with a bit of > layering. That is not a reason to write a second driver. I will check with the xpcs maintainer how can we add indirect access to the xpcs module. > > Andrew Thanks. Tomer