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

dt-bindings: net: Cleanup MDIO node schemas

The schemas for MDIO bus nodes range from missing to duplicating
everything in mdio.yaml. The MDIO bus node schemas only need to
reference mdio.yaml, define any binding specific properties, and define
'unevaluatedProperties: false'. This ensures that MDIO nodes only
contain defined properties. With this, any duplicated properties can
be removed.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Vivien Didelot <vivien.didelot@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Vladimir Oltean <olteanv@gmail.com>
Cc: Joakim Zhang <qiangqing.zhang@nxp.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Cc: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Cc: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
Cc: "Fernández Rojas" <noltari@gmail.com>
Cc: John Crispin <john@phrozen.org>
Cc: "G. Jaya Kumaran" <vineetha.g.jaya.kumaran@intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Jose Abreu <joabreu@synopsys.com>
Cc: netdev@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20220105151009.3093506-1-robh@kernel.org

+38 -89
+4
Documentation/devicetree/bindings/net/actions,owl-emac.yaml
··· 51 51 description: 52 52 Phandle to the device containing custom config. 53 53 54 + mdio: 55 + $ref: mdio.yaml# 56 + unevaluatedProperties: false 57 + 54 58 required: 55 59 - compatible 56 60 - reg
+11 -14
Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml
··· 122 122 123 123 mdio-mux: 124 124 type: object 125 + unevaluatedProperties: false 125 126 126 127 properties: 127 128 compatible: ··· 133 132 description: 134 133 Phandle to EMAC MDIO. 135 134 135 + "#address-cells": 136 + const: 1 137 + 138 + "#size-cells": 139 + const: 0 140 + 136 141 mdio@1: 137 - type: object 142 + $ref: mdio.yaml# 143 + unevaluatedProperties: false 138 144 description: Internal MDIO Bus 139 145 140 146 properties: 141 - "#address-cells": 142 - const: 1 143 - 144 - "#size-cells": 145 - const: 0 146 - 147 147 compatible: 148 148 const: allwinner,sun8i-h3-mdio-internal 149 149 ··· 170 168 171 169 172 170 mdio@2: 173 - type: object 171 + $ref: mdio.yaml# 172 + unevaluatedProperties: false 174 173 description: External MDIO Bus (H3 only) 175 174 176 175 properties: 177 - "#address-cells": 178 - const: 1 179 - 180 - "#size-cells": 181 - const: 0 182 - 183 176 reg: 184 177 const: 2 185 178
+1 -25
Documentation/devicetree/bindings/net/brcm,bcm6368-mdio-mux.yaml
··· 15 15 properties as well to generate desired MDIO transaction on appropriate bus. 16 16 17 17 allOf: 18 - - $ref: "mdio.yaml#" 18 + - $ref: mdio-mux.yaml# 19 19 20 20 properties: 21 21 compatible: 22 22 const: brcm,bcm6368-mdio-mux 23 - 24 - "#address-cells": 25 - const: 1 26 - 27 - "#size-cells": 28 - const: 0 29 23 30 24 reg: 31 25 maxItems: 1 ··· 27 33 required: 28 34 - compatible 29 35 - reg 30 - 31 - patternProperties: 32 - '^mdio@[0-1]$': 33 - type: object 34 - properties: 35 - reg: 36 - maxItems: 1 37 - 38 - "#address-cells": 39 - const: 1 40 - 41 - "#size-cells": 42 - const: 0 43 - 44 - required: 45 - - reg 46 - - "#address-cells" 47 - - "#size-cells" 48 36 49 37 unevaluatedProperties: false 50 38
+2 -4
Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
··· 52 52 53 53 patternProperties: 54 54 "^mdio@[0-1]$": 55 - type: object 56 - 57 - allOf: 58 - - $ref: "http://devicetree.org/schemas/net/mdio.yaml#" 55 + $ref: /schemas/net/mdio.yaml# 56 + unevaluatedProperties: false 59 57 60 58 properties: 61 59 compatible:
+2 -21
Documentation/devicetree/bindings/net/dsa/qca8k.yaml
··· 58 58 B68 on the QCA832x and B49 on the QCA833x. 59 59 60 60 mdio: 61 - type: object 61 + $ref: /schemas/net/mdio.yaml# 62 + unevaluatedProperties: false 62 63 description: Qca8k switch have an internal mdio to access switch port. 63 64 If this is not present, the legacy mapping is used and the 64 65 internal mdio access is used. 65 66 With the legacy mapping the reg corresponding to the internal 66 67 mdio is the switch reg with an offset of -1. 67 - 68 - properties: 69 - '#address-cells': 70 - const: 1 71 - '#size-cells': 72 - const: 0 73 - 74 - patternProperties: 75 - "^(ethernet-)?phy@[0-4]$": 76 - type: object 77 - 78 - allOf: 79 - - $ref: "http://devicetree.org/schemas/net/mdio.yaml#" 80 - 81 - properties: 82 - reg: 83 - maxItems: 1 84 - 85 - required: 86 - - reg 87 68 88 69 patternProperties: 89 70 "^(ethernet-)?ports$":
+2 -1
Documentation/devicetree/bindings/net/fsl,fec.yaml
··· 165 165 req_bit is the gpr bit offset for ENET stop request. 166 166 167 167 mdio: 168 - type: object 168 + $ref: mdio.yaml# 169 + unevaluatedProperties: false 169 170 description: 170 171 Specifies the mdio bus in the FEC, used as a container for phy nodes. 171 172
+1 -1
Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml
··· 117 117 snps,mtl-tx-config = <&mtl_tx_setup>; 118 118 snps,tso; 119 119 120 - mdio0 { 120 + mdio { 121 121 #address-cells = <1>; 122 122 #size-cells = <0>; 123 123 compatible = "snps,dwmac-mdio";
+2 -2
Documentation/devicetree/bindings/net/intel,ixp4xx-ethernet.yaml
··· 48 48 and the instance to use in the second cell 49 49 50 50 mdio: 51 - type: object 52 - $ref: "mdio.yaml#" 51 + $ref: mdio.yaml# 52 + unevaluatedProperties: false 53 53 description: optional node for embedded MDIO controller 54 54 55 55 required:
+1
Documentation/devicetree/bindings/net/litex,liteeth.yaml
··· 62 62 63 63 mdio: 64 64 $ref: mdio.yaml# 65 + unevaluatedProperties: false 65 66 66 67 required: 67 68 - compatible
+2 -5
Documentation/devicetree/bindings/net/mdio-mux.yaml
··· 15 15 bus multiplexer/switch will have one child node for each child bus. 16 16 17 17 properties: 18 - $nodename: 19 - pattern: '^mdio-mux[\-@]?' 20 - 21 18 mdio-parent-bus: 22 19 $ref: /schemas/types.yaml#/definitions/phandle 23 20 description: ··· 29 32 30 33 patternProperties: 31 34 '^mdio@[0-9a-f]+$': 32 - type: object 35 + $ref: mdio.yaml# 36 + unevaluatedProperties: false 33 37 34 38 properties: 35 39 reg: 36 40 maxItems: 1 37 - description: The sub-bus number. 38 41 39 42 additionalProperties: true 40 43
+2 -3
Documentation/devicetree/bindings/net/mediatek,star-emac.yaml
··· 48 48 to control the MII mode. 49 49 50 50 mdio: 51 - type: object 52 - description: 53 - Creates and registers an MDIO bus. 51 + $ref: mdio.yaml# 52 + unevaluatedProperties: false 54 53 55 54 required: 56 55 - compatible
+4 -11
Documentation/devicetree/bindings/net/qca,ar71xx.yaml
··· 34 34 interrupts: 35 35 maxItems: 1 36 36 37 - '#address-cells': 38 - description: number of address cells for the MDIO bus 39 - const: 1 40 - 41 - '#size-cells': 42 - description: number of size cells on the MDIO bus 43 - const: 0 44 - 45 37 clocks: 46 38 items: 47 39 - description: MAC main clock ··· 53 61 items: 54 62 - const: mac 55 63 - const: mdio 64 + 65 + mdio: 66 + $ref: mdio.yaml# 67 + unevaluatedProperties: false 56 68 57 69 required: 58 70 - compatible ··· 106 110 #size-cells = <0>; 107 111 108 112 switch10: switch@10 { 109 - #address-cells = <1>; 110 - #size-cells = <0>; 111 - 112 113 compatible = "qca,ar9331-switch"; 113 114 reg = <0x10>; 114 115 resets = <&rst 8>;
+2 -1
Documentation/devicetree/bindings/net/snps,dwmac.yaml
··· 286 286 MAC2MAC connection. 287 287 288 288 mdio: 289 - type: object 289 + $ref: mdio.yaml# 290 + unevaluatedProperties: false 290 291 description: 291 292 Creates and registers an MDIO bus. 292 293
+1
Documentation/devicetree/bindings/net/socionext,uniphier-ave4.yaml
··· 72 72 73 73 mdio: 74 74 $ref: mdio.yaml# 75 + unevaluatedProperties: false 75 76 76 77 required: 77 78 - compatible
+1 -1
Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml
··· 71 71 phy-mode = "rgmii-id"; 72 72 phy-handle = <&phy0>; 73 73 74 - mdio0 { 74 + mdio { 75 75 #address-cells = <0x1>; 76 76 #size-cells = <0x0>; 77 77 compatible = "snps,dwmac-mdio";