From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: netdev@vger.kernel.org
Cc: devicetree@vger.kernel.org, "Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>, "Andrew Lunn" <andrew@lunn.ch>,
"Vivien Didelot" <vivien.didelot@gmail.com>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Oleksij Rempel" <linux@rempel-privat.de>,
"Christian Marangi" <ansuelsmth@gmail.com>,
"John Crispin" <john@phrozen.org>,
"Kurt Kanzenbach" <kurt@linutronix.de>,
"Mans Rullgard" <mans@mansr.com>,
"Arun Ramadoss" <arun.ramadoss@microchip.com>,
"Woojung Huh" <woojung.huh@microchip.com>,
UNGLinuxDriver@microchip.com,
"Claudiu Manoil" <claudiu.manoil@nxp.com>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"George McCollister" <george.mccollister@gmail.com>,
"DENG Qingfang" <dqfext@gmail.com>,
"Sean Wang" <sean.wang@mediatek.com>,
"Landen Chao" <Landen.Chao@mediatek.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"Hauke Mehrtens" <hauke@hauke-m.de>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
"Aleksander Jan Bajkowski" <olek2@wp.pl>,
"Alvin Šipraga" <alsi@bang-olufsen.dk>,
"Luiz Angelo Daros de Luca" <luizluca@gmail.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Pawel Dembicki" <paweldembicki@gmail.com>,
"Clément Léger" <clement.leger@bootlin.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Russell King" <rmk+kernel@armlinux.org.uk>,
"Marek Behún" <kabel@kernel.org>,
"Marcin Wojtas" <mw@semihalf.com>
Subject: [PATCH net-next] dt-bindings: net: dsa: make phylink bindings required for CPU/DSA ports
Date: Sun, 31 Jul 2022 18:00:06 +0300 [thread overview]
Message-ID: <20220731150006.2841795-1-vladimir.oltean@nxp.com> (raw)
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@kernel.org>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.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
next reply other threads:[~2022-07-31 15:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-31 15:00 Vladimir Oltean [this message]
2022-07-31 16:02 ` [PATCH net-next] dt-bindings: net: dsa: make phylink bindings required for CPU/DSA ports Rob Herring
2022-08-01 16:22 ` Jakub Kicinski
2022-08-01 16:29 ` Vladimir Oltean
2022-08-01 17:17 ` Rob Herring
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=20220731150006.2841795-1-vladimir.oltean@nxp.com \
--to=vladimir.oltean@nxp.com \
--cc=Landen.Chao@mediatek.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=alsi@bang-olufsen.dk \
--cc=andrew@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=arun.ramadoss@microchip.com \
--cc=claudiu.manoil@nxp.com \
--cc=clement.leger@bootlin.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dqfext@gmail.com \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=geert+renesas@glider.be \
--cc=george.mccollister@gmail.com \
--cc=hauke@hauke-m.de \
--cc=john@phrozen.org \
--cc=kabel@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux@rempel-privat.de \
--cc=luizluca@gmail.com \
--cc=mans@mansr.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=matthias.bgg@gmail.com \
--cc=mw@semihalf.com \
--cc=netdev@vger.kernel.org \
--cc=olek2@wp.pl \
--cc=pabeni@redhat.com \
--cc=paweldembicki@gmail.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=robh+dt@kernel.org \
--cc=sean.wang@mediatek.com \
--cc=vivien.didelot@gmail.com \
--cc=woojung.huh@microchip.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