8bdf764fdd22f45ebbaff85cbd43d219baa1951f
[openwrt/openwrt.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 compatible = "nvmem-cells";
98 label = "factory";
99 reg = <0x40000 0x10000>;
100 #address-cells = <1>;
101 #size-cells = <1>;
102 read-only;
103
104 eeprom_factory_0: eeprom@0 {
105 reg = <0x0 0x400>;
106 };
107
108 eeprom_factory_8000: eeprom@8000 {
109 reg = <0x8000 0x200>;
110 };
111
112 macaddr_factory_28: macaddr@28 {
113 reg = <0x28 0x6>;
114 };
115 };
116
117 partition@50000 {
118 compatible = "denx,uimage";
119 label = "firmware";
120 reg = <0x50000 0x7b0000>;
121 };
122 };
123 };
124 };
125
126 &wmac {
127 status = "okay";
128
129 nvmem-cells = <&eeprom_factory_0>;
130 nvmem-cell-names = "eeprom";
131 };
132
133 &ethernet {
134 nvmem-cells = <&macaddr_factory_28>;
135 nvmem-cell-names = "mac-address";
136 };
137
138 &esw {
139 mediatek,portmap = <0x2f>;
140 };