ramips/mt76x8: Name DTS files based on scheme
[oweals/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-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                                 compatible = "wrg";
44                                 label = "firmware";
45                                 reg = <0x40000 0x3a0000>;
46                         };
47                 };
48         };
49
50         rtl8366s {
51                 compatible = "realtek,rtl8366s";
52                 gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
53                 gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
54         };
55
56         keys {
57                 compatible = "gpio-keys-polled";
58                 poll-interval = <100>;
59
60                 reset {
61                         label = "reset";
62                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
63                         linux,code = <KEY_RESTART>;
64                 };
65
66                 wps {
67                         label = "wps";
68                         gpios = <&gpio2 16 GPIO_ACTIVE_LOW>;
69                         linux,code = <KEY_WPS_BUTTON>;
70                 };
71
72                 ap {
73                         label = "ap";
74                         gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
75                         linux,code = <BTN_0>;
76                         linux,input-type = <EV_SW>;
77                 };
78
79                 bridge {
80                         label = "bridge";
81                         gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
82                         linux,code = <BTN_1>;
83                         linux,input-type = <EV_SW>;
84                 };
85         };
86
87         leds {
88                 compatible = "gpio-leds";
89
90                 wps {
91                         label = "dap-1522-a1:blue:wps";
92                         gpios = <&gpio2 17 GPIO_ACTIVE_LOW>;
93                 };
94
95                 ap {
96                         label = "dap-1522-a1:blue:ap";
97                         gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
98                 };
99
100                 sta {
101                         label = "dap-1522-a1:red:sta";
102                         gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
103                 };
104
105                 led_status: status {
106                         label = "dap-1522-a1:blue:status";
107                         gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
108                 };
109         };
110 };
111
112 &gpio0 {
113         status = "okay";
114 };
115
116 &gpio2 {
117         status = "okay";
118 };
119
120 &pinctrl {
121         state_default: pinctrl0 {
122                 gpio {
123                         ralink,group = "i2c", "uartlite", "pci";
124                         ralink,function = "gpio";
125                 };
126         };
127 };
128
129 &ethernet {
130         status = "okay";
131         mtd-mac-address = <&factory 0x2004>;
132
133         port@0 {
134                 mediatek,fixed-link = <1000 1 1 1>;
135         };
136
137         mdio-bus {
138                 status = "okay";
139
140                 phy0: ethernet-phy@0 {
141                         phy-mode = "mii";
142                         reg = <0>;
143                 };
144         };
145 };
146
147 &wmac {
148         ralink,mtd-eeprom = <&factory 0x2000>;
149 };