Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: net: mediatek,net: fixup MAC binding

1. Use unevaluatedProperties
It's needed to allow ethernet-controller.yaml properties work correctly.

2. Drop unneeded phy-handle/phy-mode

3. Don't require phy-handle
Some SoCs may use fixed link.

For in-kernel MT7621 DTS files this fixes following errors:
arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb: ethernet@1e100000: mac@0: 'fixed-link' does not match any of the regexes: 'pinctrl-[0-9]+'
From schema: Documentation/devicetree/bindings/net/mediatek,net.yaml
arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb: ethernet@1e100000: mac@0: 'phy-handle' is a required property
From schema: Documentation/devicetree/bindings/net/mediatek,net.yaml
arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb: ethernet@1e100000: mac@1: 'fixed-link' does not match any of the regexes: 'pinctrl-[0-9]+'
From schema: Documentation/devicetree/bindings/net/mediatek,net.yaml
arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dtb: ethernet@1e100000: mac@1: 'phy-handle' is a required property
From schema: Documentation/devicetree/bindings/net/mediatek,net.yaml

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Rafał Miłecki and committed by
David S. Miller
8469c7f5 e7397184

+1 -6
+1 -6
Documentation/devicetree/bindings/net/mediatek,net.yaml
··· 293 293 patternProperties: 294 294 "^mac@[0-1]$": 295 295 type: object 296 - additionalProperties: false 296 + unevaluatedProperties: false 297 297 allOf: 298 298 - $ref: ethernet-controller.yaml# 299 299 description: ··· 305 305 reg: 306 306 maxItems: 1 307 307 308 - phy-handle: true 309 - 310 - phy-mode: true 311 - 312 308 required: 313 309 - reg 314 310 - compatible 315 - - phy-handle 316 311 317 312 required: 318 313 - compatible