* [net-next v3 0/5] Add StarFive jhb100 soc SGMII GMAC support
@ 2026-05-07 9:41 Minda Chen
2026-05-07 9:41 ` [net-next v3 1/5] dt-bindings: net: starfive,jh7110-dwmac: Remove jh8100 Minda Chen
` (5 more replies)
0 siblings, 6 replies; 17+ messages in thread
From: Minda Chen @ 2026-05-07 9:41 UTC (permalink / raw)
To: Alexandre Torgue, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, netdev
Cc: linux-kernel, linux-stm32, devicetree, Minda Chen
jhb100 is a Starfive new RISC-V SoC for datacenter BMC (BaseBoard
Managent Controller). Similar with Aspeed 27x0.
The jhb100 minimal system upstream is in progress:
https://patchwork.kernel.org/project/linux-riscv/cover/20260403054945.467700-1-changhuang.liang@starfivetech.com/
jhb100 GMAC still using designware GMAC core like JH7100 and JH7110,
and contains 2 SGMII interfaces, 1 RGMII/RMII interface, 1 RMII
interface. In JH7100/JH7110 dwmac-starfive.c have supported RGMII/RMII
interface. So require to add SGMII support to dwmac-starfive.c for JHB100.
SGMII serdes PHY has been integrated in JHB100 and do not have driver
setting.
In JHB100 EVB board, SGMII connect with motorcomm YT8531s external PHY
and support RJ45 ethernet port.
The patch base in 7.1-rc2
previous patch link:
v2: https://patchwork.kernel.org/project/netdevbpf/cover/20260417024523.107786-1-minda.chen@starfivetech.com/
changes
v3:
patch2: Add jhb100 attach to jh7110 compatibible, remove redundant commit
message. just descript the jhb100 hardware.
patch3: Add oneOf 5 clocks / 6 clocks to claim the clocks and make it
pass yaml test.
patch4: Add review tag and unused tag to phy interface.
v2:
1. patch1 Add the remove reason
2. patch2 rename rx clock to sgmii_rx
3. patch4 confirm sgmii rx clock exist, or will probe error
sgmii will not call starfive_dwmac_set_mode()
Minda Chen (5):
dt-bindings: net: starfive,jh7110-dwmac: Remove jh8100
dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 support
dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 sgmii rx clk
net: stmmac: starfive: Add jhb100 SGMII interface
net: stmmac: starfive: Add STMMAC_FLAG_SPH_DISABLE flag
.../bindings/net/starfive,jh7110-dwmac.yaml | 67 ++++++++++++++-----
.../ethernet/stmicro/stmmac/dwmac-starfive.c | 59 ++++++++++++----
2 files changed, 96 insertions(+), 30 deletions(-)
base-commit: 74fe02ce122a6103f207d29fafc8b3a53de6abaf
--
2.17.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* [net-next v3 1/5] dt-bindings: net: starfive,jh7110-dwmac: Remove jh8100
2026-05-07 9:41 [net-next v3 0/5] Add StarFive jhb100 soc SGMII GMAC support Minda Chen
@ 2026-05-07 9:41 ` Minda Chen
2026-05-07 12:31 ` Andrew Lunn
2026-05-07 17:36 ` Conor Dooley
2026-05-07 9:41 ` [net-next v3 2/5] dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 support Minda Chen
` (4 subsequent siblings)
5 siblings, 2 replies; 17+ messages in thread
From: Minda Chen @ 2026-05-07 9:41 UTC (permalink / raw)
To: Alexandre Torgue, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, netdev
Cc: linux-kernel, linux-stm32, devicetree, Minda Chen
Remove jh8100 dt-bindings because do not support it now.
StarFive have stopped jh8100 developing and will not release
it outside.
Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
---
.../bindings/net/starfive,jh7110-dwmac.yaml | 28 ++++---------------
1 file changed, 5 insertions(+), 23 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
index 313a15331661..0d1962980f57 100644
--- a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
@@ -30,10 +30,6 @@ properties:
- items:
- const: starfive,jh7110-dwmac
- const: snps,dwmac-5.20
- - items:
- - const: starfive,jh8100-dwmac
- - const: starfive,jh7110-dwmac
- - const: snps,dwmac-5.20
reg:
maxItems: 1
@@ -120,25 +116,11 @@ allOf:
minItems: 3
maxItems: 3
- if:
- properties:
- compatible:
- contains:
- const: starfive,jh8100-dwmac
- then:
- properties:
- resets:
- maxItems: 1
-
- reset-names:
- const: stmmaceth
- else:
- properties:
- resets:
- minItems: 2
-
- reset-names:
- minItems: 2
+ resets:
+ minItems: 2
+
+ reset-names:
+ minItems: 2
unevaluatedProperties: false
--
2.17.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [net-next v3 2/5] dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 support
2026-05-07 9:41 [net-next v3 0/5] Add StarFive jhb100 soc SGMII GMAC support Minda Chen
2026-05-07 9:41 ` [net-next v3 1/5] dt-bindings: net: starfive,jh7110-dwmac: Remove jh8100 Minda Chen
@ 2026-05-07 9:41 ` Minda Chen
2026-05-08 17:14 ` sashiko-bot
2026-05-07 9:41 ` [net-next v3 3/5] dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 sgmii rx clk Minda Chen
` (3 subsequent siblings)
5 siblings, 1 reply; 17+ messages in thread
From: Minda Chen @ 2026-05-07 9:41 UTC (permalink / raw)
To: Alexandre Torgue, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, netdev
Cc: linux-kernel, linux-stm32, devicetree, Minda Chen
The jhb100 GMAC still using Synopsys designware GMAC core.
hardware features are similar with jh7100.
Add jhb100 GMAC compatible and reset, interrupts features.
jhb100 dwmac has only one reset signal and one interrupt
line.
Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
---
.../bindings/net/starfive,jh7110-dwmac.yaml | 51 ++++++++++++++-----
1 file changed, 37 insertions(+), 14 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
index 0d1962980f57..06aeaa0f6f00 100644
--- a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
@@ -30,6 +30,10 @@ properties:
- items:
- const: starfive,jh7110-dwmac
- const: snps,dwmac-5.20
+ - items:
+ - const: starfive,jhb100-dwmac
+ - const: starfive,jh7110-dwmac
+ - const: snps,dwmac-5.20
reg:
maxItems: 1
@@ -107,20 +111,39 @@ allOf:
contains:
const: starfive,jh7110-dwmac
then:
- properties:
- interrupts:
- minItems: 3
- maxItems: 3
-
- interrupt-names:
- minItems: 3
- maxItems: 3
-
- resets:
- minItems: 2
-
- reset-names:
- minItems: 2
+ if:
+ properties:
+ compatible:
+ contains:
+ const: starfive,jhb100-dwmac
+ then:
+ properties:
+ interrupts:
+ maxItems: 1
+
+ interrupt-names:
+ const: macirq
+
+ resets:
+ maxItems: 1
+
+ reset-names:
+ const: stmmaceth
+ else:
+ properties:
+ interrupts:
+ minItems: 3
+ maxItems: 3
+
+ interrupt-names:
+ minItems: 3
+ maxItems: 3
+
+ resets:
+ minItems: 2
+
+ reset-names:
+ minItems: 2
unevaluatedProperties: false
--
2.17.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [net-next v3 3/5] dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 sgmii rx clk
2026-05-07 9:41 [net-next v3 0/5] Add StarFive jhb100 soc SGMII GMAC support Minda Chen
2026-05-07 9:41 ` [net-next v3 1/5] dt-bindings: net: starfive,jh7110-dwmac: Remove jh8100 Minda Chen
2026-05-07 9:41 ` [net-next v3 2/5] dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 support Minda Chen
@ 2026-05-07 9:41 ` Minda Chen
2026-05-07 17:42 ` Conor Dooley
2026-05-08 17:14 ` sashiko-bot
2026-05-07 9:41 ` [net-next v3 4/5] net: stmmac: starfive: Add jhb100 SGMII interface Minda Chen
` (2 subsequent siblings)
5 siblings, 2 replies; 17+ messages in thread
From: Minda Chen @ 2026-05-07 9:41 UTC (permalink / raw)
To: Alexandre Torgue, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, netdev
Cc: linux-kernel, linux-stm32, devicetree, Minda Chen
jhb100 SGMII interface tx/rx mac clock is split and require to
set clock rate in 10M/100M/1000M speed. So dts need to add a
new rx clock in code, dts and dt binding doc.
So in jhb100 SGMII interface contain 6 clocks, RMII/RGMII
interface still contail 5 clocks.
Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
---
.../bindings/net/starfive,jh7110-dwmac.yaml | 42 ++++++++++++++++---
1 file changed, 36 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
index 06aeaa0f6f00..af160a8dedb8 100644
--- a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
@@ -39,20 +39,18 @@ properties:
maxItems: 1
clocks:
+ minItems: 5
items:
- description: GMAC main clock
- description: GMAC AHB clock
- description: PTP clock
- description: TX clock
- description: GTX clock
+ - description: SGMII RX clock
clock-names:
- items:
- - const: stmmaceth
- - const: pclk
- - const: ptp_ref
- - const: tx
- - const: gtx
+ minItems: 5
+ maxItems: 6
starfive,tx-use-rgmii-clk:
description:
@@ -99,6 +97,18 @@ allOf:
minItems: 2
maxItems: 2
+ clocks:
+ minItems: 5
+ maxItems: 5
+
+ clock-names:
+ items:
+ - const: stmmaceth
+ - const: pclk
+ - const: ptp_ref
+ - const: tx
+ - const: gtx
+
resets:
maxItems: 1
@@ -111,6 +121,26 @@ allOf:
contains:
const: starfive,jh7110-dwmac
then:
+ properties:
+ clocks:
+ minItems: 5
+ maxItems: 6
+
+ clock-names:
+ oneOf:
+ - items:
+ - const: stmmaceth
+ - const: pclk
+ - const: ptp_ref
+ - const: tx
+ - const: gtx
+ - items:
+ - const: stmmaceth
+ - const: pclk
+ - const: ptp_ref
+ - const: tx
+ - const: gtx
+ - const: sgmii_rx
if:
properties:
compatible:
--
2.17.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [net-next v3 4/5] net: stmmac: starfive: Add jhb100 SGMII interface
2026-05-07 9:41 [net-next v3 0/5] Add StarFive jhb100 soc SGMII GMAC support Minda Chen
` (2 preceding siblings ...)
2026-05-07 9:41 ` [net-next v3 3/5] dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 sgmii rx clk Minda Chen
@ 2026-05-07 9:41 ` Minda Chen
2026-05-07 12:41 ` Andrew Lunn
2026-05-07 17:44 ` Conor Dooley
2026-05-07 9:41 ` [net-next v3 5/5] net: stmmac: starfive: Add STMMAC_FLAG_SPH_DISABLE flag Minda Chen
2026-05-07 12:31 ` [net-next v3 0/5] Add StarFive jhb100 soc SGMII GMAC support Andrew Lunn
5 siblings, 2 replies; 17+ messages in thread
From: Minda Chen @ 2026-05-07 9:41 UTC (permalink / raw)
To: Alexandre Torgue, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, netdev
Cc: linux-kernel, linux-stm32, devicetree, Minda Chen
Add jhb100 compatible and SGMII support. jhb100 soc contains
2 SGMII interfaces and integrated with serdes PHY. SGMII with
split TX/RX MAC clock and need to set 2.5M/25M/125M TX/RX clock
rate in 10M/100M/1000M speed mode.
Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Sai Krishna <saikrishnag@marvell.com>
---
.../ethernet/stmicro/stmmac/dwmac-starfive.c | 59 ++++++++++++++-----
1 file changed, 45 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
index 16b955a6d77b..bd86a39b79f0 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
@@ -26,6 +26,7 @@ struct starfive_dwmac_data {
struct starfive_dwmac {
struct device *dev;
const struct starfive_dwmac_data *data;
+ struct clk *sgmii_rx;
};
static int starfive_dwmac_set_mode(struct plat_stmmacenet_data *plat_dat)
@@ -68,6 +69,25 @@ static int starfive_dwmac_set_mode(struct plat_stmmacenet_data *plat_dat)
return 0;
}
+static int stmmac_starfive_sgmii_set_clk_rate(void *bsp_priv, struct clk *clk_tx_i,
+ phy_interface_t __maybe_unused interface,
+ int speed)
+{
+ struct starfive_dwmac *dwmac = (void *)bsp_priv;
+ long rate = rgmii_clock(speed);
+ int ret;
+
+ /* MAC clock rate the same as RGMII */
+ if (rate < 0)
+ return 0;
+
+ ret = clk_set_rate(clk_tx_i, rate);
+ if (ret)
+ return ret;
+
+ return clk_set_rate(dwmac->sgmii_rx, rate);
+}
+
static int starfive_dwmac_probe(struct platform_device *pdev)
{
struct plat_stmmacenet_data *plat_dat;
@@ -102,23 +122,33 @@ static int starfive_dwmac_probe(struct platform_device *pdev)
return dev_err_probe(&pdev->dev, PTR_ERR(clk_gtx),
"error getting gtx clock\n");
- /* Generally, the rgmii_tx clock is provided by the internal clock,
- * which needs to match the corresponding clock frequency according
- * to different speeds. If the rgmii_tx clock is provided by the
- * external rgmii_rxin, there is no need to configure the clock
- * internally, because rgmii_rxin will be adaptively adjusted.
- */
- if (!device_property_read_bool(&pdev->dev, "starfive,tx-use-rgmii-clk"))
- plat_dat->set_clk_tx_rate = stmmac_set_clk_tx_rate;
-
dwmac->dev = &pdev->dev;
- plat_dat->flags |= STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP;
plat_dat->bsp_priv = dwmac;
- plat_dat->dma_cfg->dche = true;
+ if (plat_dat->phy_interface == PHY_INTERFACE_MODE_SGMII) {
+ dwmac->sgmii_rx = devm_clk_get_enabled(&pdev->dev, "sgmii_rx");
+ if (IS_ERR(dwmac->sgmii_rx))
+ return dev_err_probe(&pdev->dev,
+ PTR_ERR(dwmac->sgmii_rx),
+ "error getting sgmii rx clock\n");
+ plat_dat->set_clk_tx_rate = stmmac_starfive_sgmii_set_clk_rate;
+ } else {
+ /*
+ * Generally, the rgmii_tx clock is provided by the internal clock,
+ * which needs to match the corresponding clock frequency according
+ * to different speeds. If the rgmii_tx clock is provided by the
+ * external rgmii_rxin, there is no need to configure the clock
+ * internally, because rgmii_rxin will be adaptively adjusted.
+ */
+ if (!device_property_read_bool(&pdev->dev, "starfive,tx-use-rgmii-clk"))
+ plat_dat->set_clk_tx_rate = stmmac_set_clk_tx_rate;
+
+ err = starfive_dwmac_set_mode(plat_dat);
+ if (err)
+ return err;
+ }
- err = starfive_dwmac_set_mode(plat_dat);
- if (err)
- return err;
+ plat_dat->flags |= STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP;
+ plat_dat->dma_cfg->dche = true;
return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
}
@@ -130,6 +160,7 @@ static const struct starfive_dwmac_data jh7100_data = {
static const struct of_device_id starfive_dwmac_match[] = {
{ .compatible = "starfive,jh7100-dwmac", .data = &jh7100_data },
{ .compatible = "starfive,jh7110-dwmac" },
+ { .compatible = "starfive,jhb100-dwmac" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, starfive_dwmac_match);
--
2.17.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [net-next v3 5/5] net: stmmac: starfive: Add STMMAC_FLAG_SPH_DISABLE flag
2026-05-07 9:41 [net-next v3 0/5] Add StarFive jhb100 soc SGMII GMAC support Minda Chen
` (3 preceding siblings ...)
2026-05-07 9:41 ` [net-next v3 4/5] net: stmmac: starfive: Add jhb100 SGMII interface Minda Chen
@ 2026-05-07 9:41 ` Minda Chen
2026-05-07 12:42 ` Andrew Lunn
2026-05-07 12:31 ` [net-next v3 0/5] Add StarFive jhb100 soc SGMII GMAC support Andrew Lunn
5 siblings, 1 reply; 17+ messages in thread
From: Minda Chen @ 2026-05-07 9:41 UTC (permalink / raw)
To: Alexandre Torgue, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, netdev
Cc: linux-kernel, linux-stm32, devicetree, Minda Chen
Add default disable split header flag in all the starfive
soc.
Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
index bd86a39b79f0..935c4fc4c29f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
@@ -147,7 +147,7 @@ static int starfive_dwmac_probe(struct platform_device *pdev)
return err;
}
- plat_dat->flags |= STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP;
+ plat_dat->flags |= (STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP | STMMAC_FLAG_SPH_DISABLE);
plat_dat->dma_cfg->dche = true;
return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
--
2.17.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [net-next v3 0/5] Add StarFive jhb100 soc SGMII GMAC support
2026-05-07 9:41 [net-next v3 0/5] Add StarFive jhb100 soc SGMII GMAC support Minda Chen
` (4 preceding siblings ...)
2026-05-07 9:41 ` [net-next v3 5/5] net: stmmac: starfive: Add STMMAC_FLAG_SPH_DISABLE flag Minda Chen
@ 2026-05-07 12:31 ` Andrew Lunn
5 siblings, 0 replies; 17+ messages in thread
From: Andrew Lunn @ 2026-05-07 12:31 UTC (permalink / raw)
To: Minda Chen
Cc: Alexandre Torgue, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, netdev, linux-kernel, linux-stm32, devicetree
On Thu, May 07, 2026 at 05:41:10PM +0800, Minda Chen wrote:
> jhb100 is a Starfive new RISC-V SoC for datacenter BMC (BaseBoard
> Managent Controller). Similar with Aspeed 27x0.
>
> The jhb100 minimal system upstream is in progress:
> https://patchwork.kernel.org/project/linux-riscv/cover/20260403054945.467700-1-changhuang.liang@starfivetech.com/
>
> jhb100 GMAC still using designware GMAC core like JH7100 and JH7110,
> and contains 2 SGMII interfaces, 1 RGMII/RMII interface, 1 RMII
> interface. In JH7100/JH7110 dwmac-starfive.c have supported RGMII/RMII
> interface. So require to add SGMII support to dwmac-starfive.c for JHB100.
>
> SGMII serdes PHY has been integrated in JHB100 and do not have driver
> setting.
>
> In JHB100 EVB board, SGMII connect with motorcomm YT8531s external PHY
> and support RJ45 ethernet port.
>
> The patch base in 7.1-rc2
For networking, please base on net-next/main.
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
Andrew
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [net-next v3 1/5] dt-bindings: net: starfive,jh7110-dwmac: Remove jh8100
2026-05-07 9:41 ` [net-next v3 1/5] dt-bindings: net: starfive,jh7110-dwmac: Remove jh8100 Minda Chen
@ 2026-05-07 12:31 ` Andrew Lunn
2026-05-07 17:36 ` Conor Dooley
1 sibling, 0 replies; 17+ messages in thread
From: Andrew Lunn @ 2026-05-07 12:31 UTC (permalink / raw)
To: Minda Chen
Cc: Alexandre Torgue, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, netdev, linux-kernel, linux-stm32, devicetree
On Thu, May 07, 2026 at 05:41:11PM +0800, Minda Chen wrote:
> Remove jh8100 dt-bindings because do not support it now.
> StarFive have stopped jh8100 developing and will not release
> it outside.
>
> Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [net-next v3 4/5] net: stmmac: starfive: Add jhb100 SGMII interface
2026-05-07 9:41 ` [net-next v3 4/5] net: stmmac: starfive: Add jhb100 SGMII interface Minda Chen
@ 2026-05-07 12:41 ` Andrew Lunn
2026-05-08 9:35 ` Minda Chen
2026-05-07 17:44 ` Conor Dooley
1 sibling, 1 reply; 17+ messages in thread
From: Andrew Lunn @ 2026-05-07 12:41 UTC (permalink / raw)
To: Minda Chen
Cc: Alexandre Torgue, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, netdev, linux-kernel, linux-stm32, devicetree
> +static int stmmac_starfive_sgmii_set_clk_rate(void *bsp_priv, struct clk *clk_tx_i,
> + phy_interface_t __maybe_unused interface,
> + int speed)
> +{
> + struct starfive_dwmac *dwmac = (void *)bsp_priv;
Why (void *) when it is already a void *?
Andrew
---
pw-bot: cr
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [net-next v3 5/5] net: stmmac: starfive: Add STMMAC_FLAG_SPH_DISABLE flag
2026-05-07 9:41 ` [net-next v3 5/5] net: stmmac: starfive: Add STMMAC_FLAG_SPH_DISABLE flag Minda Chen
@ 2026-05-07 12:42 ` Andrew Lunn
0 siblings, 0 replies; 17+ messages in thread
From: Andrew Lunn @ 2026-05-07 12:42 UTC (permalink / raw)
To: Minda Chen
Cc: Alexandre Torgue, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, netdev, linux-kernel, linux-stm32, devicetree
On Thu, May 07, 2026 at 05:41:15PM +0800, Minda Chen wrote:
> Add default disable split header flag in all the starfive
> soc.
>
> Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [net-next v3 1/5] dt-bindings: net: starfive,jh7110-dwmac: Remove jh8100
2026-05-07 9:41 ` [net-next v3 1/5] dt-bindings: net: starfive,jh7110-dwmac: Remove jh8100 Minda Chen
2026-05-07 12:31 ` Andrew Lunn
@ 2026-05-07 17:36 ` Conor Dooley
1 sibling, 0 replies; 17+ messages in thread
From: Conor Dooley @ 2026-05-07 17:36 UTC (permalink / raw)
To: Minda Chen
Cc: Alexandre Torgue, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski, netdev,
linux-kernel, linux-stm32, devicetree
[-- Attachment #1: Type: text/plain, Size: 318 bytes --]
On Thu, May 07, 2026 at 05:41:11PM +0800, Minda Chen wrote:
> Remove jh8100 dt-bindings because do not support it now.
> StarFive have stopped jh8100 developing and will not release
> it outside.
>
> Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [net-next v3 3/5] dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 sgmii rx clk
2026-05-07 9:41 ` [net-next v3 3/5] dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 sgmii rx clk Minda Chen
@ 2026-05-07 17:42 ` Conor Dooley
2026-05-08 17:14 ` sashiko-bot
1 sibling, 0 replies; 17+ messages in thread
From: Conor Dooley @ 2026-05-07 17:42 UTC (permalink / raw)
To: Minda Chen
Cc: Alexandre Torgue, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski, netdev,
linux-kernel, linux-stm32, devicetree
[-- Attachment #1: Type: text/plain, Size: 3320 bytes --]
On Thu, May 07, 2026 at 05:41:13PM +0800, Minda Chen wrote:
> jhb100 SGMII interface tx/rx mac clock is split and require to
> set clock rate in 10M/100M/1000M speed. So dts need to add a
> new rx clock in code, dts and dt binding doc.
> So in jhb100 SGMII interface contain 6 clocks, RMII/RGMII
> interface still contail 5 clocks.
Why is this not being done in the commit adding the jhb100 in the first
place?
>
> Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
> ---
> .../bindings/net/starfive,jh7110-dwmac.yaml | 42 ++++++++++++++++---
> 1 file changed, 36 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> index 06aeaa0f6f00..af160a8dedb8 100644
> --- a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> @@ -39,20 +39,18 @@ properties:
> maxItems: 1
>
> clocks:
> + minItems: 5
> items:
> - description: GMAC main clock
> - description: GMAC AHB clock
> - description: PTP clock
> - description: TX clock
> - description: GTX clock
> + - description: SGMII RX clock
>
> clock-names:
> - items:
> - - const: stmmaceth
> - - const: pclk
> - - const: ptp_ref
> - - const: tx
> - - const: gtx
> + minItems: 5
> + maxItems: 6
>
> starfive,tx-use-rgmii-clk:
> description:
> @@ -99,6 +97,18 @@ allOf:
> minItems: 2
> maxItems: 2
>
> + clocks:
> + minItems: 5
> + maxItems: 5
This can just be "maxItems: 5", since minItems is set outside the
conditional to 5.
> +
> + clock-names:
> + items:
> + - const: stmmaceth
> + - const: pclk
> + - const: ptp_ref
> + - const: tx
> + - const: gtx
> +
> resets:
> maxItems: 1
>
> @@ -111,6 +121,26 @@ allOf:
> contains:
> const: starfive,jh7110-dwmac
> then:
> + properties:
> + clocks:
> + minItems: 5
> + maxItems: 6
Remove these constraints, since they don't do anything more than the
outside ones do.
> +
> + clock-names:
> + oneOf:
> + - items:
> + - const: stmmaceth
> + - const: pclk
> + - const: ptp_ref
> + - const: tx
> + - const: gtx
> + - items:
> + - const: stmmaceth
> + - const: pclk
> + - const: ptp_ref
> + - const: tx
> + - const: gtx
> + - const: sgmii_rx
Can't you just leave this list outside the conditional section, and add
the extra item to the end? The only difference appears to be the
sgmii_rx clock, and it's at the end.
I'm also not really convinced that this flexibility is required, unless
there are some controllers on the platform that do not support sgmii.
pw-bot: changes-requested
Cheers,
Conor.
> if:
> properties:
> compatible:
> --
> 2.17.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [net-next v3 4/5] net: stmmac: starfive: Add jhb100 SGMII interface
2026-05-07 9:41 ` [net-next v3 4/5] net: stmmac: starfive: Add jhb100 SGMII interface Minda Chen
2026-05-07 12:41 ` Andrew Lunn
@ 2026-05-07 17:44 ` Conor Dooley
2026-05-08 9:35 ` Minda Chen
1 sibling, 1 reply; 17+ messages in thread
From: Conor Dooley @ 2026-05-07 17:44 UTC (permalink / raw)
To: Minda Chen
Cc: Alexandre Torgue, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski, netdev,
linux-kernel, linux-stm32, devicetree
[-- Attachment #1: Type: text/plain, Size: 925 bytes --]
On Thu, May 07, 2026 at 05:41:14PM +0800, Minda Chen wrote:
> Add jhb100 compatible and SGMII support. jhb100 soc contains
> 2 SGMII interfaces and integrated with serdes PHY. SGMII with
> split TX/RX MAC clock and need to set 2.5M/25M/125M TX/RX clock
> rate in 10M/100M/1000M speed mode.
>
> Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
> Reviewed-by: Sai Krishna <saikrishnag@marvell.com>
> @@ -130,6 +160,7 @@ static const struct starfive_dwmac_data jh7100_data = {
> static const struct of_device_id starfive_dwmac_match[] = {
> { .compatible = "starfive,jh7100-dwmac", .data = &jh7100_data },
> { .compatible = "starfive,jh7110-dwmac" },
> + { .compatible = "starfive,jhb100-dwmac" },
You've declared compatibility with the jh7110, why do you also need to
add the new comaptible?
> { /* sentinel */ }
> };
> MODULE_DEVICE_TABLE(of, starfive_dwmac_match);
> --
> 2.17.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [net-next v3 4/5] net: stmmac: starfive: Add jhb100 SGMII interface
2026-05-07 17:44 ` Conor Dooley
@ 2026-05-08 9:35 ` Minda Chen
0 siblings, 0 replies; 17+ messages in thread
From: Minda Chen @ 2026-05-08 9:35 UTC (permalink / raw)
To: Conor Dooley
Cc: Alexandre Torgue, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
devicetree@vger.kernel.org
>
> On Thu, May 07, 2026 at 05:41:14PM +0800, Minda Chen wrote:
> > Add jhb100 compatible and SGMII support. jhb100 soc contains
> > 2 SGMII interfaces and integrated with serdes PHY. SGMII with split
> > TX/RX MAC clock and need to set 2.5M/25M/125M TX/RX clock rate in
> > 10M/100M/1000M speed mode.
> >
> > Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
> > Reviewed-by: Sai Krishna <saikrishnag@marvell.com> @@ -130,6 +160,7 @@
> > static const struct starfive_dwmac_data jh7100_data = { static const
> > struct of_device_id starfive_dwmac_match[] = {
> > { .compatible = "starfive,jh7100-dwmac", .data = &jh7100_data },
> > { .compatible = "starfive,jh7110-dwmac" },
> > + { .compatible = "starfive,jhb100-dwmac" },
>
> You've declared compatibility with the jh7110, why do you also need to add the
> new comaptible?
>
I am sorry, I forget to remove this.
> > { /* sentinel */ }
> > };
> > MODULE_DEVICE_TABLE(of, starfive_dwmac_match);
> > --
> > 2.17.1
> >
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [net-next v3 4/5] net: stmmac: starfive: Add jhb100 SGMII interface
2026-05-07 12:41 ` Andrew Lunn
@ 2026-05-08 9:35 ` Minda Chen
0 siblings, 0 replies; 17+ messages in thread
From: Minda Chen @ 2026-05-08 9:35 UTC (permalink / raw)
To: Andrew Lunn
Cc: Alexandre Torgue, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
devicetree@vger.kernel.org
>
> > +static int stmmac_starfive_sgmii_set_clk_rate(void *bsp_priv, struct clk
> *clk_tx_i,
> > + phy_interface_t __maybe_unused interface,
> > + int speed)
> > +{
> > + struct starfive_dwmac *dwmac = (void *)bsp_priv;
>
> Why (void *) when it is already a void *?
>
> Andrew
>
Okay, Thanks.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [net-next v3 2/5] dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 support
2026-05-07 9:41 ` [net-next v3 2/5] dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 support Minda Chen
@ 2026-05-08 17:14 ` sashiko-bot
0 siblings, 0 replies; 17+ messages in thread
From: sashiko-bot @ 2026-05-08 17:14 UTC (permalink / raw)
To: Minda Chen; +Cc: devicetree, conor+dt, robh, krzk+dt
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The compatible string 'starfive,jhb100-dwmac' incorrectly uses 'starfive,jh7110-dwmac' as a fallback, violating Device Tree ABI backwards compatibility rules.
- [Medium] The schema logic for 'starfive,jhb100-dwmac' relies on the invalid fallback string, resulting in incorrect nesting and missing 'select' validation.
--
commit 99d98f58cde78e6cc89acf897a5b4bac3713e9c4
Author: Minda Chen <minda.chen@starfivetech.com>
dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 support
This commit adds support for the jhb100 GMAC, which is based on the Synopsys
designware GMAC core. It introduces a new compatible string and updates the
interrupt and reset constraints, as the jhb100 hardware has only one reset
signal and one interrupt line.
> diff --git a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> --- a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> @@ -30,6 +30,10 @@ properties:
> - items:
> - const: starfive,jh7110-dwmac
> - const: snps,dwmac-5.20
> + - items:
> + - const: starfive,jhb100-dwmac
> + - const: starfive,jh7110-dwmac
> + - const: snps,dwmac-5.20
The starfive,jhb100-dwmac hardware physically provides only 1 interrupt and
1 reset, but the fallback starfive,jh7110-dwmac strictly requires 3
interrupts and 2 resets. Does this break Device Tree ABI backwards
compatibility?
An unmodified legacy operating system matching the fallback would expect the
missing resources and might fail to initialize. Should the
starfive,jh7110-dwmac fallback be removed from this list?
[ ... ]
> @@ -107,20 +111,39 @@ allOf:
> contains:
> const: starfive,jh7110-dwmac
> then:
> - properties:
> - interrupts:
> - minItems: 3
> - maxItems: 3
> -
> - interrupt-names:
> - minItems: 3
> - maxItems: 3
> -
> - resets:
> - minItems: 2
> -
> - reset-names:
> - minItems: 2
> + if:
> + properties:
> + compatible:
> + contains:
> + const: starfive,jhb100-dwmac
These interrupt and reset constraints for jhb100 are nested inside an outer
condition checking for starfive,jh7110-dwmac. If the invalid fallback is
removed from the compatible array above, will jhb100 nodes fail this outer
condition and silently bypass their specific constraints?
Furthermore, if a device tree correctly drops the jh7110 fallback, will
dt_binding_check silently ignore the jhb100 node entirely because it is
missing from the custom select block at the top of the schema?
Could these constraints be evaluated in an independent if block, and the
new compatible string be added to the select block?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260507094115.8355-1-minda.chen@starfivetech.com?part=2
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [net-next v3 3/5] dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 sgmii rx clk
2026-05-07 9:41 ` [net-next v3 3/5] dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 sgmii rx clk Minda Chen
2026-05-07 17:42 ` Conor Dooley
@ 2026-05-08 17:14 ` sashiko-bot
1 sibling, 0 replies; 17+ messages in thread
From: sashiko-bot @ 2026-05-08 17:14 UTC (permalink / raw)
To: Minda Chen; +Cc: robh, krzk+dt, conor+dt, devicetree
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The patch erroneously relaxes clock constraints for the base `starfive,jh7110-dwmac` hardware, incorrectly allowing it to specify 6 clocks.
- [Low] Replacing the global `items` array for `clock-names` with duplicated conditional blocks is a binding anti-pattern.
--
commit 868beb354c5de56282a3dbb82e7d79b8745d272e
Author: Minda Chen <minda.chen@starfivetech.com>
dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 sgmii rx clk
This commit updates the starfive,jh7110-dwmac binding to support the jhb100
SGMII interface. It adds a 6th clock for the new SGMII interface while
noting that existing RMII/RGMII interfaces still use 5 clocks.
> --- a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
> @@ -39,20 +39,18 @@ properties:
[ ... ]
> clock-names:
> - items:
> - - const: stmmaceth
> - - const: pclk
> - - const: ptp_ref
> - - const: tx
> - - const: gtx
> + minItems: 5
> + maxItems: 6
This isn't a bug, but does it make sense to keep the full 6-element list
defined here at the top level and rely purely on minItems and maxItems
overrides inside the conditional blocks?
Standard device tree binding practice usually defines the complete items array
once at the top level. By removing the items array here and moving it into
the conditionals, the string constants are duplicated across multiple blocks.
[ ... ]
> @@ -111,6 +121,26 @@ allOf:
> contains:
> const: starfive,jh7110-dwmac
> then:
> + properties:
> + clocks:
> + minItems: 5
> + maxItems: 6
> +
> + clock-names:
> + oneOf:
> + - items:
> + - const: stmmaceth
> + - const: pclk
> + - const: ptp_ref
> + - const: tx
> + - const: gtx
> + - items:
> + - const: stmmaceth
> + - const: pclk
> + - const: ptp_ref
> + - const: tx
> + - const: gtx
> + - const: sgmii_rx
Does this inadvertently relax the clock constraints for the base
starfive,jh7110-dwmac hardware?
The commit message explicitly states that the 6th clock is a requirement
only for the new jhb100 SGMII interface, while other interfaces use 5 clocks.
Since jhb100 uses starfive,jh7110-dwmac as a fallback, this outer then
block applies to both hardware variants. Because there is no inner else
block for the pure starfive,jh7110-dwmac to restrict maxItems back to 5,
will a pure jh7110 device tree now be erroneously permitted to specify 6
clocks and silently pass schema validation?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260507094115.8355-1-minda.chen@starfivetech.com?part=3
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2026-05-08 17:14 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-07 9:41 [net-next v3 0/5] Add StarFive jhb100 soc SGMII GMAC support Minda Chen
2026-05-07 9:41 ` [net-next v3 1/5] dt-bindings: net: starfive,jh7110-dwmac: Remove jh8100 Minda Chen
2026-05-07 12:31 ` Andrew Lunn
2026-05-07 17:36 ` Conor Dooley
2026-05-07 9:41 ` [net-next v3 2/5] dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 support Minda Chen
2026-05-08 17:14 ` sashiko-bot
2026-05-07 9:41 ` [net-next v3 3/5] dt-bindings: net: starfive,jh7110-dwmac: Add jhb100 sgmii rx clk Minda Chen
2026-05-07 17:42 ` Conor Dooley
2026-05-08 17:14 ` sashiko-bot
2026-05-07 9:41 ` [net-next v3 4/5] net: stmmac: starfive: Add jhb100 SGMII interface Minda Chen
2026-05-07 12:41 ` Andrew Lunn
2026-05-08 9:35 ` Minda Chen
2026-05-07 17:44 ` Conor Dooley
2026-05-08 9:35 ` Minda Chen
2026-05-07 9:41 ` [net-next v3 5/5] net: stmmac: starfive: Add STMMAC_FLAG_SPH_DISABLE flag Minda Chen
2026-05-07 12:42 ` Andrew Lunn
2026-05-07 12:31 ` [net-next v3 0/5] Add StarFive jhb100 soc SGMII GMAC support Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox