dt-bindings: net: nvidia,tegra234-mgbe: Add missing properties
Thierry Reding
maintainerPATCH 1/1 dt-bindings: net: nvidia,tegra234-mgbe: Add missing properties
From: Thierry Reding <[email protected]>
Being a DWMAC derivative, the Tegra234 MGBE supports AXI configuration nodes named stmmac-axi-config and phandle references to them using the snps,axi-config property.
While at it, add the 10gbase-r PHY mode.
---
This gets rid of the remaining warnings on half of the Tegra234 boards.
.../devicetree/bindings/net/nvidia,tegra234-mgbe.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.yaml +8 -1
@@ -81,8 +81,9 @@ properties: phy-mode: contains: enum: - - usxgmii - 10gbase-kr + - 10gbase-r + - usxgmii mdio: $ref: mdio.yaml#
@@ -90,6 +91,12 @@ properties: description: Optional node for embedded MDIO controller. + snps,axi-config: + $ref: snps,dwmac.yaml#/properties/snps,axi-config + + stmmac-axi-config: + $ref: snps,dwmac.yaml#/properties/stmmac-axi-config + required: - compatible - reg
Signature · 1 line
2.54.0
Rob Herring (Arm)
maintainerQuoted 6 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Being a DWMAC derivative, the Tegra234 MGBE supports AXI configuration nodes named stmmac-axi-config and phandle references to them using the snps,axi-config property.
Quoted 9 lines
While at it, add the 10gbase-r PHY mode.
Signed-off-by Thierry Reding <[email protected]>---
This gets rid of the remaining warnings on half of the Tegra234 boards..../devicetree/bindings/net/nvidia,tegra234-mgbe.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.yaml: properties:snps,axi-config: 'anyOf' conditional failed, one must be fixed:
'description' is a dependency of '$ref'
'snps,dwmac.yaml#/properties/snps,axi-config' does not match 'types.yaml#\\/definitions\\/'
hint: A vendor property needs a $ref to types.yaml
'snps,dwmac.yaml#/properties/snps,axi-config' does not match '^#\\/(definitions|\\$defs)\\/'
hint: A vendor property can have a $ref to a a $defs schema
hint: Vendor specific properties must have a type and description unless they have a defined, common suffix.
from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/[email protected]
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
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 after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
Rob Herring
maintainerQuoted 31 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Being a DWMAC derivative, the Tegra234 MGBE supports AXI configuration nodes named stmmac-axi-config and phandle references to them using the snps,axi-config property.
While at it, add the 10gbase-r PHY mode.
Signed-off-by Thierry Reding <[email protected]>---
This gets rid of the remaining warnings on half of the Tegra234 boards..../devicetree/bindings/net/nvidia,tegra234-mgbe.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.yaml +2
-1@@ -81,8 +81,9 @@ properties: phy-mode: contains: enum: - - usxgmii - 10gbase-kr + - 10gbase-r + - usxgmii mdio: $ref: mdio.yaml#
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.yaml properties: · line 98
Quoted 8 lines
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.yaml +5
-0@@ -90,6 +91,12 @@ properties: description: Optional node for embedded MDIO controller. + snps,axi-config: + $ref: snps,dwmac.yaml#/properties/snps,axi-config + + stmmac-axi-config: + $ref: snps,dwmac.yaml#/properties/stmmac-axi-config
You should be referencing the whole snps,dwmac.yaml.
Rob
Thierry Reding
maintainerQuoted 35 lines · Rob Herring
Quoted 34 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Being a DWMAC derivative, the Tegra234 MGBE supports AXI configuration nodes named stmmac-axi-config and phandle references to them using the snps,axi-config property.
While at it, add the 10gbase-r PHY mode.
Signed-off-by Thierry Reding <[email protected]>---
This gets rid of the remaining warnings on half of the Tegra234 boards..../devicetree/bindings/net/nvidia,tegra234-mgbe.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.yaml +2
-1@@ -81,8 +81,9 @@ properties: phy-mode: contains: enum: - - usxgmii - 10gbase-kr + - 10gbase-r + - usxgmii mdio: $ref: mdio.yaml#@@ -90,6 +91,12 @@ properties: description: Optional node for embedded MDIO controller.
Quoted 7 lines
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.yaml properties: · line 98
Quoted 5 lines
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.yaml +5
-0+ snps,axi-config: + $ref: snps,dwmac.yaml#/properties/snps,axi-config + + stmmac-axi-config: + $ref: snps,dwmac.yaml#/properties/stmmac-axi-configYou should be referencing the whole snps,dwmac.yaml.
I initially tried that, but it makes things a lot worse:
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.example.dtb: ethernet@6800000 (nvidia,tegra234-mgbe): clock-names: ['mgbe', 'mac', 'mac-divider', 'ptp_ref', 'rx-input-m', 'rx-input', 'tx', 'eee-pcs', 'rx-pcs-input', 'rx-pcs-m', 'rx-pcs', 'tx-pcs'] is too long
from schema $id: http://devicetree.org/schemas/net/nvidia,tegra234-mgbe.yaml
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.example.dtb: ethernet@6800000 (nvidia,tegra234-mgbe): clocks: [[4294967295, 380], [4294967295, 377], [4294967295, 376], [4294967295, 381], [4294967295, 357], [4294967295, 248], [4294967295, 374], [4294967295, 379], [4294967295, 369], [4294967295, 361], [4294967295, 373], [4294967295, 375]] is too long from schema $id: http://devicetree.org/schemas/net/nvidia,tegra234-mgbe.yaml
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.example.dtb: ethernet@6800000 (nvidia,tegra234-mgbe): compatible: ['nvidia,tegra234-mgbe'] does not contain items matching the given schema
from schema $id: http://devicetree.org/schemas/net/nvidia,tegra234-mgbe.yaml
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.example.dtb: ethernet@6800000 (nvidia,tegra234-mgbe): interrupt-names:0: 'oneOf' conditional failed, one must be fixed:
'macirq' was expected
'eth_wake_irq' was expected
'eth_lpi' was expected
'sfty' was expected
'common' does not match '^rx-queue-[0-7]$'
'common' does not match '^tx-queue-[0-7]$'
'common' does not match '^ptp-pps-[0-3]$'
from schema $id: http://devicetree.org/schemas/net/nvidia,tegra234-mgbe.yaml
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.example.dtb: ethernet@6800000 (nvidia,tegra234-mgbe): mdio: 'compatible' is a required property
from schema $id: http://devicetree.org/schemas/net/nvidia,tegra234-mgbe.yaml
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.example.dtb: ethernet@6800000 (nvidia,tegra234-mgbe): reg: [[109051904, 65536], [109117440, 65536], [109707264, 65536]] is too long
from schema $id: http://devicetree.org/schemas/net/nvidia,tegra234-mgbe.yaml
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.example.dtb: ethernet@6800000 (nvidia,tegra234-mgbe): reset-names: 'oneOf' conditional failed, one must be fixed:
['mac', 'pcs'] is too long
'mac' is not one of ['stmmaceth', 'ahb']
'stmmaceth' was expected
'ahb' was expected
from schema $id: http://devicetree.org/schemas/net/nvidia,tegra234-mgbe.yaml
This is because while the underlying IP is derived from the Synopsis one, the Tegra MGBE is slightly modified and has different clock inputs, interrupts, etc.
Or, well, I guess I don't actually know (does anyoen?) if the licensed IP is properly represented by snps,dwmac.yaml, or if it's just a set of values that happen to apply to some set of derived IPs.
Anyway, the easiest would probably be to just duplicate the snps,axi-config property because it's only a phandle. stmmac-axi-config not having a vendor prefix doesn't throw an error, so we could probably keep it as-is.
I suppose another alternative would be to add special cases into snps,dwmac.yaml, but I don't know if that's a great idea, it's just going to make that very messy if everyone starts doing that.
Which do you prefer? Or is there another option that you think would be better here?
Thanks,
Thierry
Rob Herring
maintainerQuoted 85 lines · Thierry Reding
Quoted 35 lines · Rob Herring
Quoted 34 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Being a DWMAC derivative, the Tegra234 MGBE supports AXI configuration nodes named stmmac-axi-config and phandle references to them using the snps,axi-config property.
While at it, add the 10gbase-r PHY mode.
Signed-off-by Thierry Reding <[email protected]>---
This gets rid of the remaining warnings on half of the Tegra234 boards..../devicetree/bindings/net/nvidia,tegra234-mgbe.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.yaml +2
-1@@ -81,8 +81,9 @@ properties: phy-mode: contains: enum: - - usxgmii - 10gbase-kr + - 10gbase-r + - usxgmii mdio: $ref: mdio.yaml#@@ -90,6 +91,12 @@ properties: description: Optional node for embedded MDIO controller.Quoted 7 lines
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.yaml properties: · line 98
Quoted 5 lines
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.yaml +5
-0+ snps,axi-config: + $ref: snps,dwmac.yaml#/properties/snps,axi-config + + stmmac-axi-config: + $ref: snps,dwmac.yaml#/properties/stmmac-axi-configYou should be referencing the whole snps,dwmac.yaml.
I initially tried that, but it makes things a lot worse:
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.example.dtb: ethernet@6800000 (nvidia,tegra234-mgbe): clock-names: ['mgbe', 'mac', 'mac-divider', 'ptp_ref', 'rx-input-m', 'rx-input', 'tx', 'eee-pcs', 'rx-pcs-input', 'rx-pcs-m', 'rx-pcs', 'tx-pcs'] is too long
from schema $id: http://devicetree.org/schemas/net/nvidia,tegra234-mgbe.yaml
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.example.dtb: ethernet@6800000 (nvidia,tegra234-mgbe): clocks: [[4294967295, 380], [4294967295, 377], [4294967295, 376], [4294967295, 381], [4294967295, 357], [4294967295, 248], [4294967295, 374], [4294967295, 379], [4294967295, 369], [4294967295, 361], [4294967295, 373], [4294967295, 375]] is too long from schema $id: http://devicetree.org/schemas/net/nvidia,tegra234-mgbe.yaml
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.example.dtb: ethernet@6800000 (nvidia,tegra234-mgbe): compatible: ['nvidia,tegra234-mgbe'] does not contain items matching the given schema
from schema $id: http://devicetree.org/schemas/net/nvidia,tegra234-mgbe.yaml
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.example.dtb: ethernet@6800000 (nvidia,tegra234-mgbe): interrupt-names:0: 'oneOf' conditional failed, one must be fixed:
'macirq' was expected
'eth_wake_irq' was expected
'eth_lpi' was expected
'sfty' was expected
'common' does not match '^rx-queue-[0-7]$'
'common' does not match '^tx-queue-[0-7]$'
'common' does not match '^ptp-pps-[0-3]$'
from schema $id: http://devicetree.org/schemas/net/nvidia,tegra234-mgbe.yaml
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.example.dtb: ethernet@6800000 (nvidia,tegra234-mgbe): mdio: 'compatible' is a required property
from schema $id: http://devicetree.org/schemas/net/nvidia,tegra234-mgbe.yaml
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.example.dtb: ethernet@6800000 (nvidia,tegra234-mgbe): reg: [[109051904, 65536], [109117440, 65536], [109707264, 65536]] is too long
from schema $id: http://devicetree.org/schemas/net/nvidia,tegra234-mgbe.yaml
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.example.dtb: ethernet@6800000 (nvidia,tegra234-mgbe): reset-names: 'oneOf' conditional failed, one must be fixed:
['mac', 'pcs'] is too long
'mac' is not one of ['stmmaceth', 'ahb']
'stmmaceth' was expected
'ahb' was expected
from schema $id: http://devicetree.org/schemas/net/nvidia,tegra234-mgbe.yamlThis is because while the underlying IP is derived from the Synopsis one, the Tegra MGBE is slightly modified and has different clock inputs, interrupts, etc.
Or, well, I guess I don't actually know (does anyoen?) if the licensed IP is properly represented by snps,dwmac.yaml, or if it's just a set of values that happen to apply to some set of derived IPs.
Anyway, the easiest would probably be to just duplicate the snps,axi-config property because it's only a phandle. stmmac-axi-config not having a vendor prefix doesn't throw an error, so we could probably keep it as-is.
Quoted 6 lines
I suppose another alternative would be to add special cases into snps,dwmac.yaml, but I don't know if that's a great idea, it's just going to make that very messy if everyone starts doing that.
Which do you prefer? Or is there another option that you think would be better here?
My preference is to make deviating from the common schema painful, so we don't get needless variations in names and such. That doesn't work too well with existing bindings (but proves my point).
You either have to extend the common binding to fix the above errors. For example, update clocks so that more clocks are allowed. Alternatively, you could split out all the vendor properties to another file that both you and snps,dwmac.yaml include.
Rob