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