xref: /freebsd/sys/contrib/device-tree/Bindings/net/mdio.yaml (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/net/mdio.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
78bab661aSEmmanuel Vadottitle: MDIO Bus Common Properties
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Andrew Lunn <andrew@lunn.ch>
11c66ec88fSEmmanuel Vadot  - Florian Fainelli <f.fainelli@gmail.com>
12c66ec88fSEmmanuel Vadot  - Heiner Kallweit <hkallweit1@gmail.com>
13c66ec88fSEmmanuel Vadot
14c66ec88fSEmmanuel Vadotdescription:
15c66ec88fSEmmanuel Vadot  These are generic properties that can apply to any MDIO bus. Any
16c66ec88fSEmmanuel Vadot  MDIO bus must have a list of child nodes, one per device on the
17c66ec88fSEmmanuel Vadot  bus. These should follow the generic ethernet-phy.yaml document, or
18c66ec88fSEmmanuel Vadot  a device specific binding document.
19c66ec88fSEmmanuel Vadot
20c66ec88fSEmmanuel Vadotproperties:
21c66ec88fSEmmanuel Vadot  $nodename:
22*b2d2a78aSEmmanuel Vadot    pattern: '^mdio(-(bus|external))?(@.+|-([0-9]+))?$'
23c66ec88fSEmmanuel Vadot
24c66ec88fSEmmanuel Vadot  "#address-cells":
25c66ec88fSEmmanuel Vadot    const: 1
26c66ec88fSEmmanuel Vadot
27c66ec88fSEmmanuel Vadot  "#size-cells":
28c66ec88fSEmmanuel Vadot    const: 0
29c66ec88fSEmmanuel Vadot
30c66ec88fSEmmanuel Vadot  reset-gpios:
31c66ec88fSEmmanuel Vadot    maxItems: 1
32c66ec88fSEmmanuel Vadot    description:
33c66ec88fSEmmanuel Vadot      The phandle and specifier for the GPIO that controls the RESET
34c66ec88fSEmmanuel Vadot      lines of all devices on that MDIO bus.
35c66ec88fSEmmanuel Vadot
36c66ec88fSEmmanuel Vadot  reset-delay-us:
37c66ec88fSEmmanuel Vadot    description:
38c66ec88fSEmmanuel Vadot      RESET pulse width in microseconds. It applies to all MDIO devices
39c66ec88fSEmmanuel Vadot      and must therefore be appropriately determined based on all devices
40c66ec88fSEmmanuel Vadot      requirements (maximum value of all per-device RESET pulse widths).
41c66ec88fSEmmanuel Vadot
42c66ec88fSEmmanuel Vadot  reset-post-delay-us:
43c66ec88fSEmmanuel Vadot    description:
44c66ec88fSEmmanuel Vadot      Delay after reset deassert in microseconds. It applies to all MDIO
45c66ec88fSEmmanuel Vadot      devices and it's determined by how fast all devices are ready for
46c66ec88fSEmmanuel Vadot      communication. This delay happens just before e.g. Ethernet PHY
47c66ec88fSEmmanuel Vadot      type ID auto detection.
48c66ec88fSEmmanuel Vadot
49c66ec88fSEmmanuel Vadot  clock-frequency:
50c66ec88fSEmmanuel Vadot    description:
51c66ec88fSEmmanuel Vadot      Desired MDIO bus clock frequency in Hz. Values greater than IEEE 802.3
52c66ec88fSEmmanuel Vadot      defined 2.5MHz should only be used when all devices on the bus support
53c66ec88fSEmmanuel Vadot      the given clock speed.
54c66ec88fSEmmanuel Vadot
55c66ec88fSEmmanuel Vadot  suppress-preamble:
56c66ec88fSEmmanuel Vadot    description:
57c66ec88fSEmmanuel Vadot      The 32 bit preamble should be suppressed. In order for this to
58c66ec88fSEmmanuel Vadot      work, all devices on the bus must support suppressed preamble.
59c66ec88fSEmmanuel Vadot    type: boolean
60c66ec88fSEmmanuel Vadot
61c66ec88fSEmmanuel VadotpatternProperties:
62e67e8565SEmmanuel Vadot  '@[0-9a-f]+$':
63c66ec88fSEmmanuel Vadot    type: object
64c66ec88fSEmmanuel Vadot
65c66ec88fSEmmanuel Vadot    properties:
66c66ec88fSEmmanuel Vadot      reg:
67c66ec88fSEmmanuel Vadot        minimum: 0
68c66ec88fSEmmanuel Vadot        maximum: 31
69c66ec88fSEmmanuel Vadot        description:
70c66ec88fSEmmanuel Vadot          The ID number for the device.
71c66ec88fSEmmanuel Vadot
72c66ec88fSEmmanuel Vadot      broken-turn-around:
735def4c47SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/flag
74c66ec88fSEmmanuel Vadot        description:
75c66ec88fSEmmanuel Vadot          If set, indicates the MDIO device does not correctly release
76c66ec88fSEmmanuel Vadot          the turn around line low at end of the control phase of the
77c66ec88fSEmmanuel Vadot          MDIO transaction.
78c66ec88fSEmmanuel Vadot
79c66ec88fSEmmanuel Vadot      reset-gpios:
80c66ec88fSEmmanuel Vadot        maxItems: 1
81c66ec88fSEmmanuel Vadot        description:
82c66ec88fSEmmanuel Vadot          The GPIO phandle and specifier for the MDIO reset signal.
83c66ec88fSEmmanuel Vadot
84c66ec88fSEmmanuel Vadot      reset-assert-us:
85c66ec88fSEmmanuel Vadot        description:
86c66ec88fSEmmanuel Vadot          Delay after the reset was asserted in microseconds. If this
87c66ec88fSEmmanuel Vadot          property is missing the delay will be skipped.
88c66ec88fSEmmanuel Vadot
89c66ec88fSEmmanuel Vadot      reset-deassert-us:
90c66ec88fSEmmanuel Vadot        description:
91c66ec88fSEmmanuel Vadot          Delay after the reset was deasserted in microseconds. If
92c66ec88fSEmmanuel Vadot          this property is missing the delay will be skipped.
93c66ec88fSEmmanuel Vadot
94c66ec88fSEmmanuel Vadot    required:
95c66ec88fSEmmanuel Vadot      - reg
96c66ec88fSEmmanuel Vadot
976be33864SEmmanuel VadotadditionalProperties: true
986be33864SEmmanuel Vadot
99c66ec88fSEmmanuel Vadotexamples:
100c66ec88fSEmmanuel Vadot  - |
101c66ec88fSEmmanuel Vadot    davinci_mdio: mdio@5c030000 {
102c66ec88fSEmmanuel Vadot        reg = <0x5c030000 0x1000>;
103c66ec88fSEmmanuel Vadot        #address-cells = <1>;
104c66ec88fSEmmanuel Vadot        #size-cells = <0>;
105c66ec88fSEmmanuel Vadot
106c66ec88fSEmmanuel Vadot        reset-gpios = <&gpio2 5 1>;
107c66ec88fSEmmanuel Vadot        reset-delay-us = <2>;
108c66ec88fSEmmanuel Vadot
109c66ec88fSEmmanuel Vadot        ethphy0: ethernet-phy@1 {
110c66ec88fSEmmanuel Vadot            reg = <1>;
111c66ec88fSEmmanuel Vadot        };
112c66ec88fSEmmanuel Vadot
113c66ec88fSEmmanuel Vadot        ethphy1: ethernet-phy@3 {
114c66ec88fSEmmanuel Vadot            reg = <3>;
115c66ec88fSEmmanuel Vadot        };
116c66ec88fSEmmanuel Vadot    };
117