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