c45f94b2f171d9419c86f966626064fc5039a875
[openwrt/staging/jow.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 mediatek,mtd-eeprom = <&factory 0x0>;
78 };
79
80 &ethernet {
81 nvmem-cells = <&macaddr_factory_28>;
82 nvmem-cell-names = "mac-address";
83 };
84
85 &spi0 {
86 status = "okay";
87
88 flash@0 {
89 compatible = "jedec,spi-nor";
90 reg = <0>;
91 spi-max-frequency = <40000000>;
92
93 partitions {
94 compatible = "fixed-partitions";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 partition@0 {
99 label = "Bootloader";
100 reg = <0x0 0x30000>;
101 read-only;
102 };
103
104 partition@30000 {
105 label = "Config";
106 reg = <0x30000 0x10000>;
107 };
108
109 partition@40000 {
110 label = "Bdata";
111 reg = <0x40000 0x10000>;
112 read-only;
113 };
114
115 factory: partition@50000 {
116 label = "factory";
117 reg = <0x50000 0x10000>;
118 read-only;
119 };
120
121 partition@60000 {
122 label = "crash";
123 reg = <0x60000 0x10000>;
124 read-only;
125 };
126
127 partition@70000 {
128 label = "cfg_bak";
129 reg = <0x70000 0x10000>;
130 read-only;
131 };
132
133 partition@80000 {
134 label = "overlay";
135 reg = <0x80000 0xc0000>;
136 read-only;
137 };
138
139 partition@140000 {
140 label = "firmware";
141 compatible = "denx,uimage";
142 reg = <0x140000 0xec0000>;
143 };
144 };
145 };
146 };
147
148 &factory {
149 compatible = "nvmem-cells";
150 #address-cells = <1>;
151 #size-cells = <1>;
152
153 macaddr_factory_28: macaddr@28 {
154 reg = <0x28 0x6>;
155 };
156 };