From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Describe the firmware-managed variant of the QCom DesignWare MAC. As the
properties here differ a lot from the HLOS-managed variant, lets put it
in a separate file.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
.../devicetree/bindings/net/qcom,ethqos-scmi.yaml | 101 +++++++++++++++++++++
.../devicetree/bindings/net/snps,dwmac.yaml | 5 +-
MAINTAINERS | 1 +
3 files changed, 106 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/net/qcom,ethqos-scmi.yaml b/Documentation/devicetree/bindings/net/qcom,ethqos-scmi.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..b821299d7b30cdb802d9ee5d9fa17542b8334bd2
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/qcom,ethqos-scmi.yaml
@@ -0,0 +1,101 @@
+# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/qcom,ethqos-scmi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Ethernet ETHQOS device (firmware managed)
+
+maintainers:
+ - Bjorn Andersson <andersson@kernel.org>
+ - Konrad Dybcio <konradybcio@kernel.org>
+ - Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+
+description:
+ dwmmac based Qualcomm ethernet devices which support Gigabit
+ ethernet (version v2.3.0 and onwards) with clocks, interconnects, etc.
+ managed by firmware
+
+allOf:
+ - $ref: snps,dwmac.yaml#
+
+properties:
+ compatible:
+ const: qcom,sa8255p-ethqos
+
+ reg:
+ maxItems: 2
+
+ reg-names:
+ items:
+ - const: stmmaceth
+ - const: rgmii
+
+ interrupts:
+ items:
+ - description: Combined signal for various interrupt events
+ - description: The interrupt that occurs when HW safety error triggered
+
+ interrupt-names:
+ items:
+ - const: macirq
+ - const: sfty
+
+ power-domains:
+ minItems: 3
+
+ power-domain-names:
+ items:
+ - const: core
+ - const: mdio
+ - const: serdes
+
+ iommus:
+ maxItems: 1
+
+ dma-coherent: true
+
+ phys: true
+
+ phy-names:
+ const: serdes
+
+required:
+ - compatible
+ - reg-names
+ - power-domains
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ ethernet: ethernet@7a80000 {
+ compatible = "qcom,sa8255p-ethqos";
+ reg = <0x23040000 0x10000>,
+ <0x23056000 0x100>;
+ reg-names = "stmmaceth", "rgmii";
+
+ iommus = <&apps_smmu 0x120 0x7>;
+
+ interrupts = <GIC_SPI 946 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 782 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq", "sfty";
+
+ dma-coherent;
+
+ snps,tso;
+ snps,pbl = <32>;
+ rx-fifo-depth = <16384>;
+ tx-fifo-depth = <16384>;
+
+ phy-handle = <ðernet_phy>;
+ phy-mode = "2500base-x";
+
+ snps,mtl-rx-config = <&mtl_rx_setup1>;
+ snps,mtl-tx-config = <&mtl_tx_setup1>;
+
+ power-domains = <&scmi8_pd 0>, <&scmi8_pd 1>, <&scmi8_dvfs 0>;
+ power-domain-names = "core", "mdio","serdes";
+ };
diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index dd3c72e8363e70d101ed2702e2ea3235ee38e2a0..312d1bbc2ad1051520355039f5587381cbd1e01c 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -71,6 +71,7 @@ properties:
- loongson,ls7a-dwmac
- nxp,s32g2-dwmac
- qcom,qcs404-ethqos
+ - qcom,sa8255p-ethqos
- qcom,sa8775p-ethqos
- qcom,sc8280xp-ethqos
- qcom,sm8150-ethqos
@@ -180,7 +181,8 @@ properties:
- const: ahb
power-domains:
- maxItems: 1
+ minItems: 1
+ maxItems: 3
mac-mode:
$ref: ethernet-controller.yaml#/properties/phy-connection-type
@@ -643,6 +645,7 @@ allOf:
- ingenic,x1830-mac
- ingenic,x2000-mac
- qcom,qcs404-ethqos
+ - qcom,sa8255p-ethqos
- qcom,sa8775p-ethqos
- qcom,sc8280xp-ethqos
- qcom,sm8150-ethqos
diff --git a/MAINTAINERS b/MAINTAINERS
index 252b06d4240cc2b67405b8a967055bd53dec7c8e..14c80fbad8b97cc5562555d2422c81724d42111d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21218,6 +21218,7 @@ M: Vinod Koul <vkoul@kernel.org>
L: netdev@vger.kernel.org
L: linux-arm-msm@vger.kernel.org
S: Maintained
+F: Documentation/devicetree/bindings/net/qcom,ethqos-scmi.yaml
F: Documentation/devicetree/bindings/net/qcom,ethqos.yaml
F: drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
--
2.48.1
On Mon, Oct 27, 2025 at 04:44:49PM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Describe the firmware-managed variant of the QCom DesignWare MAC. As the
> properties here differ a lot from the HLOS-managed variant, lets put it
> in a separate file.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
> .../devicetree/bindings/net/qcom,ethqos-scmi.yaml | 101 +++++++++++++++++++++
> .../devicetree/bindings/net/snps,dwmac.yaml | 5 +-
> MAINTAINERS | 1 +
> 3 files changed, 106 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/net/qcom,ethqos-scmi.yaml b/Documentation/devicetree/bindings/net/qcom,ethqos-scmi.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..b821299d7b30cdb802d9ee5d9fa17542b8334bd2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/qcom,ethqos-scmi.yaml
> @@ -0,0 +1,101 @@
> +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/qcom,ethqos-scmi.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm Ethernet ETHQOS device (firmware managed)
> +
> +maintainers:
> + - Bjorn Andersson <andersson@kernel.org>
> + - Konrad Dybcio <konradybcio@kernel.org>
> + - Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> +
> +description:
> + dwmmac based Qualcomm ethernet devices which support Gigabit
> + ethernet (version v2.3.0 and onwards) with clocks, interconnects, etc.
> + managed by firmware
> +
> +allOf:
> + - $ref: snps,dwmac.yaml#
> +
> +properties:
> + compatible:
> + const: qcom,sa8255p-ethqos
> +
> + reg:
> + maxItems: 2
> +
> + reg-names:
> + items:
> + - const: stmmaceth
> + - const: rgmii
> +
> + interrupts:
> + items:
> + - description: Combined signal for various interrupt events
> + - description: The interrupt that occurs when HW safety error triggered
> +
> + interrupt-names:
> + items:
> + - const: macirq
> + - const: sfty
> +
> + power-domains:
> + minItems: 3
maxItems instead
But the other problem is that it is conflicting with snps,dwmac.yaml
which says max 1 is allowed. You need to fix that, along with
restricting other users of that shared schema to maxItems: 1.
> +
> + power-domain-names:
> + items:
> + - const: core
> + - const: mdio
> + - const: serdes
> +
> + iommus:
> + maxItems: 1
> +
> + dma-coherent: true
> +
> + phys: true
Missing maxItems.
> +
> + phy-names:
> + const: serdes
> +
> +required:
> + - compatible
> + - reg-names
> + - power-domains
power-domain-names
Shouldn't phys be required? How device can work sometimes without its
phy?
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> + ethernet: ethernet@7a80000 {
> + compatible = "qcom,sa8255p-ethqos";
> + reg = <0x23040000 0x10000>,
> + <0x23056000 0x100>;
> + reg-names = "stmmaceth", "rgmii";
> +
> + iommus = <&apps_smmu 0x120 0x7>;
> +
> + interrupts = <GIC_SPI 946 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 782 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "macirq", "sfty";
> +
> + dma-coherent;
> +
> + snps,tso;
> + snps,pbl = <32>;
> + rx-fifo-depth = <16384>;
> + tx-fifo-depth = <16384>;
> +
> + phy-handle = <ðernet_phy>;
> + phy-mode = "2500base-x";
Incomplete example - missing phys.
> +
> + snps,mtl-rx-config = <&mtl_rx_setup1>;
> + snps,mtl-tx-config = <&mtl_tx_setup1>;
> +
> + power-domains = <&scmi8_pd 0>, <&scmi8_pd 1>, <&scmi8_dvfs 0>;
> + power-domain-names = "core", "mdio","serdes";
> + };
> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> index dd3c72e8363e70d101ed2702e2ea3235ee38e2a0..312d1bbc2ad1051520355039f5587381cbd1e01c 100644
> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> @@ -71,6 +71,7 @@ properties:
> - loongson,ls7a-dwmac
> - nxp,s32g2-dwmac
> - qcom,qcs404-ethqos
> + - qcom,sa8255p-ethqos
> - qcom,sa8775p-ethqos
> - qcom,sc8280xp-ethqos
> - qcom,sm8150-ethqos
> @@ -180,7 +181,8 @@ properties:
> - const: ahb
>
> power-domains:
> - maxItems: 1
> + minItems: 1
> + maxItems: 3
Ah, you did it. But you need to update all other bindings as well.
Best regards,
Krzysztof
On Tue, Oct 28, 2025 at 9:16 AM Krzysztof Kozlowski <krzk@kernel.org> wrote: > > > + > > + power-domains: > > + minItems: 3 > > maxItems instead > > But the other problem is that it is conflicting with snps,dwmac.yaml > which says max 1 is allowed. You need to fix that, along with > restricting other users of that shared schema to maxItems: 1. > Just to be clear: snps,dwmac.yaml should stay as: power-domains: minItems: 1 maxItems: 3 But all bindings referencing it, except the new one, should now gain: power-domains: maxItems: 1 > > Shouldn't phys be required? How device can work sometimes without its > phy? > Actually I will drop phys, the serdes PHY is managed by SCMI. Bart
On 03/11/2025 18:18, Bartosz Golaszewski wrote: > On Tue, Oct 28, 2025 at 9:16 AM Krzysztof Kozlowski <krzk@kernel.org> wrote: >> >>> + >>> + power-domains: >>> + minItems: 3 >> >> maxItems instead >> >> But the other problem is that it is conflicting with snps,dwmac.yaml >> which says max 1 is allowed. You need to fix that, along with >> restricting other users of that shared schema to maxItems: 1. >> > > Just to be clear: snps,dwmac.yaml should stay as: > > power-domains: > minItems: 1 > maxItems: 3 > > But all bindings referencing it, except the new one, should now gain: > > power-domains: > maxItems: 1 Yes. Best regards, Krzysztof
© 2016 - 2026 Red Hat, Inc.