rockchip: add Radxa CM3 IO board support
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7628an_wavlink_wl-wn531a3.dts
1 #include "mt7628an.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/leds/common.h>
5 #include <dt-bindings/gpio/gpio.h>
6
7 / {
8 compatible = "wavlink,wl-wn531a3", "mediatek,mt7628an-soc";
9 model = "Wavlink WL-WN531A3";
10
11 aliases {
12 led-boot = &led_status_blue;
13 led-failsafe = &led_status_red;
14 led-running = &led_status_blue;
15 led-upgrade = &led_status_red;
16 };
17
18 keys {
19 compatible = "gpio-keys";
20
21 turbo {
22 label = "turbo";
23 gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
24 linux,code = <BTN_1>;
25 };
26
27 wps {
28 label = "wps";
29 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_WPS_BUTTON>;
31 };
32
33 reset {
34 label = "reset";
35 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_RESTART>;
37 };
38
39 touchlink {
40 label = "touchlink";
41 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
42 linux,code = <BTN_0>;
43 };
44 };
45
46 leds {
47 compatible = "gpio-leds";
48
49 wifi {
50 label = "blue:wifi";
51 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
52 linux,default-trigger = "phy0tpt";
53 };
54
55 led_status_blue: led_status_blue {
56 function = LED_FUNCTION_STATUS;
57 color = <LED_COLOR_ID_BLUE>;
58 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
59 };
60
61 led_status_red: led_status_red {
62 function = LED_FUNCTION_STATUS;
63 color = <LED_COLOR_ID_RED>;
64 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
65 };
66 };
67 };
68
69 &state_default {
70 gpio {
71 groups = "i2c", "wled_an", "gpio", "wdt";
72 function = "gpio";
73 };
74 };
75
76 &pcie {
77 status = "okay";
78 };
79
80 &pcie0 {
81 mt76@0,0 {
82 reg = <0x0000 0 0 0 0>;
83 nvmem-cells = <&eeprom_factory_8000>;
84 nvmem-cell-names = "eeprom";
85 ieee80211-freq-limit = <5000000 6000000>;
86 };
87 };
88
89 &spi0 {
90 status = "okay";
91
92 flash@0 {
93 compatible = "jedec,spi-nor";
94 reg = <0>;
95 spi-max-frequency = <40000000>;
96
97 partitions {
98 compatible = "fixed-partitions";
99 #address-cells = <1>;
100 #size-cells = <1>;
101
102 partition@0 {
103 label = "u-boot";
104 reg = <0x0 0x30000>;
105 read-only;
106 };
107
108 partition@30000 {
109 label = "u-boot-env";
110 reg = <0x30000 0x10000>;
111 read-only;
112 };
113
114 factory: partition@40000 {
115 label = "factory";
116 reg = <0x40000 0x10000>;
117 read-only;
118
119 nvmem-layout {
120 compatible = "fixed-layout";
121 #address-cells = <1>;
122 #size-cells = <1>;
123
124 eeprom_factory_0: eeprom@0 {
125 reg = <0x0 0x400>;
126 };
127
128 eeprom_factory_8000: eeprom@8000 {
129 reg = <0x8000 0x200>;
130 };
131
132 macaddr_factory_28: macaddr@28 {
133 reg = <0x28 0x6>;
134 };
135 };
136 };
137
138 partition@50000 {
139 compatible = "denx,uimage";
140 label = "firmware";
141 reg = <0x50000 0x7b0000>;
142 };
143 };
144 };
145 };
146
147 &wmac {
148 status = "okay";
149
150 nvmem-cells = <&eeprom_factory_0>;
151 nvmem-cell-names = "eeprom";
152 };
153
154 &ethernet {
155 nvmem-cells = <&macaddr_factory_28>;
156 nvmem-cell-names = "mac-address";
157 };
158
159 &esw {
160 mediatek,portmap = <0x2f>;
161 };