vr9_tplink_vr200.dtsi 3.63 KB
Newer Older
1
2
3
4
5
6
7
#include "vr9.dtsi"

#include <dt-bindings/input/input.h>
#include <dt-bindings/mips/lantiq_rcu_gphy.h>

/ {
	memory@0 {
8
		device_type = "memory";
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
		reg = <0x0 0x7f00000>;
	};

	usb_vbus: regulator-usb-vbus {
		compatible = "regulator-fixed";

		regulator-name = "USB_VBUS";

		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;

		gpio = <&gpio 33 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};
};

&eth0 {
26
27
28
	pinctrl-0 = <&mdio_pins>, <&gphy0_led1_pins>, <&gphy1_led1_pins>;
	pinctrl-names = "default";

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
	lan: interface@0 {
		compatible = "lantiq,xrx200-pdi";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0>;
		mtd-mac-address = <&romfile 0xf100>;
		lantiq,switch;

		ethernet@0 {
			compatible = "lantiq,xrx200-pdi-port";
			reg = <0>;
			phy-mode = "rgmii";
			phy-handle = <&phy0>;
			// gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
		};
		ethernet@5 {
			compatible = "lantiq,xrx200-pdi-port";
			reg = <5>;
			phy-mode = "rgmii";
			phy-handle = <&phy5>;
		};
		ethernet@2 {
			compatible = "lantiq,xrx200-pdi-port";
			reg = <2>;
			phy-mode = "gmii";
			phy-handle = <&phy11>;
		};
		ethernet@3 {
			compatible = "lantiq,xrx200-pdi-port";
			reg = <4>;
			phy-mode = "gmii";
			phy-handle = <&phy13>;
		};
	};

64
	mdio {
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
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "lantiq,xrx200-mdio";

		phy0: ethernet-phy@0 {
			reg = <0x0>;
			compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
		};
		phy5: ethernet-phy@5 {
			reg = <0x5>;
			compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
		};
		phy11: ethernet-phy@11 {
			reg = <0x11>;
			compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
		};
		phy13: ethernet-phy@13 {
			reg = <0x13>;
			compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
		};
	};
};

&gphy0 {
	lantiq,gphy-mode = <GPHY_MODE_GE>;
};

&gphy1 {
	lantiq,gphy-mode = <GPHY_MODE_GE>;
};

&gpio {
	pinctrl-names = "default";
	pinctrl-0 = <&state_default>;

	state_default: pinmux {
		phy-rst {
			lantiq,pins = "io42";
			lantiq,pull = <0>;
			lantiq,open-drain = <0>;
			lantiq,output = <1>;
		};
		pcie-rst {
			lantiq,pins = "io38";
			lantiq,pull = <0>;
			lantiq,output = <1>;
		};
	};
};

115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
&pcie0 {
	pcie@0 {
		reg = <0 0 0 0 0>;
		#interrupt-cells = <1>;
		#size-cells = <2>;
		#address-cells = <3>;
		device_type = "pci";

		wifi@0,0 {
			reg = <0 0 0 0 0>;
			mediatek,mtd-eeprom = <&radio 0x0000>;
			big-endian;
			ieee80211-freq-limit = <5000000 6000000>;
			mtd-mac-address = <&romfile 0xf100>;
			mtd-mac-address-increment = <2>;
		};
	};
};

134
135
136
137
138
139
140
141
&pci0 {
	status = "okay";
	gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
};

&spi {
	status = "okay";

142
	flash@4 {
143
		compatible = "jedec,spi-nor";
Mathias Kresin's avatar
Mathias Kresin committed
144
		reg = <4>;
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
		spi-max-frequency = <33250000>;
		m25p,fast-read;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				reg = <0x0 0x20000>;
				label = "u-boot";
				read-only;
			};

			partition@20000 {
				reg = <0x20000 0xf90000>;
				label = "firmware";
			};

			partition@fb0000 {
				reg = <0xfb0000 0x10000>;
				label = "radioDECT";
				read-only;
			};

			partition@fc0000 {
				reg = <0xfc0000 0x10000>;
				label = "config";
				read-only;
			};

			romfile: partition@fd0000 {
				reg = <0xfd0000 0x10000>;
				label = "romfile";
				read-only;
			};

			partition@fe0000 {
				reg = <0xfe0000 0x10000>;
				label = "rom";
				read-only;
			};

188
			radio: partition@ff0000 {
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
				reg = <0xff0000 0x10000>;
				label = "radio";
				read-only;
			};
		};
	};
};

&usb_phy0 {
	status = "okay";
};

&usb_phy1 {
	status = "okay";
};

&usb0 {
	status = "okay";
	vbus-supply = <&usb_vbus>;
};

&usb1 {
	status = "okay";
	vbus-supply = <&usb_vbus>;
};