fa5f740e176b47313a7b1e69c915e78306d7813f
[oweals/openwrt.git] / target / linux / ramips / dts / rt3052_accton_wr6202.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 = "accton,wr6202", "ralink,rt3052-soc";
10         model = "Accton WR6202";
11
12         chosen {
13                 bootargs = "console=ttyS0,115200";
14         };
15
16         leds {
17                 compatible = "gpio-leds";
18
19                 wps {
20                         label = "wr6202:blue:wps";
21                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
22                 };
23
24                 3g {
25                         label = "wr6202:blue:3g";
26                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
27                 };
28         };
29
30         keys {
31                 compatible = "gpio-keys-polled";
32                 poll-interval = <20>;
33
34                 reset {
35                         label = "reset";
36                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
37                         linux,code = <KEY_RESTART>;
38                 };
39
40                 wps {
41                         label = "wps";
42                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
43                         linux,code = <KEY_WPS_BUTTON>;
44                 };
45         };
46
47         cfi@1f000000 {
48                 compatible = "cfi-flash";
49                 reg = <0x1f000000 0x800000>;
50                 bank-width = <2>;
51                 device-width = <2>;
52
53                 partitions {
54                         compatible = "fixed-partitions";
55                         #address-cells = <1>;
56                         #size-cells = <1>;
57
58                         partition@0 {
59                                 label = "u-boot";
60                                 reg = <0x0 0x30000>;
61                                 read-only;
62                         };
63
64                         partition@30000 {
65                                 label = "u-boot-env";
66                                 reg = <0x30000 0x10000>;
67                                 read-only;
68                         };
69
70                         factory: partition@40000 {
71                                 label = "factory";
72                                 reg = <0x40000 0x10000>;
73                                 read-only;
74                         };
75
76                         partition@50000 {
77                                 compatible = "denx,uimage";
78                                 label = "firmware";
79                                 reg = <0x50000 0x7b0000>;
80                         };
81                 };
82         };
83
84         gpio_export {
85                 compatible = "gpio-export";
86                 #size-cells = <0>;
87
88                 usb {
89                         gpio-export,name = "usb";
90                         gpio-export,output = <0>;
91                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
92                 };
93         };
94 };
95
96 &state_default {
97         gpio {
98                 groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
99                 function = "gpio";
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 };