Thread (9 messages) 9 messages, 3 authors, 2022-10-12

Re: [PATCH v3 1/3] dt-bindings: net: marvell,pp2: convert to json-schema

From: Krzysztof Kozlowski <hidden>
Date: 2022-10-12 14:32:38
Also in: linux-devicetree, lkml

On 11/10/2022 16:34, Marcin Wojtas wrote:
quoted
Keep the same order of items here as in list of properties
quoted
+
+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).
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help