ramips: rtxxxx: remove mac-address-increment
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_lenovo_newifi-d1.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "lenovo,newifi-d1", "mediatek,mt7621-soc";
8 model = "Lenovo Newifi D1";
9
10 aliases {
11 led-boot = &led_blue;
12 led-failsafe = &led_blue;
13 led-running = &led_blue;
14 led-upgrade = &led_blue;
15 label-mac-device = &gmac0;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200";
20 };
21
22 leds {
23 compatible = "gpio-leds";
24
25 status-red {
26 label = "red:status";
27 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
28 };
29
30 status-green {
31 label = "green:status";
32 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
33 };
34
35 led_blue: status-blue {
36 label = "blue:status";
37 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
38 default-state = "on";
39 };
40 };
41
42 keys {
43 compatible = "gpio-keys";
44
45 reset {
46 label = "reset";
47 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RESTART>;
49 };
50
51 wps {
52 label = "wps";
53 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_WPS_BUTTON>;
55 };
56 };
57
58 gpio_export {
59 compatible = "gpio-export";
60 #size-cells = <0>;
61
62 usb2power {
63 gpio-export,name = "usb2power";
64 gpio-export,output = <1>;
65 gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
66 };
67
68 usb3power {
69 gpio-export,name = "usb3power";
70 gpio-export,output = <1>;
71 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
72 };
73 };
74 };
75
76 &sdhci {
77 status = "okay";
78 };
79
80 &spi0 {
81 status = "okay";
82
83 flash@0 {
84 compatible = "jedec,spi-nor";
85 reg = <0>;
86 spi-max-frequency = <45000000>;
87 broken-flash-reset;
88
89 partitions {
90 compatible = "fixed-partitions";
91 #address-cells = <1>;
92 #size-cells = <1>;
93
94 partition@0 {
95 label = "u-boot";
96 reg = <0x0 0x30000>;
97 read-only;
98 };
99
100 partition@30000 {
101 label = "u-boot-env";
102 reg = <0x30000 0x10000>;
103 read-only;
104 };
105
106 factory: partition@40000 {
107 compatible = "nvmem-cells";
108 label = "factory";
109 reg = <0x40000 0x10000>;
110 #address-cells = <1>;
111 #size-cells = <1>;
112 read-only;
113
114 eeprom_factory_0: eeprom@0 {
115 reg = <0x0 0x400>;
116 };
117
118 eeprom_factory_8000: eeprom@8000 {
119 reg = <0x8000 0x200>;
120 };
121
122 macaddr_factory_e000: macaddr@e000 {
123 reg = <0xe000 0x6>;
124 };
125
126 macaddr_factory_e006: macaddr@e006 {
127 reg = <0xe006 0x6>;
128 };
129 };
130
131 partition@50000 {
132 compatible = "denx,uimage";
133 label = "firmware";
134 reg = <0x50000 0x1fb0000>;
135 };
136 };
137 };
138 };
139
140 &pcie {
141 status = "okay";
142 };
143
144 &pcie0 {
145 mt76@0,0 {
146 reg = <0x0000 0 0 0 0>;
147 nvmem-cells = <&eeprom_factory_8000>;
148 nvmem-cell-names = "eeprom";
149 ieee80211-freq-limit = <5000000 6000000>;
150 };
151 };
152
153 &pcie1 {
154 mt76@0,0 {
155 reg = <0x0000 0 0 0 0>;
156 nvmem-cells = <&eeprom_factory_0>;
157 nvmem-cell-names = "eeprom";
158 };
159 };
160
161 &gmac0 {
162 nvmem-cells = <&macaddr_factory_e000>;
163 nvmem-cell-names = "mac-address";
164 };
165
166 &gmac1 {
167 status = "okay";
168 label = "wan";
169 phy-handle = <&ethphy4>;
170
171 nvmem-cells = <&macaddr_factory_e006>;
172 nvmem-cell-names = "mac-address";
173 };
174
175 &mdio {
176 ethphy4: ethernet-phy@4 {
177 reg = <4>;
178 };
179 };
180
181 &switch0 {
182 ports {
183 port@1 {
184 status = "okay";
185 label = "lan2";
186 };
187
188 port@2 {
189 status = "okay";
190 label = "lan1";
191 };
192 };
193 };
194
195 &state_default {
196 gpio {
197 groups = "jtag", "uart2", "wdt";
198 function = "gpio";
199 };
200 };