ramips: convert MT7628 EEPROM to NVMEM format
[openwrt/staging/hauke.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 mediatek,mtd-eeprom = <&factory 0x8000>;
81 ieee80211-freq-limit = <5000000 6000000>;
82 };
83 };
84
85 &spi0 {
86 status = "okay";
87
88 flash@0 {
89 compatible = "jedec,spi-nor";
90 reg = <0>;
91 spi-max-frequency = <40000000>;
92
93 partitions {
94 compatible = "fixed-partitions";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 partition@0 {
99 label = "u-boot";
100 reg = <0x0 0x30000>;
101 read-only;
102 };
103
104 partition@30000 {
105 label = "u-boot-env";
106 reg = <0x30000 0x10000>;
107 read-only;
108 };
109
110 factory: partition@40000 {
111 compatible = "nvmem-cells";
112 label = "factory";
113 reg = <0x40000 0x10000>;
114 #address-cells = <1>;
115 #size-cells = <1>;
116 read-only;
117
118 eeprom_factory_0: eeprom@0 {
119 reg = <0x0 0x400>;
120 };
121
122 macaddr_factory_28: macaddr@28 {
123 reg = <0x28 0x6>;
124 };
125 };
126
127 partition@50000 {
128 compatible = "denx,uimage";
129 label = "firmware";
130 reg = <0x50000 0x7b0000>;
131 };
132 };
133 };
134 };
135
136 &wmac {
137 status = "okay";
138
139 nvmem-cells = <&eeprom_factory_0>;
140 nvmem-cell-names = "eeprom";
141 };
142
143 &ethernet {
144 nvmem-cells = <&macaddr_factory_28>;
145 nvmem-cell-names = "mac-address";
146 };
147
148 &esw {
149 mediatek,portmap = <0x2f>;
150 };