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