devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Adam Ford <aford173@gmail.com>
Cc: devicetree@vger.kernel.org, woods.technical@gmail.com,
	aford@beaconembedded.com, "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Adam Ford <aford@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: net: davinci_emac: Convert to yaml version from txt
Date: Mon, 24 Jun 2024 15:11:22 +0200	[thread overview]
Message-ID: <74620c16-f5a4-4782-aa46-0bd5d8c656c0@kernel.org> (raw)
In-Reply-To: <CAHCN7xKTnbDec2uJu0vJMY-NMTDvhb=C_FPM+5QeDNBwwRgZeA@mail.gmail.com>

On 24/06/2024 13:59, Adam Ford wrote:

>>> diff --git a/Documentation/devicetree/bindings/net/davinci_emac.yaml b/Documentation/devicetree/bindings/net/davinci_emac.yaml
>>> new file mode 100644
>>> index 000000000000..4c2640aef8a1
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/net/davinci_emac.yaml
>>
>> Filename matching compatible format. Missing vendor prefix. Underscores
>> are not used in names or compatibles.
> 
> Thank you for the review.
> 
> Would a proper name be ti,davinci-emac.yaml?

Yes, it's fine.

> 
>>
>>
>>> @@ -0,0 +1,111 @@
>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/net/davinci_emac.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: Texas Instruments Davici EMAC
>>> +
>>> +maintainers:
>>> +  - Adam Ford <aford@gmail.com>
>>> +
>>> +description:
>>> +  Ethernet based on the Programmable Real-Time Unit and Industrial
>>> +  Communication Subsystem.
>>> +
>>> +allOf:
>>> +  - $ref: ethernet-controller.yaml#
>>> +
>>> +properties:
>>> +  compatible:
>>> +    items:
>>
>>
>> That's just enum, no need for items here.
>>
>>> +      - enum:
>>> +          - ti,davinci-dm6467-emac # da850
>>> +          - ti,dm816-emac
>>> +          - ti,am3517-emac
>>> +
>>> +  reg:
>>> +    maxItems: 1
>>> +
>>> +  interrupts:
>>> +    minItems: 4
>>
>> You need to list and describe the items.
>>
>>> +
>>> +  clocks:
>>> +    maxItems: 1
>>> +
>>> +  clock-names:
>>> +    items:
>>> +      - const: ick
>>> +
>>> +  power-domains:
>>> +    maxItems: 1
>>> +
>>> +  resets:
>>> +    maxItems: 1
>>> +
>>> +  local-mac-address: true
>>
>> Drop
>>
>>> +  mac-address: true
>>
>> Drop
>>
>> You miss top-level $ref to appropriate schema.
>>
>>> +
>>> +  syscon:
>>> +    $ref: /schemas/types.yaml#/definitions/phandle
>>> +    description: a phandle to the global system controller on
>>> +      to enable/disable interrupts
>>
>> Drop entire property. There was no such property in old binding and
>> nothing explains why it was added.
> 
> The am3517.dtsi emac node has a syscon, so I didn't want to break it.
> I'll take a look to see what the syscon node on the am3517 does.  I
> struggle with if statements in yaml, but if it's necessary for the
> am3517, can we keep it if I elaborate on it in the commit message?

Explain in commit msg changes to the binding done during conversion.
With a rationale why these are needed (e.g. existing DTS and Linux
drivers use them).


Best regards,
Krzysztof


      reply	other threads:[~2024-06-24 13:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-23 17:09 [PATCH] dt-bindings: net: davinci_emac: Convert to yaml version from txt Adam Ford
2024-06-24  5:07 ` Krzysztof Kozlowski
2024-06-24 11:59   ` Adam Ford
2024-06-24 13:11     ` Krzysztof Kozlowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=74620c16-f5a4-4782-aa46-0bd5d8c656c0@kernel.org \
    --to=krzk@kernel.org \
    --cc=aford173@gmail.com \
    --cc=aford@beaconembedded.com \
    --cc=aford@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    --cc=woods.technical@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).