ramips: mt7628: move mtd-eeprom out of root DTSI
[openwrt/staging/stintel.git] / target / linux / ramips / dts / mt7628an_cudy_wr1000.dts
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 compatible = "cudy,wr1000", "mediatek,mt7628an-soc";
10 model = "Cudy WR1000";
11
12 aliases {
13 led-boot = &led_wps;
14 led-failsafe = &led_wps;
15 led-upgrade = &led_wps;
16 label-mac-device = &wmac;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 reset {
23 label = "reset";
24 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_RESTART>;
26 };
27
28 wps {
29 label = "rfkill";
30 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_WPS_BUTTON>;
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 lan1 {
39 label = "blue:lan1";
40 gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
41 };
42
43 lan2 {
44 label = "blue:lan2";
45 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
46 };
47
48 wan {
49 label = "blue:wan";
50 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
51 };
52
53 wlan2g {
54 label = "blue:wlan2g";
55 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
56 linux,default-trigger = "phy0tpt";
57 };
58
59 led_wps: wps {
60 label = "blue:wps";
61 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
62 };
63 };
64 };
65
66 &spi0 {
67 status = "okay";
68
69 flash@0 {
70 compatible = "jedec,spi-nor";
71 reg = <0>;
72 spi-max-frequency = <10000000>;
73
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 label = "u-boot";
81 reg = <0x0 0x30000>;
82 read-only;
83 };
84
85 partition@30000 {
86 label = "u-boot-env";
87 reg = <0x30000 0x10000>;
88 read-only;
89 };
90
91 factory: partition@40000 {
92 label = "factory";
93 reg = <0x40000 0x10000>;
94 read-only;
95 };
96
97 partition@50000 {
98 compatible = "denx,uimage";
99 label = "firmware";
100 reg = <0x50000 0x7b0000>;
101 };
102 };
103 };
104 };
105
106 &state_default {
107 gpio {
108 groups = "i2s", "refclk", "wdt", "p4led_an",
109 "p3led_an", "p2led_an", "wled_an";
110 function = "gpio";
111 };
112 };
113
114 &pcie {
115 status = "okay";
116 };
117
118 &pcie0 {
119 wifi@0,0 {
120 compatible = "mediatek,mt76";
121 reg = <0x0000 0 0 0 0>;
122 mediatek,mtd-eeprom = <&factory 0x8000>;
123 ieee80211-freq-limit = <5000000 6000000>;
124
125 led {
126 led-sources = <2>;
127 led-active-low;
128 };
129 };
130 };
131
132 &wmac {
133 status = "okay";
134
135 mediatek,mtd-eeprom = <&factory 0x0>;
136 };
137
138 &ethernet {
139 nvmem-cells = <&macaddr_factory_28>;
140 nvmem-cell-names = "mac-address";
141 };
142
143 &esw {
144 mediatek,portmap = <0x2f>;
145 };
146
147 &factory {
148 compatible = "nvmem-cells";
149 #address-cells = <1>;
150 #size-cells = <1>;
151
152 macaddr_factory_28: macaddr@28 {
153 reg = <0x28 0x6>;
154 };
155 };