ramips: mt7628: create shared DTSI for Xiaomi Mi Router 4A/4C
[openwrt/staging/rmilecki.git] / target / linux / ramips / dts / mt7628an_xiaomi_mi-router-4.dtsi
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 aliases {
10 led-boot = &led_power_yellow;
11 led-failsafe = &led_power_yellow;
12 led-running = &led_power_blue;
13 led-upgrade = &led_power_yellow;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,115200";
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_power_blue: power_blue {
24 label = "blue:power";
25 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
26 };
27
28 led_power_yellow: power_yellow {
29 label = "yellow:power";
30 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
31 };
32 };
33
34 keys {
35 compatible = "gpio-keys";
36
37 reset {
38 label = "reset";
39 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_RESTART>;
41 };
42 };
43 };
44
45 &spi0 {
46 status = "okay";
47
48 flash0: flash@0 {
49 compatible = "jedec,spi-nor";
50 reg = <0>;
51 spi-max-frequency = <10000000>;
52
53 partitions: partitions {
54 compatible = "fixed-partitions";
55 #address-cells = <1>;
56 #size-cells = <1>;
57
58 partition@0 {
59 label = "bootloader";
60 reg = <0x0 0x20000>;
61 read-only;
62 };
63
64 partition@20000 {
65 label = "config";
66 reg = <0x20000 0x10000>;
67 read-only;
68 };
69
70 factory: partition@30000 {
71 label = "factory";
72 reg = <0x30000 0x10000>;
73 read-only;
74 };
75
76 partition@40000 {
77 label = "crash";
78 reg = <0x40000 0x10000>;
79 read-only;
80 };
81
82 partition@50000 {
83 label = "cfg_bak";
84 reg = <0x50000 0x10000>;
85 read-only;
86 };
87
88 /* additional partitions in DTS */
89 };
90 };
91 };
92
93 &state_default {
94 gpio {
95 groups = "gpio", "wdt", "wled_an";
96 function = "gpio";
97 };
98 };
99
100 &wmac {
101 status = "okay";
102 };