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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 30BC4C4167B for ; Thu, 30 Nov 2023 20:35:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=F89e1qZwFUWT8XXzdM+kWAMM/VyWa3Q6pLfem9HIhw0=; b=2RyZ1VM82w7qGL 4YLWkiTR44M5MnbXYOJ8cMlsumBygZQLv+wPHcPRqiFI2oFnYe9SkeIM5C7ZNOukahqrojcMsd6Qr 15IM6R5iSRMVak8hjUsXlcvebJqOLu2Xm+lxRO8QxcexXUy3kcSutiJd5fJrMDAJMlodOG3XCAh83 mXu6L3Bii6c8OiGCcPtnHoS3iyil1vYepNiPz2ua/dqjQzKuw6jXZdkEt+VVVMMUkMvIqiGSe7JtV qU0cM/FyyRh/9l7iHPfohbV3x8e6V1cS5/ubnxD+tsPoLPLMG7CoYacIlSvBVK+0Nc1H5QjZ+h/Jc s/I63Eq3UUBr/9aasyig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r8nkQ-00BrtX-0c; Thu, 30 Nov 2023 20:34:58 +0000 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r8nkM-00Brqg-1a for linux-arm-kernel@lists.infradead.org; Thu, 30 Nov 2023 20:34:56 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 4FFB8240006; Thu, 30 Nov 2023 20:34:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1701376488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IzQ3On710hTv4xHUxSRSe52ROEYKFUSjwFd+FRw9ZWo=; b=ZDiYNDVjFXSdd+LTZVKANyqlnEkTWiTR8yc/VLuFsekCuu17tQQuKYpOMDajW5APgyyZgn K/c4zgpvDVG+cc2AUL7Bo/kTCLhhz+QBP1BknOrBANFqUrIU9nnWBdMTcyHg44TN4JAuCU 1L+grucTiVpIrmCYvcsvxcBaFj0opmJp6PWECQ0NsgXWyKBlp2eMcWvfnj2uuYgatUS1wI bQIhD6vcX0DlHmnQNKoXgzm4ogPNiRCBhbtPqU5k2scwA3MTTyGvgf8E3jSLWwnf9uqbiM aHV/8bpcShrEg/vqzSLYKYmJ4+jHTjP5zGv3rKUmt7UINkA+DanGsptTm8CfSw== Date: Thu, 30 Nov 2023 21:34:41 +0100 From: Maxime Chevallier To: Serge Semin Cc: Andrew Lunn , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Tomer Maimon , davem@davemloft.net, avifishman70@gmail.com, venture@google.com, openbmc@lists.ozlabs.org, robh+dt@kernel.org, tali.perry1@gmail.com, mcoquelin.stm32@gmail.com, edumazet@google.com, joabreu@synopsys.com, joel@jms.id.au, krzysztof.kozlowski+dt@linaro.org, peppe.cavallaro@st.com, j.neuschaefer@gmx.net, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, benjaminfair@google.com Subject: Re: [Linux-stm32] [PATCH v1 2/2] net: stmmac: Add NPCM support Message-ID: <20231130213441.032a661c@device.home> In-Reply-To: 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> <25d0c091-3dce-4d62-a112-c82106809c65@lunn.ch> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) MIME-Version: 1.0 X-GND-Sasl: maxime.chevallier@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231130_123454_836032_B5E323AD X-CRM114-Status: GOOD ( 19.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, On Thu, 30 Nov 2023 22:59:32 +0300 Serge Semin wrote: > On Thu, Nov 30, 2023 at 06:26:13PM +0100, Andrew Lunn wrote: > > > I will check with the xpcs maintainer how can we add indirect access > > > to the xpcs module. > > > > https://elixir.bootlin.com/linux/latest/source/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c#L449 > > > > It creates a regmap for the memory range. On top of that it creates an > > MDIO bus. You can then access the PCS in the normal way. > > Actually Synopsys DW XPCS can be synthesized with two types of the CSR > interfaces: > 1. MDIO: device looks as a normal MDIO device. This option is currently > supported by the STMMAC MDIO driver. > 2. MCI/APB3: device MMD CSRs are directly (all CSRs are visible) or > indirectly (paged-base access) accessible over the system memory bus. > > In addition to the above XPCS device can be equipped with separate > clock sources (at least to feed the MCI or APB3 interface) and may > have dedicated IRQ line to signal various events like link > establishing, failures, etc. From that perspective XPCS in both cases > looks as a normal platform device for which would be better to have a > special DT-node defined with all those resources supplied. Then the > XPCS DT-node could be passed to the DW MAC DT-node via the already > standardized "pcs-handle" DT-property. To my understanding, this should work, there's another PCS that works this way : https://elixir.bootlin.com/linux/v6.7-rc3/source/drivers/net/pcs/pcs-rzn1-miic.c Are you still able to use the mdio-regmap glue that Andrew mentioned, to avoid the duplication between the mdio and mmio register accesses ? Maxime _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel