ramips: mt7621: nix mac-address-increment
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7621_iptime_a3002mesh.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "iptime,a3002mesh", "mediatek,mt7621-soc";
11 model = "ipTIME A3002MESH";
12
13 aliases {
14 led-boot = &led_cpu;
15 led-failsafe = &led_cpu;
16 led-running = &led_cpu;
17 led-upgrade = &led_cpu;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_cpu: led-0 {
24 label = "amber:cpu";
25 color = <LED_COLOR_ID_AMBER>;
26 function = LED_FUNCTION_CPU;
27 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
28 };
29
30 led-1 {
31 color = <LED_COLOR_ID_AMBER>;
32 function = LED_FUNCTION_WLAN;
33 function-enumerator = <0>;
34 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
35 linux,default-trigger = "phy0radio";
36 };
37
38 led-2 {
39 color = <LED_COLOR_ID_AMBER>;
40 function = LED_FUNCTION_WLAN;
41 function-enumerator = <1>;
42 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
43 linux,default-trigger = "phy1radio";
44 };
45 };
46
47 keys {
48 compatible = "gpio-keys";
49
50 reset {
51 label = "reset";
52 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_RESTART>;
54 };
55 };
56 };
57
58 &spi0 {
59 status = "okay";
60
61 flash@0 {
62 compatible = "jedec,spi-nor";
63 reg = <0>;
64 spi-max-frequency = <50000000>;
65
66 partitions {
67 compatible = "fixed-partitions";
68 #address-cells = <1>;
69 #size-cells = <1>;
70
71 partition@0 {
72 label = "u-boot";
73 reg = <0x0 0x20000>;
74 read-only;
75
76 nvmem-layout {
77 compatible = "fixed-layout";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 macaddr_uboot_1fc40: macaddr@1fc40 {
82 compatible = "mac-base";
83 reg = <0x1fc40 0x6>;
84 #nvmem-cell-cells = <1>;
85 };
86 };
87 };
88
89 partition@20000 {
90 label = "config";
91 reg = <0x20000 0x10000>;
92 read-only;
93 };
94
95 factory: partition@30000 {
96 label = "factory";
97 reg = <0x30000 0x10000>;
98 read-only;
99
100 nvmem-layout {
101 compatible = "fixed-layout";
102 #address-cells = <1>;
103 #size-cells = <1>;
104
105 eeprom_factory_0: eeprom@0 {
106 reg = <0x0 0x4da8>;
107 };
108 };
109 };
110
111 partition@40000 {
112 compatible = "denx,uimage";
113 label = "firmware";
114 reg = <0x40000 0xfc0000>;
115 };
116 };
117 };
118 };
119
120 &gmac0 {
121 nvmem-cells = <&macaddr_uboot_1fc40 2>;
122 nvmem-cell-names = "mac-address";
123 };
124
125 &gmac1 {
126 status = "okay";
127 label = "wan";
128 phy-handle = <&ethphy0>;
129
130 nvmem-cells = <&macaddr_uboot_1fc40 0>;
131 nvmem-cell-names = "mac-address";
132 };
133
134 &mdio {
135 ethphy0: ethernet-phy@0 {
136 reg = <0>;
137 };
138 };
139
140 &switch0 {
141 ports {
142 port@3 {
143 status = "okay";
144 label = "lan1";
145 };
146
147 port@4 {
148 status = "okay";
149 label = "lan2";
150 };
151 };
152 };
153
154 &pcie {
155 status = "okay";
156 };
157
158 &pcie0 {
159 wifi@0,0 {
160 compatible = "mediatek,mt76";
161 reg = <0x0000 0 0 0 0>;
162 nvmem-cells = <&eeprom_factory_0>;
163 nvmem-cell-names = "eeprom";
164 };
165 };
166
167 &state_default {
168 gpio {
169 groups = "i2c", "jtag", "wdt";
170 function = "gpio";
171 };
172 };