xref: /freebsd/sys/contrib/device-tree/Bindings/net/renesas,r9a09g057-gbeth.yaml (revision ae5de77ed78ae54d86cead5604869212e8008e6b)
1*ae5de77eSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*ae5de77eSEmmanuel Vadot%YAML 1.2
3*ae5de77eSEmmanuel Vadot---
4*ae5de77eSEmmanuel Vadot$id: http://devicetree.org/schemas/net/renesas,r9a09g057-gbeth.yaml#
5*ae5de77eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*ae5de77eSEmmanuel Vadot
7*ae5de77eSEmmanuel Vadottitle: GBETH glue layer for Renesas RZ/V2H(P) (and similar SoCs)
8*ae5de77eSEmmanuel Vadot
9*ae5de77eSEmmanuel Vadotmaintainers:
10*ae5de77eSEmmanuel Vadot  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
11*ae5de77eSEmmanuel Vadot
12*ae5de77eSEmmanuel Vadotselect:
13*ae5de77eSEmmanuel Vadot  properties:
14*ae5de77eSEmmanuel Vadot    compatible:
15*ae5de77eSEmmanuel Vadot      contains:
16*ae5de77eSEmmanuel Vadot        enum:
17*ae5de77eSEmmanuel Vadot          - renesas,r9a09g056-gbeth
18*ae5de77eSEmmanuel Vadot          - renesas,r9a09g057-gbeth
19*ae5de77eSEmmanuel Vadot          - renesas,rzv2h-gbeth
20*ae5de77eSEmmanuel Vadot  required:
21*ae5de77eSEmmanuel Vadot    - compatible
22*ae5de77eSEmmanuel Vadot
23*ae5de77eSEmmanuel Vadotproperties:
24*ae5de77eSEmmanuel Vadot  compatible:
25*ae5de77eSEmmanuel Vadot    items:
26*ae5de77eSEmmanuel Vadot      - enum:
27*ae5de77eSEmmanuel Vadot          - renesas,r9a09g056-gbeth # RZ/V2N
28*ae5de77eSEmmanuel Vadot          - renesas,r9a09g057-gbeth # RZ/V2H(P)
29*ae5de77eSEmmanuel Vadot      - const: renesas,rzv2h-gbeth
30*ae5de77eSEmmanuel Vadot      - const: snps,dwmac-5.20
31*ae5de77eSEmmanuel Vadot
32*ae5de77eSEmmanuel Vadot  reg:
33*ae5de77eSEmmanuel Vadot    maxItems: 1
34*ae5de77eSEmmanuel Vadot
35*ae5de77eSEmmanuel Vadot  clocks:
36*ae5de77eSEmmanuel Vadot    items:
37*ae5de77eSEmmanuel Vadot      - description: CSR clock
38*ae5de77eSEmmanuel Vadot      - description: AXI system clock
39*ae5de77eSEmmanuel Vadot      - description: PTP clock
40*ae5de77eSEmmanuel Vadot      - description: TX clock
41*ae5de77eSEmmanuel Vadot      - description: RX clock
42*ae5de77eSEmmanuel Vadot      - description: TX clock phase-shifted by 180 degrees
43*ae5de77eSEmmanuel Vadot      - description: RX clock phase-shifted by 180 degrees
44*ae5de77eSEmmanuel Vadot
45*ae5de77eSEmmanuel Vadot  clock-names:
46*ae5de77eSEmmanuel Vadot    items:
47*ae5de77eSEmmanuel Vadot      - const: stmmaceth
48*ae5de77eSEmmanuel Vadot      - const: pclk
49*ae5de77eSEmmanuel Vadot      - const: ptp_ref
50*ae5de77eSEmmanuel Vadot      - const: tx
51*ae5de77eSEmmanuel Vadot      - const: rx
52*ae5de77eSEmmanuel Vadot      - const: tx-180
53*ae5de77eSEmmanuel Vadot      - const: rx-180
54*ae5de77eSEmmanuel Vadot
55*ae5de77eSEmmanuel Vadot  interrupts:
56*ae5de77eSEmmanuel Vadot    minItems: 11
57*ae5de77eSEmmanuel Vadot
58*ae5de77eSEmmanuel Vadot  interrupt-names:
59*ae5de77eSEmmanuel Vadot    items:
60*ae5de77eSEmmanuel Vadot      - const: macirq
61*ae5de77eSEmmanuel Vadot      - const: eth_wake_irq
62*ae5de77eSEmmanuel Vadot      - const: eth_lpi
63*ae5de77eSEmmanuel Vadot      - const: rx-queue-0
64*ae5de77eSEmmanuel Vadot      - const: rx-queue-1
65*ae5de77eSEmmanuel Vadot      - const: rx-queue-2
66*ae5de77eSEmmanuel Vadot      - const: rx-queue-3
67*ae5de77eSEmmanuel Vadot      - const: tx-queue-0
68*ae5de77eSEmmanuel Vadot      - const: tx-queue-1
69*ae5de77eSEmmanuel Vadot      - const: tx-queue-2
70*ae5de77eSEmmanuel Vadot      - const: tx-queue-3
71*ae5de77eSEmmanuel Vadot
72*ae5de77eSEmmanuel Vadot  resets:
73*ae5de77eSEmmanuel Vadot    items:
74*ae5de77eSEmmanuel Vadot      - description: AXI power-on system reset
75*ae5de77eSEmmanuel Vadot
76*ae5de77eSEmmanuel Vadotrequired:
77*ae5de77eSEmmanuel Vadot  - compatible
78*ae5de77eSEmmanuel Vadot  - reg
79*ae5de77eSEmmanuel Vadot  - clocks
80*ae5de77eSEmmanuel Vadot  - clock-names
81*ae5de77eSEmmanuel Vadot  - interrupts
82*ae5de77eSEmmanuel Vadot  - interrupt-names
83*ae5de77eSEmmanuel Vadot  - resets
84*ae5de77eSEmmanuel Vadot
85*ae5de77eSEmmanuel VadotallOf:
86*ae5de77eSEmmanuel Vadot  - $ref: snps,dwmac.yaml#
87*ae5de77eSEmmanuel Vadot
88*ae5de77eSEmmanuel VadotunevaluatedProperties: false
89*ae5de77eSEmmanuel Vadot
90*ae5de77eSEmmanuel Vadotexamples:
91*ae5de77eSEmmanuel Vadot  - |
92*ae5de77eSEmmanuel Vadot    #include <dt-bindings/clock/renesas-cpg-mssr.h>
93*ae5de77eSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
94*ae5de77eSEmmanuel Vadot
95*ae5de77eSEmmanuel Vadot    ethernet@15c30000 {
96*ae5de77eSEmmanuel Vadot        compatible = "renesas,r9a09g057-gbeth", "renesas,rzv2h-gbeth", "snps,dwmac-5.20";
97*ae5de77eSEmmanuel Vadot        reg = <0x15c30000 0x10000>;
98*ae5de77eSEmmanuel Vadot        clocks =  <&cpg CPG_MOD 0xbd>, <&cpg CPG_MOD 0xbc>,
99*ae5de77eSEmmanuel Vadot                  <&ptp_clock>, <&cpg CPG_MOD 0xb8>,
100*ae5de77eSEmmanuel Vadot                  <&cpg CPG_MOD 0xb9>, <&cpg CPG_MOD 0xba>,
101*ae5de77eSEmmanuel Vadot                  <&cpg CPG_MOD 0xbb>;
102*ae5de77eSEmmanuel Vadot        clock-names = "stmmaceth", "pclk", "ptp_ref",
103*ae5de77eSEmmanuel Vadot                      "tx", "rx", "tx-180", "rx-180";
104*ae5de77eSEmmanuel Vadot        resets = <&cpg 0xb0>;
105*ae5de77eSEmmanuel Vadot        interrupts = <GIC_SPI 765 IRQ_TYPE_LEVEL_HIGH>,
106*ae5de77eSEmmanuel Vadot                     <GIC_SPI 767 IRQ_TYPE_LEVEL_HIGH>,
107*ae5de77eSEmmanuel Vadot                     <GIC_SPI 766 IRQ_TYPE_LEVEL_HIGH>,
108*ae5de77eSEmmanuel Vadot                     <GIC_SPI 772 IRQ_TYPE_LEVEL_HIGH>,
109*ae5de77eSEmmanuel Vadot                     <GIC_SPI 773 IRQ_TYPE_LEVEL_HIGH>,
110*ae5de77eSEmmanuel Vadot                     <GIC_SPI 774 IRQ_TYPE_LEVEL_HIGH>,
111*ae5de77eSEmmanuel Vadot                     <GIC_SPI 745 IRQ_TYPE_LEVEL_HIGH>,
112*ae5de77eSEmmanuel Vadot                     <GIC_SPI 768 IRQ_TYPE_LEVEL_HIGH>,
113*ae5de77eSEmmanuel Vadot                     <GIC_SPI 769 IRQ_TYPE_LEVEL_HIGH>,
114*ae5de77eSEmmanuel Vadot                     <GIC_SPI 770 IRQ_TYPE_LEVEL_HIGH>,
115*ae5de77eSEmmanuel Vadot                     <GIC_SPI 771 IRQ_TYPE_LEVEL_HIGH>;
116*ae5de77eSEmmanuel Vadot        interrupt-names = "macirq", "eth_wake_irq", "eth_lpi",
117*ae5de77eSEmmanuel Vadot                          "rx-queue-0", "rx-queue-1", "rx-queue-2",
118*ae5de77eSEmmanuel Vadot                          "rx-queue-3", "tx-queue-0", "tx-queue-1",
119*ae5de77eSEmmanuel Vadot                          "tx-queue-2", "tx-queue-3";
120*ae5de77eSEmmanuel Vadot        phy-mode = "rgmii-id";
121*ae5de77eSEmmanuel Vadot        snps,multicast-filter-bins = <256>;
122*ae5de77eSEmmanuel Vadot        snps,perfect-filter-entries = <128>;
123*ae5de77eSEmmanuel Vadot        rx-fifo-depth = <8192>;
124*ae5de77eSEmmanuel Vadot        tx-fifo-depth = <8192>;
125*ae5de77eSEmmanuel Vadot        snps,fixed-burst;
126*ae5de77eSEmmanuel Vadot        snps,force_thresh_dma_mode;
127*ae5de77eSEmmanuel Vadot        snps,axi-config = <&stmmac_axi_setup>;
128*ae5de77eSEmmanuel Vadot        snps,mtl-rx-config = <&mtl_rx_setup>;
129*ae5de77eSEmmanuel Vadot        snps,mtl-tx-config = <&mtl_tx_setup>;
130*ae5de77eSEmmanuel Vadot        snps,txpbl = <32>;
131*ae5de77eSEmmanuel Vadot        snps,rxpbl = <32>;
132*ae5de77eSEmmanuel Vadot        phy-handle = <&phy0>;
133*ae5de77eSEmmanuel Vadot
134*ae5de77eSEmmanuel Vadot        stmmac_axi_setup: stmmac-axi-config {
135*ae5de77eSEmmanuel Vadot            snps,lpi_en;
136*ae5de77eSEmmanuel Vadot            snps,wr_osr_lmt = <0xf>;
137*ae5de77eSEmmanuel Vadot            snps,rd_osr_lmt = <0xf>;
138*ae5de77eSEmmanuel Vadot            snps,blen = <16 8 4 0 0 0 0>;
139*ae5de77eSEmmanuel Vadot        };
140*ae5de77eSEmmanuel Vadot
141*ae5de77eSEmmanuel Vadot        mtl_rx_setup: rx-queues-config {
142*ae5de77eSEmmanuel Vadot            snps,rx-queues-to-use = <4>;
143*ae5de77eSEmmanuel Vadot            snps,rx-sched-sp;
144*ae5de77eSEmmanuel Vadot
145*ae5de77eSEmmanuel Vadot            queue0 {
146*ae5de77eSEmmanuel Vadot                snps,dcb-algorithm;
147*ae5de77eSEmmanuel Vadot                snps,priority = <0x1>;
148*ae5de77eSEmmanuel Vadot                snps,map-to-dma-channel = <0>;
149*ae5de77eSEmmanuel Vadot            };
150*ae5de77eSEmmanuel Vadot
151*ae5de77eSEmmanuel Vadot            queue1 {
152*ae5de77eSEmmanuel Vadot                snps,dcb-algorithm;
153*ae5de77eSEmmanuel Vadot                snps,priority = <0x2>;
154*ae5de77eSEmmanuel Vadot                snps,map-to-dma-channel = <1>;
155*ae5de77eSEmmanuel Vadot            };
156*ae5de77eSEmmanuel Vadot
157*ae5de77eSEmmanuel Vadot            queue2 {
158*ae5de77eSEmmanuel Vadot                snps,dcb-algorithm;
159*ae5de77eSEmmanuel Vadot                snps,priority = <0x4>;
160*ae5de77eSEmmanuel Vadot                snps,map-to-dma-channel = <2>;
161*ae5de77eSEmmanuel Vadot            };
162*ae5de77eSEmmanuel Vadot
163*ae5de77eSEmmanuel Vadot            queue3 {
164*ae5de77eSEmmanuel Vadot                snps,dcb-algorithm;
165*ae5de77eSEmmanuel Vadot                snps,priority = <0x8>;
166*ae5de77eSEmmanuel Vadot                snps,map-to-dma-channel = <3>;
167*ae5de77eSEmmanuel Vadot            };
168*ae5de77eSEmmanuel Vadot        };
169*ae5de77eSEmmanuel Vadot
170*ae5de77eSEmmanuel Vadot        mtl_tx_setup: tx-queues-config {
171*ae5de77eSEmmanuel Vadot            snps,tx-queues-to-use = <4>;
172*ae5de77eSEmmanuel Vadot
173*ae5de77eSEmmanuel Vadot            queue0 {
174*ae5de77eSEmmanuel Vadot                snps,dcb-algorithm;
175*ae5de77eSEmmanuel Vadot                snps,priority = <0x1>;
176*ae5de77eSEmmanuel Vadot            };
177*ae5de77eSEmmanuel Vadot
178*ae5de77eSEmmanuel Vadot            queue1 {
179*ae5de77eSEmmanuel Vadot                snps,dcb-algorithm;
180*ae5de77eSEmmanuel Vadot                snps,priority = <0x2>;
181*ae5de77eSEmmanuel Vadot            };
182*ae5de77eSEmmanuel Vadot
183*ae5de77eSEmmanuel Vadot            queue2 {
184*ae5de77eSEmmanuel Vadot                snps,dcb-algorithm;
185*ae5de77eSEmmanuel Vadot                snps,priority = <0x4>;
186*ae5de77eSEmmanuel Vadot            };
187*ae5de77eSEmmanuel Vadot
188*ae5de77eSEmmanuel Vadot            queue3 {
189*ae5de77eSEmmanuel Vadot                snps,dcb-algorithm;
190*ae5de77eSEmmanuel Vadot                snps,priority = <0x1>;
191*ae5de77eSEmmanuel Vadot            };
192*ae5de77eSEmmanuel Vadot        };
193*ae5de77eSEmmanuel Vadot
194*ae5de77eSEmmanuel Vadot        mdio {
195*ae5de77eSEmmanuel Vadot            #address-cells = <1>;
196*ae5de77eSEmmanuel Vadot            #size-cells = <0>;
197*ae5de77eSEmmanuel Vadot            compatible = "snps,dwmac-mdio";
198*ae5de77eSEmmanuel Vadot
199*ae5de77eSEmmanuel Vadot            phy0: ethernet-phy@0 {
200*ae5de77eSEmmanuel Vadot                reg = <0>;
201*ae5de77eSEmmanuel Vadot            };
202*ae5de77eSEmmanuel Vadot        };
203*ae5de77eSEmmanuel Vadot    };
204