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