ramips: mt7621: add TP-Link EAP613 v1
[openwrt/openwrt.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
85 partition@50000 {
86 compatible = "denx,uimage";
87 label = "firmware";
88 reg = <0x50000 0xf00000>;
89 };
90
91 partition@fe0000 {
92 label = "bdinfo";
93 reg = <0xfe0000 0x10000>;
94 read-only;
95
96 compatible = "nvmem-cells";
97 #address-cells = <1>;
98 #size-cells = <1>;
99
100 macaddr_bdinfo_9: macaddr@9 {
101 reg = <0x9 0x6>;
102 };
103 };
104
105 partition@ff0000 {
106 label = "reserve";
107 reg = <0xff0000 0x10000>;
108 read-only;
109 };
110 };
111 };
112 };
113
114 &pcie {
115 status = "okay";
116 };
117
118 &pcie0 {
119 wifi@0,0 {
120 compatible = "mediatek,mt76";
121 reg = <0x0000 0 0 0 0>;
122 mediatek,mtd-eeprom = <&factory 0x0>;
123 };
124 };
125
126 &gmac0 {
127 nvmem-cells = <&macaddr_bdinfo_9>;
128 nvmem-cell-names = "mac-address";
129 };
130
131 &gmac1 {
132 status = "okay";
133 label = "wan";
134 phy-handle = <&ethphy4>;
135
136 nvmem-cells = <&macaddr_bdinfo_9>;
137 nvmem-cell-names = "mac-address";
138 mac-address-increment = <1>;
139 };
140
141 &mdio {
142 ethphy4: ethernet-phy@4 {
143 reg = <4>;
144 };
145 };
146
147 &switch0 {
148 ports {
149 port@2 {
150 status = "okay";
151 label = "lan2";
152 };
153
154 port@3 {
155 status = "okay";
156 label = "lan1";
157 };
158 };
159 };
160
161 &state_default {
162 gpio {
163 groups = "jtag", "wdt";
164 function = "gpio";
165 };
166 };