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