554d73ce3d4cd34459b81a4d5aed8771ef2f6277
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7621_iptime_ax2004m.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 = "iptime,ax2004m", "mediatek,mt7621-soc";
10 model = "ipTIME AX2004M";
11
12 aliases {
13 led-boot = &led_cpu;
14 led-failsafe = &led_cpu;
15 led-running = &led_cpu;
16 led-upgrade = &led_cpu;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 led_cpu: cpu {
27 label = "amber:cpu";
28 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
29 };
30
31 wlan2g {
32 label = "amber:wlan2g";
33 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
34 linux,default-trigger = "phy0radio";
35 };
36
37 wlan5g {
38 label = "amber:wlan5g";
39 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
40 linux,default-trigger = "phy1radio";
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 reset {
48 label = "reset";
49 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_RESTART>;
51 };
52 };
53 };
54
55 &nand {
56 status = "okay";
57
58 partitions {
59 compatible = "fixed-partitions";
60 #address-cells = <1>;
61 #size-cells = <1>;
62
63 partition@0 {
64 label = "u-boot";
65 reg = <0x0 0x80000>;
66 read-only;
67 };
68
69 partition@80000 {
70 label = "config";
71 reg = <0x80000 0x80000>;
72 read-only;
73 };
74
75 factory: partition@100000 {
76 label = "factory";
77 reg = <0x100000 0x80000>;
78 read-only;
79
80 compatible = "nvmem-cells";
81 #address-cells = <1>;
82 #size-cells = <1>;
83
84 macaddr_factory_4: macaddr@4 {
85 reg = <0x4 0x6>;
86 };
87 };
88
89 partition@180000 {
90 label = "firmware";
91 reg = <0x180000 0x7680000>;
92
93 compatible = "fixed-partitions";
94 #address-cells = <1>;
95 #size-cells = <1>;
96
97 partition@0 {
98 label = "kernel";
99 reg = <0x0 0x400000>;
100 };
101
102 partition@400000 {
103 label = "ubi";
104 reg = <0x400000 0x7280000>;
105 };
106 };
107 };
108 };
109
110 &state_default {
111 gpio {
112 groups = "i2c", "jtag", "wdt";
113 function = "gpio";
114 };
115 };
116
117 &gmac0 {
118 nvmem-cells = <&macaddr_factory_4>;
119 nvmem-cell-names = "mac-address";
120 mac-address-increment = <3>;
121 };
122
123 &gmac1 {
124 status = "okay";
125 label = "wan";
126 phy-handle = <&ethphy0>;
127
128 nvmem-cells = <&macaddr_factory_4>;
129 nvmem-cell-names = "mac-address";
130 mac-address-increment = <1>;
131 };
132
133 &mdio {
134 ethphy0: ethernet-phy@0 {
135 reg = <0>;
136 };
137 };
138
139 &switch0 {
140 ports {
141 port@1 {
142 status = "okay";
143 label = "lan4";
144 };
145
146 port@2 {
147 status = "okay";
148 label = "lan3";
149 };
150
151 port@3 {
152 status = "okay";
153 label = "lan2";
154 };
155
156 port@4 {
157 status = "okay";
158 label = "lan1";
159 };
160 };
161 };
162
163 &pcie {
164 status = "okay";
165 };
166
167 &pcie1 {
168 wifi@0,0 {
169 compatible = "mediatek,mt76";
170 reg = <0x0000 0 0 0 0>;
171 mediatek,mtd-eeprom = <&factory 0x0>;
172 };
173 };