[PATCH net-next 3/8] dt-bindings: net: ethernet-controller: remove the enum values of speed

Wei Fang posted 8 patches 3 months, 3 weeks ago
There is a newer version of this series
[PATCH net-next 3/8] dt-bindings: net: ethernet-controller: remove the enum values of speed
Posted by Wei Fang 3 months, 3 weeks ago
Some fixed-link devices have uncommon link speeds. For example, the CPU
port of NXP NETC switch is connected to an ENETC (Ethernet Controller),
they are fully integrated into the NETC IP and connected through the
'pseudo link'. The link speed varies depending on the NETC version. For
example, the speed of NETC v4.3 is 2680 Mbps, other versions may be 8
Gbps or 12.5 Gbps or other speeds. There is no need and pointless to add
these values to ethernet-controller.yaml. Therefore, remove these enum
values so that when performing dtbs_check, no warnings are reported for
the uncommon values.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
---
 Documentation/devicetree/bindings/net/ethernet-controller.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
index 1bafd687dcb1..7fa02d58c208 100644
--- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
@@ -177,7 +177,6 @@ properties:
             description:
               Link speed.
             $ref: /schemas/types.yaml#/definitions/uint32
-            enum: [10, 100, 1000, 2500, 5000, 10000]
 
           full-duplex:
             $ref: /schemas/types.yaml#/definitions/flag
-- 
2.34.1
Re: [PATCH net-next 3/8] dt-bindings: net: ethernet-controller: remove the enum values of speed
Posted by Rob Herring 3 months, 2 weeks ago
On Thu, Oct 16, 2025 at 06:20:14PM +0800, Wei Fang wrote:
> Some fixed-link devices have uncommon link speeds. For example, the CPU
> port of NXP NETC switch is connected to an ENETC (Ethernet Controller),
> they are fully integrated into the NETC IP and connected through the
> 'pseudo link'. The link speed varies depending on the NETC version. For
> example, the speed of NETC v4.3 is 2680 Mbps, other versions may be 8
> Gbps or 12.5 Gbps or other speeds. There is no need and pointless to add
> these values to ethernet-controller.yaml. Therefore, remove these enum
> values so that when performing dtbs_check, no warnings are reported for
> the uncommon values.

Every binding that used this was relying on these constraints. So you've 
got to move them into the individual bindings. I'd leave a minimum and 
maximum here.

> 
> Signed-off-by: Wei Fang <wei.fang@nxp.com>
> ---
>  Documentation/devicetree/bindings/net/ethernet-controller.yaml | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
> index 1bafd687dcb1..7fa02d58c208 100644
> --- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml
> +++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
> @@ -177,7 +177,6 @@ properties:
>              description:
>                Link speed.
>              $ref: /schemas/types.yaml#/definitions/uint32
> -            enum: [10, 100, 1000, 2500, 5000, 10000]
>  
>            full-duplex:
>              $ref: /schemas/types.yaml#/definitions/flag
> -- 
> 2.34.1
>