ramips: fix power LED DTB for wt3020
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / W502U.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 = "alfanetworks,w502u", "ralink,rt3052-soc";
10 model = "ALFA Networks W502U";
11
12 aliases {
13 led-status = &led_wps;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,115200";
18 };
19
20 cfi@1f000000 {
21 compatible = "cfi-flash";
22 reg = <0x1f000000 0x800000>;
23 bank-width = <2>;
24 device-width = <2>;
25
26 partitions {
27 compatible = "fixed-partitions";
28 #address-cells = <1>;
29 #size-cells = <1>;
30
31 partition@0 {
32 label = "u-boot";
33 reg = <0x0 0x30000>;
34 read-only;
35 };
36
37 partition@30000 {
38 label = "u-boot-env";
39 reg = <0x30000 0x10000>;
40 read-only;
41 };
42
43 factory: partition@40000 {
44 label = "factory";
45 reg = <0x40000 0x10000>;
46 read-only;
47 };
48
49 partition@50000 {
50 label = "firmware";
51 reg = <0x50000 0x7b0000>;
52 };
53 };
54 };
55
56 gpio-leds {
57 compatible = "gpio-leds";
58
59 usb {
60 label = "w502u:blue:usb";
61 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
62 };
63
64 led_wps: wps {
65 label = "w502u:blue:wps";
66 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
67 };
68 };
69
70 gpio-keys-polled {
71 compatible = "gpio-keys-polled";
72 poll-interval = <20>;
73
74 reset {
75 label = "reset";
76 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
77 linux,code = <KEY_RESTART>;
78 };
79
80 wps {
81 label = "wps";
82 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
83 linux,code = <KEY_WPS_BUTTON>;
84 };
85 };
86 };
87
88 &pinctrl {
89 state_default: pinctrl0 {
90 gpio {
91 ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
92 ralink,function = "gpio";
93 };
94 };
95 };
96
97 &ethernet {
98 mtd-mac-address = <&factory 0x28>;
99 };
100
101 &esw {
102 mediatek,portmap = <0x3e>;
103 };
104
105 &wmac {
106 ralink,mtd-eeprom = <&factory 0>;
107 };
108
109 &otg {
110 status = "okay";
111 };