0de66af84ca0454a41523359d0716c4de637bf8a
[openwrt/openwrt.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 compatible = "denx,uimage";
54 label = "firmware";
55 reg = <0x50000 0x7b0000>;
56 };
57 };
58 };
59
60 gpio-leds {
61 compatible = "gpio-leds";
62
63 usb {
64 label = "w502u:blue:usb";
65 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
66 trigger-sources = <&otg_port1>;
67 linux,default-trigger = "usbport";
68 };
69
70 led_wps: wps {
71 label = "w502u:blue:wps";
72 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
73 };
74 };
75
76 gpio-keys-polled {
77 compatible = "gpio-keys-polled";
78 poll-interval = <20>;
79
80 reset {
81 label = "reset";
82 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
83 linux,code = <KEY_RESTART>;
84 };
85
86 wps {
87 label = "wps";
88 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
89 linux,code = <KEY_WPS_BUTTON>;
90 };
91 };
92 };
93
94 &pinctrl {
95 state_default: pinctrl0 {
96 gpio {
97 ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
98 ralink,function = "gpio";
99 };
100 };
101 };
102
103 &ethernet {
104 mtd-mac-address = <&factory 0x28>;
105 };
106
107 &esw {
108 mediatek,portmap = <0x3e>;
109 };
110
111 &wmac {
112 ralink,mtd-eeprom = <&factory 0>;
113 };
114
115 &otg {
116 status = "okay";
117 };