xref: /freebsd/sys/contrib/device-tree/Bindings/net/dsa/renesas,rzn1-a5psw.yaml (revision b97ee269eae3cbaf35c18f51a459aea581c2a7dc)
1*b97ee269SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*b97ee269SEmmanuel Vadot%YAML 1.2
3*b97ee269SEmmanuel Vadot---
4*b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/net/dsa/renesas,rzn1-a5psw.yaml#
5*b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*b97ee269SEmmanuel Vadot
7*b97ee269SEmmanuel Vadottitle: Renesas RZ/N1 Advanced 5 ports ethernet switch
8*b97ee269SEmmanuel Vadot
9*b97ee269SEmmanuel Vadotmaintainers:
10*b97ee269SEmmanuel Vadot  - Clément Léger <clement.leger@bootlin.com>
11*b97ee269SEmmanuel Vadot
12*b97ee269SEmmanuel Vadotdescription: |
13*b97ee269SEmmanuel Vadot  The advanced 5 ports switch is present on the Renesas RZ/N1 SoC family and
14*b97ee269SEmmanuel Vadot  handles 4 ports + 1 CPU management port.
15*b97ee269SEmmanuel Vadot
16*b97ee269SEmmanuel VadotallOf:
17*b97ee269SEmmanuel Vadot  - $ref: dsa.yaml#
18*b97ee269SEmmanuel Vadot
19*b97ee269SEmmanuel Vadotproperties:
20*b97ee269SEmmanuel Vadot  compatible:
21*b97ee269SEmmanuel Vadot    items:
22*b97ee269SEmmanuel Vadot      - enum:
23*b97ee269SEmmanuel Vadot          - renesas,r9a06g032-a5psw
24*b97ee269SEmmanuel Vadot      - const: renesas,rzn1-a5psw
25*b97ee269SEmmanuel Vadot
26*b97ee269SEmmanuel Vadot  reg:
27*b97ee269SEmmanuel Vadot    maxItems: 1
28*b97ee269SEmmanuel Vadot
29*b97ee269SEmmanuel Vadot  interrupts:
30*b97ee269SEmmanuel Vadot    items:
31*b97ee269SEmmanuel Vadot      - description: Device Level Ring (DLR) interrupt
32*b97ee269SEmmanuel Vadot      - description: Switch interrupt
33*b97ee269SEmmanuel Vadot      - description: Parallel Redundancy Protocol (PRP) interrupt
34*b97ee269SEmmanuel Vadot      - description: Integrated HUB module interrupt
35*b97ee269SEmmanuel Vadot      - description: Receive Pattern Match interrupt
36*b97ee269SEmmanuel Vadot
37*b97ee269SEmmanuel Vadot  interrupt-names:
38*b97ee269SEmmanuel Vadot    items:
39*b97ee269SEmmanuel Vadot      - const: dlr
40*b97ee269SEmmanuel Vadot      - const: switch
41*b97ee269SEmmanuel Vadot      - const: prp
42*b97ee269SEmmanuel Vadot      - const: hub
43*b97ee269SEmmanuel Vadot      - const: ptrn
44*b97ee269SEmmanuel Vadot
45*b97ee269SEmmanuel Vadot  power-domains:
46*b97ee269SEmmanuel Vadot    maxItems: 1
47*b97ee269SEmmanuel Vadot
48*b97ee269SEmmanuel Vadot  mdio:
49*b97ee269SEmmanuel Vadot    $ref: /schemas/net/mdio.yaml#
50*b97ee269SEmmanuel Vadot    unevaluatedProperties: false
51*b97ee269SEmmanuel Vadot
52*b97ee269SEmmanuel Vadot  clocks:
53*b97ee269SEmmanuel Vadot    items:
54*b97ee269SEmmanuel Vadot      - description: AHB clock used for the switch register interface
55*b97ee269SEmmanuel Vadot      - description: Switch system clock
56*b97ee269SEmmanuel Vadot
57*b97ee269SEmmanuel Vadot  clock-names:
58*b97ee269SEmmanuel Vadot    items:
59*b97ee269SEmmanuel Vadot      - const: hclk
60*b97ee269SEmmanuel Vadot      - const: clk
61*b97ee269SEmmanuel Vadot
62*b97ee269SEmmanuel Vadot  ethernet-ports:
63*b97ee269SEmmanuel Vadot    type: object
64*b97ee269SEmmanuel Vadot    properties:
65*b97ee269SEmmanuel Vadot      '#address-cells':
66*b97ee269SEmmanuel Vadot        const: 1
67*b97ee269SEmmanuel Vadot      '#size-cells':
68*b97ee269SEmmanuel Vadot        const: 0
69*b97ee269SEmmanuel Vadot
70*b97ee269SEmmanuel Vadot    patternProperties:
71*b97ee269SEmmanuel Vadot      "^(ethernet-)?port@[0-4]$":
72*b97ee269SEmmanuel Vadot        type: object
73*b97ee269SEmmanuel Vadot        description: Ethernet switch ports
74*b97ee269SEmmanuel Vadot
75*b97ee269SEmmanuel Vadot        properties:
76*b97ee269SEmmanuel Vadot          pcs-handle:
77*b97ee269SEmmanuel Vadot            description:
78*b97ee269SEmmanuel Vadot              phandle pointing to a PCS sub-node compatible with
79*b97ee269SEmmanuel Vadot              renesas,rzn1-miic.yaml#
80*b97ee269SEmmanuel Vadot            $ref: /schemas/types.yaml#/definitions/phandle
81*b97ee269SEmmanuel Vadot
82*b97ee269SEmmanuel VadotunevaluatedProperties: false
83*b97ee269SEmmanuel Vadot
84*b97ee269SEmmanuel Vadotrequired:
85*b97ee269SEmmanuel Vadot  - compatible
86*b97ee269SEmmanuel Vadot  - reg
87*b97ee269SEmmanuel Vadot  - clocks
88*b97ee269SEmmanuel Vadot  - clock-names
89*b97ee269SEmmanuel Vadot  - power-domains
90*b97ee269SEmmanuel Vadot
91*b97ee269SEmmanuel Vadotexamples:
92*b97ee269SEmmanuel Vadot  - |
93*b97ee269SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
94*b97ee269SEmmanuel Vadot    #include <dt-bindings/clock/r9a06g032-sysctrl.h>
95*b97ee269SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
96*b97ee269SEmmanuel Vadot
97*b97ee269SEmmanuel Vadot    switch@44050000 {
98*b97ee269SEmmanuel Vadot        compatible = "renesas,r9a06g032-a5psw", "renesas,rzn1-a5psw";
99*b97ee269SEmmanuel Vadot        reg = <0x44050000 0x10000>;
100*b97ee269SEmmanuel Vadot        clocks = <&sysctrl R9A06G032_HCLK_SWITCH>, <&sysctrl R9A06G032_CLK_SWITCH>;
101*b97ee269SEmmanuel Vadot        clock-names = "hclk", "clk";
102*b97ee269SEmmanuel Vadot        power-domains = <&sysctrl>;
103*b97ee269SEmmanuel Vadot        interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
104*b97ee269SEmmanuel Vadot                     <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
105*b97ee269SEmmanuel Vadot                     <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>,
106*b97ee269SEmmanuel Vadot                     <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
107*b97ee269SEmmanuel Vadot                     <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
108*b97ee269SEmmanuel Vadot        interrupt-names = "dlr", "switch", "prp", "hub", "ptrn";
109*b97ee269SEmmanuel Vadot
110*b97ee269SEmmanuel Vadot        dsa,member = <0 0>;
111*b97ee269SEmmanuel Vadot
112*b97ee269SEmmanuel Vadot        ethernet-ports {
113*b97ee269SEmmanuel Vadot            #address-cells = <1>;
114*b97ee269SEmmanuel Vadot            #size-cells = <0>;
115*b97ee269SEmmanuel Vadot
116*b97ee269SEmmanuel Vadot            port@0 {
117*b97ee269SEmmanuel Vadot                reg = <0>;
118*b97ee269SEmmanuel Vadot                label = "lan0";
119*b97ee269SEmmanuel Vadot                phy-handle = <&switch0phy3>;
120*b97ee269SEmmanuel Vadot                pcs-handle = <&mii_conv4>;
121*b97ee269SEmmanuel Vadot            };
122*b97ee269SEmmanuel Vadot
123*b97ee269SEmmanuel Vadot            port@1 {
124*b97ee269SEmmanuel Vadot                reg = <1>;
125*b97ee269SEmmanuel Vadot                label = "lan1";
126*b97ee269SEmmanuel Vadot                phy-handle = <&switch0phy1>;
127*b97ee269SEmmanuel Vadot                pcs-handle = <&mii_conv3>;
128*b97ee269SEmmanuel Vadot            };
129*b97ee269SEmmanuel Vadot
130*b97ee269SEmmanuel Vadot            port@4 {
131*b97ee269SEmmanuel Vadot                reg = <4>;
132*b97ee269SEmmanuel Vadot                ethernet = <&gmac2>;
133*b97ee269SEmmanuel Vadot                label = "cpu";
134*b97ee269SEmmanuel Vadot                fixed-link {
135*b97ee269SEmmanuel Vadot                  speed = <1000>;
136*b97ee269SEmmanuel Vadot                  full-duplex;
137*b97ee269SEmmanuel Vadot                };
138*b97ee269SEmmanuel Vadot            };
139*b97ee269SEmmanuel Vadot        };
140*b97ee269SEmmanuel Vadot
141*b97ee269SEmmanuel Vadot        mdio {
142*b97ee269SEmmanuel Vadot            #address-cells = <1>;
143*b97ee269SEmmanuel Vadot            #size-cells = <0>;
144*b97ee269SEmmanuel Vadot
145*b97ee269SEmmanuel Vadot            reset-gpios = <&gpio0a 2 GPIO_ACTIVE_HIGH>;
146*b97ee269SEmmanuel Vadot            reset-delay-us = <15>;
147*b97ee269SEmmanuel Vadot            clock-frequency = <2500000>;
148*b97ee269SEmmanuel Vadot
149*b97ee269SEmmanuel Vadot            switch0phy1: ethernet-phy@1{
150*b97ee269SEmmanuel Vadot                reg = <1>;
151*b97ee269SEmmanuel Vadot            };
152*b97ee269SEmmanuel Vadot
153*b97ee269SEmmanuel Vadot            switch0phy3: ethernet-phy@3{
154*b97ee269SEmmanuel Vadot                reg = <3>;
155*b97ee269SEmmanuel Vadot            };
156*b97ee269SEmmanuel Vadot        };
157*b97ee269SEmmanuel Vadot    };
158