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