devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Marcin Wojtas <mw@semihalf.com>
Cc: "Michał Grzelak" <mig@semihalf.com>,
	devicetree@vger.kernel.org, linux@armlinux.org.uk,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, upstream@semihalf.com
Subject: Re: [PATCH v3 1/3] dt-bindings: net: marvell,pp2: convert to json-schema
Date: Wed, 12 Oct 2022 10:32:07 -0400	[thread overview]
Message-ID: <6f3088a8-284d-d71f-68d1-01a5412bfff2@linaro.org> (raw)
In-Reply-To: <CAPv3WKcY=erFTBDLP1AhQa0+CP6C8KJinmKFEkR2xh4mHHv_aQ@mail.gmail.com>

On 11/10/2022 16:34, Marcin Wojtas wrote:
>>
>> Keep the same order of items here as in list of properties
>>
>>> +
>>> +required:
>>> +  - compatible
>>> +  - reg
>>> +  - clocks
>>> +  - clock-names
>>> +
>>> +allOf:
>>> +  - $ref: ethernet-controller.yaml#
>>
>> Hmm, are you sure this applies to top-level properties, not to
>> ethernet-port subnodes? Your ports have phy-mode and phy - just like
>> ethernet-controller. If I understand correctly, your Armada Ethernet
>> Controller actually consists of multiple ethernet controllers?
>>
> 
> PP2 is a single controller with common HW blocks, such as queue/buffer
> management, parser/classifier, register space, and more. It controls
> up to 3 MAC's (ports) that can be connected to phys, sfp cages, etc.
> The latter cannot exist on their own and IMO the current hierarchy -
> the main controller with subnodes (ports) properly reflects the
> hardware.
> 
> Anyway, the ethernet-controller.yaml properties fit to the subnodes.
> Apart from the name. The below is IMO a good description:.

It also starts to look a bit like a switch (see bindings/net/dsa).

> 
>> If so, this should be moved to proper place inside patternProperties.
>> Maybe the subnodes should also be renamed from ports to just "ethernet"
>> (as ethernet-controller.yaml expects), but other schemas do not follow
>> this convention,
> 
> ethernet@
> {
>     ethernet-port@0
>     {
>      }
>      ethernet-port@1
>      {
>      }
> }
> 
> What do you recommend?

Yes, keep it like this and reference the ethernet-controller.yaml in
each port.

Best regards,
Krzysztof


  parent reply	other threads:[~2022-10-12 14:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-11 19:06 [PATCH v3 0/3] marvell,pp2.yaml and .dtsi improvements Michał Grzelak
2022-10-11 19:06 ` [PATCH v3 1/3] dt-bindings: net: marvell,pp2: convert to json-schema Michał Grzelak
2022-10-11 19:47   ` Krzysztof Kozlowski
2022-10-11 20:34     ` Marcin Wojtas
2022-10-11 23:01       ` Marcin Wojtas
2022-10-12 14:34         ` Krzysztof Kozlowski
2022-10-12 14:32       ` Krzysztof Kozlowski [this message]
2022-10-11 19:06 ` [PATCH v3 2/3] arm64: dts: marvell: Update network description to match schema Michał Grzelak
2022-10-11 19:06 ` [PATCH v3 3/3] ARM: dts: armada-375: " Michał Grzelak

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=6f3088a8-284d-d71f-68d1-01a5412bfff2@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mig@semihalf.com \
    --cc=mw@semihalf.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=upstream@semihalf.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).