xref: /linux/Documentation/devicetree/bindings/net/fsl,fman.yaml (revision f94ecbc920925d5922d68a434f76aa8ef8d7f21e)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/net/fsl,fman.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Freescale Frame Manager Device
8
9maintainers:
10  - Frank Li <Frank.Li@nxp.com>
11
12description:
13  Due to the fact that the FMan is an aggregation of sub-engines (ports, MACs,
14  etc.) the FMan node will have child nodes for each of them.
15
16properties:
17  compatible:
18    enum:
19      - fsl,fman
20    description:
21      FMan version can be determined via FM_IP_REV_1 register in the
22      FMan block. The offset is 0xc4 from the beginning of the
23      Frame Processing Manager memory map (0xc3000 from the
24      beginning of the FMan node).
25
26  cell-index:
27    $ref: /schemas/types.yaml#/definitions/uint32
28    description: |
29      Specifies the index of the FMan unit.
30
31      The cell-index value may be used by the SoC, to identify the
32      FMan unit in the SoC memory map. In the table below,
33      there's a description of the cell-index use in each SoC:
34
35      - P1023:
36      register[bit]      FMan unit  cell-index
37      ============================================================
38      DEVDISR[1]      1    0
39
40      - P2041, P3041, P4080 P5020, P5040:
41      register[bit]      FMan unit  cell-index
42      ============================================================
43      DCFG_DEVDISR2[6]    1    0
44      DCFG_DEVDISR2[14]    2    1
45        (Second FM available only in P4080 and P5040)
46
47      - B4860, T1040, T2080, T4240:
48      register[bit]      FMan unit  cell-index
49      ============================================================
50      DCFG_CCSR_DEVDISR2[24]    1    0
51      DCFG_CCSR_DEVDISR2[25]    2    1
52        (Second FM available only in T4240)
53
54      DEVDISR, DCFG_DEVDISR2 and DCFG_CCSR_DEVDISR2 are located in
55      the specific SoC "Device Configuration/Pin Control" Memory
56      Map.
57
58  reg:
59    items:
60      - description: BMI configuration registers.
61      - description: QMI configuration registers.
62      - description: DMA configuration registers.
63      - description: FPM configuration registers.
64      - description: FMan controller configuration registers.
65    minItems: 1
66
67  ranges: true
68
69  clocks:
70    maxItems: 1
71
72  clock-names:
73    items:
74      - const: fmanclk
75
76  interrupts:
77    items:
78      - description: The first element is associated with the event interrupts.
79      - description: the second element is associated with the error interrupts.
80
81  fsl,qman-channel-range:
82    $ref: /schemas/types.yaml#/definitions/uint32-array
83    description:
84      Specifies the range of the available dedicated
85      channels in the FMan. The first cell specifies the beginning
86      of the range and the second cell specifies the number of
87      channels
88    items:
89      - description: The first cell specifies the beginning of the range.
90      - description: |
91          The second cell specifies the number of channels.
92          Further information available at:
93          "Work Queue (WQ) Channel Assignments in the QMan" section
94          in DPAA Reference Manual.
95
96  fsl,qman:
97    $ref: /schemas/types.yaml#/definitions/phandle
98    description: See soc/fsl/qman.txt
99
100  fsl,bman:
101    $ref: /schemas/types.yaml#/definitions/phandle
102    description: See soc/fsl/bman.txt
103
104  fsl,erratum-a050385:
105    $ref: /schemas/types.yaml#/definitions/flag
106    description: A boolean property. Indicates the presence of the
107      erratum A050385 which indicates that DMA transactions that are
108      split can result in a FMan lock.
109
110  '#address-cells':
111    const: 1
112
113  '#size-cells':
114    const: 1
115
116patternProperties:
117  '^muram@[a-f0-9]+$':
118    $ref: fsl,fman-muram.yaml
119
120  '^port@[a-f0-9]+$':
121    $ref: fsl,fman-port.yaml
122
123  '^ethernet@[a-f0-9]+$':
124    $ref: fsl,fman-dtsec.yaml
125
126  '^mdio@[a-f0-9]+$':
127    $ref: fsl,fman-mdio.yaml
128
129  '^phc@[a-f0-9]+$':
130    $ref: /schemas/ptp/fsl,ptp.yaml
131
132required:
133  - compatible
134  - cell-index
135  - reg
136  - ranges
137  - clocks
138  - clock-names
139  - interrupts
140  - fsl,qman-channel-range
141
142additionalProperties: false
143
144examples:
145  - |
146    #include <dt-bindings/interrupt-controller/irq.h>
147
148    fman@400000 {
149        compatible = "fsl,fman";
150        reg = <0x400000 0x100000>;
151        ranges = <0 0x400000 0x100000>;
152        #address-cells = <1>;
153        #size-cells = <1>;
154        cell-index = <1>;
155        clocks = <&fman_clk>;
156        clock-names = "fmanclk";
157        interrupts = <96 IRQ_TYPE_EDGE_FALLING>,
158                     <16 IRQ_TYPE_EDGE_FALLING>;
159        fsl,qman-channel-range = <0x40 0xc>;
160
161        muram@0 {
162            compatible = "fsl,fman-muram";
163            reg = <0x0 0x28000>;
164        };
165
166        port@81000 {
167            cell-index = <1>;
168            compatible = "fsl,fman-v2-port-oh";
169            reg = <0x81000 0x1000>;
170        };
171
172        fman1_rx_0x8: port@88000 {
173            cell-index = <0x8>;
174            compatible = "fsl,fman-v2-port-rx";
175            reg = <0x88000 0x1000>;
176        };
177
178        fman1_tx_0x28: port@a8000 {
179            cell-index = <0x28>;
180            compatible = "fsl,fman-v2-port-tx";
181            reg = <0xa8000 0x1000>;
182        };
183
184        ethernet@e0000 {
185            compatible = "fsl,fman-dtsec";
186            cell-index = <0>;
187            reg = <0xe0000 0x1000>;
188            ptp-timer = <&ptp_timer>;
189            fsl,fman-ports = <&fman1_rx_0x8 &fman1_tx_0x28>;
190            tbi-handle = <&tbi5>;
191        };
192
193        ptp_timer: phc@fe000 {
194            compatible = "fsl,fman-ptp-timer";
195            reg = <0xfe000 0x1000>;
196            interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
197        };
198
199        mdio@f1000 {
200            compatible = "fsl,fman-xmdio";
201            reg = <0xf1000 0x1000>;
202            interrupts = <101 IRQ_TYPE_EDGE_FALLING>;
203        };
204    };
205