2adb6ba8e36895f76aac4c6e17bef8bb07c87ae7
[openwrt/staging/pepe2k.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 label = "factory";
118 reg = <0x50000 0x10000>;
119 read-only;
120
121 nvmem-layout {
122 compatible = "fixed-layout";
123 #address-cells = <1>;
124 #size-cells = <1>;
125
126 eeprom_factory_0: eeprom@0 {
127 reg = <0x0 0x400>;
128 };
129
130 macaddr_factory_28: macaddr@28 {
131 reg = <0x28 0x6>;
132 };
133 };
134 };
135
136 partition@60000 {
137 label = "crash";
138 reg = <0x60000 0x10000>;
139 read-only;
140 };
141
142 partition@70000 {
143 label = "cfg_bak";
144 reg = <0x70000 0x10000>;
145 read-only;
146 };
147
148 partition@80000 {
149 label = "overlay";
150 reg = <0x80000 0xc0000>;
151 read-only;
152 };
153
154 partition@140000 {
155 label = "firmware";
156 compatible = "denx,uimage";
157 reg = <0x140000 0xec0000>;
158 };
159 };
160 };
161 };