ramips: improve Xiaomi mi-mini indications
[openwrt/openwrt.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 compatible = "nvmem-cells";
77 #address-cells = <1>;
78 #size-cells = <1>;
79
80 macaddr_uboot_1fc40: macaddr@1fc40 {
81 reg = <0x1fc40 0x6>;
82 };
83 };
84
85 partition@20000 {
86 label = "config";
87 reg = <0x20000 0x10000>;
88 read-only;
89 };
90
91 factory: partition@30000 {
92 label = "factory";
93 reg = <0x30000 0x10000>;
94 read-only;
95 };
96
97 partition@40000 {
98 compatible = "denx,uimage";
99 label = "firmware";
100 reg = <0x40000 0xfc0000>;
101 };
102 };
103 };
104 };
105
106 &gmac0 {
107 nvmem-cells = <&macaddr_uboot_1fc40>;
108 nvmem-cell-names = "mac-address";
109 mac-address-increment = <(2)>;
110 };
111
112 &gmac1 {
113 status = "okay";
114 label = "wan";
115 phy-handle = <&ethphy0>;
116
117 nvmem-cells = <&macaddr_uboot_1fc40>;
118 nvmem-cell-names = "mac-address";
119 };
120
121 &mdio {
122 ethphy0: ethernet-phy@0 {
123 reg = <0>;
124 };
125 };
126
127 &switch0 {
128 ports {
129 port@3 {
130 status = "okay";
131 label = "lan1";
132 };
133
134 port@4 {
135 status = "okay";
136 label = "lan2";
137 };
138 };
139 };
140
141 &pcie {
142 status = "okay";
143 };
144
145 &pcie0 {
146 wifi@0,0 {
147 compatible = "mediatek,mt76";
148 reg = <0x0000 0 0 0 0>;
149 mediatek,mtd-eeprom = <&factory 0x0000>;
150 };
151 };
152
153 &state_default {
154 gpio {
155 groups = "i2c", "jtag", "wdt";
156 function = "gpio";
157 };
158 };