Commit 6453ae7f authored by Grygorii Strashko's avatar Grygorii Strashko Committed by Rob Herring

dt-bindings: net: davinci-mdio: convert bindings to json-schema

Now that we have the DT validation in place, let's convert the device tree
bindings for the TI SoC Davinci/OMAP/Keystone2 MDIO Controllerr over to a
YAML schemas.
Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 454f5d9d
TI SoC Davinci/Keystone2 MDIO Controller Device Tree Bindings
---------------------------------------------------
Required properties:
- compatible : Should be "ti,davinci_mdio"
and "ti,keystone_mdio" for Keystone 2 SoCs
and "ti,cpsw-mdio" for am335x, am472x, am57xx/dra7, dm814x SoCs
and "ti,am4372-mdio" for am472x SoC
- reg : physical base address and size of the davinci mdio
registers map
- bus_freq : Mdio Bus frequency
Optional properties:
- ti,hwmods : Must be "davinci_mdio"
Note: "ti,hwmods" field is used to fetch the base address and irq
resources from TI, omap hwmod data base during device registration.
Future plan is to migrate hwmod data base contents into device tree
blob so that, all the required data will be used from device tree dts
file.
Examples:
mdio: davinci_mdio@4a101000 {
compatible = "ti,davinci_mdio";
reg = <0x4A101000 0x1000>;
bus_freq = <1000000>;
};
(or)
mdio: davinci_mdio@4a101000 {
compatible = "ti,davinci_mdio";
ti,hwmods = "davinci_mdio";
bus_freq = <1000000>;
};
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/ti,davinci-mdio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: TI SoC Davinci/Keystone2 MDIO Controller
maintainers:
- Grygorii Strashko <grygorii.strashko@ti.com>
description:
TI SoC Davinci/Keystone2 MDIO Controller
allOf:
- $ref: "mdio.yaml#"
properties:
compatible:
oneOf:
- const: ti,davinci_mdio
- items:
- const: ti,keystone_mdio
- const: ti,davinci_mdio
- items:
- const: ti,cpsw-mdio
- const: ti,davinci_mdio
- items:
- const: ti,am4372-mdio
- const: ti,cpsw-mdio
- const: ti,davinci_mdio
reg:
maxItems: 1
bus_freq:
maximum: 2500000
description:
MDIO Bus frequency
ti,hwmods:
description: TI hwmod name
deprecated: true
allOf:
- $ref: /schemas/types.yaml#/definitions/string-array
- items:
const: davinci_mdio
if:
properties:
compatible:
contains:
const: ti,davinci_mdio
required:
- bus_freq
required:
- compatible
- reg
- "#address-cells"
- "#size-cells"
examples:
- |
davinci_mdio: mdio@4a101000 {
compatible = "ti,davinci_mdio";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x4a101000 0x1000>;
bus_freq = <1000000>;
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment