162d77ff7SMaxime Ripard# SPDX-License-Identifier: GPL-2.0
262d77ff7SMaxime Ripard%YAML 1.2
362d77ff7SMaxime Ripard---
462d77ff7SMaxime Ripard$id: http://devicetree.org/schemas/net/mdio.yaml#
562d77ff7SMaxime Ripard$schema: http://devicetree.org/meta-schemas/core.yaml#
662d77ff7SMaxime Ripard
7*ab040c42SKrzysztof Kozlowskititle: MDIO Bus Common Properties
862d77ff7SMaxime Ripard
962d77ff7SMaxime Ripardmaintainers:
1062d77ff7SMaxime Ripard  - Andrew Lunn <andrew@lunn.ch>
1162d77ff7SMaxime Ripard  - Florian Fainelli <f.fainelli@gmail.com>
1262d77ff7SMaxime Ripard  - Heiner Kallweit <hkallweit1@gmail.com>
1362d77ff7SMaxime Ripard
1462d77ff7SMaxime Riparddescription:
1562d77ff7SMaxime Ripard  These are generic properties that can apply to any MDIO bus. Any
1662d77ff7SMaxime Ripard  MDIO bus must have a list of child nodes, one per device on the
1762d77ff7SMaxime Ripard  bus. These should follow the generic ethernet-phy.yaml document, or
1862d77ff7SMaxime Ripard  a device specific binding document.
1962d77ff7SMaxime Ripard
2062d77ff7SMaxime Ripardproperties:
214c2c04c2SMaxime Ripard  $nodename:
224c2c04c2SMaxime Ripard    pattern: "^mdio(@.*)?"
234c2c04c2SMaxime Ripard
24960ebc8aSMaxime Ripard  "#address-cells":
25960ebc8aSMaxime Ripard    const: 1
26960ebc8aSMaxime Ripard
27960ebc8aSMaxime Ripard  "#size-cells":
28960ebc8aSMaxime Ripard    const: 0
29960ebc8aSMaxime Ripard
3062d77ff7SMaxime Ripard  reset-gpios:
3162d77ff7SMaxime Ripard    maxItems: 1
3262d77ff7SMaxime Ripard    description:
3362d77ff7SMaxime Ripard      The phandle and specifier for the GPIO that controls the RESET
34630c3ff8SFlorian Fainelli      lines of all devices on that MDIO bus.
3562d77ff7SMaxime Ripard
3662d77ff7SMaxime Ripard  reset-delay-us:
3762d77ff7SMaxime Ripard    description:
38630c3ff8SFlorian Fainelli      RESET pulse width in microseconds. It applies to all MDIO devices
39630c3ff8SFlorian Fainelli      and must therefore be appropriately determined based on all devices
40630c3ff8SFlorian Fainelli      requirements (maximum value of all per-device RESET pulse widths).
4162d77ff7SMaxime Ripard
42c44a1b91SBruno Thomsen  reset-post-delay-us:
43c44a1b91SBruno Thomsen    description:
44c44a1b91SBruno Thomsen      Delay after reset deassert in microseconds. It applies to all MDIO
45c44a1b91SBruno Thomsen      devices and it's determined by how fast all devices are ready for
46c44a1b91SBruno Thomsen      communication. This delay happens just before e.g. Ethernet PHY
47c44a1b91SBruno Thomsen      type ID auto detection.
48c44a1b91SBruno Thomsen
493e782985SAndrew Lunn  clock-frequency:
503e782985SAndrew Lunn    description:
513e782985SAndrew Lunn      Desired MDIO bus clock frequency in Hz. Values greater than IEEE 802.3
523e782985SAndrew Lunn      defined 2.5MHz should only be used when all devices on the bus support
533e782985SAndrew Lunn      the given clock speed.
543e782985SAndrew Lunn
553c01eb62SAndrew Lunn  suppress-preamble:
563c01eb62SAndrew Lunn    description:
573c01eb62SAndrew Lunn      The 32 bit preamble should be suppressed. In order for this to
583c01eb62SAndrew Lunn      work, all devices on the bus must support suppressed preamble.
593c01eb62SAndrew Lunn    type: boolean
603c01eb62SAndrew Lunn
615b19b6c3SMaxime RipardpatternProperties:
62ad31ce56SRob Herring  '@[0-9a-f]+$':
635b19b6c3SMaxime Ripard    type: object
645b19b6c3SMaxime Ripard
655b19b6c3SMaxime Ripard    properties:
665b19b6c3SMaxime Ripard      reg:
675b19b6c3SMaxime Ripard        minimum: 0
685b19b6c3SMaxime Ripard        maximum: 31
695b19b6c3SMaxime Ripard        description:
70630c3ff8SFlorian Fainelli          The ID number for the device.
715b19b6c3SMaxime Ripard
72b92d905fSFlorian Fainelli      broken-turn-around:
73d69c6dddSRob Herring        $ref: /schemas/types.yaml#/definitions/flag
74b92d905fSFlorian Fainelli        description:
75b92d905fSFlorian Fainelli          If set, indicates the MDIO device does not correctly release
76b92d905fSFlorian Fainelli          the turn around line low at end of the control phase of the
77b92d905fSFlorian Fainelli          MDIO transaction.
78b92d905fSFlorian Fainelli
79b92d905fSFlorian Fainelli      reset-gpios:
80b92d905fSFlorian Fainelli        maxItems: 1
81b92d905fSFlorian Fainelli        description:
82b92d905fSFlorian Fainelli          The GPIO phandle and specifier for the MDIO reset signal.
83b92d905fSFlorian Fainelli
84b92d905fSFlorian Fainelli      reset-assert-us:
85b92d905fSFlorian Fainelli        description:
86b92d905fSFlorian Fainelli          Delay after the reset was asserted in microseconds. If this
87b92d905fSFlorian Fainelli          property is missing the delay will be skipped.
88b92d905fSFlorian Fainelli
89b92d905fSFlorian Fainelli      reset-deassert-us:
90b92d905fSFlorian Fainelli        description:
91b92d905fSFlorian Fainelli          Delay after the reset was deasserted in microseconds. If
92b92d905fSFlorian Fainelli          this property is missing the delay will be skipped.
93b92d905fSFlorian Fainelli
945b19b6c3SMaxime Ripard    required:
955b19b6c3SMaxime Ripard      - reg
965b19b6c3SMaxime Ripard
976a0e321eSRob HerringadditionalProperties: true
986a0e321eSRob Herring
9962d77ff7SMaxime Ripardexamples:
10062d77ff7SMaxime Ripard  - |
10162d77ff7SMaxime Ripard    davinci_mdio: mdio@5c030000 {
10262d77ff7SMaxime Ripard        reg = <0x5c030000 0x1000>;
10362d77ff7SMaxime Ripard        #address-cells = <1>;
10462d77ff7SMaxime Ripard        #size-cells = <0>;
10562d77ff7SMaxime Ripard
10662d77ff7SMaxime Ripard        reset-gpios = <&gpio2 5 1>;
10762d77ff7SMaxime Ripard        reset-delay-us = <2>;
10862d77ff7SMaxime Ripard
10962d77ff7SMaxime Ripard        ethphy0: ethernet-phy@1 {
11062d77ff7SMaxime Ripard            reg = <1>;
11162d77ff7SMaxime Ripard        };
11262d77ff7SMaxime Ripard
11362d77ff7SMaxime Ripard        ethphy1: ethernet-phy@3 {
11462d77ff7SMaxime Ripard            reg = <3>;
11562d77ff7SMaxime Ripard        };
11662d77ff7SMaxime Ripard    };
117