2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-06 20:53:54 +08:00

dt-bindings: net: fsl,fec: improve the binding a bit

This patch improves the yaml a bit according to Rob Herring comments:
1) normalize interrupt-names property, there is no reason to support
random order.
2) validate each string in clock-names property.
3) add constraints for fsl,num-tx-queues/fsl,num-rx-queues property.
4) change additionalProperties to false in order to do strict checking.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Joakim Zhang 2021-07-21 18:12:19 +08:00 committed by David S. Miller
parent 240bfd134c
commit 649502a337

View File

@ -49,19 +49,21 @@ properties:
maxItems: 4 maxItems: 4
interrupt-names: interrupt-names:
description: oneOf:
Names of the interrupts listed in interrupts property in the same order. - items:
The defaults if not specified are - const: int0
__Number of interrupts__ __Default__ - items:
1 "int0" - const: int0
2 "int0", "pps" - const: pps
3 "int0", "int1", "int2" - items:
4 "int0", "int1", "int2", "pps" - const: int0
The order may be changed as long as they correspond to the interrupts - const: int1
property. Currently, only i.mx7 uses "int1" and "int2". They correspond to - const: int2
tx/rx queues 1 and 2. "int0" will be used for queue 0 and ENET_MII interrupts. - items:
For imx6sx, "int0" handles all 3 queues and ENET_MII. "pps" is for the pulse - const: int0
per second interrupt associated with 1588 precision time protocol(PTP). - const: int1
- const: int2
- const: pps
clocks: clocks:
minItems: 2 minItems: 2
@ -80,7 +82,7 @@ properties:
clock-names: clock-names:
minItems: 2 minItems: 2
maxItems: 5 maxItems: 5
contains: items:
enum: enum:
- ipg - ipg
- ahb - ahb
@ -107,12 +109,14 @@ properties:
description: description:
The property is valid for enet-avb IP, which supports hw multi queues. The property is valid for enet-avb IP, which supports hw multi queues.
Should specify the tx queue number, otherwise set tx queue number to 1. Should specify the tx queue number, otherwise set tx queue number to 1.
enum: [1, 2, 3]
fsl,num-rx-queues: fsl,num-rx-queues:
$ref: /schemas/types.yaml#/definitions/uint32 $ref: /schemas/types.yaml#/definitions/uint32
description: description:
The property is valid for enet-avb IP, which supports hw multi queues. The property is valid for enet-avb IP, which supports hw multi queues.
Should specify the rx queue number, otherwise set rx queue number to 1. Should specify the rx queue number, otherwise set rx queue number to 1.
enum: [1, 2, 3]
fsl,magic-packet: fsl,magic-packet:
$ref: /schemas/types.yaml#/definitions/flag $ref: /schemas/types.yaml#/definitions/flag
@ -179,7 +183,7 @@ required:
# least undocumented properties. However, PHY may have a deprecated option to # least undocumented properties. However, PHY may have a deprecated option to
# place PHY OF properties in the MAC node, such as Micrel PHY, and we can find # place PHY OF properties in the MAC node, such as Micrel PHY, and we can find
# these boards which is based on i.MX6QDL. # these boards which is based on i.MX6QDL.
additionalProperties: true additionalProperties: false
examples: examples:
- | - |