lkml.org 
[lkml]   [2023]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [EXTERNAL] Re: [PATCH v4 1/2] dt-bindings: net: Add ICSSG Ethernet Driver bindings
From
Hi Krzysztof,

On 06/02/23 16:11, Krzysztof Kozlowski wrote:
> On 06/02/2023 11:39, Md Danish Anwar wrote:
>>>> + properties:
>>>> + '#address-cells':
>>>> + const: 1
>>>> + '#size-cells':
>>>> + const: 0
>>>> +
>>>> + patternProperties:
>>>> + ^port@[0-1]$:
>>>> + type: object
>>>> + description: ICSSG PRUETH external ports
>>>> +
>>
>> At least one ethernet port is required. Should I add the below line here for this?
>>
>> minItems: 1
>
> You need after the patternProperties:
> anyOf:
> - required:
> - port@0
> - required:
> - port@1
>


Is this correct?

ethernet-ports:
type: object
additionalProperties: false

properties:
'#address-cells':
const: 1
'#size-cells':
const: 0

patternProperties:
^port@[0-1]$:
type: object
description: ICSSG PRUETH external ports
$ref: ethernet-controller.yaml#
unevaluatedProperties: false

properties:
reg:
items:
- enum: [0, 1]
description: ICSSG PRUETH port number

interrupts:
maxItems: 1

ti,syscon-rgmii-delay:
items:
- items:
- description: phandle to system controller node
- description: The offset to ICSSG control register
$ref: /schemas/types.yaml#/definitions/phandle-array
description:
phandle to system controller node and register offset
to ICSSG control register for RGMII transmit delay

required:
- reg
anyOf:
- required:
- port@0
- required:
- port@1

Adding anyOf just below patternProperties was throwing error, so I added anyOf
after the end of patternProperties. Please let me know if this looks OK.

>>
>>
>
> Best regards,
> Krzysztof
>

--
Thanks and Regards,
Danish.

\
 
 \ /
  Last update: 2023-03-27 00:12    [W:0.076 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site