1ee8433daSSean Anderson# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2ee8433daSSean Anderson%YAML 1.2
3ee8433daSSean Anderson---
4ee8433daSSean Anderson$id: http://devicetree.org/schemas/net/fsl,fman-dtsec.yaml#
5ee8433daSSean Anderson$schema: http://devicetree.org/meta-schemas/core.yaml#
6ee8433daSSean Anderson
7ee8433daSSean Andersontitle: NXP FMan MAC
8ee8433daSSean Anderson
9ee8433daSSean Andersonmaintainers:
10ee8433daSSean Anderson  - Madalin Bucur <madalin.bucur@nxp.com>
11ee8433daSSean Anderson
12ee8433daSSean Andersondescription: |
13ee8433daSSean Anderson  Each FMan has several MACs, each implementing an Ethernet interface. Earlier
14ee8433daSSean Anderson  versions of FMan used the Datapath Three Speed Ethernet Controller (dTSEC) for
15ee8433daSSean Anderson  10/100/1000 MBit/s speeds, and the 10-Gigabit Ethernet Media Access Controller
16ee8433daSSean Anderson  (10GEC) for 10 Gbit/s speeds. Later versions of FMan use the Multirate
17ee8433daSSean Anderson  Ethernet Media Access Controller (mEMAC) to handle all speeds.
18ee8433daSSean Anderson
19ee8433daSSean Andersonproperties:
20ee8433daSSean Anderson  compatible:
21ee8433daSSean Anderson    enum:
22ee8433daSSean Anderson      - fsl,fman-dtsec
23ee8433daSSean Anderson      - fsl,fman-xgec
24ee8433daSSean Anderson      - fsl,fman-memac
25ee8433daSSean Anderson
26ee8433daSSean Anderson  cell-index:
27ee8433daSSean Anderson    maximum: 64
28ee8433daSSean Anderson    description: |
29ee8433daSSean Anderson      FManV2:
30ee8433daSSean Anderson      register[bit]           MAC             cell-index
31ee8433daSSean Anderson      ============================================================
32ee8433daSSean Anderson      FM_EPI[16]              XGEC            8
33ee8433daSSean Anderson      FM_EPI[16+n]            dTSECn          n-1
34ee8433daSSean Anderson      FM_NPI[11+n]            dTSECn          n-1
35ee8433daSSean Anderson              n = 1,..,5
36ee8433daSSean Anderson
37ee8433daSSean Anderson      FManV3:
38ee8433daSSean Anderson      register[bit]           MAC             cell-index
39ee8433daSSean Anderson      ============================================================
40ee8433daSSean Anderson      FM_EPI[16+n]            mEMACn          n-1
41ee8433daSSean Anderson      FM_EPI[25]              mEMAC10         9
42ee8433daSSean Anderson
43ee8433daSSean Anderson      FM_NPI[11+n]            mEMACn          n-1
44ee8433daSSean Anderson      FM_NPI[10]              mEMAC10         9
45ee8433daSSean Anderson      FM_NPI[11]              mEMAC9          8
46ee8433daSSean Anderson              n = 1,..8
47ee8433daSSean Anderson
48ee8433daSSean Anderson      FM_EPI and FM_NPI are located in the FMan memory map.
49ee8433daSSean Anderson
50ee8433daSSean Anderson      2. SoC registers:
51ee8433daSSean Anderson
52ee8433daSSean Anderson      - P2041, P3041, P4080 P5020, P5040:
53ee8433daSSean Anderson      register[bit]           FMan            MAC             cell
54ee8433daSSean Anderson                              Unit                            index
55ee8433daSSean Anderson      ============================================================
56ee8433daSSean Anderson      DCFG_DEVDISR2[7]        1               XGEC            8
57ee8433daSSean Anderson      DCFG_DEVDISR2[7+n]      1               dTSECn          n-1
58ee8433daSSean Anderson      DCFG_DEVDISR2[15]       2               XGEC            8
59ee8433daSSean Anderson      DCFG_DEVDISR2[15+n]     2               dTSECn          n-1
60ee8433daSSean Anderson              n = 1,..5
61ee8433daSSean Anderson
62ee8433daSSean Anderson      - T1040, T2080, T4240, B4860:
63ee8433daSSean Anderson      register[bit]                   FMan    MAC             cell
64ee8433daSSean Anderson                                      Unit                    index
65ee8433daSSean Anderson      ============================================================
66ee8433daSSean Anderson      DCFG_CCSR_DEVDISR2[n-1]         1       mEMACn          n-1
67ee8433daSSean Anderson      DCFG_CCSR_DEVDISR2[11+n]        2       mEMACn          n-1
68ee8433daSSean Anderson              n = 1,..6,9,10
69ee8433daSSean Anderson
70ee8433daSSean Anderson      EVDISR, DCFG_DEVDISR2 and DCFG_CCSR_DEVDISR2 are located in
71ee8433daSSean Anderson      the specific SoC "Device Configuration/Pin Control" Memory
72ee8433daSSean Anderson      Map.
73ee8433daSSean Anderson
74ee8433daSSean Anderson  reg:
75ee8433daSSean Anderson    maxItems: 1
76ee8433daSSean Anderson
77ee8433daSSean Anderson  fsl,fman-ports:
78ee8433daSSean Anderson    $ref: /schemas/types.yaml#/definitions/phandle-array
79ee8433daSSean Anderson    maxItems: 2
80ee8433daSSean Anderson    description: |
81ee8433daSSean Anderson      An array of two references: the first is the FMan RX port and the second
82ee8433daSSean Anderson      is the TX port used by this MAC.
83ee8433daSSean Anderson
84ee8433daSSean Anderson  ptp-timer:
85ee8433daSSean Anderson    $ref: /schemas/types.yaml#/definitions/phandle
86ee8433daSSean Anderson    description: A reference to the IEEE1588 timer
87ee8433daSSean Anderson
88*045d0501SSean Anderson  phys:
89*045d0501SSean Anderson    description: A reference to the SerDes lane(s)
90*045d0501SSean Anderson    maxItems: 1
91*045d0501SSean Anderson
92*045d0501SSean Anderson  phy-names:
93*045d0501SSean Anderson    items:
94*045d0501SSean Anderson      - const: serdes
95*045d0501SSean Anderson
96ee8433daSSean Anderson  pcsphy-handle:
97*045d0501SSean Anderson    $ref: /schemas/types.yaml#/definitions/phandle-array
98*045d0501SSean Anderson    minItems: 1
99*045d0501SSean Anderson    maxItems: 3
100*045d0501SSean Anderson    deprecated: true
101*045d0501SSean Anderson    description: See pcs-handle.
102*045d0501SSean Anderson
103*045d0501SSean Anderson  pcs-handle:
104*045d0501SSean Anderson    minItems: 1
105*045d0501SSean Anderson    maxItems: 3
106*045d0501SSean Anderson    description: |
107*045d0501SSean Anderson      A reference to the various PCSs (typically found on the SerDes). If
108*045d0501SSean Anderson      pcs-handle-names is absent, and phy-connection-type is "xgmii", then the first
109*045d0501SSean Anderson      reference will be assumed to be for "xfi". Otherwise, if pcs-handle-names is
110*045d0501SSean Anderson      absent, then the first reference will be assumed to be for "sgmii".
111*045d0501SSean Anderson
112*045d0501SSean Anderson  pcs-handle-names:
113*045d0501SSean Anderson    minItems: 1
114*045d0501SSean Anderson    maxItems: 3
115*045d0501SSean Anderson    items:
116*045d0501SSean Anderson      enum:
117*045d0501SSean Anderson        - sgmii
118*045d0501SSean Anderson        - qsgmii
119*045d0501SSean Anderson        - xfi
120*045d0501SSean Anderson    description: The type of each PCS in pcsphy-handle.
121ee8433daSSean Anderson
122ee8433daSSean Anderson  tbi-handle:
123ee8433daSSean Anderson    $ref: /schemas/types.yaml#/definitions/phandle
124ee8433daSSean Anderson    description: A reference to the (TBI-based) PCS
125ee8433daSSean Anderson
126ee8433daSSean Andersonrequired:
127ee8433daSSean Anderson  - compatible
128ee8433daSSean Anderson  - cell-index
129ee8433daSSean Anderson  - reg
130ee8433daSSean Anderson  - fsl,fman-ports
131ee8433daSSean Anderson  - ptp-timer
132ee8433daSSean Anderson
133*045d0501SSean Andersondependencies:
134*045d0501SSean Anderson  pcs-handle-names:
135*045d0501SSean Anderson    - pcs-handle
136*045d0501SSean Anderson
137ee8433daSSean AndersonallOf:
138ee8433daSSean Anderson  - $ref: ethernet-controller.yaml#
139ee8433daSSean Anderson  - if:
140ee8433daSSean Anderson      properties:
141ee8433daSSean Anderson        compatible:
142ee8433daSSean Anderson          contains:
143ee8433daSSean Anderson            const: fsl,fman-dtsec
144ee8433daSSean Anderson    then:
145ee8433daSSean Anderson      required:
146ee8433daSSean Anderson        - tbi-handle
147ee8433daSSean Anderson
148ee8433daSSean AndersonunevaluatedProperties: false
149ee8433daSSean Anderson
150ee8433daSSean Andersonexamples:
151ee8433daSSean Anderson  - |
152ee8433daSSean Anderson    ethernet@e0000 {
153ee8433daSSean Anderson            compatible = "fsl,fman-dtsec";
154ee8433daSSean Anderson            cell-index = <0>;
155ee8433daSSean Anderson            reg = <0xe0000 0x1000>;
156ee8433daSSean Anderson            fsl,fman-ports = <&fman1_rx8 &fman1_tx28>;
157ee8433daSSean Anderson            ptp-timer = <&ptp_timer>;
158ee8433daSSean Anderson            tbi-handle = <&tbi0>;
159ee8433daSSean Anderson    };
160ee8433daSSean Anderson  - |
161ee8433daSSean Anderson    ethernet@e8000 {
162ee8433daSSean Anderson            cell-index = <4>;
163ee8433daSSean Anderson            compatible = "fsl,fman-memac";
164ee8433daSSean Anderson            reg = <0xe8000 0x1000>;
165ee8433daSSean Anderson            fsl,fman-ports = <&fman0_rx_0x0c &fman0_tx_0x2c>;
166ee8433daSSean Anderson            ptp-timer = <&ptp_timer0>;
167*045d0501SSean Anderson            pcs-handle = <&pcsphy4>, <&qsgmiib_pcs1>;
168*045d0501SSean Anderson            pcs-handle-names = "sgmii", "qsgmii";
169*045d0501SSean Anderson            phys = <&serdes1 1>;
170*045d0501SSean Anderson            phy-names = "serdes";
171ee8433daSSean Anderson    };
172ee8433daSSean Anderson...
173