treewide: add space before SPDX identifier
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7628an_xiaomi_mi-router-4c.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,mi-router-4c", "mediatek,mt7628an-soc";
10 model = "Xiaomi Mi Router 4C";
11
12 aliases {
13 led-boot = &led_power_yellow;
14 led-failsafe = &led_power_yellow;
15 led-running = &led_power_blue;
16 led-upgrade = &led_power_yellow;
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_power_blue: power_blue {
28 label = "blue:power";
29 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
30 };
31
32 led_power_yellow: power_yellow {
33 label = "yellow:power";
34 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
35 };
36 };
37
38 keys {
39 compatible = "gpio-keys";
40
41 reset {
42 label = "reset";
43 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RESTART>;
45 };
46 };
47 };
48
49 &state_default {
50 gpio {
51 groups = "gpio", "wdt", "wled_an";
52 function = "gpio";
53 };
54 };
55
56 &ehci {
57 status = "disabled";
58 };
59
60 &ohci {
61 status = "disabled";
62 };
63
64 &esw {
65 mediatek,portmap = <0x3d>;
66 mediatek,portdisable = <0x29>;
67 };
68
69 &wmac {
70 status = "okay";
71 };
72
73 &ethernet {
74 mtd-mac-address = <&factory 0x28>;
75 };
76
77 &spi0 {
78 status = "okay";
79
80 flash@0 {
81 compatible = "jedec,spi-nor";
82 reg = <0>;
83 spi-max-frequency = <40000000>;
84
85 partitions {
86 compatible = "fixed-partitions";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 partition@0 {
91 label = "bootloader";
92 reg = <0x0 0x20000>;
93 read-only;
94 };
95
96 partition@20000 {
97 label = "config";
98 reg = <0x20000 0x10000>;
99 read-only;
100 };
101
102 factory: partition@30000 {
103 label = "factory";
104 reg = <0x30000 0x10000>;
105 read-only;
106 };
107
108 partition@40000 {
109 label = "crash";
110 reg = <0x40000 0x10000>;
111 read-only;
112 };
113
114 partition@50000 {
115 label = "cfg_bak";
116 reg = <0x50000 0x10000>;
117 read-only;
118 };
119
120 partition@60000 {
121 label = "overlay";
122 reg = <0x60000 0x100000>;
123 read-only;
124 };
125
126 partition@160000 {
127 label = "firmware";
128 reg = <0x160000 0xea0000>;
129 compatible = "denx,uimage";
130 };
131 };
132 };
133 };