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