xref: /linux/Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml (revision f08a1e912d3e60bf3028ea1c5199a609d12cd37c)
1a9a495d5SGrygorii Strashko# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2a9a495d5SGrygorii Strashko%YAML 1.2
3a9a495d5SGrygorii Strashko---
4a9a495d5SGrygorii Strashko$id: http://devicetree.org/schemas/net/ti,k3-am654-cpsw-nuss.yaml#
5a9a495d5SGrygorii Strashko$schema: http://devicetree.org/meta-schemas/core.yaml#
6a9a495d5SGrygorii Strashko
7dd3cb467SAndrew Lunntitle: The TI AM654x/J721E/AM642x SoC Gigabit Ethernet MAC (Media Access Controller)
8a9a495d5SGrygorii Strashko
9a9a495d5SGrygorii Strashkomaintainers:
10*84f90efdSRavi Gunasekaran  - Siddharth Vadapalli <s-vadapalli@ti.com>
11*84f90efdSRavi Gunasekaran  - Roger Quadros <rogerq@kernel.org>
12a9a495d5SGrygorii Strashko
13a9a495d5SGrygorii Strashkodescription:
14a9a495d5SGrygorii Strashko  The TI AM654x/J721E SoC Gigabit Ethernet MAC (CPSW2G NUSS) has two ports
15a9a495d5SGrygorii Strashko  (one external) and provides Ethernet packet communication for the device.
1619d9a846SGrygorii Strashko  The TI AM642x SoC Gigabit Ethernet MAC (CPSW3G NUSS) has three ports
1719d9a846SGrygorii Strashko  (two external) and provides Ethernet packet communication and switching.
18a9a495d5SGrygorii Strashko
1919d9a846SGrygorii Strashko  The internal Communications Port Programming Interface (CPPI5) (Host port 0).
2019d9a846SGrygorii Strashko  Host Port 0 CPPI Packet Streaming Interface interface supports 8 TX channels
2119d9a846SGrygorii Strashko  and one RX channels and operating by NAVSS Unified DMA  Peripheral Root
2219d9a846SGrygorii Strashko  Complex (UDMA-P) controller.
2319d9a846SGrygorii Strashko
2419d9a846SGrygorii Strashko  CPSWxG features
2519d9a846SGrygorii Strashko  updated Address Lookup Engine (ALE).
26a9a495d5SGrygorii Strashko  priority level Quality Of Service (QOS) support (802.1p)
27a9a495d5SGrygorii Strashko  Support for Audio/Video Bridging (P802.1Qav/D6.0)
28a9a495d5SGrygorii Strashko  Support for IEEE 1588 Clock Synchronization (2008 Annex D, Annex E and Annex F)
29a9a495d5SGrygorii Strashko  Flow Control (802.3x) Support
30a9a495d5SGrygorii Strashko  Time Sensitive Network Support
31a9a495d5SGrygorii Strashko  IEEE P902.3br/D2.0 Interspersing Express Traffic
32a9a495d5SGrygorii Strashko  IEEE 802.1Qbv/D2.2 Enhancements for Scheduled Traffic
33a9a495d5SGrygorii Strashko  Configurable number of addresses plus VLANs
34a9a495d5SGrygorii Strashko  Configurable number of classifier/policers
35a9a495d5SGrygorii Strashko  VLAN support, 802.1Q compliant, Auto add port VLAN for untagged frames on
36a9a495d5SGrygorii Strashko  ingress, Auto VLAN removal on egress and auto pad to minimum frame size.
37a9a495d5SGrygorii Strashko  RX/TX csum offload
3819d9a846SGrygorii Strashko  Management Data Input/Output (MDIO) interface for PHYs management
3919d9a846SGrygorii Strashko  RMII/RGMII Interfaces support
4019d9a846SGrygorii Strashko  new version of Common Platform Time Sync (CPTS)
4119d9a846SGrygorii Strashko
4219d9a846SGrygorii Strashko  The CPSWxG NUSS is integrated into
4319d9a846SGrygorii Strashko    device MCU domain named MCU_CPSW0 on AM654x/J721E SoC.
4419d9a846SGrygorii Strashko    device MAIN domain named CPSW0 on AM642x SoC.
45a9a495d5SGrygorii Strashko
46a9a495d5SGrygorii Strashko  Specifications can be found at
4719d9a846SGrygorii Strashko    https://www.ti.com/lit/pdf/spruid7
4819d9a846SGrygorii Strashko    https://www.ti.com/lit/zip/spruil1
4919d9a846SGrygorii Strashko    https://www.ti.com/lit/pdf/spruim2
50a9a495d5SGrygorii Strashko
51a9a495d5SGrygorii Strashkoproperties:
52a9a495d5SGrygorii Strashko  "#address-cells": true
53a9a495d5SGrygorii Strashko  "#size-cells": true
54a9a495d5SGrygorii Strashko
55a9a495d5SGrygorii Strashko  compatible:
561c3ac086SRob Herring    enum:
5740235edeSSiddharth Vadapalli      - ti,am642-cpsw-nuss
581c3ac086SRob Herring      - ti,am654-cpsw-nuss
59d9849516SSiddharth Vadapalli      - ti,j7200-cpswxg-nuss
601c3ac086SRob Herring      - ti,j721e-cpsw-nuss
61c85b53e3SSiddharth Vadapalli      - ti,j721e-cpswxg-nuss
62e0c9c2a7SSiddharth Vadapalli      - ti,j784s4-cpswxg-nuss
63a9a495d5SGrygorii Strashko
64a9a495d5SGrygorii Strashko  reg:
65a9a495d5SGrygorii Strashko    maxItems: 1
66a9a495d5SGrygorii Strashko    description:
6719d9a846SGrygorii Strashko      The physical base address and size of full the CPSWxG NUSS IO range
68a9a495d5SGrygorii Strashko
69a9a495d5SGrygorii Strashko  reg-names:
70a9a495d5SGrygorii Strashko    items:
71a9a495d5SGrygorii Strashko      - const: cpsw_nuss
72a9a495d5SGrygorii Strashko
73a9a495d5SGrygorii Strashko  ranges: true
74a9a495d5SGrygorii Strashko
75a9a495d5SGrygorii Strashko  dma-coherent: true
76a9a495d5SGrygorii Strashko
77a9a495d5SGrygorii Strashko  clocks:
780499220dSRob Herring    maxItems: 1
7919d9a846SGrygorii Strashko    description: CPSWxG NUSS functional clock
80a9a495d5SGrygorii Strashko
81a9a495d5SGrygorii Strashko  clock-names:
82a9a495d5SGrygorii Strashko    items:
83a9a495d5SGrygorii Strashko      - const: fck
84a9a495d5SGrygorii Strashko
8519d9a846SGrygorii Strashko  assigned-clock-parents: true
8619d9a846SGrygorii Strashko
8719d9a846SGrygorii Strashko  assigned-clocks: true
8819d9a846SGrygorii Strashko
89a9a495d5SGrygorii Strashko  power-domains:
90a9a495d5SGrygorii Strashko    maxItems: 1
91a9a495d5SGrygorii Strashko
92a9a495d5SGrygorii Strashko  dmas:
93a9a495d5SGrygorii Strashko    maxItems: 9
94a9a495d5SGrygorii Strashko
95a9a495d5SGrygorii Strashko  dma-names:
96a9a495d5SGrygorii Strashko    items:
97a9a495d5SGrygorii Strashko      - const: tx0
98a9a495d5SGrygorii Strashko      - const: tx1
99a9a495d5SGrygorii Strashko      - const: tx2
100a9a495d5SGrygorii Strashko      - const: tx3
101a9a495d5SGrygorii Strashko      - const: tx4
102a9a495d5SGrygorii Strashko      - const: tx5
103a9a495d5SGrygorii Strashko      - const: tx6
104a9a495d5SGrygorii Strashko      - const: tx7
105a9a495d5SGrygorii Strashko      - const: rx
106a9a495d5SGrygorii Strashko
107a9a495d5SGrygorii Strashko  ethernet-ports:
108a9a495d5SGrygorii Strashko    type: object
109a9a495d5SGrygorii Strashko    properties:
110a9a495d5SGrygorii Strashko      '#address-cells':
111a9a495d5SGrygorii Strashko        const: 1
112a9a495d5SGrygorii Strashko      '#size-cells':
113a9a495d5SGrygorii Strashko        const: 0
114a9a495d5SGrygorii Strashko
115a9a495d5SGrygorii Strashko    patternProperties:
116c85b53e3SSiddharth Vadapalli      "^port@[1-8]$":
117a9a495d5SGrygorii Strashko        type: object
11819d9a846SGrygorii Strashko        description: CPSWxG NUSS external ports
119a9a495d5SGrygorii Strashko
1203d21a460SRob Herring        $ref: ethernet-controller.yaml#
121057062adSRob Herring        unevaluatedProperties: false
122a9a495d5SGrygorii Strashko
123a9a495d5SGrygorii Strashko        properties:
124a9a495d5SGrygorii Strashko          reg:
12519d9a846SGrygorii Strashko            minimum: 1
126c85b53e3SSiddharth Vadapalli            maximum: 8
127a9a495d5SGrygorii Strashko            description: CPSW port number
128a9a495d5SGrygorii Strashko
129a9a495d5SGrygorii Strashko          phys:
130aacaf7b3SSiddharth Vadapalli            minItems: 1
131aacaf7b3SSiddharth Vadapalli            items:
132aacaf7b3SSiddharth Vadapalli              - description: CPSW MAC's PHY.
133aacaf7b3SSiddharth Vadapalli              - description: Serdes PHY. Serdes PHY is required only if
134aacaf7b3SSiddharth Vadapalli                             the Serdes has to be configured in the
135aacaf7b3SSiddharth Vadapalli                             Single-Link configuration.
136aacaf7b3SSiddharth Vadapalli
137aacaf7b3SSiddharth Vadapalli          phy-names:
138aacaf7b3SSiddharth Vadapalli            minItems: 1
139aacaf7b3SSiddharth Vadapalli            items:
140aacaf7b3SSiddharth Vadapalli              - const: mac
141aacaf7b3SSiddharth Vadapalli              - const: serdes
142a9a495d5SGrygorii Strashko
143a9a495d5SGrygorii Strashko          label:
144a9a495d5SGrygorii Strashko            description: label associated with this port
145a9a495d5SGrygorii Strashko
146a9a495d5SGrygorii Strashko          ti,mac-only:
147d69c6dddSRob Herring            $ref: /schemas/types.yaml#/definitions/flag
148a9a495d5SGrygorii Strashko            description:
149a9a495d5SGrygorii Strashko              Specifies the port works in mac-only mode.
150a9a495d5SGrygorii Strashko
151a9a495d5SGrygorii Strashko          ti,syscon-efuse:
152d69c6dddSRob Herring            $ref: /schemas/types.yaml#/definitions/phandle-array
15339bd2b6aSRob Herring            items:
15439bd2b6aSRob Herring              - items:
15539bd2b6aSRob Herring                  - description: Phandle to the system control device node which
15639bd2b6aSRob Herring                      provides access to efuse
15739bd2b6aSRob Herring                  - description: offset to efuse registers???
158a9a495d5SGrygorii Strashko            description:
159a9a495d5SGrygorii Strashko              Phandle to the system control device node which provides access
160a9a495d5SGrygorii Strashko              to efuse IO range with MAC addresses
161a9a495d5SGrygorii Strashko
162a9a495d5SGrygorii Strashko        required:
163a9a495d5SGrygorii Strashko          - reg
164a9a495d5SGrygorii Strashko          - phys
165a9a495d5SGrygorii Strashko
166a9a495d5SGrygorii Strashko    additionalProperties: false
167a9a495d5SGrygorii Strashko
168a9a495d5SGrygorii StrashkopatternProperties:
169a9a495d5SGrygorii Strashko  "^mdio@[0-9a-f]+$":
170a9a495d5SGrygorii Strashko    type: object
17161ab5a06SKrzysztof Kozlowski    $ref: ti,davinci-mdio.yaml#
1723d21a460SRob Herring
173a9a495d5SGrygorii Strashko    description:
174a9a495d5SGrygorii Strashko      CPSW MDIO bus.
175a9a495d5SGrygorii Strashko
1764786f4a0SGrygorii Strashko  "^cpts@[0-9a-f]+":
1776e87ac74SGrygorii Strashko    type: object
17861ab5a06SKrzysztof Kozlowski    $ref: ti,k3-am654-cpts.yaml#
1796e87ac74SGrygorii Strashko    description:
1806e87ac74SGrygorii Strashko      CPSW Common Platform Time Sync (CPTS) module.
1816e87ac74SGrygorii Strashko
182a9a495d5SGrygorii Strashkorequired:
183a9a495d5SGrygorii Strashko  - compatible
184a9a495d5SGrygorii Strashko  - reg
185a9a495d5SGrygorii Strashko  - reg-names
186a9a495d5SGrygorii Strashko  - ranges
187a9a495d5SGrygorii Strashko  - clocks
188a9a495d5SGrygorii Strashko  - clock-names
189a9a495d5SGrygorii Strashko  - power-domains
190a9a495d5SGrygorii Strashko  - dmas
191a9a495d5SGrygorii Strashko  - dma-names
192a9a495d5SGrygorii Strashko  - '#address-cells'
193a9a495d5SGrygorii Strashko  - '#size-cells'
194a9a495d5SGrygorii Strashko
195d9849516SSiddharth VadapalliallOf:
196d9849516SSiddharth Vadapalli  - if:
197d9849516SSiddharth Vadapalli      not:
198d9849516SSiddharth Vadapalli        properties:
199d9849516SSiddharth Vadapalli          compatible:
200d9849516SSiddharth Vadapalli            contains:
201e0c9c2a7SSiddharth Vadapalli              enum:
202e0c9c2a7SSiddharth Vadapalli                - ti,j721e-cpswxg-nuss
203e0c9c2a7SSiddharth Vadapalli                - ti,j784s4-cpswxg-nuss
204d9849516SSiddharth Vadapalli    then:
205d9849516SSiddharth Vadapalli      properties:
206d9849516SSiddharth Vadapalli        ethernet-ports:
207d9849516SSiddharth Vadapalli          patternProperties:
208c85b53e3SSiddharth Vadapalli            "^port@[5-8]$": false
209c85b53e3SSiddharth Vadapalli            "^port@[1-4]$":
210c85b53e3SSiddharth Vadapalli              properties:
211c85b53e3SSiddharth Vadapalli                reg:
212c85b53e3SSiddharth Vadapalli                  minimum: 1
213c85b53e3SSiddharth Vadapalli                  maximum: 4
214c85b53e3SSiddharth Vadapalli
215c85b53e3SSiddharth Vadapalli  - if:
216c85b53e3SSiddharth Vadapalli      not:
217c85b53e3SSiddharth Vadapalli        properties:
218c85b53e3SSiddharth Vadapalli          compatible:
219c85b53e3SSiddharth Vadapalli            contains:
220c85b53e3SSiddharth Vadapalli              enum:
221c85b53e3SSiddharth Vadapalli                - ti,j7200-cpswxg-nuss
22240235edeSSiddharth Vadapalli                - ti,j721e-cpswxg-nuss
223e0c9c2a7SSiddharth Vadapalli                - ti,j784s4-cpswxg-nuss
224c85b53e3SSiddharth Vadapalli    then:
225c85b53e3SSiddharth Vadapalli      properties:
226c85b53e3SSiddharth Vadapalli        ethernet-ports:
227c85b53e3SSiddharth Vadapalli          patternProperties:
228c85b53e3SSiddharth Vadapalli            "^port@[3-8]$": false
229c85b53e3SSiddharth Vadapalli            "^port@[1-2]$":
230c85b53e3SSiddharth Vadapalli              properties:
231c85b53e3SSiddharth Vadapalli                reg:
232c85b53e3SSiddharth Vadapalli                  minimum: 1
233c85b53e3SSiddharth Vadapalli                  maximum: 2
234d9849516SSiddharth Vadapalli
235a9a495d5SGrygorii StrashkoadditionalProperties: false
236a9a495d5SGrygorii Strashko
237a9a495d5SGrygorii Strashkoexamples:
238a9a495d5SGrygorii Strashko  - |
239a9a495d5SGrygorii Strashko    #include <dt-bindings/soc/ti,sci_pm_domain.h>
240a9a495d5SGrygorii Strashko    #include <dt-bindings/net/ti-dp83867.h>
2414786f4a0SGrygorii Strashko    #include <dt-bindings/interrupt-controller/irq.h>
2424786f4a0SGrygorii Strashko    #include <dt-bindings/interrupt-controller/arm-gic.h>
243a9a495d5SGrygorii Strashko
244fba56184SRob Herring    bus {
245fba56184SRob Herring        #address-cells = <2>;
246fba56184SRob Herring        #size-cells = <2>;
247fba56184SRob Herring
248a9a495d5SGrygorii Strashko        mcu_cpsw: ethernet@46000000 {
249a9a495d5SGrygorii Strashko            compatible = "ti,am654-cpsw-nuss";
250a9a495d5SGrygorii Strashko            #address-cells = <2>;
251a9a495d5SGrygorii Strashko            #size-cells = <2>;
252a9a495d5SGrygorii Strashko            reg = <0x0 0x46000000 0x0 0x200000>;
253a9a495d5SGrygorii Strashko            reg-names = "cpsw_nuss";
254fba56184SRob Herring            ranges = <0x0 0x0 0x0 0x46000000 0x0 0x200000>;
255a9a495d5SGrygorii Strashko            dma-coherent;
256a9a495d5SGrygorii Strashko            clocks = <&k3_clks 5 10>;
257a9a495d5SGrygorii Strashko            clock-names = "fck";
258a9a495d5SGrygorii Strashko            power-domains = <&k3_pds 5 TI_SCI_PD_EXCLUSIVE>;
259a9a495d5SGrygorii Strashko            pinctrl-names = "default";
260a9a495d5SGrygorii Strashko            pinctrl-0 = <&mcu_cpsw_pins_default &mcu_mdio_pins_default>;
261a9a495d5SGrygorii Strashko
262a9a495d5SGrygorii Strashko            dmas = <&mcu_udmap 0xf000>,
263a9a495d5SGrygorii Strashko                   <&mcu_udmap 0xf001>,
264a9a495d5SGrygorii Strashko                   <&mcu_udmap 0xf002>,
265a9a495d5SGrygorii Strashko                   <&mcu_udmap 0xf003>,
266a9a495d5SGrygorii Strashko                   <&mcu_udmap 0xf004>,
267a9a495d5SGrygorii Strashko                   <&mcu_udmap 0xf005>,
268a9a495d5SGrygorii Strashko                   <&mcu_udmap 0xf006>,
269a9a495d5SGrygorii Strashko                   <&mcu_udmap 0xf007>,
270a9a495d5SGrygorii Strashko                   <&mcu_udmap 0x7000>;
271a9a495d5SGrygorii Strashko            dma-names = "tx0", "tx1", "tx2", "tx3", "tx4", "tx5", "tx6", "tx7",
272a9a495d5SGrygorii Strashko                        "rx";
273a9a495d5SGrygorii Strashko
274a9a495d5SGrygorii Strashko            ethernet-ports {
275a9a495d5SGrygorii Strashko                #address-cells = <1>;
276a9a495d5SGrygorii Strashko                #size-cells = <0>;
277a9a495d5SGrygorii Strashko
278a9a495d5SGrygorii Strashko                cpsw_port1: port@1 {
279a9a495d5SGrygorii Strashko                    reg = <1>;
280a9a495d5SGrygorii Strashko                    ti,mac-only;
281a9a495d5SGrygorii Strashko                    label = "port1";
282a9a495d5SGrygorii Strashko                    ti,syscon-efuse = <&mcu_conf 0x200>;
283a9a495d5SGrygorii Strashko                    phys = <&phy_gmii_sel 1>;
284a9a495d5SGrygorii Strashko
285a9a495d5SGrygorii Strashko                    phy-mode = "rgmii-rxid";
286a9a495d5SGrygorii Strashko                    phy-handle = <&phy0>;
287a9a495d5SGrygorii Strashko                };
288a9a495d5SGrygorii Strashko            };
289a9a495d5SGrygorii Strashko
290a9a495d5SGrygorii Strashko            davinci_mdio: mdio@f00 {
291a9a495d5SGrygorii Strashko                compatible = "ti,cpsw-mdio","ti,davinci_mdio";
292a9a495d5SGrygorii Strashko                reg = <0x0 0xf00 0x0 0x100>;
293a9a495d5SGrygorii Strashko                #address-cells = <1>;
294a9a495d5SGrygorii Strashko                #size-cells = <0>;
295a9a495d5SGrygorii Strashko                clocks = <&k3_clks 5 10>;
296a9a495d5SGrygorii Strashko                clock-names = "fck";
297a9a495d5SGrygorii Strashko                bus_freq = <1000000>;
298a9a495d5SGrygorii Strashko
299a9a495d5SGrygorii Strashko                phy0: ethernet-phy@0 {
300a9a495d5SGrygorii Strashko                    reg = <0>;
301a9a495d5SGrygorii Strashko                    ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
302a9a495d5SGrygorii Strashko                    ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
303a9a495d5SGrygorii Strashko                };
304a9a495d5SGrygorii Strashko            };
305a9a495d5SGrygorii Strashko        };
3064786f4a0SGrygorii Strashko
3074786f4a0SGrygorii Strashko        cpts@3d000 {
3084786f4a0SGrygorii Strashko             compatible = "ti,am65-cpts";
3094786f4a0SGrygorii Strashko             reg = <0x0 0x3d000 0x0 0x400>;
3104786f4a0SGrygorii Strashko             clocks = <&k3_clks 18 2>;
3114786f4a0SGrygorii Strashko             clock-names = "cpts";
3124786f4a0SGrygorii Strashko             interrupts-extended = <&gic500 GIC_SPI 858 IRQ_TYPE_LEVEL_HIGH>;
3134786f4a0SGrygorii Strashko             interrupt-names = "cpts";
3144786f4a0SGrygorii Strashko             ti,cpts-ext-ts-inputs = <4>;
3154786f4a0SGrygorii Strashko             ti,cpts-periodic-outputs = <2>;
3164786f4a0SGrygorii Strashko        };
317a9a495d5SGrygorii Strashko    };
318