aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi
blob: 7d4c7f0de9d2e57ace4e26ea32a844bbe7c11943 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

#include "cn71xx.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

/ {
	compatible = "ubnt,edgerouter-e300", "cavium,cn7130";
	model = "Ubiquiti EdgeRouter E300 series";

	aliases {
		/* White + Blinking Blue */
		led-boot = &led_power_white;
		/* Blue + Blinking White */
		led-failsafe = &led_power_blue;
		/* Constant Blue */
		led-running = &led_power_blue;
		/* Blue + Blinking White */
		led-upgrade = &led_power_blue;
	};

	memory@0 {
		device_type = "memory";
		reg = <0x0 0x00000000>,
		      <0x0 0x10000000>,
		      <0x0 0x20000000>,
		      <0x0 0x30000000>;
	};

	leds {
		compatible = "gpio-leds";

		led_power_blue: power_blue {
			label = "blue:power";
			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
		};

		led_power_white: power_white {
			label = "white:power";
			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
		};
	};

	keys {
		compatible = "gpio-keys-polled";
		poll-interval = <20>;

		reset {
			label = "reset";
			linux,code = <KEY_RESTART>;
			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
			debounce-interval = <60>;
		};
	};

	sfp: sfp {
		compatible = "sff,sfp";
		i2c-bus = <&twsi0>;
		/* Pins 12, 13 and 14 gets pulled low when SFP is plugged in */
		mod-def0-gpio = <&gpio 12 GPIO_ACTIVE_LOW>;
	};
};

&uart0 {
	status = "okay";
};

&usb0 {
	status = "okay";
};

&xhci0 {
	status = "okay";
	dr_mode = "host";
};

&twsi0 {
	status = "okay";

	sfp_eeprom@50 {
		compatible = "at,24c04";
		reg = <0x50>;
	};

	sfp_eeprom@51 {
		compatible = "at,24c04";
		reg = <0x51>;
	};
};

&spi {
	status = "okay";

	flash@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "Macronix,mx25l6405d", "spi-flash";
		reg = <0>;
		spi-max-frequency = <25000000>;

		partition@0 {
			label = "boot0";
			read-only;
			reg = <0x000000 0x300000>;
		};

		partition@300000 {
			label = "dummy";
			read-only;
			reg = <0x300000 0x100000>;
		};

		eeprom: partition@400000 {
			label = "eeprom";
			read-only;
			reg = <0x400000 0x10000>;
		};
	};
};

&mmc {
	status = "okay";

	mmc-slot@0 {
		compatible = "mmc-slot";
		reg = <0>;
		non-removable;
		max-frequency = <26000000>;
		voltage-ranges = <3300 3300>;
		bus-width = <8>;
	};
};

&smi0 {
	status = "okay";

	phy4: ethernet-phy@4 {
		device_type = "ethernet-phy";
		interrupts = <17 8>;
		interrupt-parent = <&gpio>;
		compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22";
		reg = <4>;
		sfp = <&sfp>;
	};

	phy5: ethernet-phy@5 {
		device_type = "ethernet-phy";
		interrupts = <17 8>;
		interrupt-parent = <&gpio>;
		compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22";
		reg = <5>;
	};

	phy6: ethernet-phy@6 {
		device_type = "ethernet-phy";
		interrupts = <17 8>;
		interrupt-parent = <&gpio>;
		compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22";
		reg = <6>;
	};

	phy7: ethernet-phy@7 {
		device_type = "ethernet-phy";
		interrupts = <17 8>;
		interrupt-parent = <&gpio>;
		compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22";
		reg = <7>;
	};
};

&pip {
	status = "okay";

	interface@0 {
		status = "okay";

		ethernet@1 {
			label = "lan0";
			status = "okay";
			phy-mode = "sgmii";
			phy-handle = <&phy5>;
			mtd-mac-address = <&eeprom 0>;
			mtd-mac-address-increment = <(1)>;
		};

		ethernet@2 {
			label = "lan1";
			status = "okay";
			phy-mode = "sgmii";
			phy-handle = <&phy6>;
			mtd-mac-address = <&eeprom 0>;
			mtd-mac-address-increment = <(2)>;
		};

		ethernet@3 {
			label = "lan2";
			status = "okay";
			phy-mode = "sgmii";
			phy-handle = <&phy7>;
			mtd-mac-address = <&eeprom 0>;
			mtd-mac-address-increment = <(3)>;
		};
	};
};