ramips: convert MT7915 EEPROM to NVMEM format
[openwrt/staging/hauke.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 nvmem-cells = <&eeprom_factory_0>;
85 nvmem-cell-names = "eeprom";
86 mediatek,disable-radar-background;
87 };
88 };
89
90 &spi0 {
91 status = "okay";
92
93 flash@0 {
94 compatible = "jedec,spi-nor";
95 reg = <0>;
96 spi-max-frequency = <50000000>;
97 m25p,fast-read;
98 broken-flash-reset;
99
100 partitions {
101 compatible = "fixed-partitions";
102 #address-cells = <1>;
103 #size-cells = <1>;
104
105 partition@0 {
106 label = "u-boot";
107 reg = <0x0 0x30000>;
108 read-only;
109 };
110
111 partition@30000 {
112 label = "u-boot-env";
113 reg = <0x30000 0x10000>;
114 read-only;
115 };
116
117 factory: partition@40000 {
118 compatible = "nvmem-cells";
119 label = "factory";
120 reg = <0x40000 0x10000>;
121 #address-cells = <1>;
122 #size-cells = <1>;
123 read-only;
124
125 eeprom_factory_0: eeprom@0 {
126 reg = <0x0 0xe00>;
127 };
128 };
129
130 partition@50000 {
131 compatible = "denx,uimage";
132 label = "firmware";
133 reg = <0x50000 0xfb0000>;
134 };
135
136 partition@1000000 {
137 label = "app";
138 reg = <0x1000000 0xfd0000>;
139 read-only;
140 };
141
142 partition@1fd0000 {
143 label = "debug";
144 reg = <0x1fd0000 0x10000>;
145 read-only;
146 };
147
148 partition@1fe0000 {
149 label = "backup";
150 reg = <0x1fe0000 0x10000>;
151 read-only;
152 };
153
154 partition@1ff0000 {
155 label = "bdinfo";
156 reg = <0x1ff0000 0x10000>;
157 read-only;
158
159 compatible = "nvmem-cells";
160 #address-cells = <1>;
161 #size-cells = <1>;
162
163 macaddr_bdinfo_de00: macaddr@de00 {
164 reg = <0xde00 0x6>;
165 };
166 };
167 };
168 };
169 };
170
171 &state_default {
172 gpio {
173 groups = "jtag", "uart3";
174 function = "gpio";
175 };
176 };
177
178 &switch0 {
179 ports {
180 port@3 {
181 status = "okay";
182 label = "wan";
183 };
184 };
185 };