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