ramips: add support for Sercomm CPJ routers
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_cudy_m1800.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
8 / {
9 compatible = "cudy,m1800", "mediatek,mt7621-soc";
10 model = "Cudy M1800";
11
12 aliases {
13 led-boot = &led_internet_white;
14 led-failsafe = &led_internet_white;
15 led-running = &led_internet_white;
16 led-upgrade = &led_internet_white;
17 label-mac-device = &gmac0;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32
33 wps {
34 label = "wps";
35 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_WPS_BUTTON>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 led_internet_white: internet-white {
44 label = "white:internet";
45 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
46 };
47
48 internet-red {
49 label = "red:internet";
50 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
51 };
52 };
53 };
54
55 &gmac0 {
56 nvmem-cells = <&macaddr_bdinfo_de00>;
57 nvmem-cell-names = "mac-address";
58 mac-address-increment = <1>;
59 };
60
61 &gmac1 {
62 status = "okay";
63 label = "lan";
64 phy-handle = <&ethphy4>;
65
66 nvmem-cells = <&macaddr_bdinfo_de00>;
67 nvmem-cell-names = "mac-address";
68 };
69
70 &mdio {
71 ethphy4: ethernet-phy@4 {
72 reg = <4>;
73 };
74 };
75
76 &pcie {
77 status = "okay";
78 };
79
80 &pcie0 {
81 wifi@0,0 {
82 compatible = "mediatek,mt76";
83 reg = <0x0000 0 0 0 0>;
84 mediatek,mtd-eeprom = <&factory 0x0000>;
85 mediatek,disable-radar-background;
86 };
87 };
88
89 &spi0 {
90 status = "okay";
91
92 flash@0 {
93 compatible = "jedec,spi-nor";
94 reg = <0>;
95 spi-max-frequency = <50000000>;
96 m25p,fast-read;
97 broken-flash-reset;
98
99 partitions {
100 compatible = "fixed-partitions";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 partition@0 {
105 label = "u-boot";
106 reg = <0x0 0x30000>;
107 read-only;
108 };
109
110 partition@30000 {
111 label = "u-boot-env";
112 reg = <0x30000 0x10000>;
113 read-only;
114 };
115
116 factory: partition@40000 {
117 label = "factory";
118 reg = <0x40000 0x10000>;
119 read-only;
120 };
121
122 partition@50000 {
123 compatible = "denx,uimage";
124 label = "firmware";
125 reg = <0x50000 0xfb0000>;
126 };
127
128 partition@1000000 {
129 label = "app";
130 reg = <0x1000000 0xfd0000>;
131 read-only;
132 };
133
134 partition@1fd0000 {
135 label = "debug";
136 reg = <0x1fd0000 0x10000>;
137 read-only;
138 };
139
140 partition@1fe0000 {
141 label = "backup";
142 reg = <0x1fe0000 0x10000>;
143 read-only;
144 };
145
146 partition@1ff0000 {
147 label = "bdinfo";
148 reg = <0x1ff0000 0x10000>;
149 read-only;
150
151 compatible = "nvmem-cells";
152 #address-cells = <1>;
153 #size-cells = <1>;
154
155 macaddr_bdinfo_de00: macaddr@de00 {
156 reg = <0xde00 0x6>;
157 };
158 };
159 };
160 };
161 };
162
163 &state_default {
164 gpio {
165 groups = "jtag", "uart3";
166 function = "gpio";
167 };
168 };
169
170 &switch0 {
171 ports {
172 port@3 {
173 status = "okay";
174 label = "wan";
175 };
176 };
177 };