[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220731150006.2841795-1-vladimir.oltean@nxp.com>
Date: Sun, 31 Jul 2022 18:00:06 +0300
From: Vladimir Oltean <vladimir.oltean@....com>
To: netdev@...r.kernel.org
Cc: devicetree@...r.kernel.org, Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Oleksij Rempel <linux@...pel-privat.de>,
Christian Marangi <ansuelsmth@...il.com>,
John Crispin <john@...ozen.org>,
Kurt Kanzenbach <kurt@...utronix.de>,
Mans Rullgard <mans@...sr.com>,
Arun Ramadoss <arun.ramadoss@...rochip.com>,
Woojung Huh <woojung.huh@...rochip.com>,
UNGLinuxDriver@...rochip.com,
Claudiu Manoil <claudiu.manoil@....com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
George McCollister <george.mccollister@...il.com>,
DENG Qingfang <dqfext@...il.com>,
Sean Wang <sean.wang@...iatek.com>,
Landen Chao <Landen.Chao@...iatek.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Hauke Mehrtens <hauke@...ke-m.de>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
Aleksander Jan Bajkowski <olek2@...pl>,
Alvin Šipraga <alsi@...g-olufsen.dk>,
Luiz Angelo Daros de Luca <luizluca@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Pawel Dembicki <paweldembicki@...il.com>,
Clément Léger <clement.leger@...tlin.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Russell King <rmk+kernel@...linux.org.uk>,
Marek Behún <kabel@...nel.org>,
Marcin Wojtas <mw@...ihalf.com>
Subject: [PATCH net-next] dt-bindings: net: dsa: make phylink bindings required for CPU/DSA ports
It is desirable that new DSA drivers are written to expect that all
their ports register with phylink, and not rely on the DSA core's
workarounds to skip this process.
To that end, DSA is being changed to warn existing drivers when such DT
blobs are in use:
https://patchwork.kernel.org/project/netdevbpf/cover/20220729132119.1191227-1-vladimir.oltean@nxp.com/
Introduce another layer of validation in the DSA DT schema, and assert
that CPU and DSA ports must have phylink-related properties present.
Suggested-by: Rob Herring <robh+dt@...nel.org>
Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
---
I've sent this patch separately because at least right now I don't have
a reason to resend the other 4 patches linked above, and this has no
dependency on those.
.../devicetree/bindings/net/dsa/dsa-port.yaml | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml b/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml
index 09317e16cb5d..a9420302c5d8 100644
--- a/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml
@@ -76,6 +76,28 @@ properties:
required:
- reg
+if:
+ oneOf:
+ - properties:
+ ethernet:
+ items:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ - properties:
+ link:
+ items:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+then:
+ allOf:
+ - required:
+ - phy-mode
+ - oneOf:
+ - required:
+ - fixed-link
+ - required:
+ - phy-handle
+ - required:
+ - managed
+
additionalProperties: true
...
--
2.34.1
Powered by blists - more mailing lists