* [PATCH v4 1/3] net: stmmac: s32: use a syscon for S32_PHY_INTF_SEL_RGMII
2026-01-23 19:51 [PATCH v4 0/3] s32g: Use a syscon for GPR Dan Carpenter
@ 2026-01-23 19:51 ` Dan Carpenter
2026-01-26 15:24 ` [v4,1/3] " Simon Horman
2026-01-23 19:51 ` [PATCH v4 2/3] dt-bindings: net: nxp,s32-dwmac: Use the GPR syscon Dan Carpenter
2026-01-23 19:51 ` [PATCH v4 3/3] dts: s32g: Add GPR syscon region Dan Carpenter
2 siblings, 1 reply; 10+ messages in thread
From: Dan Carpenter @ 2026-01-23 19:51 UTC (permalink / raw)
To: Jan Petrous
Cc: s32, Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Maxime Coquelin, Alexandre Torgue, netdev,
linux-stm32, linux-arm-kernel, linux-kernel, Frank Li, linaro-s32,
imx
On the s32 chipsets the GMAC_0_CTRL_STS register is in GPR region.
Originally, accessing this register was done in a sort of ad-hoc way,
but we want to use the syscon interface to do it.
This is a little bit ugly because we have to maintain backwards
compatibility to the old device trees so we have to support both ways
to access this register.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
v3: no change
v2: no change
v1: Fix forward porting bug. s/PHY_INTF_SEL_RGMII/S32_PHY_INTF_SEL_RGMII/
.../net/ethernet/stmicro/stmmac/dwmac-s32.c | 23 +++++++++++++++----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
index 5a485ee98fa7..2e6bb41f49e1 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
@@ -11,12 +11,14 @@
#include <linux/device.h>
#include <linux/ethtool.h>
#include <linux/io.h>
+#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of_mdio.h>
#include <linux/of_address.h>
#include <linux/phy.h>
#include <linux/phylink.h>
#include <linux/platform_device.h>
+#include <linux/regmap.h>
#include <linux/stmmac.h>
#include "stmmac_platform.h"
@@ -32,6 +34,8 @@
struct s32_priv_data {
void __iomem *ioaddr;
void __iomem *ctrl_sts;
+ struct regmap *sts_regmap;
+ unsigned int sts_offset;
struct device *dev;
phy_interface_t *intf_mode;
struct clk *tx_clk;
@@ -40,7 +44,10 @@ struct s32_priv_data {
static int s32_gmac_write_phy_intf_select(struct s32_priv_data *gmac)
{
- writel(S32_PHY_INTF_SEL_RGMII, gmac->ctrl_sts);
+ if (gmac->ctrl_sts)
+ writel(S32_PHY_INTF_SEL_RGMII, gmac->ctrl_sts);
+ else
+ regmap_write(gmac->sts_regmap, gmac->sts_offset, S32_PHY_INTF_SEL_RGMII);
dev_dbg(gmac->dev, "PHY mode set to %s\n", phy_modes(*gmac->intf_mode));
@@ -125,10 +132,16 @@ static int s32_dwmac_probe(struct platform_device *pdev)
"dt configuration failed\n");
/* PHY interface mode control reg */
- gmac->ctrl_sts = devm_platform_get_and_ioremap_resource(pdev, 1, NULL);
- if (IS_ERR(gmac->ctrl_sts))
- return dev_err_probe(dev, PTR_ERR(gmac->ctrl_sts),
- "S32CC config region is missing\n");
+ gmac->sts_regmap = syscon_regmap_lookup_by_phandle_args(dev->of_node,
+ "nxp,phy-sel", 1, &gmac->sts_offset);
+ if (gmac->sts_regmap == ERR_PTR(-EPROBE_DEFER))
+ return PTR_ERR(gmac->sts_regmap);
+ if (IS_ERR(gmac->sts_regmap)) {
+ gmac->ctrl_sts = devm_platform_get_and_ioremap_resource(pdev, 1, NULL);
+ if (IS_ERR(gmac->ctrl_sts))
+ return dev_err_probe(dev, PTR_ERR(gmac->ctrl_sts),
+ "S32CC config region is missing\n");
+ }
/* tx clock */
gmac->tx_clk = devm_clk_get(&pdev->dev, "tx");
--
2.51.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [v4,1/3] net: stmmac: s32: use a syscon for S32_PHY_INTF_SEL_RGMII
2026-01-23 19:51 ` [PATCH v4 1/3] net: stmmac: s32: use a syscon for S32_PHY_INTF_SEL_RGMII Dan Carpenter
@ 2026-01-26 15:24 ` Simon Horman
2026-01-26 15:33 ` Russell King (Oracle)
0 siblings, 1 reply; 10+ messages in thread
From: Simon Horman @ 2026-01-26 15:24 UTC (permalink / raw)
To: dan.carpenter
Cc: Simon Horman, robh, kuba, festevam, ghennadi.procopciuc,
alexandre.torgue, linux-kernel, andrew+netdev, shawnguo, mbrugger,
mcoquelin.stm32, linaro-s32, davem, s.hauer, edumazet,
linux-arm-kernel, imx, conor+dt, krzk+dt, devicetree, Frank.li,
chester62515, netdev, kernel, pabeni, jan.petrous, linux-stm32,
s32
This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
---
net: stmmac: s32: use a syscon for S32_PHY_INTF_SEL_RGMII
This commit adds syscon/regmap support for accessing the GMAC_0_CTRL_STS
register on s32 chipsets, while maintaining backwards compatibility with
the existing direct MMIO approach for older device trees.
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
> index 5a485ee98fa7..2e6bb41f49e1 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
[ ... ]
> @@ -40,7 +44,10 @@ struct s32_priv_data {
>
> static int s32_gmac_write_phy_intf_select(struct s32_priv_data *gmac)
> {
> - writel(S32_PHY_INTF_SEL_RGMII, gmac->ctrl_sts);
> + if (gmac->ctrl_sts)
> + writel(S32_PHY_INTF_SEL_RGMII, gmac->ctrl_sts);
> + else
> + regmap_write(gmac->sts_regmap, gmac->sts_offset, S32_PHY_INTF_SEL_RGMII);
Should the regmap_write() return value be checked here? The function
returns int and the caller s32_gmac_init() checks the return value
expecting errors to be propagated. For comparison, dwmac-sun55i.c in
sun55i_gmac200_set_syscon() does check regmap_write() return value:
ret = regmap_write(regmap, SYSCON_REG, reg);
if (ret < 0)
return dev_err_probe(dev, ret, "Failed to write to syscon\n");
>
> dev_dbg(gmac->dev, "PHY mode set to %s\n", phy_modes(*gmac->intf_mode));
>
> return 0;
[ ... ]
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [v4,1/3] net: stmmac: s32: use a syscon for S32_PHY_INTF_SEL_RGMII
2026-01-26 15:24 ` [v4,1/3] " Simon Horman
@ 2026-01-26 15:33 ` Russell King (Oracle)
2026-01-26 16:01 ` Simon Horman
0 siblings, 1 reply; 10+ messages in thread
From: Russell King (Oracle) @ 2026-01-26 15:33 UTC (permalink / raw)
To: Simon Horman
Cc: dan.carpenter, robh, kuba, festevam, ghennadi.procopciuc,
alexandre.torgue, linux-kernel, andrew+netdev, shawnguo, mbrugger,
mcoquelin.stm32, linaro-s32, davem, s.hauer, edumazet,
linux-arm-kernel, imx, conor+dt, krzk+dt, devicetree, Frank.li,
chester62515, netdev, kernel, pabeni, jan.petrous, linux-stm32,
s32
On Mon, Jan 26, 2026 at 03:24:30PM +0000, Simon Horman wrote:
> This is an AI-generated review of your patch. The human sending this
> email has considered the AI review valid, or at least plausible.
>
> For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
> ---
> net: stmmac: s32: use a syscon for S32_PHY_INTF_SEL_RGMII
>
> This commit adds syscon/regmap support for accessing the GMAC_0_CTRL_STS
> register on s32 chipsets, while maintaining backwards compatibility with
> the existing direct MMIO approach for older device trees.
>
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
> > index 5a485ee98fa7..2e6bb41f49e1 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
>
> [ ... ]
>
> > @@ -40,7 +44,10 @@ struct s32_priv_data {
> >
> > static int s32_gmac_write_phy_intf_select(struct s32_priv_data *gmac)
> > {
> > - writel(S32_PHY_INTF_SEL_RGMII, gmac->ctrl_sts);
> > + if (gmac->ctrl_sts)
> > + writel(S32_PHY_INTF_SEL_RGMII, gmac->ctrl_sts);
> > + else
> > + regmap_write(gmac->sts_regmap, gmac->sts_offset, S32_PHY_INTF_SEL_RGMII);
>
> Should the regmap_write() return value be checked here? The function
> returns int and the caller s32_gmac_init() checks the return value
> expecting errors to be propagated. For comparison, dwmac-sun55i.c in
> sun55i_gmac200_set_syscon() does check regmap_write() return value:
>
> ret = regmap_write(regmap, SYSCON_REG, reg);
> if (ret < 0)
> return dev_err_probe(dev, ret, "Failed to write to syscon\n");
AI is wrong on this last line - s32_gmac_write_phy_intf_select() is
called from s32_gmac_init(), which is called from plat_dat->init.
plat_dat->init is called from two paths:
1. stmmac_pltfr_probe() -> stmmac_dvr_probe() -> plat_dat->init()
2. stmmac_resume() -> plat_dat->resume() -> stmmac_plat_resume() ->
stmmac_pltfr_init() -> plat_dat->init()
In the resume path, it is not appropriate to use dev_err_probe()
because we're not in the probe path.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [v4,1/3] net: stmmac: s32: use a syscon for S32_PHY_INTF_SEL_RGMII
2026-01-26 15:33 ` Russell King (Oracle)
@ 2026-01-26 16:01 ` Simon Horman
2026-01-27 8:55 ` Dan Carpenter
0 siblings, 1 reply; 10+ messages in thread
From: Simon Horman @ 2026-01-26 16:01 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: dan.carpenter, robh, kuba, festevam, ghennadi.procopciuc,
alexandre.torgue, linux-kernel, andrew+netdev, shawnguo, mbrugger,
mcoquelin.stm32, linaro-s32, davem, s.hauer, edumazet,
linux-arm-kernel, imx, conor+dt, krzk+dt, devicetree, Frank.li,
chester62515, netdev, kernel, pabeni, jan.petrous, linux-stm32,
s32
On Mon, Jan 26, 2026 at 03:33:54PM +0000, Russell King (Oracle) wrote:
> On Mon, Jan 26, 2026 at 03:24:30PM +0000, Simon Horman wrote:
> > This is an AI-generated review of your patch. The human sending this
> > email has considered the AI review valid, or at least plausible.
> >
> > For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
> > ---
> > net: stmmac: s32: use a syscon for S32_PHY_INTF_SEL_RGMII
> >
> > This commit adds syscon/regmap support for accessing the GMAC_0_CTRL_STS
> > register on s32 chipsets, while maintaining backwards compatibility with
> > the existing direct MMIO approach for older device trees.
> >
> > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
> > > index 5a485ee98fa7..2e6bb41f49e1 100644
> > > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
> > > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c
> >
> > [ ... ]
> >
> > > @@ -40,7 +44,10 @@ struct s32_priv_data {
> > >
> > > static int s32_gmac_write_phy_intf_select(struct s32_priv_data *gmac)
> > > {
> > > - writel(S32_PHY_INTF_SEL_RGMII, gmac->ctrl_sts);
> > > + if (gmac->ctrl_sts)
> > > + writel(S32_PHY_INTF_SEL_RGMII, gmac->ctrl_sts);
> > > + else
> > > + regmap_write(gmac->sts_regmap, gmac->sts_offset, S32_PHY_INTF_SEL_RGMII);
> >
> > Should the regmap_write() return value be checked here? The function
> > returns int and the caller s32_gmac_init() checks the return value
> > expecting errors to be propagated. For comparison, dwmac-sun55i.c in
> > sun55i_gmac200_set_syscon() does check regmap_write() return value:
> >
> > ret = regmap_write(regmap, SYSCON_REG, reg);
> > if (ret < 0)
> > return dev_err_probe(dev, ret, "Failed to write to syscon\n");
>
> AI is wrong on this last line - s32_gmac_write_phy_intf_select() is
> called from s32_gmac_init(), which is called from plat_dat->init.
>
> plat_dat->init is called from two paths:
>
> 1. stmmac_pltfr_probe() -> stmmac_dvr_probe() -> plat_dat->init()
>
> 2. stmmac_resume() -> plat_dat->resume() -> stmmac_plat_resume() ->
> stmmac_pltfr_init() -> plat_dat->init()
>
> In the resume path, it is not appropriate to use dev_err_probe()
> because we're not in the probe path.
Hi Russell,
I agree that using dev_err_probe() is not appropriate here.
And, FWIIW, I took that part to be an illustration that
sun55i_gmac200_set_syscon() handles a similar case,
rather than a suggestion of how to handle it here.
But at any rate, I think the key question is should the case
where regmap_write() returns an error be handled in
s32_gmac_write_phy_intf_select() (by some means)?
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [v4,1/3] net: stmmac: s32: use a syscon for S32_PHY_INTF_SEL_RGMII
2026-01-26 16:01 ` Simon Horman
@ 2026-01-27 8:55 ` Dan Carpenter
2026-01-27 12:57 ` Simon Horman
0 siblings, 1 reply; 10+ messages in thread
From: Dan Carpenter @ 2026-01-27 8:55 UTC (permalink / raw)
To: Simon Horman
Cc: Russell King (Oracle), robh, kuba, festevam, ghennadi.procopciuc,
alexandre.torgue, linux-kernel, andrew+netdev, shawnguo, mbrugger,
mcoquelin.stm32, linaro-s32, davem, s.hauer, edumazet,
linux-arm-kernel, imx, conor+dt, krzk+dt, devicetree, Frank.li,
chester62515, netdev, kernel, pabeni, jan.petrous, linux-stm32,
s32
On Mon, Jan 26, 2026 at 04:01:27PM +0000, Simon Horman wrote:
> But at any rate, I think the key question is should the case
> where regmap_write() returns an error be handled in
> s32_gmac_write_phy_intf_select() (by some means)?
Generally if register read/writes fail then there is nothing you
can do a the software level, you need to buy a new computer. However,
in this case we may eventually put the registers behind an SCMI
interface so probably checking is a good idea.
Could I leave the error message out? The callers has an error
message and if you ever see the error message, and even with SCMI,
the fix is probably still to buy a new computer.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [v4,1/3] net: stmmac: s32: use a syscon for S32_PHY_INTF_SEL_RGMII
2026-01-27 8:55 ` Dan Carpenter
@ 2026-01-27 12:57 ` Simon Horman
0 siblings, 0 replies; 10+ messages in thread
From: Simon Horman @ 2026-01-27 12:57 UTC (permalink / raw)
To: Dan Carpenter
Cc: Russell King (Oracle), robh, kuba, festevam, ghennadi.procopciuc,
alexandre.torgue, linux-kernel, andrew+netdev, shawnguo, mbrugger,
mcoquelin.stm32, linaro-s32, davem, s.hauer, edumazet,
linux-arm-kernel, imx, conor+dt, krzk+dt, devicetree, Frank.li,
chester62515, netdev, kernel, pabeni, jan.petrous, linux-stm32,
s32
On Tue, Jan 27, 2026 at 11:55:49AM +0300, Dan Carpenter wrote:
> On Mon, Jan 26, 2026 at 04:01:27PM +0000, Simon Horman wrote:
> > But at any rate, I think the key question is should the case
> > where regmap_write() returns an error be handled in
> > s32_gmac_write_phy_intf_select() (by some means)?
>
> Generally if register read/writes fail then there is nothing you
> can do a the software level, you need to buy a new computer. However,
> in this case we may eventually put the registers behind an SCMI
> interface so probably checking is a good idea.
>
> Could I leave the error message out? The callers has an error
> message and if you ever see the error message, and even with SCMI,
> the fix is probably still to buy a new computer.
FWIIW, that seems reasonable to me.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v4 2/3] dt-bindings: net: nxp,s32-dwmac: Use the GPR syscon
2026-01-23 19:51 [PATCH v4 0/3] s32g: Use a syscon for GPR Dan Carpenter
2026-01-23 19:51 ` [PATCH v4 1/3] net: stmmac: s32: use a syscon for S32_PHY_INTF_SEL_RGMII Dan Carpenter
@ 2026-01-23 19:51 ` Dan Carpenter
2026-01-26 15:45 ` Rob Herring (Arm)
2026-01-23 19:51 ` [PATCH v4 3/3] dts: s32g: Add GPR syscon region Dan Carpenter
2 siblings, 1 reply; 10+ messages in thread
From: Dan Carpenter @ 2026-01-23 19:51 UTC (permalink / raw)
To: Jan Petrous
Cc: s32, Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
netdev, devicetree, linux-kernel, Frank Li, linaro-s32, imx
The S32 chipsets have a GPR region which has a miscellaneous registers
including the GMAC_0_CTRL_STS register. Originally, this code accessed
that register in a sort of ad-hoc way, but it's cleaner to use a
syscon interface to access these registers.
We still need to maintain the old method of accessing the GMAC register
but using a syscon will let us access other registers more cleanly.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
v4: Fix the formatting issue Rob pointed out
v3: Better documentation about what GMAC_0_CTRL_STS register does.
v2: Add the vendor prefix to the phandle
Fix the documentation
.../devicetree/bindings/net/nxp,s32-dwmac.yaml | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml b/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml
index 2b8b74c5feec..65633b10e49e 100644
--- a/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml
@@ -32,6 +32,18 @@ properties:
- description: Main GMAC registers
- description: GMAC PHY mode control register
+ nxp,phy-sel:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ items:
+ - items:
+ - description: phandle to the GPR syscon node
+ - description: offset of PHY selection register
+ description:
+ This phandle points to the GMAC_0_CTRL_STS register which controls the
+ GMAC_0 configuration options. The register lets you select the PHY
+ interface and the PHY mode. It also controls if the FTM_0 or FTM_1
+ FlexTimer Modules connect to GMAC_O.
+
interrupts:
maxItems: 1
@@ -74,6 +86,7 @@ examples:
compatible = "nxp,s32g2-dwmac";
reg = <0x0 0x4033c000 0x0 0x2000>, /* gmac IP */
<0x0 0x4007c004 0x0 0x4>; /* GMAC_0_CTRL_STS */
+ nxp,phy-sel = <&gpr 0x4>;
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "macirq";
--
2.51.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v4 2/3] dt-bindings: net: nxp,s32-dwmac: Use the GPR syscon
2026-01-23 19:51 ` [PATCH v4 2/3] dt-bindings: net: nxp,s32-dwmac: Use the GPR syscon Dan Carpenter
@ 2026-01-26 15:45 ` Rob Herring (Arm)
0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring (Arm) @ 2026-01-26 15:45 UTC (permalink / raw)
To: Dan Carpenter
Cc: Frank Li, netdev, devicetree, David S. Miller, linux-kernel, s32,
Krzysztof Kozlowski, Conor Dooley, Andrew Lunn, Jan Petrous,
Paolo Abeni, linaro-s32, imx, Jakub Kicinski, Eric Dumazet
On Fri, 23 Jan 2026 22:51:15 +0300, Dan Carpenter wrote:
> The S32 chipsets have a GPR region which has a miscellaneous registers
> including the GMAC_0_CTRL_STS register. Originally, this code accessed
> that register in a sort of ad-hoc way, but it's cleaner to use a
> syscon interface to access these registers.
>
> We still need to maintain the old method of accessing the GMAC register
> but using a syscon will let us access other registers more cleanly.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> v4: Fix the formatting issue Rob pointed out
> v3: Better documentation about what GMAC_0_CTRL_STS register does.
> v2: Add the vendor prefix to the phandle
> Fix the documentation
>
> .../devicetree/bindings/net/nxp,s32-dwmac.yaml | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v4 3/3] dts: s32g: Add GPR syscon region
2026-01-23 19:51 [PATCH v4 0/3] s32g: Use a syscon for GPR Dan Carpenter
2026-01-23 19:51 ` [PATCH v4 1/3] net: stmmac: s32: use a syscon for S32_PHY_INTF_SEL_RGMII Dan Carpenter
2026-01-23 19:51 ` [PATCH v4 2/3] dt-bindings: net: nxp,s32-dwmac: Use the GPR syscon Dan Carpenter
@ 2026-01-23 19:51 ` Dan Carpenter
2 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2026-01-23 19:51 UTC (permalink / raw)
To: Chester Lin
Cc: Matthias Brugger, Ghennadi Procopciuc, NXP S32 Linux Team,
Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel,
imx, devicetree, linux-kernel, Frank Li, linaro-s32, netdev
Add the GPR syscon region for the s32 chipset.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
v4: no change
v3: no change
v2: Remove #address-cells and #size-cells
arch/arm64/boot/dts/freescale/s32g2.dtsi | 6 ++++++
arch/arm64/boot/dts/freescale/s32g3.dtsi | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/s32g2.dtsi b/arch/arm64/boot/dts/freescale/s32g2.dtsi
index 51d00dac12de..b954952d962b 100644
--- a/arch/arm64/boot/dts/freescale/s32g2.dtsi
+++ b/arch/arm64/boot/dts/freescale/s32g2.dtsi
@@ -325,6 +325,11 @@ usdhc0-200mhz-grp4 {
};
};
+ gpr: syscon@4007c000 {
+ compatible = "nxp,s32g2-gpr", "syscon";
+ reg = <0x4007c000 0x3000>;
+ };
+
ocotp: nvmem@400a4000 {
compatible = "nxp,s32g2-ocotp";
reg = <0x400a4000 0x400>;
@@ -731,6 +736,7 @@ gmac0: ethernet@4033c000 {
compatible = "nxp,s32g2-dwmac";
reg = <0x4033c000 0x2000>, /* gmac IP */
<0x4007c004 0x4>; /* GMAC_0_CTRL_STS */
+ nxp,phy-sel = <&gpr 0x4>;
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "macirq";
diff --git a/arch/arm64/boot/dts/freescale/s32g3.dtsi b/arch/arm64/boot/dts/freescale/s32g3.dtsi
index e314f3c7d61d..be03db737384 100644
--- a/arch/arm64/boot/dts/freescale/s32g3.dtsi
+++ b/arch/arm64/boot/dts/freescale/s32g3.dtsi
@@ -383,6 +383,11 @@ usdhc0-200mhz-grp4 {
};
};
+ gpr: syscon@4007c000 {
+ compatible = "nxp,s32g3-gpr", "syscon";
+ reg = <0x4007c000 0x3000>;
+ };
+
ocotp: nvmem@400a4000 {
compatible = "nxp,s32g3-ocotp", "nxp,s32g2-ocotp";
reg = <0x400a4000 0x400>;
@@ -808,6 +813,7 @@ gmac0: ethernet@4033c000 {
compatible = "nxp,s32g2-dwmac";
reg = <0x4033c000 0x2000>, /* gmac IP */
<0x4007c004 0x4>; /* GMAC_0_CTRL_STS */
+ nxp,phy-sel = <&gpr 0x4>;
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "macirq";
--
2.51.0
^ permalink raw reply related [flat|nested] 10+ messages in thread