11efb5bbfb49aa9c16bdc133ead2de7aa63f0147
[openwrt/openwrt.git] / target / linux / ramips / dts / DAP-1522-A1.dts
1 /dts-v1/;
2
3 #include "rt2880.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "dlink,dap-1522-a1", "ralink,rt2880-soc";
10 model = "D-Link DAP-1522 A1";
11
12 aliases {
13 led-status = &led_status;
14 };
15
16 cfi@bc400000 {
17 compatible = "cfi-flash";
18 reg = <0xbc400000 0x800000>;
19 bank-width = <2>;
20 device-width = <2>;
21
22 partitions {
23 compatible = "fixed-partitions";
24 #address-cells = <1>;
25 #size-cells = <1>;
26
27 partition@0 {
28 label = "uboot";
29 reg = <0x0 0x30000>;
30 read-only;
31 };
32
33 factory: partition@30000 {
34 label = "factory";
35 reg = <0x30000 0x10000>;
36 read-only;
37 };
38
39 partition@40000 {
40 label = "firmware";
41 reg = <0x40000 0x3a0000>;
42 };
43 };
44 };
45
46 rtl8366s {
47 compatible = "realtek,rtl8366s";
48 gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
49 gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
50 };
51
52 gpio-keys-polled {
53 compatible = "gpio-keys-polled";
54 poll-interval = <100>;
55
56 reset {
57 label = "reset";
58 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_RESTART>;
60 };
61
62 wps {
63 label = "wps";
64 gpios = <&gpio2 16 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_WPS_BUTTON>;
66 };
67
68 ap {
69 label = "ap";
70 gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
71 linux,code = <BTN_0>;
72 linux,input-type = <EV_SW>;
73 };
74
75 bridge {
76 label = "bridge";
77 gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
78 linux,code = <BTN_1>;
79 linux,input-type = <EV_SW>;
80 };
81 };
82
83 gpio-leds {
84 compatible = "gpio-leds";
85
86 wps {
87 label = "dap-1522-a1:blue:wps";
88 gpios = <&gpio2 17 GPIO_ACTIVE_LOW>;
89 };
90
91 ap {
92 label = "dap-1522-a1:blue:ap";
93 gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
94 };
95
96 sta {
97 label = "dap-1522-a1:red:sta";
98 gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
99 };
100
101 led_status: status {
102 label = "dap-1522-a1:blue:status";
103 gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
104 };
105 };
106 };
107
108 &gpio0 {
109 status = "okay";
110 };
111
112 &gpio2 {
113 status = "okay";
114 };
115
116 &pinctrl {
117 state_default: pinctrl0 {
118 gpio {
119 ralink,group = "i2c", "uartlite", "pci";
120 ralink,function = "gpio";
121 };
122 };
123 };
124
125 &ethernet {
126 status = "okay";
127 mtd-mac-address = <&factory 0x2004>;
128
129 port@0 {
130 mediatek,fixed-link = <1000 1 1 1>;
131 };
132
133 mdio-bus {
134 status = "okay";
135
136 phy0: ethernet-phy@0 {
137 phy-mode = "mii";
138 reg = <0>;
139 };
140 };
141 };
142
143 &wmac {
144 ralink,mtd-eeprom = <&factory 0x2000>;
145 };