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

dt-bindings: net: Add a YAML schemas for the generic MDIO options

The MDIO buses have a number of available device tree properties that can
be used in their device tree node. Add a YAML schemas for those.

Suggested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Maxime Ripard and committed by
Rob Herring
62d77ff7 d8704342

+52 -37
+1 -37
Documentation/devicetree/bindings/net/mdio.txt
··· 1 - Common MDIO bus properties. 2 - 3 - These are generic properties that can apply to any MDIO bus. 4 - 5 - Optional properties: 6 - - reset-gpios: One GPIO that control the RESET lines of all PHYs on that MDIO 7 - bus. 8 - - reset-delay-us: RESET pulse width in microseconds. 9 - 10 - A list of child nodes, one per device on the bus is expected. These 11 - should follow the generic phy.txt, or a device specific binding document. 12 - 13 - The 'reset-delay-us' indicates the RESET signal pulse width in microseconds and 14 - applies to all PHY devices. It must therefore be appropriately determined based 15 - on all PHY requirements (maximum value of all per-PHY RESET pulse widths). 16 - 17 - Example : 18 - This example shows these optional properties, plus other properties 19 - required for the TI Davinci MDIO driver. 20 - 21 - davinci_mdio: ethernet@5c030000 { 22 - compatible = "ti,davinci_mdio"; 23 - reg = <0x5c030000 0x1000>; 24 - #address-cells = <1>; 25 - #size-cells = <0>; 26 - 27 - reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; 28 - reset-delay-us = <2>; 29 - 30 - ethphy0: ethernet-phy@1 { 31 - reg = <1>; 32 - }; 33 - 34 - ethphy1: ethernet-phy@3 { 35 - reg = <3>; 36 - }; 37 - }; 1 + This file has moved to mdio.yaml.
+51
Documentation/devicetree/bindings/net/mdio.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/net/mdio.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: MDIO Bus Generic Binding 8 + 9 + maintainers: 10 + - Andrew Lunn <andrew@lunn.ch> 11 + - Florian Fainelli <f.fainelli@gmail.com> 12 + - Heiner Kallweit <hkallweit1@gmail.com> 13 + 14 + description: 15 + These are generic properties that can apply to any MDIO bus. Any 16 + MDIO bus must have a list of child nodes, one per device on the 17 + bus. These should follow the generic ethernet-phy.yaml document, or 18 + a device specific binding document. 19 + 20 + properties: 21 + reset-gpios: 22 + maxItems: 1 23 + description: 24 + The phandle and specifier for the GPIO that controls the RESET 25 + lines of all PHYs on that MDIO bus. 26 + 27 + reset-delay-us: 28 + description: 29 + RESET pulse width in microseconds. It applies to all PHY devices 30 + and must therefore be appropriately determined based on all PHY 31 + requirements (maximum value of all per-PHY RESET pulse widths). 32 + 33 + examples: 34 + - | 35 + davinci_mdio: mdio@5c030000 { 36 + compatible = "ti,davinci_mdio"; 37 + reg = <0x5c030000 0x1000>; 38 + #address-cells = <1>; 39 + #size-cells = <0>; 40 + 41 + reset-gpios = <&gpio2 5 1>; 42 + reset-delay-us = <2>; 43 + 44 + ethphy0: ethernet-phy@1 { 45 + reg = <1>; 46 + }; 47 + 48 + ethphy1: ethernet-phy@3 { 49 + reg = <3>; 50 + }; 51 + };