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