Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4214768rdh; Tue, 28 Nov 2023 15:32:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IGR441noZpLbaSuNq0Xp++nIKpAcBN3/UlW2Q/VsltsX/h9Tyx8qR1dowdK+K9c7CACxZXZ X-Received: by 2002:a05:6a20:3d85:b0:18b:af9d:438f with SMTP id s5-20020a056a203d8500b0018baf9d438fmr18658402pzi.49.1701214336805; Tue, 28 Nov 2023 15:32:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701214336; cv=none; d=google.com; s=arc-20160816; b=j8La1aSiVFtR9lcBFKi4jvZduGUmpCxHGydrbDju4S7txD4cz5gZrJYvnhYK732VCq QUtM74Fn4yd4mg5wuxrP3myEZuvT/b26y/kElFLn7UtVIccQH09orKN+rBZ55Yxh+jQV v1Dd+ad2iizYkYgB+Slh9Ukn18U3JKQoflb3nZZDqLHTOBl/GzoDU37cyUT2o+0/HEGa f4ggIpgVEAPttyiUqJnBiTBfnmek6LeiwlAkdz/cOVRamHZzj3oi9cbvaH0ThEIjDscU tOf94JtyXyXJvzJREVJQ1Ti2PfzR1L4gwUw/mkcS1uP6S1GjBSbhiWp99MwVv8K/W6Q3 TgdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lFBU8IhjZL/WEnPoZ4ruJNwwW8kAAIaljT/PQim0kSI=; fh=SQHUSLZOByHXzKKaCWG3qmEyW2ICHjQMHJx9M+ZY0DM=; b=Il7A3h7KWnzAEIaX5tWZykocEv0qXneIEIO1WnWYR3rSZ/K3N763jRSb1TdeQ6jrqv 3NMKrK84BF3UwMCwMBpWZz4ein9YNk7eyo9EqWnqHdADxMJ8c9ZNsreK308eLJ4C5+sP DXezwJkTxDYAwyMKD+WW7K1RZ5MdX322zmTLes6CGB3J4FV+dk9c3dV9eKwDI66HRHin x4ashNsb9Q7RVSFg9T7RO9+G+yDzggpfpCEWmF4rjtQF2RDYesTfWikV+X/8oitbR44n /RvBQSrs68d3uaQfRIbXzCz/sV4j9/t+tsK+vFPO1OVvMpqYawwaAmo3Shn44jpGXCzX G9Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=NQzUHNNU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id h69-20020a638348000000b005ad8009e304si13153712pge.784.2023.11.28.15.32.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 15:32:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=NQzUHNNU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 249C580A4AED; Tue, 28 Nov 2023 15:32:14 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376512AbjK1Xbo (ORCPT + 99 others); Tue, 28 Nov 2023 18:31:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231400AbjK1Xbm (ORCPT ); Tue, 28 Nov 2023 18:31:42 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 852EB19B2; Tue, 28 Nov 2023 15:31:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=lFBU8IhjZL/WEnPoZ4ruJNwwW8kAAIaljT/PQim0kSI=; b=NQzUHNNU2uQcmDwAFa9P8JXdwa KNs/FBr7pBpV7mPRdpVrUqxZCBMEyFoOseyV8MTcUfSUhveQNlolMDdvVLSvC8bBzEDReKfzyD/0j Hu0XLDi+Ya19v1nH1zbhS3I0Qtqxkz7nXdL2x5xZEqdENrxvAEB79yCS74JHy16q+anU=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1r87Y1-001VRR-9G; Wed, 29 Nov 2023 00:31:21 +0100 Date: Wed, 29 Nov 2023 00:31:21 +0100 From: Andrew Lunn To: Tomer Maimon 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 Subject: Re: [PATCH v1 2/2] net: stmmac: Add NPCM support Message-ID: 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 fry.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 (fry.vger.email [0.0.0.0]); Tue, 28 Nov 2023 15:32:14 -0800 (PST) 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. Andrew