1/dts-v1/;
2
3#include "rt3050.dtsi"
4
5/ {
6	compatible = "FONERA20N", "ralink,rt3052-soc";
7	model = "La Fonera 2.0N";
8
9	cfi@1f000000 {
10		compatible = "cfi-flash";
11		reg = <0x1f000000 0x800000>;
12		bank-width = <2>;
13		device-width = <2>;
14		#address-cells = <1>;
15		#size-cells = <1>;
16
17		partition@0 {
18			label = "u-boot";
19			reg = <0x0 0x30000>;
20			read-only;
21		};
22
23		partition@30000 {
24			label = "u-boot-env";
25			reg = <0x30000 0x10000>;
26			read-only;
27		};
28
29		factory: partition@40000 {
30			label = "factory";
31			reg = <0x40000 0x10000>;
32			read-only;
33		};
34
35		partition@50000 {
36			label = "firmware";
37			reg = <0x50000 0x7b0000>;
38		};
39	};
40
41	gpio-leds {
42		compatible = "gpio-leds";
43
44		wifi {
45			label = "fonera20n:orange:wifi";
46			gpios = <&gpio0 7 1>;
47		};
48
49		power {
50			label = "fonera20n:green:power";
51			gpios = <&gpio0 9 1>;
52		};
53
54		usb {
55			label = "fonera20n:orange:usb";
56			gpios = <&gpio0 14 1>;
57		};
58	};
59
60	gpio-keys-polled {
61		compatible = "gpio-keys-polled";
62		#address-cells = <1>;
63		#size-cells = <0>;
64		poll-interval = <20>;
65
66		reset {
67			label = "reset";
68			gpios = <&gpio0 12 1>;
69			linux,code = <0x198>;
70		};
71
72		switch {
73			label = "switch";
74			gpios = <&gpio0 13 1>;
75			linux,code = <0xf7>;
76			linux,input-type = <5>; /* EV_SW */
77		};
78	};
79};
80
81&pinctrl {
82	state_default: pinctrl0 {
83		gpio {
84			ralink,group = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf";
85			ralink,function = "gpio";
86		};
87	};
88};
89
90&ethernet {
91	mtd-mac-address = <&factory 0x28>;
92};
93
94&esw {
95	mediatek,portmap = <0x2f>;
96
97	port@0 {
98		compatible = "swconfig,port";
99		swconfig,segment = "lan";
100		swconfig,portmap = <0 4>;
101	};
102
103	port@1 {
104		compatible = "swconfig,port";
105		swconfig,segment = "lan";
106		swconfig,portmap = <1 3>;
107	};
108
109	port@2 {
110		compatible = "swconfig,port";
111		swconfig,segment = "lan";
112		swconfig,portmap = <2 2>;
113	};
114
115	port@3 {
116		compatible = "swconfig,port";
117		swconfig,segment = "lan";
118		swconfig,portmap = <3 1>;
119	};
120
121	port@4 {
122		compatible = "swconfig,port";
123		swconfig,segment = "wan";
124		swconfig,portmap = <4 0>;
125	};
126};
127
128&wmac {
129	ralink,mtd-eeprom = <&factory 0>;
130};
131
132&otg {
133	status = "okay";
134};
135