880a04710bd38cf19fc26ecf195e446e12968c66
[openwrt/staging/hauke.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 reg = <0x9 0x6>;
113 };
114 };
115 };
116
117 partition@ff0000 {
118 label = "reserve";
119 reg = <0xff0000 0x10000>;
120 read-only;
121 };
122 };
123 };
124 };
125
126 &pcie {
127 status = "okay";
128 };
129
130 &pcie0 {
131 wifi@0,0 {
132 compatible = "mediatek,mt76";
133 reg = <0x0000 0 0 0 0>;
134 nvmem-cells = <&eeprom_factory_0>;
135 nvmem-cell-names = "eeprom";
136 };
137 };
138
139 &gmac0 {
140 nvmem-cells = <&macaddr_bdinfo_9>;
141 nvmem-cell-names = "mac-address";
142 };
143
144 &gmac1 {
145 status = "okay";
146 label = "wan";
147 phy-handle = <&ethphy4>;
148
149 nvmem-cells = <&macaddr_bdinfo_9>;
150 nvmem-cell-names = "mac-address";
151 mac-address-increment = <1>;
152 };
153
154 &mdio {
155 ethphy4: ethernet-phy@4 {
156 reg = <4>;
157 };
158 };
159
160 &switch0 {
161 ports {
162 port@2 {
163 status = "okay";
164 label = "lan2";
165 };
166
167 port@3 {
168 status = "okay";
169 label = "lan1";
170 };
171 };
172 };
173
174 &state_default {
175 gpio {
176 groups = "jtag", "wdt";
177 function = "gpio";
178 };
179 };