* [PATCH v1 net-next 1/7] dt-bindings: mfd: ocelot: remove spi-max-frequency from required properties
2022-10-25 5:03 [PATCH v1 net-next 0/7] dt-binding preparation for ocelot switches Colin Foster
@ 2022-10-25 5:03 ` Colin Foster
2022-10-31 15:36 ` Lee Jones
2022-10-25 5:03 ` [PATCH v1 net-next 2/7] dt-bindings: mfd: ocelot: remove unnecessary driver wording Colin Foster
` (5 subsequent siblings)
6 siblings, 1 reply; 26+ messages in thread
From: Colin Foster @ 2022-10-25 5:03 UTC (permalink / raw)
To: linux-mediatek, linux-arm-kernel, netdev, linux-kernel, devicetree
Cc: Alexandre Belloni, Claudiu Manoil, John Crispin, Sean Wang,
DENG Qingfang, Landen Chao, nç ÜNAL, Matthias Brugger,
Paolo Abeni, Jakub Kicinski, Eric Dumazet, David S. Miller,
Vladimir Oltean, Florian Fainelli, Vivien Didelot, Andrew Lunn,
Krzysztof Kozlowski, Rob Herring, Lee Jones, Krzysztof Kozlowski
The property spi-max-frequency was initially documented as a required
property. It is not actually required, and will break bindings validation
if other control mediums (e.g. PCIe) are used.
Remove this property from the required arguments.
Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml | 1 -
1 file changed, 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml b/Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml
index 8bf45a5673a4..c6da91211a18 100644
--- a/Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml
+++ b/Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml
@@ -61,7 +61,6 @@ required:
- reg
- '#address-cells'
- '#size-cells'
- - spi-max-frequency
additionalProperties: false
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH v1 net-next 1/7] dt-bindings: mfd: ocelot: remove spi-max-frequency from required properties
2022-10-25 5:03 ` [PATCH v1 net-next 1/7] dt-bindings: mfd: ocelot: remove spi-max-frequency from required properties Colin Foster
@ 2022-10-31 15:36 ` Lee Jones
2022-11-01 2:41 ` Colin Foster
0 siblings, 1 reply; 26+ messages in thread
From: Lee Jones @ 2022-10-31 15:36 UTC (permalink / raw)
To: Colin Foster
Cc: linux-mediatek, linux-arm-kernel, netdev, linux-kernel,
devicetree, Alexandre Belloni, Claudiu Manoil, John Crispin,
Sean Wang, DENG Qingfang, Landen Chao, nç ÜNAL,
Matthias Brugger, Paolo Abeni, Jakub Kicinski, Eric Dumazet,
David S. Miller, Vladimir Oltean, Florian Fainelli,
Vivien Didelot, Andrew Lunn, Krzysztof Kozlowski, Rob Herring,
Krzysztof Kozlowski
On Mon, 24 Oct 2022, Colin Foster wrote:
> The property spi-max-frequency was initially documented as a required
> property. It is not actually required, and will break bindings validation
> if other control mediums (e.g. PCIe) are used.
>
> Remove this property from the required arguments.
>
> Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml | 1 -
> 1 file changed, 1 deletion(-)
Applied, thanks.
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v1 net-next 1/7] dt-bindings: mfd: ocelot: remove spi-max-frequency from required properties
2022-10-31 15:36 ` Lee Jones
@ 2022-11-01 2:41 ` Colin Foster
0 siblings, 0 replies; 26+ messages in thread
From: Colin Foster @ 2022-11-01 2:41 UTC (permalink / raw)
To: Lee Jones
Cc: linux-mediatek, linux-arm-kernel, netdev, linux-kernel,
devicetree, Alexandre Belloni, Claudiu Manoil, John Crispin,
Sean Wang, DENG Qingfang, Landen Chao, nç ÜNAL,
Matthias Brugger, Paolo Abeni, Jakub Kicinski, Eric Dumazet,
David S. Miller, Vladimir Oltean, Florian Fainelli,
Vivien Didelot, Andrew Lunn, Krzysztof Kozlowski, Rob Herring,
Krzysztof Kozlowski
On Mon, Oct 31, 2022 at 03:36:14PM +0000, Lee Jones wrote:
> On Mon, 24 Oct 2022, Colin Foster wrote:
>
> > The property spi-max-frequency was initially documented as a required
> > property. It is not actually required, and will break bindings validation
> > if other control mediums (e.g. PCIe) are used.
> >
> > Remove this property from the required arguments.
> >
> > Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> > Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > ---
> > Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml | 1 -
> > 1 file changed, 1 deletion(-)
>
> Applied, thanks.
Thanks Lee
>
> --
> Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v1 net-next 2/7] dt-bindings: mfd: ocelot: remove unnecessary driver wording
2022-10-25 5:03 [PATCH v1 net-next 0/7] dt-binding preparation for ocelot switches Colin Foster
2022-10-25 5:03 ` [PATCH v1 net-next 1/7] dt-bindings: mfd: ocelot: remove spi-max-frequency from required properties Colin Foster
@ 2022-10-25 5:03 ` Colin Foster
2022-10-31 15:37 ` Lee Jones
2022-10-25 5:03 ` [PATCH v1 net-next 3/7] dt-bindings: net: dsa: qca8k: utilize shared dsa.yaml Colin Foster
` (4 subsequent siblings)
6 siblings, 1 reply; 26+ messages in thread
From: Colin Foster @ 2022-10-25 5:03 UTC (permalink / raw)
To: linux-mediatek, linux-arm-kernel, netdev, linux-kernel, devicetree
Cc: Alexandre Belloni, Claudiu Manoil, John Crispin, Sean Wang,
DENG Qingfang, Landen Chao, nç ÜNAL, Matthias Brugger,
Paolo Abeni, Jakub Kicinski, Eric Dumazet, David S. Miller,
Vladimir Oltean, Florian Fainelli, Vivien Didelot, Andrew Lunn,
Krzysztof Kozlowski, Rob Herring, Lee Jones, Krzysztof Kozlowski
Initially there was unnecessary verbage around "this driver" in the
documentation. It was unnecessary. Remove self references about it being a
"driver" documentation and replace it with a more detailed description
about external interfaces that are supported.
Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml b/Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml
index c6da91211a18..1d1fee1a16c1 100644
--- a/Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml
+++ b/Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml
@@ -12,7 +12,8 @@ maintainers:
description: |
The Ocelot ethernet switch family contains chips that have an internal CPU
(VSC7513, VSC7514) and chips that don't (VSC7511, VSC7512). All switches have
- the option to be controlled externally, which is the purpose of this driver.
+ the option to be controlled externally via external interfaces like SPI or
+ PCIe.
The switch family is a multi-port networking switch that supports many
interfaces. Additionally, the device can perform pin control, MDIO buses, and
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH v1 net-next 2/7] dt-bindings: mfd: ocelot: remove unnecessary driver wording
2022-10-25 5:03 ` [PATCH v1 net-next 2/7] dt-bindings: mfd: ocelot: remove unnecessary driver wording Colin Foster
@ 2022-10-31 15:37 ` Lee Jones
0 siblings, 0 replies; 26+ messages in thread
From: Lee Jones @ 2022-10-31 15:37 UTC (permalink / raw)
To: Colin Foster
Cc: linux-mediatek, linux-arm-kernel, netdev, linux-kernel,
devicetree, Alexandre Belloni, Claudiu Manoil, John Crispin,
Sean Wang, DENG Qingfang, Landen Chao, nç ÜNAL,
Matthias Brugger, Paolo Abeni, Jakub Kicinski, Eric Dumazet,
David S. Miller, Vladimir Oltean, Florian Fainelli,
Vivien Didelot, Andrew Lunn, Krzysztof Kozlowski, Rob Herring,
Krzysztof Kozlowski
On Mon, 24 Oct 2022, Colin Foster wrote:
> Initially there was unnecessary verbage around "this driver" in the
> documentation. It was unnecessary. Remove self references about it being a
> "driver" documentation and replace it with a more detailed description
> about external interfaces that are supported.
>
> Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied, thanks.
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v1 net-next 3/7] dt-bindings: net: dsa: qca8k: utilize shared dsa.yaml
2022-10-25 5:03 [PATCH v1 net-next 0/7] dt-binding preparation for ocelot switches Colin Foster
2022-10-25 5:03 ` [PATCH v1 net-next 1/7] dt-bindings: mfd: ocelot: remove spi-max-frequency from required properties Colin Foster
2022-10-25 5:03 ` [PATCH v1 net-next 2/7] dt-bindings: mfd: ocelot: remove unnecessary driver wording Colin Foster
@ 2022-10-25 5:03 ` Colin Foster
2022-10-25 20:05 ` Rob Herring
2022-10-25 21:21 ` Rob Herring
2022-10-25 5:03 ` [PATCH v1 net-next 4/7] dt-bindings: net: dsa: mediatek,mt7530: remove unnecessary dsa-port reference Colin Foster
` (3 subsequent siblings)
6 siblings, 2 replies; 26+ messages in thread
From: Colin Foster @ 2022-10-25 5:03 UTC (permalink / raw)
To: linux-mediatek, linux-arm-kernel, netdev, linux-kernel, devicetree
Cc: Alexandre Belloni, Claudiu Manoil, John Crispin, Sean Wang,
DENG Qingfang, Landen Chao, nç ÜNAL, Matthias Brugger,
Paolo Abeni, Jakub Kicinski, Eric Dumazet, David S. Miller,
Vladimir Oltean, Florian Fainelli, Vivien Didelot, Andrew Lunn,
Krzysztof Kozlowski, Rob Herring, Lee Jones
The dsa.yaml binding contains duplicated bindings for address and size
cells, as well as the reference to dsa-port.yaml. Instead of duplicating
this information, remove the reference to dsa-port.yaml and include the
full reference to dsa.yaml.
Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Suggested-by: Vladimir Oltean <olteanv@gmail.com>
---
.../devicetree/bindings/net/dsa/qca8k.yaml | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
index 978162df51f7..7884f68cab73 100644
--- a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
@@ -66,22 +66,16 @@ properties:
With the legacy mapping the reg corresponding to the internal
mdio is the switch reg with an offset of -1.
+$ref: "dsa.yaml#"
+
patternProperties:
"^(ethernet-)?ports$":
type: object
- properties:
- '#address-cells':
- const: 1
- '#size-cells':
- const: 0
-
patternProperties:
"^(ethernet-)?port@[0-6]$":
type: object
description: Ethernet switch ports
- $ref: dsa-port.yaml#
-
properties:
qca,sgmii-rxclk-falling-edge:
$ref: /schemas/types.yaml#/definitions/flag
@@ -104,8 +98,6 @@ patternProperties:
SGMII on the QCA8337, it is advised to set this unless a communication
issue is observed.
- unevaluatedProperties: false
-
oneOf:
- required:
- ports
@@ -116,7 +108,7 @@ required:
- compatible
- reg
-additionalProperties: true
+unevaluatedProperties: false
examples:
- |
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH v1 net-next 3/7] dt-bindings: net: dsa: qca8k: utilize shared dsa.yaml
2022-10-25 5:03 ` [PATCH v1 net-next 3/7] dt-bindings: net: dsa: qca8k: utilize shared dsa.yaml Colin Foster
@ 2022-10-25 20:05 ` Rob Herring
2022-10-25 21:21 ` Rob Herring
1 sibling, 0 replies; 26+ messages in thread
From: Rob Herring @ 2022-10-25 20:05 UTC (permalink / raw)
To: Colin Foster
Cc: nç ÜNAL, Vivien Didelot, netdev, Florian Fainelli,
linux-arm-kernel, DENG Qingfang, Andrew Lunn, Claudiu Manoil,
devicetree, John Crispin, David S. Miller, Lee Jones,
Krzysztof Kozlowski, linux-mediatek, Landen Chao, Jakub Kicinski,
Eric Dumazet, Paolo Abeni, linux-kernel, Sean Wang,
Alexandre Belloni, Rob Herring, Matthias Brugger,
Vladimir Oltean
On Mon, 24 Oct 2022 22:03:51 -0700, Colin Foster wrote:
> The dsa.yaml binding contains duplicated bindings for address and size
> cells, as well as the reference to dsa-port.yaml. Instead of duplicating
> this information, remove the reference to dsa-port.yaml and include the
> full reference to dsa.yaml.
>
> Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> Suggested-by: Vladimir Oltean <olteanv@gmail.com>
> ---
> .../devicetree/bindings/net/dsa/qca8k.yaml | 14 +++-----------
> 1 file changed, 3 insertions(+), 11 deletions(-)
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/dsa/qca8k.example.dtb: switch@10: Unevaluated properties are not allowed ('#address-cells', '#size-cells' were unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/dsa/qca8k.example.dtb: switch@10: ports:port@6: Unevaluated properties are not allowed ('qca,sgmii-rxclk-falling-edge' was unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/dsa/qca8k.example.dtb: switch@10: Unevaluated properties are not allowed ('#address-cells', '#size-cells' were unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/
This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v1 net-next 3/7] dt-bindings: net: dsa: qca8k: utilize shared dsa.yaml
2022-10-25 5:03 ` [PATCH v1 net-next 3/7] dt-bindings: net: dsa: qca8k: utilize shared dsa.yaml Colin Foster
2022-10-25 20:05 ` Rob Herring
@ 2022-10-25 21:21 ` Rob Herring
2022-10-27 1:25 ` Vladimir Oltean
2022-10-27 2:44 ` Colin Foster
1 sibling, 2 replies; 26+ messages in thread
From: Rob Herring @ 2022-10-25 21:21 UTC (permalink / raw)
To: Colin Foster
Cc: linux-mediatek, linux-arm-kernel, netdev, linux-kernel,
devicetree, Alexandre Belloni, Claudiu Manoil, John Crispin,
Sean Wang, DENG Qingfang, Landen Chao, nç ÜNAL,
Matthias Brugger, Paolo Abeni, Jakub Kicinski, Eric Dumazet,
David S. Miller, Vladimir Oltean, Florian Fainelli,
Vivien Didelot, Andrew Lunn, Krzysztof Kozlowski, Lee Jones
On Mon, Oct 24, 2022 at 10:03:51PM -0700, Colin Foster wrote:
> The dsa.yaml binding contains duplicated bindings for address and size
> cells, as well as the reference to dsa-port.yaml. Instead of duplicating
> this information, remove the reference to dsa-port.yaml and include the
> full reference to dsa.yaml.
I don't think this works without further restructuring. Essentially,
'unevaluatedProperties' on works on a single level. So every level has
to define all properties at that level either directly in
properties/patternProperties or within a $ref.
See how graph.yaml is structured and referenced for an example how this
has to work.
>
> Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> Suggested-by: Vladimir Oltean <olteanv@gmail.com>
> ---
> .../devicetree/bindings/net/dsa/qca8k.yaml | 14 +++-----------
> 1 file changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
> index 978162df51f7..7884f68cab73 100644
> --- a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
> @@ -66,22 +66,16 @@ properties:
> With the legacy mapping the reg corresponding to the internal
> mdio is the switch reg with an offset of -1.
>
> +$ref: "dsa.yaml#"
> +
> patternProperties:
> "^(ethernet-)?ports$":
> type: object
> - properties:
> - '#address-cells':
> - const: 1
> - '#size-cells':
> - const: 0
> -
> patternProperties:
> "^(ethernet-)?port@[0-6]$":
> type: object
> description: Ethernet switch ports
>
> - $ref: dsa-port.yaml#
> -
> properties:
> qca,sgmii-rxclk-falling-edge:
> $ref: /schemas/types.yaml#/definitions/flag
> @@ -104,8 +98,6 @@ patternProperties:
> SGMII on the QCA8337, it is advised to set this unless a communication
> issue is observed.
>
> - unevaluatedProperties: false
> -
Dropping this means any undefined properties in port nodes won't be an
error. Once I fix all the issues related to these missing, there will be
a meta-schema checking for this (this could be one I fixed already).
> oneOf:
> - required:
> - ports
> @@ -116,7 +108,7 @@ required:
> - compatible
> - reg
>
> -additionalProperties: true
This should certainly be changed though. We should only have 'true' for
incomplete collections of properties. IOW, for common bindings.
> +unevaluatedProperties: false
>
> examples:
> - |
> --
> 2.25.1
>
>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v1 net-next 3/7] dt-bindings: net: dsa: qca8k: utilize shared dsa.yaml
2022-10-25 21:21 ` Rob Herring
@ 2022-10-27 1:25 ` Vladimir Oltean
2022-10-27 3:35 ` Colin Foster
2022-10-31 15:44 ` Rob Herring
2022-10-27 2:44 ` Colin Foster
1 sibling, 2 replies; 26+ messages in thread
From: Vladimir Oltean @ 2022-10-27 1:25 UTC (permalink / raw)
To: Rob Herring
Cc: Colin Foster, linux-mediatek, linux-arm-kernel, netdev,
linux-kernel, devicetree, Alexandre Belloni, Claudiu Manoil,
John Crispin, Sean Wang, DENG Qingfang, Landen Chao,
nç ÜNAL, Matthias Brugger, Paolo Abeni, Jakub Kicinski,
Eric Dumazet, David S. Miller, Florian Fainelli, Vivien Didelot,
Andrew Lunn, Krzysztof Kozlowski, Lee Jones
Hi Rob,
On Tue, Oct 25, 2022 at 04:21:14PM -0500, Rob Herring wrote:
> On Mon, Oct 24, 2022 at 10:03:51PM -0700, Colin Foster wrote:
> > The dsa.yaml binding contains duplicated bindings for address and size
> > cells, as well as the reference to dsa-port.yaml. Instead of duplicating
> > this information, remove the reference to dsa-port.yaml and include the
> > full reference to dsa.yaml.
>
> I don't think this works without further restructuring. Essentially,
> 'unevaluatedProperties' on works on a single level. So every level has
> to define all properties at that level either directly in
> properties/patternProperties or within a $ref.
>
> See how graph.yaml is structured and referenced for an example how this
> has to work.
>
> > @@ -104,8 +98,6 @@ patternProperties:
> > SGMII on the QCA8337, it is advised to set this unless a communication
> > issue is observed.
> >
> > - unevaluatedProperties: false
> > -
>
> Dropping this means any undefined properties in port nodes won't be an
> error. Once I fix all the issues related to these missing, there will be
> a meta-schema checking for this (this could be one I fixed already).
I may be misreading, but here, "unevaluatedProperties: false" from dsa.yaml
(under patternProperties: "^(ethernet-)?port@[0-9]+$":) is on the same
level as the "unevaluatedProperties: false" that Colin is deleting.
In fact, I believe that it is precisely due to the "unevaluatedProperties: false"
from dsa.yaml that this is causing a failure now:
net/dsa/qca8k.example.dtb: switch@10: ports:port@6: Unevaluated properties are not allowed ('qca,sgmii-rxclk-falling-edge' was unexpected)
Could you please explain why is the 'qca,sgmii-rxclk-falling-edge'
property not evaluated from the perspective of dsa.yaml in the example?
It's a head scratcher to me.
May it have something to do with the fact that Colin's addition:
$ref: "dsa.yaml#"
is not expressed as:
allOf:
- $ref: "dsa.yaml#"
?
If yes, can you explain exactly what is the difference with respect to
unevaluatedProperties?
> > oneOf:
> > - required:
> > - ports
> > @@ -116,7 +108,7 @@ required:
> > - compatible
> > - reg
> >
> > -additionalProperties: true
>
> This should certainly be changed though. We should only have 'true' for
> incomplete collections of properties. IOW, for common bindings.
>
> > +unevaluatedProperties: false
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v1 net-next 3/7] dt-bindings: net: dsa: qca8k: utilize shared dsa.yaml
2022-10-27 1:25 ` Vladimir Oltean
@ 2022-10-27 3:35 ` Colin Foster
2022-10-31 15:44 ` Rob Herring
1 sibling, 0 replies; 26+ messages in thread
From: Colin Foster @ 2022-10-27 3:35 UTC (permalink / raw)
To: Vladimir Oltean
Cc: Rob Herring, linux-mediatek, linux-arm-kernel, netdev,
linux-kernel, devicetree, Alexandre Belloni, Claudiu Manoil,
John Crispin, Sean Wang, DENG Qingfang, Landen Chao,
nç ÜNAL, Matthias Brugger, Paolo Abeni, Jakub Kicinski,
Eric Dumazet, David S. Miller, Florian Fainelli, Vivien Didelot,
Andrew Lunn, Krzysztof Kozlowski, Lee Jones
Hi Rob and Vladimir,
On Thu, Oct 27, 2022 at 04:25:53AM +0300, Vladimir Oltean wrote:
> Hi Rob,
>
> On Tue, Oct 25, 2022 at 04:21:14PM -0500, Rob Herring wrote:
> > On Mon, Oct 24, 2022 at 10:03:51PM -0700, Colin Foster wrote:
> > > The dsa.yaml binding contains duplicated bindings for address and size
> > > cells, as well as the reference to dsa-port.yaml. Instead of duplicating
> > > this information, remove the reference to dsa-port.yaml and include the
> > > full reference to dsa.yaml.
> >
> > I don't think this works without further restructuring. Essentially,
> > 'unevaluatedProperties' on works on a single level. So every level has
> > to define all properties at that level either directly in
> > properties/patternProperties or within a $ref.
> >
> > See how graph.yaml is structured and referenced for an example how this
> > has to work.
> >
> > > @@ -104,8 +98,6 @@ patternProperties:
> > > SGMII on the QCA8337, it is advised to set this unless a communication
> > > issue is observed.
> > >
> > > - unevaluatedProperties: false
> > > -
> >
> > Dropping this means any undefined properties in port nodes won't be an
> > error. Once I fix all the issues related to these missing, there will be
> > a meta-schema checking for this (this could be one I fixed already).
>
> I may be misreading, but here, "unevaluatedProperties: false" from dsa.yaml
> (under patternProperties: "^(ethernet-)?port@[0-9]+$":) is on the same
> level as the "unevaluatedProperties: false" that Colin is deleting.
>
> In fact, I believe that it is precisely due to the "unevaluatedProperties: false"
> from dsa.yaml that this is causing a failure now:
>
> net/dsa/qca8k.example.dtb: switch@10: ports:port@6: Unevaluated properties are not allowed ('qca,sgmii-rxclk-falling-edge' was unexpected)
>
> Could you please explain why is the 'qca,sgmii-rxclk-falling-edge'
> property not evaluated from the perspective of dsa.yaml in the example?
> It's a head scratcher to me.
>
> May it have something to do with the fact that Colin's addition:
>
> $ref: "dsa.yaml#"
>
> is not expressed as:
>
> allOf:
> - $ref: "dsa.yaml#"
>
> ?
Looking into documentation (I promise I did some reading / research to
try to get a stronger understanding of the documentation yaml) I came
across the history of ethernet-controller.yaml which suggests to me that
the pattern:
allOf:
- $ref:
is frowned upon
commit 3d21a4609335: ("dt-bindings: Remove cases of 'allOf' containing a
'$ref'")
I do have a knack for misinterpreting data, but I read that as:
allOf:
- $ref:
shouldn't be used unless there's more than one list entry.
All that aside, I did upgrade from 2022.5 to 2022.9 just now and do see
these dtschema errors now. I'll be sure to use this before resubmitting.
>
> If yes, can you explain exactly what is the difference with respect to
> unevaluatedProperties?
>
> > > oneOf:
> > > - required:
> > > - ports
> > > @@ -116,7 +108,7 @@ required:
> > > - compatible
> > > - reg
> > >
> > > -additionalProperties: true
> >
> > This should certainly be changed though. We should only have 'true' for
> > incomplete collections of properties. IOW, for common bindings.
That makes a lot of sense - and helps me understand why I had so much
trouble understanding why it originally was "additionalProperties: true"
I'll obviously take another look at this. The nxp,sja1105.yaml seemed to
be most akin to what the qca8k.yaml needed to be - that is "take
dsa.yaml and add a couple extra properties to the ports nodes". But
there's always subleties.
> >
> > > +unevaluatedProperties: false
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v1 net-next 3/7] dt-bindings: net: dsa: qca8k: utilize shared dsa.yaml
2022-10-27 1:25 ` Vladimir Oltean
2022-10-27 3:35 ` Colin Foster
@ 2022-10-31 15:44 ` Rob Herring
2022-11-01 3:47 ` Colin Foster
1 sibling, 1 reply; 26+ messages in thread
From: Rob Herring @ 2022-10-31 15:44 UTC (permalink / raw)
To: Vladimir Oltean
Cc: Colin Foster, linux-mediatek, linux-arm-kernel, netdev,
linux-kernel, devicetree, Alexandre Belloni, Claudiu Manoil,
John Crispin, Sean Wang, DENG Qingfang, Landen Chao,
nç ÜNAL, Matthias Brugger, Paolo Abeni, Jakub Kicinski,
Eric Dumazet, David S. Miller, Florian Fainelli, Vivien Didelot,
Andrew Lunn, Krzysztof Kozlowski, Lee Jones
On Thu, Oct 27, 2022 at 04:25:53AM +0300, Vladimir Oltean wrote:
> Hi Rob,
>
> On Tue, Oct 25, 2022 at 04:21:14PM -0500, Rob Herring wrote:
> > On Mon, Oct 24, 2022 at 10:03:51PM -0700, Colin Foster wrote:
> > > The dsa.yaml binding contains duplicated bindings for address and size
> > > cells, as well as the reference to dsa-port.yaml. Instead of duplicating
> > > this information, remove the reference to dsa-port.yaml and include the
> > > full reference to dsa.yaml.
> >
> > I don't think this works without further restructuring. Essentially,
> > 'unevaluatedProperties' on works on a single level. So every level has
> > to define all properties at that level either directly in
> > properties/patternProperties or within a $ref.
> >
> > See how graph.yaml is structured and referenced for an example how this
> > has to work.
> >
> > > @@ -104,8 +98,6 @@ patternProperties:
> > > SGMII on the QCA8337, it is advised to set this unless a communication
> > > issue is observed.
> > >
> > > - unevaluatedProperties: false
> > > -
> >
> > Dropping this means any undefined properties in port nodes won't be an
> > error. Once I fix all the issues related to these missing, there will be
> > a meta-schema checking for this (this could be one I fixed already).
>
> I may be misreading, but here, "unevaluatedProperties: false" from dsa.yaml
> (under patternProperties: "^(ethernet-)?port@[0-9]+$":) is on the same
> level as the "unevaluatedProperties: false" that Colin is deleting.
>
> In fact, I believe that it is precisely due to the "unevaluatedProperties: false"
> from dsa.yaml that this is causing a failure now:
>
> net/dsa/qca8k.example.dtb: switch@10: ports:port@6: Unevaluated properties are not allowed ('qca,sgmii-rxclk-falling-edge' was unexpected)
>
> Could you please explain why is the 'qca,sgmii-rxclk-falling-edge'
> property not evaluated from the perspective of dsa.yaml in the example?
> It's a head scratcher to me.
A schema with unevaluatedProperties can "see" into a $ref, but the
ref'ed schema having unevaluatedProperties can't see back to the
referring schema for properties defined there.
So if a schema is referenced by other schemas which can define their own
additional properties, that schema cannot have 'unevaluatedProperties:
false'. If both schemas have 'unevaluatedProperties: false', then it's
just redundant. We may end up doing that just because it's not obvious
when we have both or not, and no unevaluatedProperties/
additionalProperties at all is a bigger issue. I'm working on a
meta-schema to check this.
> May it have something to do with the fact that Colin's addition:
>
> $ref: "dsa.yaml#"
>
> is not expressed as:
>
> allOf:
> - $ref: "dsa.yaml#"
>
> ?
No. Either way behaves the same. We generally only use 'allOf' when
there might be more than 1 entry. That is mostly just at the top-level.
Rob
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v1 net-next 3/7] dt-bindings: net: dsa: qca8k: utilize shared dsa.yaml
2022-10-31 15:44 ` Rob Herring
@ 2022-11-01 3:47 ` Colin Foster
0 siblings, 0 replies; 26+ messages in thread
From: Colin Foster @ 2022-11-01 3:47 UTC (permalink / raw)
To: Rob Herring
Cc: Vladimir Oltean, linux-mediatek, linux-arm-kernel, netdev,
linux-kernel, devicetree, Alexandre Belloni, Claudiu Manoil,
John Crispin, Sean Wang, DENG Qingfang, Landen Chao,
nç ÜNAL, Matthias Brugger, Paolo Abeni, Jakub Kicinski,
Eric Dumazet, David S. Miller, Florian Fainelli, Vivien Didelot,
Andrew Lunn, Krzysztof Kozlowski, Lee Jones
On Mon, Oct 31, 2022 at 10:44:09AM -0500, Rob Herring wrote:
> On Thu, Oct 27, 2022 at 04:25:53AM +0300, Vladimir Oltean wrote:
> > Hi Rob,
> >
> > On Tue, Oct 25, 2022 at 04:21:14PM -0500, Rob Herring wrote:
> > > On Mon, Oct 24, 2022 at 10:03:51PM -0700, Colin Foster wrote:
> > > > The dsa.yaml binding contains duplicated bindings for address and size
> > > > cells, as well as the reference to dsa-port.yaml. Instead of duplicating
> > > > this information, remove the reference to dsa-port.yaml and include the
> > > > full reference to dsa.yaml.
> > >
> > > I don't think this works without further restructuring. Essentially,
> > > 'unevaluatedProperties' on works on a single level. So every level has
> > > to define all properties at that level either directly in
> > > properties/patternProperties or within a $ref.
> > >
> > > See how graph.yaml is structured and referenced for an example how this
> > > has to work.
> > >
> > > > @@ -104,8 +98,6 @@ patternProperties:
> > > > SGMII on the QCA8337, it is advised to set this unless a communication
> > > > issue is observed.
> > > >
> > > > - unevaluatedProperties: false
> > > > -
> > >
> > > Dropping this means any undefined properties in port nodes won't be an
> > > error. Once I fix all the issues related to these missing, there will be
> > > a meta-schema checking for this (this could be one I fixed already).
> >
> > I may be misreading, but here, "unevaluatedProperties: false" from dsa.yaml
> > (under patternProperties: "^(ethernet-)?port@[0-9]+$":) is on the same
> > level as the "unevaluatedProperties: false" that Colin is deleting.
> >
> > In fact, I believe that it is precisely due to the "unevaluatedProperties: false"
> > from dsa.yaml that this is causing a failure now:
> >
> > net/dsa/qca8k.example.dtb: switch@10: ports:port@6: Unevaluated properties are not allowed ('qca,sgmii-rxclk-falling-edge' was unexpected)
> >
> > Could you please explain why is the 'qca,sgmii-rxclk-falling-edge'
> > property not evaluated from the perspective of dsa.yaml in the example?
> > It's a head scratcher to me.
>
> A schema with unevaluatedProperties can "see" into a $ref, but the
> ref'ed schema having unevaluatedProperties can't see back to the
> referring schema for properties defined there.
>
> So if a schema is referenced by other schemas which can define their own
> additional properties, that schema cannot have 'unevaluatedProperties:
> false'. If both schemas have 'unevaluatedProperties: false', then it's
> just redundant. We may end up doing that just because it's not obvious
> when we have both or not, and no unevaluatedProperties/
> additionalProperties at all is a bigger issue. I'm working on a
> meta-schema to check this.
Thanks for this information. So if I'm understanding correctly:
- All DSA chips I'm modifying should reference dsa.yaml, as they
currently are.
- As such, these all should have unevaluatedProperties: true, so they
can see into dsa.yaml.
- dsa.yaml, and any schema that gets $ref:'d, can not have
unevaluatedProperties: false, unless the desire is to forbid any
other properties to be added.
I'll get another patch set out this week with all these changes, and
tested against the latest dt_bindings_check.
>
>
> > May it have something to do with the fact that Colin's addition:
> >
> > $ref: "dsa.yaml#"
> >
> > is not expressed as:
> >
> > allOf:
> > - $ref: "dsa.yaml#"
> >
> > ?
>
> No. Either way behaves the same. We generally only use 'allOf' when
> there might be more than 1 entry. That is mostly just at the top-level.
>
> Rob
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v1 net-next 3/7] dt-bindings: net: dsa: qca8k: utilize shared dsa.yaml
2022-10-25 21:21 ` Rob Herring
2022-10-27 1:25 ` Vladimir Oltean
@ 2022-10-27 2:44 ` Colin Foster
1 sibling, 0 replies; 26+ messages in thread
From: Colin Foster @ 2022-10-27 2:44 UTC (permalink / raw)
To: Rob Herring
Cc: linux-mediatek, linux-arm-kernel, netdev, linux-kernel,
devicetree, Alexandre Belloni, Claudiu Manoil, John Crispin,
Sean Wang, DENG Qingfang, Landen Chao, nç ÜNAL,
Matthias Brugger, Paolo Abeni, Jakub Kicinski, Eric Dumazet,
David S. Miller, Vladimir Oltean, Florian Fainelli,
Vivien Didelot, Andrew Lunn, Krzysztof Kozlowski, Lee Jones
Hi Rob,
On Tue, Oct 25, 2022 at 04:21:14PM -0500, Rob Herring wrote:
> On Mon, Oct 24, 2022 at 10:03:51PM -0700, Colin Foster wrote:
> > The dsa.yaml binding contains duplicated bindings for address and size
> > cells, as well as the reference to dsa-port.yaml. Instead of duplicating
> > this information, remove the reference to dsa-port.yaml and include the
> > full reference to dsa.yaml.
>
> I don't think this works without further restructuring. Essentially,
> 'unevaluatedProperties' on works on a single level. So every level has
> to define all properties at that level either directly in
> properties/patternProperties or within a $ref.
>
> See how graph.yaml is structured and referenced for an example how this
> has to work.
Thanks for pointing me to this. I didn't know about
https://github.com/devicetree-org/dt-schema until now, so I'll take a
look. I was primarily reading the schemas in net/dsa/* to try to get a
full understanding of the DT schema nuances, so these types of nudges
really help me.
And I see that Vladimir Oltean has responded to other parts of the
email, so I'll leave this as a simple "thanks" and keep that context
going forward.
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v1 net-next 4/7] dt-bindings: net: dsa: mediatek,mt7530: remove unnecessary dsa-port reference
2022-10-25 5:03 [PATCH v1 net-next 0/7] dt-binding preparation for ocelot switches Colin Foster
` (2 preceding siblings ...)
2022-10-25 5:03 ` [PATCH v1 net-next 3/7] dt-bindings: net: dsa: qca8k: utilize shared dsa.yaml Colin Foster
@ 2022-10-25 5:03 ` Colin Foster
2022-10-30 17:42 ` Arınç ÜNAL
2022-10-25 5:03 ` [PATCH v1 net-next 5/7] dt-bindings: net: add generic ethernet-switch Colin Foster
` (2 subsequent siblings)
6 siblings, 1 reply; 26+ messages in thread
From: Colin Foster @ 2022-10-25 5:03 UTC (permalink / raw)
To: linux-mediatek, linux-arm-kernel, netdev, linux-kernel, devicetree
Cc: Alexandre Belloni, Claudiu Manoil, John Crispin, Sean Wang,
DENG Qingfang, Landen Chao, nç ÜNAL, Matthias Brugger,
Paolo Abeni, Jakub Kicinski, Eric Dumazet, David S. Miller,
Vladimir Oltean, Florian Fainelli, Vivien Didelot, Andrew Lunn,
Krzysztof Kozlowski, Rob Herring, Lee Jones
dsa.yaml contains a reference to dsa-port.yaml, so a duplicate reference to
the binding isn't necessary. Remove this unnecessary reference.
Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Suggested-by: Vladimir Oltean <olteanv@gmail.com>
---
Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml | 3 ---
1 file changed, 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index f2e9ff3f580b..81f291105660 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -159,8 +159,6 @@ patternProperties:
type: object
description: Ethernet switch ports
- unevaluatedProperties: false
-
properties:
reg:
description:
@@ -168,7 +166,6 @@ patternProperties:
for user ports.
allOf:
- - $ref: dsa-port.yaml#
- if:
required: [ ethernet ]
then:
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH v1 net-next 4/7] dt-bindings: net: dsa: mediatek,mt7530: remove unnecessary dsa-port reference
2022-10-25 5:03 ` [PATCH v1 net-next 4/7] dt-bindings: net: dsa: mediatek,mt7530: remove unnecessary dsa-port reference Colin Foster
@ 2022-10-30 17:42 ` Arınç ÜNAL
2022-11-01 2:40 ` Colin Foster
0 siblings, 1 reply; 26+ messages in thread
From: Arınç ÜNAL @ 2022-10-30 17:42 UTC (permalink / raw)
To: Colin Foster, linux-mediatek, linux-arm-kernel, netdev,
linux-kernel, devicetree
Cc: Alexandre Belloni, Claudiu Manoil, John Crispin, Sean Wang,
DENG Qingfang, Landen Chao, Matthias Brugger, Paolo Abeni,
Jakub Kicinski, Eric Dumazet, David S. Miller, Vladimir Oltean,
Florian Fainelli, Vivien Didelot, Andrew Lunn,
Krzysztof Kozlowski, Rob Herring, Lee Jones
On 25.10.2022 08:03, Colin Foster wrote:
> dsa.yaml contains a reference to dsa-port.yaml, so a duplicate reference to
> the binding isn't necessary. Remove this unnecessary reference.
>
> Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> Suggested-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Thanks.
Arınç
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v1 net-next 4/7] dt-bindings: net: dsa: mediatek,mt7530: remove unnecessary dsa-port reference
2022-10-30 17:42 ` Arınç ÜNAL
@ 2022-11-01 2:40 ` Colin Foster
0 siblings, 0 replies; 26+ messages in thread
From: Colin Foster @ 2022-11-01 2:40 UTC (permalink / raw)
To: Arınç ÜNAL
Cc: linux-mediatek, linux-arm-kernel, netdev, linux-kernel,
devicetree, Alexandre Belloni, Claudiu Manoil, John Crispin,
Sean Wang, DENG Qingfang, Landen Chao, Matthias Brugger,
Paolo Abeni, Jakub Kicinski, Eric Dumazet, David S. Miller,
Vladimir Oltean, Florian Fainelli, Vivien Didelot, Andrew Lunn,
Krzysztof Kozlowski, Rob Herring, Lee Jones
On Sun, Oct 30, 2022 at 08:42:32PM +0300, Arınç ÜNAL wrote:
> On 25.10.2022 08:03, Colin Foster wrote:
> > dsa.yaml contains a reference to dsa-port.yaml, so a duplicate reference to
> > the binding isn't necessary. Remove this unnecessary reference.
> >
> > Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> > Suggested-by: Vladimir Oltean <olteanv@gmail.com>
>
> Reviewed-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Thanks!
>
> Thanks.
> Arınç
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v1 net-next 5/7] dt-bindings: net: add generic ethernet-switch
2022-10-25 5:03 [PATCH v1 net-next 0/7] dt-binding preparation for ocelot switches Colin Foster
` (3 preceding siblings ...)
2022-10-25 5:03 ` [PATCH v1 net-next 4/7] dt-bindings: net: dsa: mediatek,mt7530: remove unnecessary dsa-port reference Colin Foster
@ 2022-10-25 5:03 ` Colin Foster
2022-10-25 5:03 ` [PATCH v1 net-next 6/7] dt-bindings: net: add generic ethernet-switch-port binding Colin Foster
2022-10-25 5:03 ` [PATCH v1 net-next 7/7] dt-bindings: net: mscc,vsc7514-switch: utilize generic ethernet-switch.yaml Colin Foster
6 siblings, 0 replies; 26+ messages in thread
From: Colin Foster @ 2022-10-25 5:03 UTC (permalink / raw)
To: linux-mediatek, linux-arm-kernel, netdev, linux-kernel, devicetree
Cc: Alexandre Belloni, Claudiu Manoil, John Crispin, Sean Wang,
DENG Qingfang, Landen Chao, nç ÜNAL, Matthias Brugger,
Paolo Abeni, Jakub Kicinski, Eric Dumazet, David S. Miller,
Vladimir Oltean, Florian Fainelli, Vivien Didelot, Andrew Lunn,
Krzysztof Kozlowski, Rob Herring, Lee Jones
The dsa.yaml bindings had references that can apply to non-dsa switches. To
prevent duplication of this information, keep the dsa-specific information
inside dsa.yaml and move the remaining generic information to the newly
created ethernet-switch.yaml.
Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Suggested-by: Vladimir Oltean <olteanv@gmail.com>
---
.../devicetree/bindings/net/dsa/dsa.yaml | 26 +---------
.../bindings/net/ethernet-switch.yaml | 49 +++++++++++++++++++
MAINTAINERS | 1 +
3 files changed, 52 insertions(+), 24 deletions(-)
create mode 100644 Documentation/devicetree/bindings/net/ethernet-switch.yaml
diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
index b9d48e357e77..2290a9d32b21 100644
--- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
@@ -18,6 +18,8 @@ description:
select: false
+$ref: "/schemas/net/ethernet-switch.yaml#"
+
properties:
$nodename:
pattern: "^(ethernet-)?switch(@.*)?$"
@@ -32,30 +34,6 @@ properties:
(single device hanging off a CPU port) must not specify this property
$ref: /schemas/types.yaml#/definitions/uint32-array
-patternProperties:
- "^(ethernet-)?ports$":
- type: object
- properties:
- '#address-cells':
- const: 1
- '#size-cells':
- const: 0
-
- patternProperties:
- "^(ethernet-)?port@[0-9]+$":
- type: object
- description: Ethernet switch ports
-
- $ref: dsa-port.yaml#
-
- unevaluatedProperties: false
-
-oneOf:
- - required:
- - ports
- - required:
- - ethernet-ports
-
additionalProperties: true
...
diff --git a/Documentation/devicetree/bindings/net/ethernet-switch.yaml b/Documentation/devicetree/bindings/net/ethernet-switch.yaml
new file mode 100644
index 000000000000..fbaac536673d
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/ethernet-switch.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/ethernet-switch.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Ethernet Switch Device Tree Bindings
+
+maintainers:
+ - Andrew Lunn <andrew@lunn.ch>
+ - Florian Fainelli <f.fainelli@gmail.com>
+ - Vivien Didelot <vivien.didelot@gmail.com>
+
+description:
+ This binding represents Ethernet Switches which have a dedicated CPU
+ port. That port is usually connected to an Ethernet Controller of the
+ SoC. Such setups are typical for embedded devices.
+
+select: false
+
+properties:
+ $nodename:
+ pattern: "^(ethernet-)?switch(@.*)?$"
+
+patternProperties:
+ "^(ethernet-)?ports$":
+ type: object
+ properties:
+ '#address-cells':
+ const: 1
+ '#size-cells':
+ const: 0
+
+ patternProperties:
+ "^(ethernet-)?port@[0-9]+$":
+ type: object
+ description: Ethernet switch ports
+
+ $ref: /schemas/net/dsa/dsa-port.yaml#
+
+oneOf:
+ - required:
+ - ports
+ - required:
+ - ethernet-ports
+
+additionalProperties: true
+
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 3106a9f0567a..3b6c3989c419 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14326,6 +14326,7 @@ M: Florian Fainelli <f.fainelli@gmail.com>
M: Vladimir Oltean <olteanv@gmail.com>
S: Maintained
F: Documentation/devicetree/bindings/net/dsa/
+F: Documentation/devicetree/bindings/net/ethernet-switch.yaml
F: drivers/net/dsa/
F: include/linux/dsa/
F: include/linux/platform_data/dsa.h
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH v1 net-next 6/7] dt-bindings: net: add generic ethernet-switch-port binding
2022-10-25 5:03 [PATCH v1 net-next 0/7] dt-binding preparation for ocelot switches Colin Foster
` (4 preceding siblings ...)
2022-10-25 5:03 ` [PATCH v1 net-next 5/7] dt-bindings: net: add generic ethernet-switch Colin Foster
@ 2022-10-25 5:03 ` Colin Foster
2022-10-26 17:44 ` Rob Herring
2022-10-25 5:03 ` [PATCH v1 net-next 7/7] dt-bindings: net: mscc,vsc7514-switch: utilize generic ethernet-switch.yaml Colin Foster
6 siblings, 1 reply; 26+ messages in thread
From: Colin Foster @ 2022-10-25 5:03 UTC (permalink / raw)
To: linux-mediatek, linux-arm-kernel, netdev, linux-kernel, devicetree
Cc: Alexandre Belloni, Claudiu Manoil, John Crispin, Sean Wang,
DENG Qingfang, Landen Chao, nç ÜNAL, Matthias Brugger,
Paolo Abeni, Jakub Kicinski, Eric Dumazet, David S. Miller,
Vladimir Oltean, Florian Fainelli, Vivien Didelot, Andrew Lunn,
Krzysztof Kozlowski, Rob Herring, Lee Jones
The dsa-port.yaml binding had several references that can be common to all
ethernet ports, not just dsa-specific ones. Break out the generic bindings
to ethernet-switch-port.yaml they can be used by non-dsa drivers.
Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Suggested-by: Vladimir Oltean <olteanv@gmail.com>
---
.../devicetree/bindings/net/dsa/dsa-port.yaml | 26 +----------
.../bindings/net/ethernet-switch-port.yaml | 44 +++++++++++++++++++
.../bindings/net/ethernet-switch.yaml | 4 +-
MAINTAINERS | 1 +
4 files changed, 50 insertions(+), 25 deletions(-)
create mode 100644 Documentation/devicetree/bindings/net/ethernet-switch-port.yaml
diff --git a/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml b/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml
index 10ad7e71097b..c5144e733511 100644
--- a/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml
@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/net/dsa/dsa-port.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Ethernet Switch port Device Tree Bindings
+title: DSA Switch port Device Tree Bindings
maintainers:
- Andrew Lunn <andrew@lunn.ch>
@@ -15,12 +15,9 @@ description:
Ethernet switch port Description
allOf:
- - $ref: /schemas/net/ethernet-controller.yaml#
+ - $ref: /schemas/net/ethernet-switch-port.yaml#
properties:
- reg:
- description: Port number
-
label:
description:
Describes the label associated with this port, which will become
@@ -57,25 +54,6 @@ properties:
- rtl8_4t
- seville
- phy-handle: true
-
- phy-mode: true
-
- fixed-link: true
-
- mac-address: true
-
- sfp: true
-
- managed: true
-
- rx-internal-delay-ps: true
-
- tx-internal-delay-ps: true
-
-required:
- - reg
-
# CPU and DSA ports must have phylink-compatible link descriptions
if:
oneOf:
diff --git a/Documentation/devicetree/bindings/net/ethernet-switch-port.yaml b/Documentation/devicetree/bindings/net/ethernet-switch-port.yaml
new file mode 100644
index 000000000000..cb1e5e12bf0a
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/ethernet-switch-port.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/ethernet-switch-port.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Ethernet Switch port Device Tree Bindings
+
+maintainers:
+ - Andrew Lunn <andrew@lunn.ch>
+ - Florian Fainelli <f.fainelli@gmail.com>
+ - Vivien Didelot <vivien.didelot@gmail.com>
+
+description:
+ Ethernet switch port Description
+
+$ref: ethernet-controller.yaml#
+
+properties:
+ reg:
+ description: Port number
+
+ phy-handle: true
+
+ phy-mode: true
+
+ fixed-link: true
+
+ mac-address: true
+
+ sfp: true
+
+ managed: true
+
+ rx-internal-delay-ps: true
+
+ tx-internal-delay-ps: true
+
+required:
+ - reg
+
+additionalProperties: true
+
+...
diff --git a/Documentation/devicetree/bindings/net/ethernet-switch.yaml b/Documentation/devicetree/bindings/net/ethernet-switch.yaml
index fbaac536673d..f698857619da 100644
--- a/Documentation/devicetree/bindings/net/ethernet-switch.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-switch.yaml
@@ -36,7 +36,9 @@ patternProperties:
type: object
description: Ethernet switch ports
- $ref: /schemas/net/dsa/dsa-port.yaml#
+ allOf:
+ - $ref: /schemas/net/dsa/dsa-port.yaml#
+ - $ref: ethernet-switch-port.yaml#
oneOf:
- required:
diff --git a/MAINTAINERS b/MAINTAINERS
index 3b6c3989c419..d98fc1962874 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14326,6 +14326,7 @@ M: Florian Fainelli <f.fainelli@gmail.com>
M: Vladimir Oltean <olteanv@gmail.com>
S: Maintained
F: Documentation/devicetree/bindings/net/dsa/
+F: Documentation/devicetree/bindings/net/ethernet-switch-port.yaml
F: Documentation/devicetree/bindings/net/ethernet-switch.yaml
F: drivers/net/dsa/
F: include/linux/dsa/
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH v1 net-next 6/7] dt-bindings: net: add generic ethernet-switch-port binding
2022-10-25 5:03 ` [PATCH v1 net-next 6/7] dt-bindings: net: add generic ethernet-switch-port binding Colin Foster
@ 2022-10-26 17:44 ` Rob Herring
2022-10-27 4:06 ` Colin Foster
0 siblings, 1 reply; 26+ messages in thread
From: Rob Herring @ 2022-10-26 17:44 UTC (permalink / raw)
To: Colin Foster
Cc: linux-mediatek, linux-arm-kernel, netdev, linux-kernel,
devicetree, Alexandre Belloni, Claudiu Manoil, John Crispin,
Sean Wang, DENG Qingfang, Landen Chao, nç ÜNAL,
Matthias Brugger, Paolo Abeni, Jakub Kicinski, Eric Dumazet,
David S. Miller, Vladimir Oltean, Florian Fainelli,
Vivien Didelot, Andrew Lunn, Krzysztof Kozlowski, Lee Jones
On Mon, Oct 24, 2022 at 10:03:54PM -0700, Colin Foster wrote:
> The dsa-port.yaml binding had several references that can be common to all
> ethernet ports, not just dsa-specific ones. Break out the generic bindings
> to ethernet-switch-port.yaml they can be used by non-dsa drivers.
>
> Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> Suggested-by: Vladimir Oltean <olteanv@gmail.com>
> ---
> .../devicetree/bindings/net/dsa/dsa-port.yaml | 26 +----------
> .../bindings/net/ethernet-switch-port.yaml | 44 +++++++++++++++++++
> .../bindings/net/ethernet-switch.yaml | 4 +-
> MAINTAINERS | 1 +
> 4 files changed, 50 insertions(+), 25 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/net/ethernet-switch-port.yaml
>
> diff --git a/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml b/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml
> index 10ad7e71097b..c5144e733511 100644
> --- a/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml
> @@ -4,7 +4,7 @@
> $id: http://devicetree.org/schemas/net/dsa/dsa-port.yaml#
> $schema: http://devicetree.org/meta-schemas/core.yaml#
>
> -title: Ethernet Switch port Device Tree Bindings
> +title: DSA Switch port Device Tree Bindings
>
> maintainers:
> - Andrew Lunn <andrew@lunn.ch>
> @@ -15,12 +15,9 @@ description:
> Ethernet switch port Description
>
> allOf:
> - - $ref: /schemas/net/ethernet-controller.yaml#
> + - $ref: /schemas/net/ethernet-switch-port.yaml#
>
> properties:
> - reg:
> - description: Port number
> -
> label:
> description:
> Describes the label associated with this port, which will become
> @@ -57,25 +54,6 @@ properties:
> - rtl8_4t
> - seville
>
> - phy-handle: true
> -
> - phy-mode: true
> -
> - fixed-link: true
> -
> - mac-address: true
> -
> - sfp: true
> -
> - managed: true
> -
> - rx-internal-delay-ps: true
> -
> - tx-internal-delay-ps: true
> -
> -required:
> - - reg
> -
> # CPU and DSA ports must have phylink-compatible link descriptions
> if:
> oneOf:
> diff --git a/Documentation/devicetree/bindings/net/ethernet-switch-port.yaml b/Documentation/devicetree/bindings/net/ethernet-switch-port.yaml
> new file mode 100644
> index 000000000000..cb1e5e12bf0a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/ethernet-switch-port.yaml
> @@ -0,0 +1,44 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/ethernet-switch-port.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Ethernet Switch port Device Tree Bindings
> +
> +maintainers:
> + - Andrew Lunn <andrew@lunn.ch>
> + - Florian Fainelli <f.fainelli@gmail.com>
> + - Vivien Didelot <vivien.didelot@gmail.com>
> +
> +description:
> + Ethernet switch port Description
> +
> +$ref: ethernet-controller.yaml#
> +
> +properties:
> + reg:
> + description: Port number
> +
> + phy-handle: true
> +
> + phy-mode: true
> +
> + fixed-link: true
> +
> + mac-address: true
> +
> + sfp: true
> +
> + managed: true
> +
> + rx-internal-delay-ps: true
> +
> + tx-internal-delay-ps: true
> +
> +required:
> + - reg
> +
> +additionalProperties: true
> +
> +...
> diff --git a/Documentation/devicetree/bindings/net/ethernet-switch.yaml b/Documentation/devicetree/bindings/net/ethernet-switch.yaml
> index fbaac536673d..f698857619da 100644
> --- a/Documentation/devicetree/bindings/net/ethernet-switch.yaml
> +++ b/Documentation/devicetree/bindings/net/ethernet-switch.yaml
> @@ -36,7 +36,9 @@ patternProperties:
> type: object
> description: Ethernet switch ports
>
> - $ref: /schemas/net/dsa/dsa-port.yaml#
> + allOf:
> + - $ref: /schemas/net/dsa/dsa-port.yaml#
> + - $ref: ethernet-switch-port.yaml#
dsa-port.yaml references ethernet-switch-port.yaml, so you shouldn't
need both here.
I imagine what you were trying to do here was say it is either one of
these, not both. I don't think this is going work for the same reasons I
mentioned with unevaluatedProperties.
Rob
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v1 net-next 6/7] dt-bindings: net: add generic ethernet-switch-port binding
2022-10-26 17:44 ` Rob Herring
@ 2022-10-27 4:06 ` Colin Foster
0 siblings, 0 replies; 26+ messages in thread
From: Colin Foster @ 2022-10-27 4:06 UTC (permalink / raw)
To: Rob Herring
Cc: linux-mediatek, linux-arm-kernel, netdev, linux-kernel,
devicetree, Alexandre Belloni, Claudiu Manoil, John Crispin,
Sean Wang, DENG Qingfang, Landen Chao, nç ÜNAL,
Matthias Brugger, Paolo Abeni, Jakub Kicinski, Eric Dumazet,
David S. Miller, Vladimir Oltean, Florian Fainelli,
Vivien Didelot, Andrew Lunn, Krzysztof Kozlowski, Lee Jones
On Wed, Oct 26, 2022 at 12:44:21PM -0500, Rob Herring wrote:
> On Mon, Oct 24, 2022 at 10:03:54PM -0700, Colin Foster wrote:
> > The dsa-port.yaml binding had several references that can be common to all
> > ethernet ports, not just dsa-specific ones. Break out the generic bindings
> > to ethernet-switch-port.yaml they can be used by non-dsa drivers.
> >
> > Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> > Suggested-by: Vladimir Oltean <olteanv@gmail.com>
> > ---
> > .../devicetree/bindings/net/dsa/dsa-port.yaml | 26 +----------
> > .../bindings/net/ethernet-switch-port.yaml | 44 +++++++++++++++++++
> > .../bindings/net/ethernet-switch.yaml | 4 +-
> > MAINTAINERS | 1 +
> > 4 files changed, 50 insertions(+), 25 deletions(-)
> > create mode 100644 Documentation/devicetree/bindings/net/ethernet-switch-port.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml b/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml
> > index 10ad7e71097b..c5144e733511 100644
> > --- a/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml
> > +++ b/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml
> > @@ -4,7 +4,7 @@
> > $id: http://devicetree.org/schemas/net/dsa/dsa-port.yaml#
> > $schema: http://devicetree.org/meta-schemas/core.yaml#
> >
> > -title: Ethernet Switch port Device Tree Bindings
> > +title: DSA Switch port Device Tree Bindings
> >
> > maintainers:
> > - Andrew Lunn <andrew@lunn.ch>
> > @@ -15,12 +15,9 @@ description:
> > Ethernet switch port Description
> >
> > allOf:
> > - - $ref: /schemas/net/ethernet-controller.yaml#
> > + - $ref: /schemas/net/ethernet-switch-port.yaml#
> >
> > properties:
> > - reg:
> > - description: Port number
> > -
> > label:
> > description:
> > Describes the label associated with this port, which will become
> > @@ -57,25 +54,6 @@ properties:
> > - rtl8_4t
> > - seville
> >
> > - phy-handle: true
> > -
> > - phy-mode: true
> > -
> > - fixed-link: true
> > -
> > - mac-address: true
> > -
> > - sfp: true
> > -
> > - managed: true
> > -
> > - rx-internal-delay-ps: true
> > -
> > - tx-internal-delay-ps: true
> > -
> > -required:
> > - - reg
> > -
> > # CPU and DSA ports must have phylink-compatible link descriptions
> > if:
> > oneOf:
> > diff --git a/Documentation/devicetree/bindings/net/ethernet-switch-port.yaml b/Documentation/devicetree/bindings/net/ethernet-switch-port.yaml
> > new file mode 100644
> > index 000000000000..cb1e5e12bf0a
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/net/ethernet-switch-port.yaml
> > @@ -0,0 +1,44 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/net/ethernet-switch-port.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Ethernet Switch port Device Tree Bindings
> > +
> > +maintainers:
> > + - Andrew Lunn <andrew@lunn.ch>
> > + - Florian Fainelli <f.fainelli@gmail.com>
> > + - Vivien Didelot <vivien.didelot@gmail.com>
> > +
> > +description:
> > + Ethernet switch port Description
> > +
> > +$ref: ethernet-controller.yaml#
> > +
> > +properties:
> > + reg:
> > + description: Port number
> > +
> > + phy-handle: true
> > +
> > + phy-mode: true
> > +
> > + fixed-link: true
> > +
> > + mac-address: true
> > +
> > + sfp: true
> > +
> > + managed: true
> > +
> > + rx-internal-delay-ps: true
> > +
> > + tx-internal-delay-ps: true
> > +
> > +required:
> > + - reg
> > +
> > +additionalProperties: true
> > +
> > +...
> > diff --git a/Documentation/devicetree/bindings/net/ethernet-switch.yaml b/Documentation/devicetree/bindings/net/ethernet-switch.yaml
> > index fbaac536673d..f698857619da 100644
> > --- a/Documentation/devicetree/bindings/net/ethernet-switch.yaml
> > +++ b/Documentation/devicetree/bindings/net/ethernet-switch.yaml
> > @@ -36,7 +36,9 @@ patternProperties:
> > type: object
> > description: Ethernet switch ports
> >
> > - $ref: /schemas/net/dsa/dsa-port.yaml#
> > + allOf:
> > + - $ref: /schemas/net/dsa/dsa-port.yaml#
> > + - $ref: ethernet-switch-port.yaml#
>
> dsa-port.yaml references ethernet-switch-port.yaml, so you shouldn't
> need both here.
>
> I imagine what you were trying to do here was say it is either one of
> these, not both. I don't think this is going work for the same reasons I
> mentioned with unevaluatedProperties.
Oh, that was definitely a mistake for me to reference
ethernet-switch-port.yaml. And that was exactly requested of me when
Vladimir helped guide me down this path:
"""
6. The ethernet-switch.yaml will have "$ref: ethernet-switch-port.yaml#"
and "$ref: dsa-port.yaml". The dsa-port.yaml schema will *not* have
"$ref: ethernet-switch-port.yaml#", just its custom additions.
I'm not 100% on this, but I think there will be a problem if:
- dsa.yaml references ethernet-switch.yaml
- ethernet-switch.yaml references ethernet-switch-port.yaml
- dsa.yaml also references dsa-port.yaml
- dsa-port.yaml references ethernet-switch-port.yaml
because ethernet-switch-port.yaml will be referenced twice. Again,
not sure if this is a problem. If it isn't, things can be simpler,
just make dsa-port.yaml reference ethernet-switch-port.yaml, and skip
steps 2 and 3 since dsa-port.yaml containing just the DSA specifics
is no longer problematic.
"""
I might have been testing to see if this was necessary and since I
didn't notice any dt_binding_check errors this might have slipped into
the patch set. But my intent was to reference both here and remove the
reference in dsa-port.yaml.
>
> Rob
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v1 net-next 7/7] dt-bindings: net: mscc,vsc7514-switch: utilize generic ethernet-switch.yaml
2022-10-25 5:03 [PATCH v1 net-next 0/7] dt-binding preparation for ocelot switches Colin Foster
` (5 preceding siblings ...)
2022-10-25 5:03 ` [PATCH v1 net-next 6/7] dt-bindings: net: add generic ethernet-switch-port binding Colin Foster
@ 2022-10-25 5:03 ` Colin Foster
2022-10-25 20:05 ` Rob Herring
2022-10-26 17:47 ` Rob Herring
6 siblings, 2 replies; 26+ messages in thread
From: Colin Foster @ 2022-10-25 5:03 UTC (permalink / raw)
To: linux-mediatek, linux-arm-kernel, netdev, linux-kernel, devicetree
Cc: Alexandre Belloni, Claudiu Manoil, John Crispin, Sean Wang,
DENG Qingfang, Landen Chao, nç ÜNAL, Matthias Brugger,
Paolo Abeni, Jakub Kicinski, Eric Dumazet, David S. Miller,
Vladimir Oltean, Florian Fainelli, Vivien Didelot, Andrew Lunn,
Krzysztof Kozlowski, Rob Herring, Lee Jones
Several bindings for ethernet switches are available for non-dsa switches
by way of ethernet-switch.yaml. Remove these duplicate entries and utilize
the common bindings for the VSC7514.
Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Suggested-by: Vladimir Oltean <olteanv@gmail.com>
---
.../bindings/net/mscc,vsc7514-switch.yaml | 36 +------------------
1 file changed, 1 insertion(+), 35 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml b/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml
index ee0a504bdb24..1703bd46c3ca 100644
--- a/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml
+++ b/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml
@@ -19,11 +19,8 @@ description: |
packet extraction/injection.
properties:
- $nodename:
- pattern: "^switch@[0-9a-f]+$"
-
compatible:
- const: mscc,vsc7514-switch
+ $ref: ethernet-switch.yaml#
reg:
items:
@@ -88,47 +85,16 @@ properties:
- const: fdma
ethernet-ports:
- type: object
-
- properties:
- '#address-cells':
- const: 1
- '#size-cells':
- const: 0
additionalProperties: false
patternProperties:
"^port@[0-9a-f]+$":
- type: object
- description: Ethernet ports handled by the switch
$ref: ethernet-controller.yaml#
unevaluatedProperties: false
- properties:
- reg:
- description: Switch port number
-
- phy-handle: true
-
- phy-mode: true
-
- fixed-link: true
-
- mac-address: true
-
- required:
- - reg
- - phy-mode
-
- oneOf:
- - required:
- - phy-handle
- - required:
- - fixed-link
-
required:
- compatible
- reg
--
2.25.1
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH v1 net-next 7/7] dt-bindings: net: mscc,vsc7514-switch: utilize generic ethernet-switch.yaml
2022-10-25 5:03 ` [PATCH v1 net-next 7/7] dt-bindings: net: mscc,vsc7514-switch: utilize generic ethernet-switch.yaml Colin Foster
@ 2022-10-25 20:05 ` Rob Herring
2022-10-25 21:23 ` Rob Herring
2022-10-26 17:47 ` Rob Herring
1 sibling, 1 reply; 26+ messages in thread
From: Rob Herring @ 2022-10-25 20:05 UTC (permalink / raw)
To: Colin Foster
Cc: Vladimir Oltean, Claudiu Manoil, Eric Dumazet, Alexandre Belloni,
netdev, Jakub Kicinski, Lee Jones, Andrew Lunn, David S. Miller,
Landen Chao, John Crispin, DENG Qingfang, linux-mediatek,
Rob Herring, nç ÜNAL, devicetree, linux-kernel,
linux-arm-kernel, Florian Fainelli, Vivien Didelot,
Matthias Brugger, Krzysztof Kozlowski, Sean Wang, Paolo Abeni
On Mon, 24 Oct 2022 22:03:55 -0700, Colin Foster wrote:
> Several bindings for ethernet switches are available for non-dsa switches
> by way of ethernet-switch.yaml. Remove these duplicate entries and utilize
> the common bindings for the VSC7514.
>
> Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> Suggested-by: Vladimir Oltean <olteanv@gmail.com>
> ---
> .../bindings/net/mscc,vsc7514-switch.yaml | 36 +------------------
> 1 file changed, 1 insertion(+), 35 deletions(-)
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/net/ethernet-switch.yaml
Documentation/devicetree/bindings/net/mscc,vsc7514-switch.example.dtb:0:0: /example-0/switch@1010000: failed to match any schema with compatible: ['mscc,vsc7514-switch']
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/
This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v1 net-next 7/7] dt-bindings: net: mscc,vsc7514-switch: utilize generic ethernet-switch.yaml
2022-10-25 20:05 ` Rob Herring
@ 2022-10-25 21:23 ` Rob Herring
0 siblings, 0 replies; 26+ messages in thread
From: Rob Herring @ 2022-10-25 21:23 UTC (permalink / raw)
To: Colin Foster
Cc: Vladimir Oltean, Claudiu Manoil, Eric Dumazet, Alexandre Belloni,
netdev, Jakub Kicinski, Lee Jones, Andrew Lunn, David S. Miller,
Landen Chao, John Crispin, DENG Qingfang, linux-mediatek,
nç ÜNAL, devicetree, linux-kernel, linux-arm-kernel,
Florian Fainelli, Vivien Didelot, Matthias Brugger,
Krzysztof Kozlowski, Sean Wang, Paolo Abeni
On Tue, Oct 25, 2022 at 03:05:02PM -0500, Rob Herring wrote:
> On Mon, 24 Oct 2022 22:03:55 -0700, Colin Foster wrote:
> > Several bindings for ethernet switches are available for non-dsa switches
> > by way of ethernet-switch.yaml. Remove these duplicate entries and utilize
> > the common bindings for the VSC7514.
> >
> > Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> > Suggested-by: Vladimir Oltean <olteanv@gmail.com>
> > ---
> > .../bindings/net/mscc,vsc7514-switch.yaml | 36 +------------------
> > 1 file changed, 1 insertion(+), 35 deletions(-)
> >
>
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
>
> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> ./Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/net/ethernet-switch.yaml
> Documentation/devicetree/bindings/net/mscc,vsc7514-switch.example.dtb:0:0: /example-0/switch@1010000: failed to match any schema with compatible: ['mscc,vsc7514-switch']
This one you can ignore. The base tree is reset if a prior patch failed.
Rob
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v1 net-next 7/7] dt-bindings: net: mscc,vsc7514-switch: utilize generic ethernet-switch.yaml
2022-10-25 5:03 ` [PATCH v1 net-next 7/7] dt-bindings: net: mscc,vsc7514-switch: utilize generic ethernet-switch.yaml Colin Foster
2022-10-25 20:05 ` Rob Herring
@ 2022-10-26 17:47 ` Rob Herring
2022-10-27 3:57 ` Colin Foster
1 sibling, 1 reply; 26+ messages in thread
From: Rob Herring @ 2022-10-26 17:47 UTC (permalink / raw)
To: Colin Foster
Cc: linux-mediatek, linux-arm-kernel, netdev, linux-kernel,
devicetree, Alexandre Belloni, Claudiu Manoil, John Crispin,
Sean Wang, DENG Qingfang, Landen Chao, nç ÜNAL,
Matthias Brugger, Paolo Abeni, Jakub Kicinski, Eric Dumazet,
David S. Miller, Vladimir Oltean, Florian Fainelli,
Vivien Didelot, Andrew Lunn, Krzysztof Kozlowski, Lee Jones
On Mon, Oct 24, 2022 at 10:03:55PM -0700, Colin Foster wrote:
> Several bindings for ethernet switches are available for non-dsa switches
> by way of ethernet-switch.yaml. Remove these duplicate entries and utilize
> the common bindings for the VSC7514.
>
> Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> Suggested-by: Vladimir Oltean <olteanv@gmail.com>
> ---
> .../bindings/net/mscc,vsc7514-switch.yaml | 36 +------------------
> 1 file changed, 1 insertion(+), 35 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml b/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml
> index ee0a504bdb24..1703bd46c3ca 100644
> --- a/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml
> +++ b/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml
> @@ -19,11 +19,8 @@ description: |
> packet extraction/injection.
>
> properties:
> - $nodename:
> - pattern: "^switch@[0-9a-f]+$"
> -
> compatible:
> - const: mscc,vsc7514-switch
> + $ref: ethernet-switch.yaml#
??? 'compatible' is a node?
Rob
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v1 net-next 7/7] dt-bindings: net: mscc,vsc7514-switch: utilize generic ethernet-switch.yaml
2022-10-26 17:47 ` Rob Herring
@ 2022-10-27 3:57 ` Colin Foster
0 siblings, 0 replies; 26+ messages in thread
From: Colin Foster @ 2022-10-27 3:57 UTC (permalink / raw)
To: Rob Herring
Cc: linux-mediatek, linux-arm-kernel, netdev, linux-kernel,
devicetree, Alexandre Belloni, Claudiu Manoil, John Crispin,
Sean Wang, DENG Qingfang, Landen Chao, nç ÜNAL,
Matthias Brugger, Paolo Abeni, Jakub Kicinski, Eric Dumazet,
David S. Miller, Vladimir Oltean, Florian Fainelli,
Vivien Didelot, Andrew Lunn, Krzysztof Kozlowski, Lee Jones
On Wed, Oct 26, 2022 at 12:47:04PM -0500, Rob Herring wrote:
> On Mon, Oct 24, 2022 at 10:03:55PM -0700, Colin Foster wrote:
> > Several bindings for ethernet switches are available for non-dsa switches
> > by way of ethernet-switch.yaml. Remove these duplicate entries and utilize
> > the common bindings for the VSC7514.
> >
> > Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> > Suggested-by: Vladimir Oltean <olteanv@gmail.com>
> > ---
> > .../bindings/net/mscc,vsc7514-switch.yaml | 36 +------------------
> > 1 file changed, 1 insertion(+), 35 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml b/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml
> > index ee0a504bdb24..1703bd46c3ca 100644
> > --- a/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml
> > +++ b/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml
> > @@ -19,11 +19,8 @@ description: |
> > packet extraction/injection.
> >
> > properties:
> > - $nodename:
> > - pattern: "^switch@[0-9a-f]+$"
> > -
> > compatible:
> > - const: mscc,vsc7514-switch
> > + $ref: ethernet-switch.yaml#
>
> ??? 'compatible' is a node?
I need to look more into this. The compatible string should remain
mscc,vsc7514-switch, but I think the pattern properties should
probably be updated to "^(ethernet-)switch@[0-9a-f]+$" to match
ethernet-switch.yaml.
I didn't think the ethernet-switch.yaml could be at the top level for
the 7514, but I must have been mistaken. Either way - not under
compatible as you're pointing out. Much appreciated.
>
> Rob
^ permalink raw reply [flat|nested] 26+ messages in thread