ramips: add support for ALFA Network Quad-E4G
[oweals/openwrt.git] / target / linux / ramips / dts / rt3052_netgear_wnce2001.dts
1 /dts-v1/;
2
3 #include "rt3050.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "netgear,wnce2001", "ralink,rt3052-soc";
10         model = "Netgear WNCE2001";
11
12         aliases {
13                 led-boot = &led_power_green;
14                 led-failsafe = &led_power_green;
15                 led-running = &led_power_green;
16                 led-upgrade = &led_power_green;
17         };
18
19         chosen {
20                 bootargs = "console=ttyS0,115200";
21         };
22
23         leds {
24                 compatible = "gpio-leds";
25
26                 led_power_green: power-green {
27                         label = "wnce2001:green:power";
28                         gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
29                 };
30
31                 power-red {
32                         label = "wnce2001:red:power";
33                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
34                 };
35
36                 wlan-green {
37                         label = "wnce2001:green:wlan";
38                         gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
39                 };
40
41                 wlan-red {
42                         label = "wnce2001:red:wlan";
43                         gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
44                 };
45         };
46
47         keys {
48                 compatible = "gpio-keys-polled";
49                 poll-interval = <20>;
50
51                 reset {
52                         label = "reset";
53                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
54                         linux,code = <KEY_RESTART>;
55                 };
56
57                 wps {
58                         label = "wps";
59                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
60                         linux,code = <KEY_WPS_BUTTON>;
61                 };
62
63                 rt {
64                         label = "rt";
65                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
66                         linux,code = <BTN_0>;
67                 };
68
69                 ap {
70                         label = "ap";
71                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
72                         linux,code = <BTN_1>;
73                 };
74         };
75 };
76
77 &spi0 {
78         status = "okay";
79
80         m25p80@0 {
81                 compatible = "jedec,spi-nor";
82                 reg = <0>;
83                 spi-max-frequency = <10000000>;
84
85                 partitions {
86                         compatible = "fixed-partitions";
87                         #address-cells = <1>;
88                         #size-cells = <1>;
89
90                         partition@0 {
91                                 label = "u-boot";
92                                 reg = <0x0 0x30000>;
93                                 read-only;
94                         };
95
96                         factory: partition@30000 {
97                                 label = "factory";
98                                 reg = <0x30000 0x10000>;
99                                 read-only;
100                         };
101
102                         partition@40000 {
103                                 label = "config";
104                                 reg = <0x40000 0x20000>;
105                                 read-only;
106                         };
107
108                         partition@60000 {
109                                 label = "language";
110                                 reg = <0x60000 0x30000>;
111                                 read-only;
112                         };
113
114                         partition@90000 {
115                                 label = "pot";
116                                 reg = <0x90000 0x10000>;
117                                 read-only;
118                         };
119
120                         partition@a0000 {
121                                 label = "checksum";
122                                 reg = <0xa0000 0x10000>;
123                         };
124
125                         partition@b0000 {
126                                 compatible = "denx,uimage";
127                                 label = "firmware";
128                                 reg = <0xb0000 0x350000>;
129                         };
130                 };
131         };
132 };
133
134 &pinctrl {
135         state_default: pinctrl0 {
136                 gpio {
137                         ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
138                         ralink,function = "gpio";
139                 };
140         };
141 };
142
143 &ethernet {
144         mtd-mac-address = <&factory 0x28>;
145 };
146
147 &wmac {
148         ralink,mtd-eeprom = <&factory 0>;
149 };