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