ramips: mt7621: nix mac-address-increment
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_oraybox_x3a.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
8 / {
9 compatible = "oraybox,x3a", "mediatek,mt7621-soc";
10 model = "OrayBox X3A";
11
12 aliases {
13 led-boot = &led_status_green;
14 led-failsafe = &led_status_red;
15 led-running = &led_status_blue;
16 led-upgrade = &led_status_green;
17 label-mac-device = &gmac0;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_status_red: status-red {
28 label = "red:status";
29 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
30 };
31
32 led_status_blue: status-blue {
33 label = "blue:status";
34 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
35 };
36
37 led_status_green: status-green {
38 label = "green:status";
39 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
40 };
41 };
42
43 keys {
44 compatible = "gpio-keys";
45
46 reset {
47 label = "reset";
48 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
49 linux,code = <KEY_RESTART>;
50 };
51 };
52 };
53
54 &spi0 {
55 status = "okay";
56
57 flash@0 {
58 compatible = "jedec,spi-nor";
59 reg = <0>;
60 spi-max-frequency = <30000000>;
61
62 partitions {
63 compatible = "fixed-partitions";
64 #address-cells = <1>;
65 #size-cells = <1>;
66
67 partition@0 {
68 label = "u-boot";
69 reg = <0x0 0x30000>;
70 read-only;
71 };
72
73 partition@30000 {
74 label = "u-boot-env";
75 reg = <0x30000 0x10000>;
76 read-only;
77 };
78
79 factory: partition@40000 {
80 label = "factory";
81 reg = <0x40000 0x10000>;
82 read-only;
83
84 nvmem-layout {
85 compatible = "fixed-layout";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 eeprom_factory_0: eeprom@0 {
90 reg = <0x0 0x4da8>;
91 };
92 };
93 };
94
95 partition@50000 {
96 compatible = "denx,uimage";
97 label = "firmware";
98 reg = <0x50000 0xf00000>;
99 };
100
101 partition@fe0000 {
102 label = "bdinfo";
103 reg = <0xfe0000 0x10000>;
104 read-only;
105
106 nvmem-layout {
107 compatible = "fixed-layout";
108 #address-cells = <1>;
109 #size-cells = <1>;
110
111 macaddr_bdinfo_9: macaddr@9 {
112 compatible = "mac-base";
113 reg = <0x9 0x6>;
114 #nvmem-cell-cells = <1>;
115 };
116 };
117 };
118
119 partition@ff0000 {
120 label = "reserve";
121 reg = <0xff0000 0x10000>;
122 read-only;
123 };
124 };
125 };
126 };
127
128 &pcie {
129 status = "okay";
130 };
131
132 &pcie0 {
133 wifi@0,0 {
134 compatible = "mediatek,mt76";
135 reg = <0x0000 0 0 0 0>;
136 nvmem-cells = <&eeprom_factory_0>;
137 nvmem-cell-names = "eeprom";
138 };
139 };
140
141 &gmac0 {
142 nvmem-cells = <&macaddr_bdinfo_9 0>;
143 nvmem-cell-names = "mac-address";
144 };
145
146 &gmac1 {
147 status = "okay";
148 label = "wan";
149 phy-handle = <&ethphy4>;
150
151 nvmem-cells = <&macaddr_bdinfo_9 1>;
152 nvmem-cell-names = "mac-address";
153 };
154
155 &mdio {
156 ethphy4: ethernet-phy@4 {
157 reg = <4>;
158 };
159 };
160
161 &switch0 {
162 ports {
163 port@2 {
164 status = "okay";
165 label = "lan2";
166 };
167
168 port@3 {
169 status = "okay";
170 label = "lan1";
171 };
172 };
173 };
174
175 &state_default {
176 gpio {
177 groups = "jtag", "wdt";
178 function = "gpio";
179 };
180 };