xref: /freebsd-src/sys/contrib/device-tree/Bindings/net/cortina,gemini-ethernet.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
1c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2c9ccf3a3SEmmanuel Vadot%YAML 1.2
3c9ccf3a3SEmmanuel Vadot---
4c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/net/cortina,gemini-ethernet.yaml#
5c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c9ccf3a3SEmmanuel Vadot
7c9ccf3a3SEmmanuel Vadottitle: Cortina Systems Gemini Ethernet Controller
8c9ccf3a3SEmmanuel Vadot
9c9ccf3a3SEmmanuel Vadotmaintainers:
10c9ccf3a3SEmmanuel Vadot  - Linus Walleij <linus.walleij@linaro.org>
11c9ccf3a3SEmmanuel Vadot
12c9ccf3a3SEmmanuel Vadotdescription: |
13c9ccf3a3SEmmanuel Vadot  This ethernet controller is found in the Gemini SoC family:
14c9ccf3a3SEmmanuel Vadot  StorLink SL3512 and SL3516, also known as Cortina Systems
15c9ccf3a3SEmmanuel Vadot  CS3512 and CS3516.
16c9ccf3a3SEmmanuel Vadot
17c9ccf3a3SEmmanuel Vadotproperties:
18c9ccf3a3SEmmanuel Vadot  compatible:
19c9ccf3a3SEmmanuel Vadot    const: cortina,gemini-ethernet
20c9ccf3a3SEmmanuel Vadot
21c9ccf3a3SEmmanuel Vadot  reg:
22c9ccf3a3SEmmanuel Vadot    minItems: 3
23c9ccf3a3SEmmanuel Vadot    description: must contain the global registers and the V-bit and A-bit
24c9ccf3a3SEmmanuel Vadot      memory areas, in total three register sets.
25c9ccf3a3SEmmanuel Vadot
26c9ccf3a3SEmmanuel Vadot  "#address-cells":
27c9ccf3a3SEmmanuel Vadot    const: 1
28c9ccf3a3SEmmanuel Vadot
29c9ccf3a3SEmmanuel Vadot  "#size-cells":
30c9ccf3a3SEmmanuel Vadot    const: 1
31c9ccf3a3SEmmanuel Vadot
32c9ccf3a3SEmmanuel Vadot  ranges: true
33c9ccf3a3SEmmanuel Vadot
34c9ccf3a3SEmmanuel Vadot# The subnodes represents the two ethernet ports in this device.
35c9ccf3a3SEmmanuel Vadot# They are not independent of each other since they share resources
36c9ccf3a3SEmmanuel Vadot# in the parent node, and are thus children.
37c9ccf3a3SEmmanuel VadotpatternProperties:
38c9ccf3a3SEmmanuel Vadot  "^ethernet-port@[0-9]+$":
39c9ccf3a3SEmmanuel Vadot    type: object
40*7ef62cebSEmmanuel Vadot    unevaluatedProperties: false
41c9ccf3a3SEmmanuel Vadot    description: contains the resources for ethernet port
42c9ccf3a3SEmmanuel Vadot    allOf:
43c9ccf3a3SEmmanuel Vadot      - $ref: ethernet-controller.yaml#
44c9ccf3a3SEmmanuel Vadot    properties:
45c9ccf3a3SEmmanuel Vadot      compatible:
46c9ccf3a3SEmmanuel Vadot        const: cortina,gemini-ethernet-port
47c9ccf3a3SEmmanuel Vadot
48c9ccf3a3SEmmanuel Vadot      reg:
49c9ccf3a3SEmmanuel Vadot        items:
50c9ccf3a3SEmmanuel Vadot          - description: DMA/TOE memory
51c9ccf3a3SEmmanuel Vadot          - description: GMAC memory area of the port
52c9ccf3a3SEmmanuel Vadot
53c9ccf3a3SEmmanuel Vadot      interrupts:
54c9ccf3a3SEmmanuel Vadot        maxItems: 1
55c9ccf3a3SEmmanuel Vadot        description: should contain the interrupt line of the port.
56c9ccf3a3SEmmanuel Vadot                     this is nominally a level interrupt active high.
57c9ccf3a3SEmmanuel Vadot
58c9ccf3a3SEmmanuel Vadot      resets:
59c9ccf3a3SEmmanuel Vadot        maxItems: 1
60c9ccf3a3SEmmanuel Vadot        description: this must provide an SoC-integrated reset line for the port.
61c9ccf3a3SEmmanuel Vadot
62c9ccf3a3SEmmanuel Vadot      clocks:
63c9ccf3a3SEmmanuel Vadot        maxItems: 1
64c9ccf3a3SEmmanuel Vadot        description: this should contain a handle to the PCLK clock for
65c9ccf3a3SEmmanuel Vadot                     clocking the silicon in this port
66c9ccf3a3SEmmanuel Vadot
67c9ccf3a3SEmmanuel Vadot      clock-names:
68c9ccf3a3SEmmanuel Vadot        const: PCLK
69c9ccf3a3SEmmanuel Vadot
70c9ccf3a3SEmmanuel Vadot    required:
71c9ccf3a3SEmmanuel Vadot      - reg
72c9ccf3a3SEmmanuel Vadot      - compatible
73c9ccf3a3SEmmanuel Vadot      - interrupts
74c9ccf3a3SEmmanuel Vadot      - resets
75c9ccf3a3SEmmanuel Vadot      - clocks
76c9ccf3a3SEmmanuel Vadot      - clock-names
77c9ccf3a3SEmmanuel Vadot
78c9ccf3a3SEmmanuel Vadotrequired:
79c9ccf3a3SEmmanuel Vadot  - compatible
80c9ccf3a3SEmmanuel Vadot  - reg
81c9ccf3a3SEmmanuel Vadot  - ranges
82c9ccf3a3SEmmanuel Vadot
83c9ccf3a3SEmmanuel VadotadditionalProperties: false
84c9ccf3a3SEmmanuel Vadot
85c9ccf3a3SEmmanuel Vadotexamples:
86c9ccf3a3SEmmanuel Vadot  - |
87c9ccf3a3SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
88c9ccf3a3SEmmanuel Vadot    #include <dt-bindings/clock/cortina,gemini-clock.h>
89c9ccf3a3SEmmanuel Vadot    #include <dt-bindings/reset/cortina,gemini-reset.h>
90c9ccf3a3SEmmanuel Vadot    mdio0: mdio {
91c9ccf3a3SEmmanuel Vadot      #address-cells = <1>;
92c9ccf3a3SEmmanuel Vadot      #size-cells = <0>;
93c9ccf3a3SEmmanuel Vadot      phy0: ethernet-phy@1 {
94c9ccf3a3SEmmanuel Vadot        reg = <1>;
95c9ccf3a3SEmmanuel Vadot        device_type = "ethernet-phy";
96c9ccf3a3SEmmanuel Vadot      };
97c9ccf3a3SEmmanuel Vadot      phy1: ethernet-phy@3 {
98c9ccf3a3SEmmanuel Vadot        reg = <3>;
99c9ccf3a3SEmmanuel Vadot        device_type = "ethernet-phy";
100c9ccf3a3SEmmanuel Vadot      };
101c9ccf3a3SEmmanuel Vadot    };
102c9ccf3a3SEmmanuel Vadot
103c9ccf3a3SEmmanuel Vadot
104c9ccf3a3SEmmanuel Vadot    ethernet@60000000 {
105c9ccf3a3SEmmanuel Vadot        compatible = "cortina,gemini-ethernet";
106c9ccf3a3SEmmanuel Vadot        reg = <0x60000000 0x4000>, /* Global registers, queue */
107c9ccf3a3SEmmanuel Vadot              <0x60004000 0x2000>, /* V-bit */
108c9ccf3a3SEmmanuel Vadot              <0x60006000 0x2000>; /* A-bit */
109c9ccf3a3SEmmanuel Vadot        #address-cells = <1>;
110c9ccf3a3SEmmanuel Vadot        #size-cells = <1>;
111c9ccf3a3SEmmanuel Vadot        ranges;
112c9ccf3a3SEmmanuel Vadot
113c9ccf3a3SEmmanuel Vadot        gmac0: ethernet-port@0 {
114c9ccf3a3SEmmanuel Vadot                compatible = "cortina,gemini-ethernet-port";
115c9ccf3a3SEmmanuel Vadot                reg = <0x60008000 0x2000>, /* Port 0 DMA/TOE */
116c9ccf3a3SEmmanuel Vadot                      <0x6000a000 0x2000>; /* Port 0 GMAC */
117c9ccf3a3SEmmanuel Vadot                interrupt-parent = <&intcon>;
118c9ccf3a3SEmmanuel Vadot                interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
119c9ccf3a3SEmmanuel Vadot                resets = <&syscon GEMINI_RESET_GMAC0>;
120c9ccf3a3SEmmanuel Vadot                clocks = <&syscon GEMINI_CLK_GATE_GMAC0>;
121c9ccf3a3SEmmanuel Vadot                clock-names = "PCLK";
122c9ccf3a3SEmmanuel Vadot                phy-mode = "rgmii";
123c9ccf3a3SEmmanuel Vadot                phy-handle = <&phy0>;
124c9ccf3a3SEmmanuel Vadot        };
125c9ccf3a3SEmmanuel Vadot
126c9ccf3a3SEmmanuel Vadot        gmac1: ethernet-port@1 {
127c9ccf3a3SEmmanuel Vadot                compatible = "cortina,gemini-ethernet-port";
128c9ccf3a3SEmmanuel Vadot                reg = <0x6000c000 0x2000>, /* Port 1 DMA/TOE */
129c9ccf3a3SEmmanuel Vadot                      <0x6000e000 0x2000>; /* Port 1 GMAC */
130c9ccf3a3SEmmanuel Vadot                interrupt-parent = <&intcon>;
131c9ccf3a3SEmmanuel Vadot                interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
132c9ccf3a3SEmmanuel Vadot                resets = <&syscon GEMINI_RESET_GMAC1>;
133c9ccf3a3SEmmanuel Vadot                clocks = <&syscon GEMINI_CLK_GATE_GMAC1>;
134c9ccf3a3SEmmanuel Vadot                clock-names = "PCLK";
135c9ccf3a3SEmmanuel Vadot                phy-mode = "rgmii";
136c9ccf3a3SEmmanuel Vadot                phy-handle = <&phy1>;
137c9ccf3a3SEmmanuel Vadot        };
138c9ccf3a3SEmmanuel Vadot    };
139