xref: /freebsd/sys/contrib/device-tree/Bindings/net/fsl,fman-dtsec.yaml (revision 7d0873ebb83b19ba1e8a89e679470d885efe12e3)
17ef62cebSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
27ef62cebSEmmanuel Vadot%YAML 1.2
37ef62cebSEmmanuel Vadot---
47ef62cebSEmmanuel Vadot$id: http://devicetree.org/schemas/net/fsl,fman-dtsec.yaml#
57ef62cebSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
67ef62cebSEmmanuel Vadot
77ef62cebSEmmanuel Vadottitle: NXP FMan MAC
87ef62cebSEmmanuel Vadot
97ef62cebSEmmanuel Vadotmaintainers:
107ef62cebSEmmanuel Vadot  - Madalin Bucur <madalin.bucur@nxp.com>
117ef62cebSEmmanuel Vadot
127ef62cebSEmmanuel Vadotdescription: |
137ef62cebSEmmanuel Vadot  Each FMan has several MACs, each implementing an Ethernet interface. Earlier
147ef62cebSEmmanuel Vadot  versions of FMan used the Datapath Three Speed Ethernet Controller (dTSEC) for
157ef62cebSEmmanuel Vadot  10/100/1000 MBit/s speeds, and the 10-Gigabit Ethernet Media Access Controller
167ef62cebSEmmanuel Vadot  (10GEC) for 10 Gbit/s speeds. Later versions of FMan use the Multirate
177ef62cebSEmmanuel Vadot  Ethernet Media Access Controller (mEMAC) to handle all speeds.
187ef62cebSEmmanuel Vadot
197ef62cebSEmmanuel Vadotproperties:
207ef62cebSEmmanuel Vadot  compatible:
217ef62cebSEmmanuel Vadot    enum:
227ef62cebSEmmanuel Vadot      - fsl,fman-dtsec
237ef62cebSEmmanuel Vadot      - fsl,fman-xgec
247ef62cebSEmmanuel Vadot      - fsl,fman-memac
257ef62cebSEmmanuel Vadot
267ef62cebSEmmanuel Vadot  cell-index:
277ef62cebSEmmanuel Vadot    maximum: 64
287ef62cebSEmmanuel Vadot    description: |
297ef62cebSEmmanuel Vadot      FManV2:
307ef62cebSEmmanuel Vadot      register[bit]           MAC             cell-index
317ef62cebSEmmanuel Vadot      ============================================================
327ef62cebSEmmanuel Vadot      FM_EPI[16]              XGEC            8
337ef62cebSEmmanuel Vadot      FM_EPI[16+n]            dTSECn          n-1
347ef62cebSEmmanuel Vadot      FM_NPI[11+n]            dTSECn          n-1
357ef62cebSEmmanuel Vadot              n = 1,..,5
367ef62cebSEmmanuel Vadot
377ef62cebSEmmanuel Vadot      FManV3:
387ef62cebSEmmanuel Vadot      register[bit]           MAC             cell-index
397ef62cebSEmmanuel Vadot      ============================================================
407ef62cebSEmmanuel Vadot      FM_EPI[16+n]            mEMACn          n-1
417ef62cebSEmmanuel Vadot      FM_EPI[25]              mEMAC10         9
427ef62cebSEmmanuel Vadot
437ef62cebSEmmanuel Vadot      FM_NPI[11+n]            mEMACn          n-1
447ef62cebSEmmanuel Vadot      FM_NPI[10]              mEMAC10         9
457ef62cebSEmmanuel Vadot      FM_NPI[11]              mEMAC9          8
467ef62cebSEmmanuel Vadot              n = 1,..8
477ef62cebSEmmanuel Vadot
487ef62cebSEmmanuel Vadot      FM_EPI and FM_NPI are located in the FMan memory map.
497ef62cebSEmmanuel Vadot
507ef62cebSEmmanuel Vadot      2. SoC registers:
517ef62cebSEmmanuel Vadot
527ef62cebSEmmanuel Vadot      - P2041, P3041, P4080 P5020, P5040:
537ef62cebSEmmanuel Vadot      register[bit]           FMan            MAC             cell
547ef62cebSEmmanuel Vadot                              Unit                            index
557ef62cebSEmmanuel Vadot      ============================================================
567ef62cebSEmmanuel Vadot      DCFG_DEVDISR2[7]        1               XGEC            8
577ef62cebSEmmanuel Vadot      DCFG_DEVDISR2[7+n]      1               dTSECn          n-1
587ef62cebSEmmanuel Vadot      DCFG_DEVDISR2[15]       2               XGEC            8
597ef62cebSEmmanuel Vadot      DCFG_DEVDISR2[15+n]     2               dTSECn          n-1
607ef62cebSEmmanuel Vadot              n = 1,..5
617ef62cebSEmmanuel Vadot
627ef62cebSEmmanuel Vadot      - T1040, T2080, T4240, B4860:
637ef62cebSEmmanuel Vadot      register[bit]                   FMan    MAC             cell
647ef62cebSEmmanuel Vadot                                      Unit                    index
657ef62cebSEmmanuel Vadot      ============================================================
667ef62cebSEmmanuel Vadot      DCFG_CCSR_DEVDISR2[n-1]         1       mEMACn          n-1
677ef62cebSEmmanuel Vadot      DCFG_CCSR_DEVDISR2[11+n]        2       mEMACn          n-1
687ef62cebSEmmanuel Vadot              n = 1,..6,9,10
697ef62cebSEmmanuel Vadot
707ef62cebSEmmanuel Vadot      EVDISR, DCFG_DEVDISR2 and DCFG_CCSR_DEVDISR2 are located in
717ef62cebSEmmanuel Vadot      the specific SoC "Device Configuration/Pin Control" Memory
727ef62cebSEmmanuel Vadot      Map.
737ef62cebSEmmanuel Vadot
747ef62cebSEmmanuel Vadot  reg:
757ef62cebSEmmanuel Vadot    maxItems: 1
767ef62cebSEmmanuel Vadot
777ef62cebSEmmanuel Vadot  fsl,fman-ports:
787ef62cebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
797ef62cebSEmmanuel Vadot    maxItems: 2
807ef62cebSEmmanuel Vadot    description: |
817ef62cebSEmmanuel Vadot      An array of two references: the first is the FMan RX port and the second
827ef62cebSEmmanuel Vadot      is the TX port used by this MAC.
837ef62cebSEmmanuel Vadot
847ef62cebSEmmanuel Vadot  ptp-timer:
857ef62cebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
867ef62cebSEmmanuel Vadot    description: A reference to the IEEE1588 timer
877ef62cebSEmmanuel Vadot
88*8bab661aSEmmanuel Vadot  phys:
89*8bab661aSEmmanuel Vadot    description: A reference to the SerDes lane(s)
90*8bab661aSEmmanuel Vadot    maxItems: 1
91*8bab661aSEmmanuel Vadot
92*8bab661aSEmmanuel Vadot  phy-names:
93*8bab661aSEmmanuel Vadot    items:
94*8bab661aSEmmanuel Vadot      - const: serdes
95*8bab661aSEmmanuel Vadot
967ef62cebSEmmanuel Vadot  pcsphy-handle:
97*8bab661aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
98*8bab661aSEmmanuel Vadot    minItems: 1
99*8bab661aSEmmanuel Vadot    maxItems: 3
100*8bab661aSEmmanuel Vadot    deprecated: true
101*8bab661aSEmmanuel Vadot    description: See pcs-handle.
102*8bab661aSEmmanuel Vadot
103*8bab661aSEmmanuel Vadot  pcs-handle:
104*8bab661aSEmmanuel Vadot    minItems: 1
105*8bab661aSEmmanuel Vadot    maxItems: 3
106*8bab661aSEmmanuel Vadot    description: |
107*8bab661aSEmmanuel Vadot      A reference to the various PCSs (typically found on the SerDes). If
108*8bab661aSEmmanuel Vadot      pcs-handle-names is absent, and phy-connection-type is "xgmii", then the first
109*8bab661aSEmmanuel Vadot      reference will be assumed to be for "xfi". Otherwise, if pcs-handle-names is
110*8bab661aSEmmanuel Vadot      absent, then the first reference will be assumed to be for "sgmii".
111*8bab661aSEmmanuel Vadot
112*8bab661aSEmmanuel Vadot  pcs-handle-names:
113*8bab661aSEmmanuel Vadot    minItems: 1
114*8bab661aSEmmanuel Vadot    maxItems: 3
115*8bab661aSEmmanuel Vadot    items:
116*8bab661aSEmmanuel Vadot      enum:
117*8bab661aSEmmanuel Vadot        - sgmii
118*8bab661aSEmmanuel Vadot        - qsgmii
119*8bab661aSEmmanuel Vadot        - xfi
120*8bab661aSEmmanuel Vadot    description: The type of each PCS in pcsphy-handle.
1217ef62cebSEmmanuel Vadot
1227ef62cebSEmmanuel Vadot  tbi-handle:
1237ef62cebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
1247ef62cebSEmmanuel Vadot    description: A reference to the (TBI-based) PCS
1257ef62cebSEmmanuel Vadot
1267ef62cebSEmmanuel Vadotrequired:
1277ef62cebSEmmanuel Vadot  - compatible
1287ef62cebSEmmanuel Vadot  - cell-index
1297ef62cebSEmmanuel Vadot  - reg
1307ef62cebSEmmanuel Vadot  - fsl,fman-ports
1317ef62cebSEmmanuel Vadot
132*8bab661aSEmmanuel Vadotdependencies:
133*8bab661aSEmmanuel Vadot  pcs-handle-names:
134*8bab661aSEmmanuel Vadot    - pcs-handle
135*8bab661aSEmmanuel Vadot
1367ef62cebSEmmanuel VadotallOf:
1377ef62cebSEmmanuel Vadot  - $ref: ethernet-controller.yaml#
1387ef62cebSEmmanuel Vadot  - if:
1397ef62cebSEmmanuel Vadot      properties:
1407ef62cebSEmmanuel Vadot        compatible:
1417ef62cebSEmmanuel Vadot          contains:
1427ef62cebSEmmanuel Vadot            const: fsl,fman-dtsec
1437ef62cebSEmmanuel Vadot    then:
1447ef62cebSEmmanuel Vadot      required:
1457ef62cebSEmmanuel Vadot        - tbi-handle
1467ef62cebSEmmanuel Vadot
1477ef62cebSEmmanuel VadotunevaluatedProperties: false
1487ef62cebSEmmanuel Vadot
1497ef62cebSEmmanuel Vadotexamples:
1507ef62cebSEmmanuel Vadot  - |
1517ef62cebSEmmanuel Vadot    ethernet@e0000 {
1527ef62cebSEmmanuel Vadot            compatible = "fsl,fman-dtsec";
1537ef62cebSEmmanuel Vadot            cell-index = <0>;
1547ef62cebSEmmanuel Vadot            reg = <0xe0000 0x1000>;
1557ef62cebSEmmanuel Vadot            fsl,fman-ports = <&fman1_rx8 &fman1_tx28>;
1567ef62cebSEmmanuel Vadot            ptp-timer = <&ptp_timer>;
1577ef62cebSEmmanuel Vadot            tbi-handle = <&tbi0>;
1587ef62cebSEmmanuel Vadot    };
1597ef62cebSEmmanuel Vadot  - |
1607ef62cebSEmmanuel Vadot    ethernet@e8000 {
1617ef62cebSEmmanuel Vadot            cell-index = <4>;
1627ef62cebSEmmanuel Vadot            compatible = "fsl,fman-memac";
1637ef62cebSEmmanuel Vadot            reg = <0xe8000 0x1000>;
1647ef62cebSEmmanuel Vadot            fsl,fman-ports = <&fman0_rx_0x0c &fman0_tx_0x2c>;
1657ef62cebSEmmanuel Vadot            ptp-timer = <&ptp_timer0>;
166*8bab661aSEmmanuel Vadot            pcs-handle = <&pcsphy4>, <&qsgmiib_pcs1>;
167*8bab661aSEmmanuel Vadot            pcs-handle-names = "sgmii", "qsgmii";
168*8bab661aSEmmanuel Vadot            phys = <&serdes1 1>;
169*8bab661aSEmmanuel Vadot            phy-names = "serdes";
1707ef62cebSEmmanuel Vadot    };
1717ef62cebSEmmanuel Vadot...
172