octeon: ubnt-edgerouter-e300: fix missing MTD partition
[openwrt/staging/stintel.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 17 GPIO_ACTIVE_HIGH>;
37 };
38
39 led_power_white: power_white {
40 label = "white:power";
41 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
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 partitions {
103 compatible = "fixed-partitions";
104 #address-cells = <1>;
105 #size-cells = <1>;
106
107 partition@0 {
108 label = "boot0";
109 read-only;
110 reg = <0x000000 0x300000>;
111 };
112
113 partition@300000 {
114 label = "dummy";
115 read-only;
116 reg = <0x300000 0x100000>;
117 };
118
119 eeprom: partition@400000 {
120 label = "eeprom";
121 read-only;
122 reg = <0x400000 0x10000>;
123 };
124 };
125 };
126 };
127
128 &mmc {
129 status = "okay";
130
131 mmc-slot@0 {
132 compatible = "mmc-slot";
133 reg = <0>;
134 non-removable;
135 max-frequency = <26000000>;
136 voltage-ranges = <3300 3300>;
137 bus-width = <8>;
138 };
139 };
140
141 &smi0 {
142 status = "okay";
143
144 phy4: ethernet-phy@4 {
145 device_type = "ethernet-phy";
146 interrupts = <17 8>;
147 interrupt-parent = <&gpio>;
148 compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22";
149 reg = <4>;
150 sfp = <&sfp>;
151 };
152
153 phy5: ethernet-phy@5 {
154 device_type = "ethernet-phy";
155 interrupts = <17 8>;
156 interrupt-parent = <&gpio>;
157 compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22";
158 reg = <5>;
159 };
160
161 phy6: ethernet-phy@6 {
162 device_type = "ethernet-phy";
163 interrupts = <17 8>;
164 interrupt-parent = <&gpio>;
165 compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22";
166 reg = <6>;
167 };
168
169 phy7: ethernet-phy@7 {
170 device_type = "ethernet-phy";
171 interrupts = <17 8>;
172 interrupt-parent = <&gpio>;
173 compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22";
174 reg = <7>;
175 };
176 };
177
178 &pip {
179 status = "okay";
180
181 interface@0 {
182 status = "okay";
183
184 ethernet@1 {
185 label = "lan0";
186 status = "okay";
187 phy-mode = "sgmii";
188 phy-handle = <&phy5>;
189 nvmem-cells = <&macaddr_eeprom_0>;
190 nvmem-cell-names = "mac-address";
191 mac-address-increment = <(1)>;
192 };
193
194 ethernet@2 {
195 label = "lan1";
196 status = "okay";
197 phy-mode = "sgmii";
198 phy-handle = <&phy6>;
199 nvmem-cells = <&macaddr_eeprom_0>;
200 nvmem-cell-names = "mac-address";
201 mac-address-increment = <(2)>;
202 };
203
204 ethernet@3 {
205 label = "lan2";
206 status = "okay";
207 phy-mode = "sgmii";
208 phy-handle = <&phy7>;
209 nvmem-cells = <&macaddr_eeprom_0>;
210 nvmem-cell-names = "mac-address";
211 mac-address-increment = <(3)>;
212 };
213 };
214 };
215
216 &eeprom {
217 compatible = "nvmem-cells";
218 #address-cells = <1>;
219 #size-cells = <1>;
220
221 macaddr_eeprom_0: macaddr@0 {
222 reg = <0x0 0x6>;
223 };
224 };