ramips: add support for Sercomm CPJ routers
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3052_alfa-network_w502u.dts
1 #include "rt3050.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "alfa-network,w502u", "ralink,rt3052-soc";
8 model = "ALFA Network W502U";
9
10 aliases {
11 led-boot = &led_wps;
12 led-failsafe = &led_wps;
13 led-running = &led_wps;
14 led-upgrade = &led_wps;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 flash@1f000000 {
22 compatible = "cfi-flash";
23 reg = <0x1f000000 0x800000>;
24 bank-width = <2>;
25 device-width = <2>;
26
27 partitions {
28 compatible = "fixed-partitions";
29 #address-cells = <1>;
30 #size-cells = <1>;
31
32 partition@0 {
33 label = "u-boot";
34 reg = <0x0 0x30000>;
35 read-only;
36 };
37
38 partition@30000 {
39 label = "u-boot-env";
40 reg = <0x30000 0x10000>;
41 read-only;
42 };
43
44 factory: partition@40000 {
45 compatible = "nvmem-cells";
46 label = "factory";
47 reg = <0x40000 0x10000>;
48 #address-cells = <1>;
49 #size-cells = <1>;
50 read-only;
51
52 eeprom_factory_0: eeprom@0 {
53 reg = <0x0 0x200>;
54 };
55
56 macaddr_factory_28: macaddr@28 {
57 reg = <0x28 0x6>;
58 };
59 };
60
61 partition@50000 {
62 compatible = "denx,uimage";
63 label = "firmware";
64 reg = <0x50000 0x7b0000>;
65 };
66 };
67 };
68
69 leds {
70 compatible = "gpio-leds";
71
72 usb {
73 label = "blue:usb";
74 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
75 trigger-sources = <&otg_port1>;
76 linux,default-trigger = "usbport";
77 };
78
79 led_wps: wps {
80 label = "blue:wps";
81 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
82 };
83 };
84
85 keys {
86 compatible = "gpio-keys-polled";
87 poll-interval = <20>;
88
89 reset {
90 label = "reset";
91 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
92 linux,code = <KEY_RESTART>;
93 };
94
95 wps {
96 label = "wps";
97 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
98 linux,code = <KEY_WPS_BUTTON>;
99 };
100 };
101 };
102
103 &state_default {
104 gpio {
105 groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
106 function = "gpio";
107 };
108 };
109
110 &ethernet {
111 nvmem-cells = <&macaddr_factory_28>;
112 nvmem-cell-names = "mac-address";
113 };
114
115 &esw {
116 mediatek,portmap = <0x3e>;
117 };
118
119 &wmac {
120 nvmem-cells = <&eeprom_factory_0>;
121 nvmem-cell-names = "eeprom";
122 };
123
124 &otg {
125 status = "okay";
126 };