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