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