[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aUMCPKicgsoICAJ0@lizhi-Precision-Tower-5810>
Date: Wed, 17 Dec 2025 14:19:24 -0500
From: Frank Li <Frank.li@....com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Chester Lin <chester62515@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
Conor Dooley <conor+dt@...nel.org>,
"David S. Miller" <davem@...emloft.net>, devicetree@...r.kernel.org,
Eric Dumazet <edumazet@...gle.com>,
Fabio Estevam <festevam@...il.com>,
Ghennadi Procopciuc <ghennadi.procopciuc@....nxp.com>,
imx@...ts.linux.dev, Jakub Kicinski <kuba@...nel.org>,
Jan Petrous <jan.petrous@....nxp.com>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Lee Jones <lee@...nel.org>, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
Matthias Brugger <mbrugger@...e.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>, netdev@...r.kernel.org,
NXP S32 Linux Team <s32@....com>, Paolo Abeni <pabeni@...hat.com>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Rob Herring <robh@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Shawn Guo <shawnguo@...nel.org>, linaro-s32@...aro.org
Subject: Re: [PATCH v2 0/4] s32g: Use a syscon for GPR
On Tue, Dec 16, 2025 at 09:30:08PM +0300, Dan Carpenter wrote:
> On Tue, Dec 16, 2025 at 09:42:06AM -0500, Frank Li wrote:
> > > >
> > > > Why not implement standard phy interface,
> > > > phy_set_mode_ext(PHY_MODE_ETHERNET, RGMII);
> > > >
> > > > For example: drivers/pci/controller/dwc/pci-imx6.c
> > > >
> > > > In legency platform, it use syscon to set some registers. It becomes mess
> > > > when more platform added. And it becomes hard to convert because avoid
> > > > break compatibltiy now.
> > > >
> > > > It doesn't become worse since new platforms switched to use standard
> > > > inteface, (phy, reset ...).
> > > >
> > >
> > > This happens below that layer, this is just saying where the registers
> > > are found. The GMAC_0_CTRL_STS is just one register in the GPR region,
> > > most of the others are unrelated to PHY.
> >
> > The other register should work as other function's providor with mfd.
> >
>
> Syscons are a really standard way to do register accesses.
It is quite like back door. Many clock/reset also use phandle to node to
controller by raw register read/write.
> The
> pci-imx6.c driver you mentioned earlier does it that way...
It is not preferred when we tried to add new one. Give me some time to look
for original threads.
> The only
> thing which my code does differently is I put the offset into the
> phandle, but that's not so unusual and it's arguably a cleaner way
> because now both the base address and offset are in the same file.
It is not big deal about offset. The key is if use phande to direct access
other module's register.
Frank
>
> regards,
> dan carpenter
>
Powered by blists - more mailing lists