ramips: improve Xiaomi mi-mini indications
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_comfast_cf-e390ax.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.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 = "comfast,cf-e390ax", "mediatek,mt7621-soc";
11 model = "COMFAST CF-E390AX";
12
13 chosen {
14 bootargs = "console=ttyS0,115200";
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_RESTART>;
24 };
25 };
26
27 leds {
28 compatible = "gpio-leds";
29
30 led_status_green: status_green {
31 label = "green:status";
32 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
33 };
34
35 led_status_blue: status_blue {
36 label = "blue:status";
37 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
38 };
39
40 led_status_red: status_red {
41 label = "red:status";
42 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
43 };
44 };
45
46 aliases {
47 led-boot = &led_status_green;
48 led-failsafe = &led_status_red;
49 led-running = &led_status_blue;
50 led-upgrade = &led_status_red;
51 };
52 };
53
54 &pcie {
55 status = "okay";
56 };
57
58 &pcie1 {
59 wifi@0,0 {
60 compatible = "mediatek,mt76";
61 reg = <0x0000 0 0 0 0>;
62 mediatek,mtd-eeprom = <&factory 0x0>;
63 };
64 };
65
66 &spi0 {
67 status = "okay";
68 flash@0 {
69 compatible = "jedec,spi-nor";
70 reg = <0>;
71 spi-max-frequency = <14000000>;
72 partitions {
73 compatible = "fixed-partitions";
74 #address-cells = <1>;
75 #size-cells = <1>;
76
77 partition@0 {
78 label = "bootloader";
79 reg = <0x0 0x30000>;
80 read-only;
81 };
82
83 partition@30000 {
84 label = "config";
85 reg = <0x30000 0x10000>;
86 read-only;
87 };
88
89 factory: partition@50000 {
90 label = "factory";
91 reg = <0x50000 0x10000>;
92 read-only;
93 };
94
95 partition@90000 {
96 compatible = "denx,uimage";
97 label = "firmware";
98 reg = <0x90000 0xf70000>;
99 };
100 };
101 };
102 };
103
104 &factory {
105 compatible = "nvmem-cells";
106 #address-cells = <1>;
107 #size-cells = <1>;
108
109 macaddr_factory_e000: macaddr@e000 {
110 reg = <0xe000 0x6>;
111 };
112 };
113
114 &gmac0 {
115 nvmem-cells = <&macaddr_factory_e000>;
116 nvmem-cell-names = "mac-address";
117 };
118
119 &switch0 {
120 ports {
121 port@0 {
122 status = "okay";
123 label = "wan";
124 nvmem-cells = <&macaddr_factory_e000>;
125 nvmem-cell-names = "mac-address";
126 mac-address-increment = <1>;
127 };
128
129 port@4 {
130 status = "okay";
131 label = "lan";
132 };
133 };
134 };
135