Message ID | 20221104045204.746124-3-colin.foster@in-advantage.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | dt-binding preparation for ocelot switches | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Clearly marked for net-next |
netdev/fixes_present | success | Fixes tag not required for -next series |
netdev/subject_prefix | success | Link |
netdev/cover_letter | success | Series has a cover letter |
netdev/patch_count | success | Link |
netdev/header_inline | success | No static functions without inline keyword in header files |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/cc_maintainers | success | CCed 16 of 16 maintainers |
netdev/build_clang | success | Errors and warnings before: 0 this patch: 0 |
netdev/module_param | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/check_selftest | success | No net selftest shell script |
netdev/verify_fixes | success | No Fixes tag |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 50 lines checked |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/source_inline | success | Was 0 now: 0 |
On Thu, Nov 03, 2022 at 09:52:00PM -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> > --- > > v1 -> v2 > * Add #address-cells and #size-cells to the switch layer. They aren't > part of dsa.yaml. I'm afraid this is not the correct resolution to the warnings you saw. There is no reason to have #address-cells = <1> under the "switch" node, since none of that node's children have a unit address (see: "ports", "mdio"). The schema example is wrong, please fix that.
diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml index 978162df51f7..d831d5eee437 100644 --- a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml +++ b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml @@ -33,6 +33,10 @@ properties: qca,qca8334: referenced as QCA8334-AL3C QFN 88 pin package qca,qca8337: referenced as QCA8337N-AL3(B/C) DR-QFN 148 pin package + '#address-cells': + const: 1 + '#size-cells': + const: 0 reg: maxItems: 1 @@ -66,22 +70,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,7 +102,7 @@ patternProperties: SGMII on the QCA8337, it is advised to set this unless a communication issue is observed. - unevaluatedProperties: false + unevaluatedProperties: true oneOf: - required: @@ -116,7 +114,7 @@ required: - compatible - reg -additionalProperties: true +unevaluatedProperties: false examples: - |
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> --- v1 -> v2 * Add #address-cells and #size-cells to the switch layer. They aren't part of dsa.yaml. * Add unevaluatedProperties: true to the ethernet-port layer so it can correctly read properties from dsa.yaml. --- .../devicetree/bindings/net/dsa/qca8k.yaml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-)