xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*4882a593Smuzhiyun%YAML 1.2
3*4882a593Smuzhiyun---
4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/net/ti,k3-am654-cpsw-nuss.yaml#
5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml#
6*4882a593Smuzhiyun
7*4882a593Smuzhiyuntitle: The TI AM654x/J721E SoC Gigabit Ethernet MAC (Media Access Controller) Device Tree Bindings
8*4882a593Smuzhiyun
9*4882a593Smuzhiyunmaintainers:
10*4882a593Smuzhiyun  - Grygorii Strashko <grygorii.strashko@ti.com>
11*4882a593Smuzhiyun  - Sekhar Nori <nsekhar@ti.com>
12*4882a593Smuzhiyun
13*4882a593Smuzhiyundescription:
14*4882a593Smuzhiyun  The TI AM654x/J721E SoC Gigabit Ethernet MAC (CPSW2G NUSS) has two ports
15*4882a593Smuzhiyun  (one external) and provides Ethernet packet communication for the device.
16*4882a593Smuzhiyun  CPSW2G NUSS features - the Reduced Gigabit Media Independent Interface (RGMII),
17*4882a593Smuzhiyun  Reduced Media Independent Interface (RMII), the Management Data
18*4882a593Smuzhiyun  Input/Output (MDIO) interface for physical layer device (PHY) management,
19*4882a593Smuzhiyun  new version of Common Platform Time Sync (CPTS), updated Address Lookup
20*4882a593Smuzhiyun  Engine (ALE).
21*4882a593Smuzhiyun  One external Ethernet port (port 1) with selectable RGMII/RMII interfaces and
22*4882a593Smuzhiyun  an internal Communications Port Programming Interface (CPPI5) (Host port 0).
23*4882a593Smuzhiyun  Host Port 0 CPPI Packet Streaming Interface interface supports 8 TX channels
24*4882a593Smuzhiyun  and one RX channels and operating by TI AM654x/J721E NAVSS Unified DMA
25*4882a593Smuzhiyun  Peripheral Root Complex (UDMA-P) controller.
26*4882a593Smuzhiyun  The CPSW2G NUSS is integrated into device MCU domain named MCU_CPSW0.
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun  Additional features
29*4882a593Smuzhiyun  priority level Quality Of Service (QOS) support (802.1p)
30*4882a593Smuzhiyun  Support for Audio/Video Bridging (P802.1Qav/D6.0)
31*4882a593Smuzhiyun  Support for IEEE 1588 Clock Synchronization (2008 Annex D, Annex E and Annex F)
32*4882a593Smuzhiyun  Flow Control (802.3x) Support
33*4882a593Smuzhiyun  Time Sensitive Network Support
34*4882a593Smuzhiyun  IEEE P902.3br/D2.0 Interspersing Express Traffic
35*4882a593Smuzhiyun  IEEE 802.1Qbv/D2.2 Enhancements for Scheduled Traffic
36*4882a593Smuzhiyun  Configurable number of addresses plus VLANs
37*4882a593Smuzhiyun  Configurable number of classifier/policers
38*4882a593Smuzhiyun  VLAN support, 802.1Q compliant, Auto add port VLAN for untagged frames on
39*4882a593Smuzhiyun  ingress, Auto VLAN removal on egress and auto pad to minimum frame size.
40*4882a593Smuzhiyun  RX/TX csum offload
41*4882a593Smuzhiyun
42*4882a593Smuzhiyun  Specifications can be found at
43*4882a593Smuzhiyun    http://www.ti.com/lit/ug/spruid7e/spruid7e.pdf
44*4882a593Smuzhiyun    http://www.ti.com/lit/ug/spruil1a/spruil1a.pdf
45*4882a593Smuzhiyun
46*4882a593Smuzhiyunproperties:
47*4882a593Smuzhiyun  "#address-cells": true
48*4882a593Smuzhiyun  "#size-cells": true
49*4882a593Smuzhiyun
50*4882a593Smuzhiyun  compatible:
51*4882a593Smuzhiyun    oneOf:
52*4882a593Smuzhiyun      - const: ti,am654-cpsw-nuss
53*4882a593Smuzhiyun      - const: ti,j721e-cpsw-nuss
54*4882a593Smuzhiyun
55*4882a593Smuzhiyun  reg:
56*4882a593Smuzhiyun    maxItems: 1
57*4882a593Smuzhiyun    description:
58*4882a593Smuzhiyun      The physical base address and size of full the CPSW2G NUSS IO range
59*4882a593Smuzhiyun
60*4882a593Smuzhiyun  reg-names:
61*4882a593Smuzhiyun    items:
62*4882a593Smuzhiyun      - const: cpsw_nuss
63*4882a593Smuzhiyun
64*4882a593Smuzhiyun  ranges: true
65*4882a593Smuzhiyun
66*4882a593Smuzhiyun  dma-coherent: true
67*4882a593Smuzhiyun
68*4882a593Smuzhiyun  clocks:
69*4882a593Smuzhiyun    description: CPSW2G NUSS functional clock
70*4882a593Smuzhiyun
71*4882a593Smuzhiyun  clock-names:
72*4882a593Smuzhiyun    items:
73*4882a593Smuzhiyun      - const: fck
74*4882a593Smuzhiyun
75*4882a593Smuzhiyun  power-domains:
76*4882a593Smuzhiyun    maxItems: 1
77*4882a593Smuzhiyun
78*4882a593Smuzhiyun  dmas:
79*4882a593Smuzhiyun    maxItems: 9
80*4882a593Smuzhiyun
81*4882a593Smuzhiyun  dma-names:
82*4882a593Smuzhiyun    items:
83*4882a593Smuzhiyun      - const: tx0
84*4882a593Smuzhiyun      - const: tx1
85*4882a593Smuzhiyun      - const: tx2
86*4882a593Smuzhiyun      - const: tx3
87*4882a593Smuzhiyun      - const: tx4
88*4882a593Smuzhiyun      - const: tx5
89*4882a593Smuzhiyun      - const: tx6
90*4882a593Smuzhiyun      - const: tx7
91*4882a593Smuzhiyun      - const: rx
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun  ethernet-ports:
94*4882a593Smuzhiyun    type: object
95*4882a593Smuzhiyun    properties:
96*4882a593Smuzhiyun      '#address-cells':
97*4882a593Smuzhiyun        const: 1
98*4882a593Smuzhiyun      '#size-cells':
99*4882a593Smuzhiyun        const: 0
100*4882a593Smuzhiyun
101*4882a593Smuzhiyun    patternProperties:
102*4882a593Smuzhiyun      port@1:
103*4882a593Smuzhiyun        type: object
104*4882a593Smuzhiyun        description: CPSW2G NUSS external ports
105*4882a593Smuzhiyun
106*4882a593Smuzhiyun        $ref: ethernet-controller.yaml#
107*4882a593Smuzhiyun
108*4882a593Smuzhiyun        properties:
109*4882a593Smuzhiyun          reg:
110*4882a593Smuzhiyun            items:
111*4882a593Smuzhiyun              - const: 1
112*4882a593Smuzhiyun            description: CPSW port number
113*4882a593Smuzhiyun
114*4882a593Smuzhiyun          phys:
115*4882a593Smuzhiyun            maxItems: 1
116*4882a593Smuzhiyun            description: phandle on phy-gmii-sel PHY
117*4882a593Smuzhiyun
118*4882a593Smuzhiyun          label:
119*4882a593Smuzhiyun            description: label associated with this port
120*4882a593Smuzhiyun
121*4882a593Smuzhiyun          ti,mac-only:
122*4882a593Smuzhiyun            $ref: /schemas/types.yaml#definitions/flag
123*4882a593Smuzhiyun            description:
124*4882a593Smuzhiyun              Specifies the port works in mac-only mode.
125*4882a593Smuzhiyun
126*4882a593Smuzhiyun          ti,syscon-efuse:
127*4882a593Smuzhiyun            $ref: /schemas/types.yaml#definitions/phandle-array
128*4882a593Smuzhiyun            description:
129*4882a593Smuzhiyun              Phandle to the system control device node which provides access
130*4882a593Smuzhiyun              to efuse IO range with MAC addresses
131*4882a593Smuzhiyun
132*4882a593Smuzhiyun        required:
133*4882a593Smuzhiyun          - reg
134*4882a593Smuzhiyun          - phys
135*4882a593Smuzhiyun
136*4882a593Smuzhiyun    additionalProperties: false
137*4882a593Smuzhiyun
138*4882a593SmuzhiyunpatternProperties:
139*4882a593Smuzhiyun  "^mdio@[0-9a-f]+$":
140*4882a593Smuzhiyun    type: object
141*4882a593Smuzhiyun    $ref: "ti,davinci-mdio.yaml#"
142*4882a593Smuzhiyun
143*4882a593Smuzhiyun    description:
144*4882a593Smuzhiyun      CPSW MDIO bus.
145*4882a593Smuzhiyun
146*4882a593Smuzhiyun  "^cpts@[0-9a-f]+":
147*4882a593Smuzhiyun    type: object
148*4882a593Smuzhiyun    $ref: "ti,k3-am654-cpts.yaml#"
149*4882a593Smuzhiyun    description:
150*4882a593Smuzhiyun      CPSW Common Platform Time Sync (CPTS) module.
151*4882a593Smuzhiyun
152*4882a593Smuzhiyunrequired:
153*4882a593Smuzhiyun  - compatible
154*4882a593Smuzhiyun  - reg
155*4882a593Smuzhiyun  - reg-names
156*4882a593Smuzhiyun  - ranges
157*4882a593Smuzhiyun  - clocks
158*4882a593Smuzhiyun  - clock-names
159*4882a593Smuzhiyun  - power-domains
160*4882a593Smuzhiyun  - dmas
161*4882a593Smuzhiyun  - dma-names
162*4882a593Smuzhiyun  - '#address-cells'
163*4882a593Smuzhiyun  - '#size-cells'
164*4882a593Smuzhiyun
165*4882a593SmuzhiyunadditionalProperties: false
166*4882a593Smuzhiyun
167*4882a593Smuzhiyunexamples:
168*4882a593Smuzhiyun  - |
169*4882a593Smuzhiyun    #include <dt-bindings/pinctrl/k3.h>
170*4882a593Smuzhiyun    #include <dt-bindings/soc/ti,sci_pm_domain.h>
171*4882a593Smuzhiyun    #include <dt-bindings/net/ti-dp83867.h>
172*4882a593Smuzhiyun    #include <dt-bindings/interrupt-controller/irq.h>
173*4882a593Smuzhiyun    #include <dt-bindings/interrupt-controller/arm-gic.h>
174*4882a593Smuzhiyun
175*4882a593Smuzhiyun    bus {
176*4882a593Smuzhiyun        #address-cells = <2>;
177*4882a593Smuzhiyun        #size-cells = <2>;
178*4882a593Smuzhiyun
179*4882a593Smuzhiyun        mcu_cpsw: ethernet@46000000 {
180*4882a593Smuzhiyun            compatible = "ti,am654-cpsw-nuss";
181*4882a593Smuzhiyun            #address-cells = <2>;
182*4882a593Smuzhiyun            #size-cells = <2>;
183*4882a593Smuzhiyun            reg = <0x0 0x46000000 0x0 0x200000>;
184*4882a593Smuzhiyun            reg-names = "cpsw_nuss";
185*4882a593Smuzhiyun            ranges = <0x0 0x0 0x0 0x46000000 0x0 0x200000>;
186*4882a593Smuzhiyun            dma-coherent;
187*4882a593Smuzhiyun            clocks = <&k3_clks 5 10>;
188*4882a593Smuzhiyun            clock-names = "fck";
189*4882a593Smuzhiyun            power-domains = <&k3_pds 5 TI_SCI_PD_EXCLUSIVE>;
190*4882a593Smuzhiyun            pinctrl-names = "default";
191*4882a593Smuzhiyun            pinctrl-0 = <&mcu_cpsw_pins_default &mcu_mdio_pins_default>;
192*4882a593Smuzhiyun
193*4882a593Smuzhiyun            dmas = <&mcu_udmap 0xf000>,
194*4882a593Smuzhiyun                   <&mcu_udmap 0xf001>,
195*4882a593Smuzhiyun                   <&mcu_udmap 0xf002>,
196*4882a593Smuzhiyun                   <&mcu_udmap 0xf003>,
197*4882a593Smuzhiyun                   <&mcu_udmap 0xf004>,
198*4882a593Smuzhiyun                   <&mcu_udmap 0xf005>,
199*4882a593Smuzhiyun                   <&mcu_udmap 0xf006>,
200*4882a593Smuzhiyun                   <&mcu_udmap 0xf007>,
201*4882a593Smuzhiyun                   <&mcu_udmap 0x7000>;
202*4882a593Smuzhiyun            dma-names = "tx0", "tx1", "tx2", "tx3", "tx4", "tx5", "tx6", "tx7",
203*4882a593Smuzhiyun                        "rx";
204*4882a593Smuzhiyun
205*4882a593Smuzhiyun            ethernet-ports {
206*4882a593Smuzhiyun                #address-cells = <1>;
207*4882a593Smuzhiyun                #size-cells = <0>;
208*4882a593Smuzhiyun
209*4882a593Smuzhiyun                cpsw_port1: port@1 {
210*4882a593Smuzhiyun                    reg = <1>;
211*4882a593Smuzhiyun                    ti,mac-only;
212*4882a593Smuzhiyun                    label = "port1";
213*4882a593Smuzhiyun                    ti,syscon-efuse = <&mcu_conf 0x200>;
214*4882a593Smuzhiyun                    phys = <&phy_gmii_sel 1>;
215*4882a593Smuzhiyun
216*4882a593Smuzhiyun                    phy-mode = "rgmii-rxid";
217*4882a593Smuzhiyun                    phy-handle = <&phy0>;
218*4882a593Smuzhiyun                };
219*4882a593Smuzhiyun            };
220*4882a593Smuzhiyun
221*4882a593Smuzhiyun            davinci_mdio: mdio@f00 {
222*4882a593Smuzhiyun                compatible = "ti,cpsw-mdio","ti,davinci_mdio";
223*4882a593Smuzhiyun                reg = <0x0 0xf00 0x0 0x100>;
224*4882a593Smuzhiyun                #address-cells = <1>;
225*4882a593Smuzhiyun                #size-cells = <0>;
226*4882a593Smuzhiyun                clocks = <&k3_clks 5 10>;
227*4882a593Smuzhiyun                clock-names = "fck";
228*4882a593Smuzhiyun                bus_freq = <1000000>;
229*4882a593Smuzhiyun
230*4882a593Smuzhiyun                phy0: ethernet-phy@0 {
231*4882a593Smuzhiyun                    reg = <0>;
232*4882a593Smuzhiyun                    ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
233*4882a593Smuzhiyun                    ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
234*4882a593Smuzhiyun                };
235*4882a593Smuzhiyun            };
236*4882a593Smuzhiyun        };
237*4882a593Smuzhiyun
238*4882a593Smuzhiyun        cpts@3d000 {
239*4882a593Smuzhiyun             compatible = "ti,am65-cpts";
240*4882a593Smuzhiyun             reg = <0x0 0x3d000 0x0 0x400>;
241*4882a593Smuzhiyun             clocks = <&k3_clks 18 2>;
242*4882a593Smuzhiyun             clock-names = "cpts";
243*4882a593Smuzhiyun             interrupts-extended = <&gic500 GIC_SPI 858 IRQ_TYPE_LEVEL_HIGH>;
244*4882a593Smuzhiyun             interrupt-names = "cpts";
245*4882a593Smuzhiyun             ti,cpts-ext-ts-inputs = <4>;
246*4882a593Smuzhiyun             ti,cpts-periodic-outputs = <2>;
247*4882a593Smuzhiyun        };
248*4882a593Smuzhiyun    };
249