-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Maxime Ripard
authored and
Rob Herring
committed
Jun 28, 2019
1 parent
8c5b094
commit 7a47b90
Showing
2 changed files
with
70 additions
and
27 deletions.
There are no files selected for viewing
70 changes: 70 additions & 0 deletions
70
Documentation/devicetree/bindings/net/allwinner,sun4i-a10-mdio.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/net/allwinner,sun4i-a10-mdio.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Allwinner A10 MDIO Controller Device Tree Bindings | ||
|
||
maintainers: | ||
- Chen-Yu Tsai <wens@csie.org> | ||
- Maxime Ripard <maxime.ripard@bootlin.com> | ||
|
||
allOf: | ||
- $ref: "mdio.yaml#" | ||
|
||
# Select every compatible, including the deprecated ones. This way, we | ||
# will be able to report a warning when we have that compatible, since | ||
# we will validate the node thanks to the select, but won't report it | ||
# as a valid value in the compatible property description | ||
select: | ||
properties: | ||
compatible: | ||
enum: | ||
- allwinner,sun4i-a10-mdio | ||
|
||
# Deprecated | ||
- allwinner,sun4i-mdio | ||
|
||
required: | ||
- compatible | ||
|
||
properties: | ||
"#address-cells": | ||
const: 1 | ||
|
||
"#size-cells": | ||
const: 0 | ||
|
||
compatible: | ||
const: allwinner,sun4i-a10-mdio | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
phy-supply: | ||
description: PHY regulator | ||
|
||
required: | ||
- compatible | ||
- reg | ||
|
||
examples: | ||
- | | ||
mdio@1c0b080 { | ||
compatible = "allwinner,sun4i-a10-mdio"; | ||
reg = <0x01c0b080 0x14>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
phy-supply = <®_emac_3v3>; | ||
phy0: ethernet-phy@0 { | ||
reg = <0>; | ||
}; | ||
}; | ||
# FIXME: We should set it, but it would report all the generic | ||
# properties as additional properties. | ||
# additionalProperties: false | ||
|
||
... |
27 changes: 0 additions & 27 deletions
27
Documentation/devicetree/bindings/net/allwinner,sun4i-mdio.txt
This file was deleted.
Oops, something went wrong.