Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Joakim Zhang and committed by
David S. Miller
649502a3 240bfd13

+19 -15
+19 -15
Documentation/devicetree/bindings/net/fsl,fec.yaml
··· 49 49 maxItems: 4 50 50 51 51 interrupt-names: 52 - description: 53 - Names of the interrupts listed in interrupts property in the same order. 54 - The defaults if not specified are 55 - __Number of interrupts__ __Default__ 56 - 1 "int0" 57 - 2 "int0", "pps" 58 - 3 "int0", "int1", "int2" 59 - 4 "int0", "int1", "int2", "pps" 60 - The order may be changed as long as they correspond to the interrupts 61 - property. Currently, only i.mx7 uses "int1" and "int2". They correspond to 62 - tx/rx queues 1 and 2. "int0" will be used for queue 0 and ENET_MII interrupts. 63 - For imx6sx, "int0" handles all 3 queues and ENET_MII. "pps" is for the pulse 64 - per second interrupt associated with 1588 precision time protocol(PTP). 52 + oneOf: 53 + - items: 54 + - const: int0 55 + - items: 56 + - const: int0 57 + - const: pps 58 + - items: 59 + - const: int0 60 + - const: int1 61 + - const: int2 62 + - items: 63 + - const: int0 64 + - const: int1 65 + - const: int2 66 + - const: pps 65 67 66 68 clocks: 67 69 minItems: 2 ··· 82 80 clock-names: 83 81 minItems: 2 84 82 maxItems: 5 85 - contains: 83 + items: 86 84 enum: 87 85 - ipg 88 86 - ahb ··· 109 107 description: 110 108 The property is valid for enet-avb IP, which supports hw multi queues. 111 109 Should specify the tx queue number, otherwise set tx queue number to 1. 110 + enum: [1, 2, 3] 112 111 113 112 fsl,num-rx-queues: 114 113 $ref: /schemas/types.yaml#/definitions/uint32 115 114 description: 116 115 The property is valid for enet-avb IP, which supports hw multi queues. 117 116 Should specify the rx queue number, otherwise set rx queue number to 1. 117 + enum: [1, 2, 3] 118 118 119 119 fsl,magic-packet: 120 120 $ref: /schemas/types.yaml#/definitions/flag ··· 183 179 # least undocumented properties. However, PHY may have a deprecated option to 184 180 # place PHY OF properties in the MAC node, such as Micrel PHY, and we can find 185 181 # these boards which is based on i.MX6QDL. 186 - additionalProperties: true 182 + additionalProperties: false 187 183 188 184 examples: 189 185 - |