octeon: create shared DTSI for Ubiquiti E300 platform
[openwrt/staging/nbd.git] / target / linux / octeon / files / arch / mips / boot / dts / cavium-octeon / cn7130_ubnt_edgerouter-e300.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "cn71xx.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "ubnt,edgerouter-e300", "cavium,cn7130";
10 model = "Ubiquiti EdgeRouter E300 series";
11
12 aliases {
13 /* White + Blinking Blue */
14 led-boot = &led_power_white;
15 /* Blue + Blinking White */
16 led-failsafe = &led_power_blue;
17 /* Constant Blue */
18 led-running = &led_power_blue;
19 /* Blue + Blinking White */
20 led-upgrade = &led_power_blue;
21 };
22
23 memory@0 {
24 device_type = "memory";
25 reg = <0x0 0x00000000>,
26 <0x0 0x10000000>,
27 <0x0 0x20000000>,
28 <0x0 0x30000000>;
29 };
30
31 leds {
32 compatible = "gpio-leds";
33
34 led_power_blue: power_blue {
35 label = "blue:power";
36 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
37 };
38
39 led_power_white: power_white {
40 label = "white:power";
41 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
42 };
43 };
44
45 keys {
46 compatible = "gpio-keys-polled";
47 poll-interval = <20>;
48
49 reset {
50 label = "reset";
51 linux,code = <KEY_RESTART>;
52 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
53 debounce-interval = <60>;
54 };
55 };
56
57 sfp: sfp {
58 compatible = "sff,sfp";
59 i2c-bus = <&twsi0>;
60 /* Pins 12, 13 and 14 gets pulled low when SFP is plugged in */
61 mod-def0-gpio = <&gpio 12 GPIO_ACTIVE_LOW>;
62 };
63 };
64
65 &uart0 {
66 status = "okay";
67 };
68
69 &usb0 {
70 status = "okay";
71 };
72
73 &xhci0 {
74 status = "okay";
75 dr_mode = "host";
76 };
77
78 &twsi0 {
79 status = "okay";
80
81 sfp_eeprom@50 {
82 compatible = "at,24c04";
83 reg = <0x50>;
84 };
85
86 sfp_eeprom@51 {
87 compatible = "at,24c04";
88 reg = <0x51>;
89 };
90 };
91
92 &spi {
93 status = "okay";
94
95 flash@0 {
96 #address-cells = <1>;
97 #size-cells = <1>;
98 compatible = "Macronix,mx25l6405d", "spi-flash";
99 reg = <0>;
100 spi-max-frequency = <25000000>;
101
102 partition@0 {
103 label = "boot0";
104 read-only;
105 reg = <0x000000 0x300000>;
106 };
107
108 partition@300000 {
109 label = "dummy";
110 read-only;
111 reg = <0x300000 0x100000>;
112 };
113
114 eeprom: partition@400000 {
115 label = "eeprom";
116 read-only;
117 reg = <0x400000 0x10000>;
118 };
119 };
120 };
121
122 &mmc {
123 status = "okay";
124
125 mmc-slot@0 {
126 compatible = "mmc-slot";
127 reg = <0>;
128 non-removable;
129 max-frequency = <26000000>;
130 voltage-ranges = <3300 3300>;
131 bus-width = <8>;
132 };
133 };
134
135 &smi0 {
136 status = "okay";
137
138 phy4: ethernet-phy@4 {
139 device_type = "ethernet-phy";
140 interrupts = <17 8>;
141 interrupt-parent = <&gpio>;
142 compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22";
143 reg = <4>;
144 sfp = <&sfp>;
145 };
146
147 phy5: ethernet-phy@5 {
148 device_type = "ethernet-phy";
149 interrupts = <17 8>;
150 interrupt-parent = <&gpio>;
151 compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22";
152 reg = <5>;
153 };
154
155 phy6: ethernet-phy@6 {
156 device_type = "ethernet-phy";
157 interrupts = <17 8>;
158 interrupt-parent = <&gpio>;
159 compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22";
160 reg = <6>;
161 };
162
163 phy7: ethernet-phy@7 {
164 device_type = "ethernet-phy";
165 interrupts = <17 8>;
166 interrupt-parent = <&gpio>;
167 compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22";
168 reg = <7>;
169 };
170 };
171
172 &pip {
173 status = "okay";
174
175 interface@0 {
176 status = "okay";
177
178 ethernet@1 {
179 label = "lan0";
180 status = "okay";
181 phy-mode = "sgmii";
182 phy-handle = <&phy5>;
183 mtd-mac-address = <&eeprom 0>;
184 mtd-mac-address-increment = <(1)>;
185 };
186
187 ethernet@2 {
188 label = "lan1";
189 status = "okay";
190 phy-mode = "sgmii";
191 phy-handle = <&phy6>;
192 mtd-mac-address = <&eeprom 0>;
193 mtd-mac-address-increment = <(2)>;
194 };
195
196 ethernet@3 {
197 label = "lan2";
198 status = "okay";
199 phy-mode = "sgmii";
200 phy-handle = <&phy7>;
201 mtd-mac-address = <&eeprom 0>;
202 mtd-mac-address-increment = <(3)>;
203 };
204 };
205 };