5487eddfd70e162535420f7f840cfa9ccc2c1c9b
[openwrt/staging/jow.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 function = LED_FUNCTION_STATUS;
32 color = <LED_COLOR_ID_GREEN>;
33 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
34 };
35
36 led_status_blue: status_blue {
37 function = LED_FUNCTION_STATUS;
38 color = <LED_COLOR_ID_BLUE>;
39 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
40 };
41
42 led_status_red: status_red {
43 function = LED_FUNCTION_STATUS;
44 color = <LED_COLOR_ID_RED>;
45 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
46 };
47 };
48
49 aliases {
50 led-boot = &led_status_green;
51 led-failsafe = &led_status_red;
52 led-running = &led_status_blue;
53 led-upgrade = &led_status_red;
54 };
55 };
56
57 &pcie {
58 status = "okay";
59 };
60
61 &pcie1 {
62 wifi@0,0 {
63 compatible = "mediatek,mt76";
64 reg = <0x0000 0 0 0 0>;
65 nvmem-cells = <&eeprom_factory_0>;
66 nvmem-cell-names = "eeprom";
67 };
68 };
69
70 &spi0 {
71 status = "okay";
72 flash@0 {
73 compatible = "jedec,spi-nor";
74 reg = <0>;
75 spi-max-frequency = <14000000>;
76 partitions {
77 compatible = "fixed-partitions";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 partition@0 {
82 label = "bootloader";
83 reg = <0x0 0x30000>;
84 read-only;
85 };
86
87 partition@30000 {
88 label = "config";
89 reg = <0x30000 0x10000>;
90 read-only;
91 };
92
93 factory: partition@50000 {
94 label = "factory";
95 reg = <0x50000 0x10000>;
96 read-only;
97
98 nvmem-layout {
99 compatible = "fixed-layout";
100 #address-cells = <1>;
101 #size-cells = <1>;
102
103 eeprom_factory_0: eeprom@0 {
104 reg = <0x0 0xe00>;
105 };
106
107 macaddr_factory_e000: macaddr@e000 {
108 compatible = "mac-base";
109 reg = <0xe000 0x6>;
110 #nvmem-cell-cells = <1>;
111 };
112 };
113 };
114
115 partition@90000 {
116 compatible = "denx,uimage";
117 label = "firmware";
118 reg = <0x90000 0xf70000>;
119 };
120 };
121 };
122 };
123
124 &gmac0 {
125 nvmem-cells = <&macaddr_factory_e000 0>;
126 nvmem-cell-names = "mac-address";
127 };
128
129 &switch0 {
130 ports {
131 port@0 {
132 status = "okay";
133 label = "wan";
134 nvmem-cells = <&macaddr_factory_e000 1>;
135 nvmem-cell-names = "mac-address";
136 };
137
138 port@4 {
139 status = "okay";
140 label = "lan";
141 };
142 };
143 };
144