bc7083fb1f7f7eef40fb045c0db779101c9f8be5
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7628an_xiaomi_miwifi-3c.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "xiaomi,miwifi-3c", "mediatek,mt7628an-soc";
10 model = "Xiaomi MiWiFi 3C";
11
12 aliases {
13 led-boot = &led_status_amber;
14 led-failsafe = &led_status_red;
15 led-running = &led_status_blue;
16 led-upgrade = &led_status_amber;
17 label-mac-device = &ethernet;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_status_blue: status_blue {
28 label = "blue:status";
29 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
30 };
31
32 led_status_red: status_red {
33 label = "red:status";
34 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
35 };
36
37 led_status_amber: status_amber {
38 label = "amber:status";
39 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
40 };
41 };
42
43 keys {
44 compatible = "gpio-keys";
45
46 reset {
47 label = "reset";
48 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
49 linux,code = <KEY_RESTART>;
50 };
51 };
52 };
53
54 &state_default {
55 gpio {
56 groups = "gpio", "refclk", "wdt", "wled_an";
57 function = "gpio";
58 };
59 };
60
61 &ehci {
62 status = "disabled";
63 };
64
65 &ohci {
66 status = "disabled";
67 };
68
69 &esw {
70 mediatek,portmap = <0x3e>;
71 mediatek,portdisable = <0x2a>;
72 };
73
74 &wmac {
75 status = "okay";
76
77 nvmem-cells = <&eeprom_factory_0>;
78 nvmem-cell-names = "eeprom";
79 };
80
81 &ethernet {
82 nvmem-cells = <&macaddr_factory_28>;
83 nvmem-cell-names = "mac-address";
84 };
85
86 &spi0 {
87 status = "okay";
88
89 flash@0 {
90 compatible = "jedec,spi-nor";
91 reg = <0>;
92 spi-max-frequency = <40000000>;
93
94 partitions {
95 compatible = "fixed-partitions";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 partition@0 {
100 label = "Bootloader";
101 reg = <0x0 0x30000>;
102 read-only;
103 };
104
105 partition@30000 {
106 label = "Config";
107 reg = <0x30000 0x10000>;
108 };
109
110 partition@40000 {
111 label = "Bdata";
112 reg = <0x40000 0x10000>;
113 read-only;
114 };
115
116 factory: partition@50000 {
117 compatible = "nvmem-cells";
118 label = "factory";
119 reg = <0x50000 0x10000>;
120 #address-cells = <1>;
121 #size-cells = <1>;
122 read-only;
123
124 eeprom_factory_0: eeprom@0 {
125 reg = <0x0 0x400>;
126 };
127
128 macaddr_factory_28: macaddr@28 {
129 reg = <0x28 0x6>;
130 };
131 };
132
133 partition@60000 {
134 label = "crash";
135 reg = <0x60000 0x10000>;
136 read-only;
137 };
138
139 partition@70000 {
140 label = "cfg_bak";
141 reg = <0x70000 0x10000>;
142 read-only;
143 };
144
145 partition@80000 {
146 label = "overlay";
147 reg = <0x80000 0xc0000>;
148 read-only;
149 };
150
151 partition@140000 {
152 label = "firmware";
153 compatible = "denx,uimage";
154 reg = <0x140000 0xec0000>;
155 };
156 };
157 };
158 };