@@ -65,16 +65,8 @@ if:
- required: [ ethernet ]
- required: [ link ]
then:
- allOf:
- - required:
- - phy-mode
- - oneOf:
- - required:
- - fixed-link
- - required:
- - phy-handle
- - required:
- - managed
+ $ref: /schemas/net/ethernet-controller.yaml#/$defs/phylink
+ required: [ phy-mode ]
additionalProperties: true
@@ -284,6 +284,35 @@ allOf:
controllers that have configurable TX internal delays. If this
property is present then the MAC applies the TX delay.
+$defs:
+ phylink:
+ description: phylink bindings for ethernet controllers
+ allOf:
+ - anyOf:
+ - required: [ fixed-link ]
+ - required: [ pcs-handle ]
+ - required: [ tbi-handle ]
+ - required: [ phy-handle ]
+ - required: [ sfp ]
+ - required: [ managed ]
+
+ - if:
+ required: [ fixed-link ]
+ then:
+ properties:
+ managed:
+ const: auto
+
+ - if:
+ required: [ sfp ]
+ then:
+ oneOf:
+ - required: [ phy-handle ]
+ - required: [ managed ]
+ properties:
+ managed:
+ const: in-band-status
+
additionalProperties: true
...
Define the phylink bindings on ethernet-controller.yaml and replace the bindings on the dsa-port.yaml schema with them. The shared ports of DSA requires phy-mode so keep that. Important remarks about the phylink bindings: - fsl,fman-dtsec uses tbi-handle instead of pcs-handle, therefore tbi-handle is included. - For sfp, only managed with the in-band-status value must be required, but phy-handle is required as another option because of a special case on the eth2 node on arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts. Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> --- .../devicetree/bindings/net/dsa/dsa-port.yaml | 12 ++------ .../bindings/net/ethernet-controller.yaml | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+), 10 deletions(-)