* [PATCH v2] dt-bindings: net: Define properties at top-level
@ 2024-07-03 19:58 Rob Herring (Arm)
2024-07-04 6:29 ` Krzysztof Kozlowski
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Rob Herring (Arm) @ 2024-07-03 19:58 UTC (permalink / raw)
To: Serge Semin, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Lorenzo Bianconi, Felix Fietkau,
Alexandre Torgue, Giuseppe Cavallaro, Jose Abreu
Cc: netdev, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
Convention is DT schemas should define all properties at the top-level
and not inside of if/then schemas. That minimizes the if/then schemas
and is more future proof.
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
v2:
- Drop the parts already applied from Serge
---
.../devicetree/bindings/net/mediatek,net.yaml | 28 +++++---
.../devicetree/bindings/net/snps,dwmac.yaml | 67 ++++++++++---------
2 files changed, 52 insertions(+), 43 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/mediatek,net.yaml b/Documentation/devicetree/bindings/net/mediatek,net.yaml
index 3202dc7967c5..686b5c2fae40 100644
--- a/Documentation/devicetree/bindings/net/mediatek,net.yaml
+++ b/Documentation/devicetree/bindings/net/mediatek,net.yaml
@@ -68,6 +68,17 @@ properties:
Phandle to the syscon node that handles the path from GMAC to
PHY variants.
+ mediatek,pcie-mirror:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to the mediatek pcie-mirror controller.
+
+ mediatek,pctl:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to the syscon node that handles the ports slew rate and
+ driver current.
+
mediatek,sgmiisys:
$ref: /schemas/types.yaml#/definitions/phandle-array
minItems: 1
@@ -131,15 +142,12 @@ allOf:
mediatek,infracfg: false
- mediatek,pctl:
- $ref: /schemas/types.yaml#/definitions/phandle
- description:
- Phandle to the syscon node that handles the ports slew rate and
- driver current.
-
mediatek,wed: false
mediatek,wed-pcie: false
+ else:
+ properties:
+ mediatek,pctl: false
- if:
properties:
@@ -201,12 +209,10 @@ allOf:
minItems: 1
maxItems: 1
- mediatek,pcie-mirror:
- $ref: /schemas/types.yaml#/definitions/phandle
- description:
- Phandle to the mediatek pcie-mirror controller.
-
mediatek,wed-pcie: false
+ else:
+ properties:
+ mediatek,pcie-mirror: false
- if:
properties:
diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index 0ab124324eec..3eb65e63fdae 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -512,6 +512,12 @@ properties:
description:
Frequency division factor for MDC clock.
+ snps,tso:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description:
+ Enables the TSO feature otherwise it will be managed by MAC HW capability
+ register.
+
mdio:
$ref: mdio.yaml#
unevaluatedProperties: false
@@ -595,41 +601,38 @@ allOf:
- if:
properties:
compatible:
- contains:
- enum:
- - allwinner,sun7i-a20-gmac
- - allwinner,sun8i-a83t-emac
- - allwinner,sun8i-h3-emac
- - allwinner,sun8i-r40-gmac
- - allwinner,sun8i-v3s-emac
- - allwinner,sun50i-a64-emac
- - loongson,ls2k-dwmac
- - loongson,ls7a-dwmac
- - ingenic,jz4775-mac
- - ingenic,x1000-mac
- - ingenic,x1600-mac
- - ingenic,x1830-mac
- - ingenic,x2000-mac
- - qcom,qcs404-ethqos
- - qcom,sa8775p-ethqos
- - qcom,sc8280xp-ethqos
- - qcom,sm8150-ethqos
- - snps,dwmac-4.00
- - snps,dwmac-4.10a
- - snps,dwmac-4.20a
- - snps,dwmac-5.10a
- - snps,dwmac-5.20
- - snps,dwxgmac
- - snps,dwxgmac-2.10
- - st,spear600-gmac
+ not:
+ contains:
+ enum:
+ - allwinner,sun7i-a20-gmac
+ - allwinner,sun8i-a83t-emac
+ - allwinner,sun8i-h3-emac
+ - allwinner,sun8i-r40-gmac
+ - allwinner,sun8i-v3s-emac
+ - allwinner,sun50i-a64-emac
+ - loongson,ls2k-dwmac
+ - loongson,ls7a-dwmac
+ - ingenic,jz4775-mac
+ - ingenic,x1000-mac
+ - ingenic,x1600-mac
+ - ingenic,x1830-mac
+ - ingenic,x2000-mac
+ - qcom,qcs404-ethqos
+ - qcom,sa8775p-ethqos
+ - qcom,sc8280xp-ethqos
+ - qcom,sm8150-ethqos
+ - snps,dwmac-4.00
+ - snps,dwmac-4.10a
+ - snps,dwmac-4.20a
+ - snps,dwmac-5.10a
+ - snps,dwmac-5.20
+ - snps,dwxgmac
+ - snps,dwxgmac-2.10
+ - st,spear600-gmac
then:
properties:
- snps,tso:
- $ref: /schemas/types.yaml#/definitions/flag
- description:
- Enables the TSO feature otherwise it will be managed by
- MAC HW capability register.
+ snps,tso: false
additionalProperties: true
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2] dt-bindings: net: Define properties at top-level
2024-07-03 19:58 [PATCH v2] dt-bindings: net: Define properties at top-level Rob Herring (Arm)
@ 2024-07-04 6:29 ` Krzysztof Kozlowski
2024-07-04 7:56 ` Serge Semin
2024-07-05 2:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-07-04 6:29 UTC (permalink / raw)
To: Rob Herring (Arm), Serge Semin, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Lorenzo Bianconi,
Felix Fietkau, Alexandre Torgue, Giuseppe Cavallaro, Jose Abreu
Cc: netdev, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
On 03/07/2024 21:58, Rob Herring (Arm) wrote:
> Convention is DT schemas should define all properties at the top-level
> and not inside of if/then schemas. That minimizes the if/then schemas
> and is more future proof.
>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
> v2:
> - Drop the parts already applied from Serge
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] dt-bindings: net: Define properties at top-level
2024-07-03 19:58 [PATCH v2] dt-bindings: net: Define properties at top-level Rob Herring (Arm)
2024-07-04 6:29 ` Krzysztof Kozlowski
@ 2024-07-04 7:56 ` Serge Semin
2024-07-05 2:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Serge Semin @ 2024-07-04 7:56 UTC (permalink / raw)
To: Rob Herring (Arm)
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Lorenzo Bianconi, Felix Fietkau,
Alexandre Torgue, Giuseppe Cavallaro, Jose Abreu, netdev,
devicetree, linux-kernel, linux-arm-kernel, linux-mediatek
On Wed, Jul 03, 2024 at 01:58:27PM -0600, Rob Herring (Arm) wrote:
> Convention is DT schemas should define all properties at the top-level
> and not inside of if/then schemas. That minimizes the if/then schemas
> and is more future proof.
>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
> v2:
> - Drop the parts already applied from Serge
> ---
> .../devicetree/bindings/net/mediatek,net.yaml | 28 +++++---
> .../devicetree/bindings/net/snps,dwmac.yaml | 67 ++++++++++---------
For the DW *MAC bindings.
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
-Serge(y)
> 2 files changed, 52 insertions(+), 43 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/net/mediatek,net.yaml b/Documentation/devicetree/bindings/net/mediatek,net.yaml
> index 3202dc7967c5..686b5c2fae40 100644
> --- a/Documentation/devicetree/bindings/net/mediatek,net.yaml
> +++ b/Documentation/devicetree/bindings/net/mediatek,net.yaml
> @@ -68,6 +68,17 @@ properties:
> Phandle to the syscon node that handles the path from GMAC to
> PHY variants.
>
> + mediatek,pcie-mirror:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description:
> + Phandle to the mediatek pcie-mirror controller.
> +
> + mediatek,pctl:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description:
> + Phandle to the syscon node that handles the ports slew rate and
> + driver current.
> +
> mediatek,sgmiisys:
> $ref: /schemas/types.yaml#/definitions/phandle-array
> minItems: 1
> @@ -131,15 +142,12 @@ allOf:
>
> mediatek,infracfg: false
>
> - mediatek,pctl:
> - $ref: /schemas/types.yaml#/definitions/phandle
> - description:
> - Phandle to the syscon node that handles the ports slew rate and
> - driver current.
> -
> mediatek,wed: false
>
> mediatek,wed-pcie: false
> + else:
> + properties:
> + mediatek,pctl: false
>
> - if:
> properties:
> @@ -201,12 +209,10 @@ allOf:
> minItems: 1
> maxItems: 1
>
> - mediatek,pcie-mirror:
> - $ref: /schemas/types.yaml#/definitions/phandle
> - description:
> - Phandle to the mediatek pcie-mirror controller.
> -
> mediatek,wed-pcie: false
> + else:
> + properties:
> + mediatek,pcie-mirror: false
>
> - if:
> properties:
> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> index 0ab124324eec..3eb65e63fdae 100644
> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> @@ -512,6 +512,12 @@ properties:
> description:
> Frequency division factor for MDC clock.
>
> + snps,tso:
> + $ref: /schemas/types.yaml#/definitions/flag
> + description:
> + Enables the TSO feature otherwise it will be managed by MAC HW capability
> + register.
> +
> mdio:
> $ref: mdio.yaml#
> unevaluatedProperties: false
> @@ -595,41 +601,38 @@ allOf:
> - if:
> properties:
> compatible:
> - contains:
> - enum:
> - - allwinner,sun7i-a20-gmac
> - - allwinner,sun8i-a83t-emac
> - - allwinner,sun8i-h3-emac
> - - allwinner,sun8i-r40-gmac
> - - allwinner,sun8i-v3s-emac
> - - allwinner,sun50i-a64-emac
> - - loongson,ls2k-dwmac
> - - loongson,ls7a-dwmac
> - - ingenic,jz4775-mac
> - - ingenic,x1000-mac
> - - ingenic,x1600-mac
> - - ingenic,x1830-mac
> - - ingenic,x2000-mac
> - - qcom,qcs404-ethqos
> - - qcom,sa8775p-ethqos
> - - qcom,sc8280xp-ethqos
> - - qcom,sm8150-ethqos
> - - snps,dwmac-4.00
> - - snps,dwmac-4.10a
> - - snps,dwmac-4.20a
> - - snps,dwmac-5.10a
> - - snps,dwmac-5.20
> - - snps,dwxgmac
> - - snps,dwxgmac-2.10
> - - st,spear600-gmac
> + not:
> + contains:
> + enum:
> + - allwinner,sun7i-a20-gmac
> + - allwinner,sun8i-a83t-emac
> + - allwinner,sun8i-h3-emac
> + - allwinner,sun8i-r40-gmac
> + - allwinner,sun8i-v3s-emac
> + - allwinner,sun50i-a64-emac
> + - loongson,ls2k-dwmac
> + - loongson,ls7a-dwmac
> + - ingenic,jz4775-mac
> + - ingenic,x1000-mac
> + - ingenic,x1600-mac
> + - ingenic,x1830-mac
> + - ingenic,x2000-mac
> + - qcom,qcs404-ethqos
> + - qcom,sa8775p-ethqos
> + - qcom,sc8280xp-ethqos
> + - qcom,sm8150-ethqos
> + - snps,dwmac-4.00
> + - snps,dwmac-4.10a
> + - snps,dwmac-4.20a
> + - snps,dwmac-5.10a
> + - snps,dwmac-5.20
> + - snps,dwxgmac
> + - snps,dwxgmac-2.10
> + - st,spear600-gmac
>
> then:
> properties:
> - snps,tso:
> - $ref: /schemas/types.yaml#/definitions/flag
> - description:
> - Enables the TSO feature otherwise it will be managed by
> - MAC HW capability register.
> + snps,tso: false
>
> additionalProperties: true
>
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] dt-bindings: net: Define properties at top-level
2024-07-03 19:58 [PATCH v2] dt-bindings: net: Define properties at top-level Rob Herring (Arm)
2024-07-04 6:29 ` Krzysztof Kozlowski
2024-07-04 7:56 ` Serge Semin
@ 2024-07-05 2:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-07-05 2:20 UTC (permalink / raw)
To: Rob Herring
Cc: fancer.lancer, davem, edumazet, kuba, pabeni, krzk+dt, conor+dt,
matthias.bgg, angelogioacchino.delregno, lorenzo, nbd,
alexandre.torgue, peppe.cavallaro, joabreu, netdev, devicetree,
linux-kernel, linux-arm-kernel, linux-mediatek
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 3 Jul 2024 13:58:27 -0600 you wrote:
> Convention is DT schemas should define all properties at the top-level
> and not inside of if/then schemas. That minimizes the if/then schemas
> and is more future proof.
>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
> v2:
> - Drop the parts already applied from Serge
>
> [...]
Here is the summary with links:
- [v2] dt-bindings: net: Define properties at top-level
https://git.kernel.org/netdev/net-next/c/390b14b5e9f6
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-07-05 2:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-03 19:58 [PATCH v2] dt-bindings: net: Define properties at top-level Rob Herring (Arm)
2024-07-04 6:29 ` Krzysztof Kozlowski
2024-07-04 7:56 ` Serge Semin
2024-07-05 2:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).