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

dt-bindings: net: sun4i-mdio: Convert the binding to a schemas

Switch our Allwinner A10 MDIO controller binding to a YAML schema to enable
the DT validation.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Maxime Ripard and committed by
Rob Herring
7a47b908 8c5b0944

+70 -27
+70
Documentation/devicetree/bindings/net/allwinner,sun4i-a10-mdio.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/net/allwinner,sun4i-a10-mdio.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Allwinner A10 MDIO Controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Chen-Yu Tsai <wens@csie.org> 11 + - Maxime Ripard <maxime.ripard@bootlin.com> 12 + 13 + allOf: 14 + - $ref: "mdio.yaml#" 15 + 16 + # Select every compatible, including the deprecated ones. This way, we 17 + # will be able to report a warning when we have that compatible, since 18 + # we will validate the node thanks to the select, but won't report it 19 + # as a valid value in the compatible property description 20 + select: 21 + properties: 22 + compatible: 23 + enum: 24 + - allwinner,sun4i-a10-mdio 25 + 26 + # Deprecated 27 + - allwinner,sun4i-mdio 28 + 29 + required: 30 + - compatible 31 + 32 + properties: 33 + "#address-cells": 34 + const: 1 35 + 36 + "#size-cells": 37 + const: 0 38 + 39 + compatible: 40 + const: allwinner,sun4i-a10-mdio 41 + 42 + reg: 43 + maxItems: 1 44 + 45 + phy-supply: 46 + description: PHY regulator 47 + 48 + required: 49 + - compatible 50 + - reg 51 + 52 + examples: 53 + - | 54 + mdio@1c0b080 { 55 + compatible = "allwinner,sun4i-a10-mdio"; 56 + reg = <0x01c0b080 0x14>; 57 + #address-cells = <1>; 58 + #size-cells = <0>; 59 + phy-supply = <&reg_emac_3v3>; 60 + 61 + phy0: ethernet-phy@0 { 62 + reg = <0>; 63 + }; 64 + }; 65 + 66 + # FIXME: We should set it, but it would report all the generic 67 + # properties as additional properties. 68 + # additionalProperties: false 69 + 70 + ...
-27
Documentation/devicetree/bindings/net/allwinner,sun4i-mdio.txt
··· 1 - * Allwinner A10 MDIO Ethernet Controller interface 2 - 3 - Required properties: 4 - - compatible: should be "allwinner,sun4i-a10-mdio" 5 - (Deprecated: "allwinner,sun4i-mdio"). 6 - - reg: address and length of the register set for the device. 7 - 8 - Optional properties: 9 - - phy-supply: phandle to a regulator if the PHY needs one 10 - 11 - Example at the SoC level: 12 - mdio@1c0b080 { 13 - compatible = "allwinner,sun4i-a10-mdio"; 14 - reg = <0x01c0b080 0x14>; 15 - #address-cells = <1>; 16 - #size-cells = <0>; 17 - }; 18 - 19 - And at the board level: 20 - 21 - mdio@1c0b080 { 22 - phy-supply = <&reg_emac_3v3>; 23 - 24 - phy0: ethernet-phy@0 { 25 - reg = <0>; 26 - }; 27 - };