xref: /linux/Documentation/devicetree/bindings/net/fsl,fman-mdio.yaml (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1*243996d1SFrank Li# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*243996d1SFrank Li%YAML 1.2
3*243996d1SFrank Li---
4*243996d1SFrank Li$id: http://devicetree.org/schemas/net/fsl,fman-mdio.yaml#
5*243996d1SFrank Li$schema: http://devicetree.org/meta-schemas/core.yaml#
6*243996d1SFrank Li
7*243996d1SFrank Lititle: Freescale Frame Manager MDIO Device
8*243996d1SFrank Li
9*243996d1SFrank Limaintainers:
10*243996d1SFrank Li  - Frank Li <Frank.Li@nxp.com>
11*243996d1SFrank Li
12*243996d1SFrank Lidescription: FMan MDIO Node.
13*243996d1SFrank Li  The MDIO is a bus to which the PHY devices are connected.
14*243996d1SFrank Li
15*243996d1SFrank Liproperties:
16*243996d1SFrank Li  compatible:
17*243996d1SFrank Li    enum:
18*243996d1SFrank Li      - fsl,fman-mdio
19*243996d1SFrank Li      - fsl,fman-xmdio
20*243996d1SFrank Li      - fsl,fman-memac-mdio
21*243996d1SFrank Li    description:
22*243996d1SFrank Li      Must include "fsl,fman-mdio" for 1 Gb/s MDIO from FMan v2.
23*243996d1SFrank Li      Must include "fsl,fman-xmdio" for 10 Gb/s MDIO from FMan v2.
24*243996d1SFrank Li      Must include "fsl,fman-memac-mdio" for 1/10 Gb/s MDIO from
25*243996d1SFrank Li      FMan v3.
26*243996d1SFrank Li
27*243996d1SFrank Li  reg:
28*243996d1SFrank Li    maxItems: 1
29*243996d1SFrank Li
30*243996d1SFrank Li  clocks:
31*243996d1SFrank Li    items:
32*243996d1SFrank Li      - description: A reference to the input clock of the controller
33*243996d1SFrank Li          from which the MDC frequency is derived.
34*243996d1SFrank Li
35*243996d1SFrank Li  interrupts:
36*243996d1SFrank Li    maxItems: 1
37*243996d1SFrank Li
38*243996d1SFrank Li  fsl,fman-internal-mdio:
39*243996d1SFrank Li    $ref: /schemas/types.yaml#/definitions/flag
40*243996d1SFrank Li    description:
41*243996d1SFrank Li      Fman has internal MDIO for internal PCS(Physical
42*243996d1SFrank Li      Coding Sublayer) PHYs and external MDIO for external PHYs.
43*243996d1SFrank Li      The settings and programming routines for internal/external
44*243996d1SFrank Li      MDIO are different. Must be included for internal MDIO.
45*243996d1SFrank Li
46*243996d1SFrank Li  fsl,erratum-a009885:
47*243996d1SFrank Li    $ref: /schemas/types.yaml#/definitions/flag
48*243996d1SFrank Li    description: Indicates the presence of the A009885
49*243996d1SFrank Li      erratum describing that the contents of MDIO_DATA may
50*243996d1SFrank Li      become corrupt unless it is read within 16 MDC cycles
51*243996d1SFrank Li      of MDIO_CFG[BSY] being cleared, when performing an
52*243996d1SFrank Li      MDIO read operation.
53*243996d1SFrank Li
54*243996d1SFrank Li  fsl,erratum-a011043:
55*243996d1SFrank Li    $ref: /schemas/types.yaml#/definitions/flag
56*243996d1SFrank Li    description:
57*243996d1SFrank Li      Indicates the presence of the A011043 erratum
58*243996d1SFrank Li      describing that the MDIO_CFG[MDIO_RD_ER] bit may be falsely
59*243996d1SFrank Li      set when reading internal PCS registers. MDIO reads to
60*243996d1SFrank Li      internal PCS registers may result in having the
61*243996d1SFrank Li      MDIO_CFG[MDIO_RD_ER] bit set, even when there is no error and
62*243996d1SFrank Li      read data (MDIO_DATA[MDIO_DATA]) is correct.
63*243996d1SFrank Li      Software may get false read error when reading internal
64*243996d1SFrank Li      PCS registers through MDIO. As a workaround, all internal
65*243996d1SFrank Li      MDIO accesses should ignore the MDIO_CFG[MDIO_RD_ER] bit.
66*243996d1SFrank Li
67*243996d1SFrank Li      For internal PHY device on internal mdio bus, a PHY node should be created.
68*243996d1SFrank Li      See the definition of the PHY node in booting-without-of.txt for an
69*243996d1SFrank Li      example of how to define a PHY (Internal PHY has no interrupt line).
70*243996d1SFrank Li      - For "fsl,fman-mdio" compatible internal mdio bus, the PHY is TBI PHY.
71*243996d1SFrank Li      - For "fsl,fman-memac-mdio" compatible internal mdio bus, the PHY is PCS PHY.
72*243996d1SFrank Li        The PCS PHY address should correspond to the value of the appropriate
73*243996d1SFrank Li        MDEV_PORT.
74*243996d1SFrank Li
75*243996d1SFrank Li  little-endian:
76*243996d1SFrank Li    $ref: /schemas/types.yaml#/definitions/flag
77*243996d1SFrank Li    description:
78*243996d1SFrank Li      IP block is little-endian mode. The default endian mode is big-endian.
79*243996d1SFrank Li
80*243996d1SFrank Lirequired:
81*243996d1SFrank Li  - compatible
82*243996d1SFrank Li  - reg
83*243996d1SFrank Li
84*243996d1SFrank LiallOf:
85*243996d1SFrank Li  - $ref: mdio.yaml#
86*243996d1SFrank Li
87*243996d1SFrank LiunevaluatedProperties: false
88*243996d1SFrank Li
89*243996d1SFrank Liexamples:
90*243996d1SFrank Li  - |
91*243996d1SFrank Li    mdio@f1000 {
92*243996d1SFrank Li        compatible = "fsl,fman-xmdio";
93*243996d1SFrank Li        reg = <0xf1000 0x1000>;
94*243996d1SFrank Li        interrupts = <101 2 0 0>;
95*243996d1SFrank Li    };
96*243996d1SFrank Li
97*243996d1SFrank Li  - |
98*243996d1SFrank Li    mdio@e3120 {
99*243996d1SFrank Li        compatible = "fsl,fman-mdio";
100*243996d1SFrank Li        reg = <0xe3120 0xee0>;
101*243996d1SFrank Li        fsl,fman-internal-mdio;
102*243996d1SFrank Li        #address-cells = <1>;
103*243996d1SFrank Li        #size-cells = <0>;
104*243996d1SFrank Li
105*243996d1SFrank Li        tbi-phy@8 {
106*243996d1SFrank Li            reg = <0x8>;
107*243996d1SFrank Li            device_type = "tbi-phy";
108*243996d1SFrank Li        };
109*243996d1SFrank Li    };
110*243996d1SFrank Li
111*243996d1SFrank Li  - |
112*243996d1SFrank Li    mdio@f1000 {
113*243996d1SFrank Li        compatible = "fsl,fman-memac-mdio";
114*243996d1SFrank Li        reg = <0xf1000 0x1000>;
115*243996d1SFrank Li        fsl,fman-internal-mdio;
116*243996d1SFrank Li        #address-cells = <1>;
117*243996d1SFrank Li        #size-cells = <0>;
118*243996d1SFrank Li
119*243996d1SFrank Li        pcsphy6: ethernet-phy@0 {
120*243996d1SFrank Li            reg = <0x0>;
121*243996d1SFrank Li        };
122*243996d1SFrank Li    };
123*243996d1SFrank Li
124