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