ramips: replace "mac-address-ascii" with "mac-base"
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_d-team_pbr-m1.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "d-team,pbr-m1", "mediatek,mt7621-soc";
8 model = "PBR-M1";
9
10 aliases {
11 led-boot = &led_sys;
12 led-failsafe = &led_sys;
13 led-running = &led_sys;
14 led-upgrade = &led_sys;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 power {
25 label = "blue:power";
26 gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
27 default-state = "on";
28 };
29
30 led_sys: sys {
31 label = "blue:sys";
32 gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
33 };
34
35 internet {
36 label = "blue:internet";
37 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
38 };
39
40 wlan2g {
41 label = "blue:wlan2g";
42 gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
43 };
44
45 wlan5g {
46 label = "blue:wlan5g";
47 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
48 };
49 };
50
51 keys {
52 compatible = "gpio-keys";
53
54 reset {
55 label = "reset";
56 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_RESTART>;
58 };
59 };
60
61 gpio_export {
62 compatible = "gpio-export";
63 #size-cells = <0>;
64
65 power_usb2 {
66 gpio-export,name = "power_usb2";
67 gpio-export,output = <1>;
68 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
69 };
70
71 power_usb3 {
72 gpio-export,name = "power_usb3";
73 gpio-export,output = <1>;
74 gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
75 };
76
77 power_sata {
78 gpio-export,name = "power_sata";
79 gpio-export,output = <1>;
80 gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
81 };
82 };
83
84 beeper: beeper {
85 compatible = "gpio-beeper";
86 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
87 };
88 };
89
90 &i2c {
91 status = "okay";
92
93 rtc@51 {
94 status = "okay";
95 compatible = "nxp,pcf8563";
96 reg = <0x51>;
97 };
98 };
99
100 &sdhci {
101 status = "okay";
102 };
103
104 &spi0 {
105 status = "okay";
106
107 flash@0 {
108 compatible = "jedec,spi-nor";
109 reg = <0>;
110 spi-max-frequency = <50000000>;
111 m25p,fast-read;
112 broken-flash-reset;
113
114 partitions {
115 compatible = "fixed-partitions";
116 #address-cells = <1>;
117 #size-cells = <1>;
118
119 partition@0 {
120 label = "u-boot";
121 reg = <0x0 0x30000>;
122 read-only;
123 };
124
125 partition@30000 {
126 label = "u-boot-env";
127 reg = <0x30000 0x10000>;
128 read-only;
129 };
130
131 factory: partition@40000 {
132 label = "factory";
133 reg = <0x40000 0x10000>;
134 read-only;
135 };
136
137 partition@50000 {
138 compatible = "denx,uimage";
139 label = "firmware";
140 reg = <0x50000 0x1fb0000>;
141 };
142 };
143 };
144 };
145
146 &pinctrl {
147 uart3_gpio: uart3-gpio {
148 uart3 {
149 groups = "uart3";
150 function = "gpio";
151 };
152 };
153 };
154
155 &pcie {
156 status = "okay";
157 pinctrl-0 = <&pcie_pins>, <&uart3_gpio>;
158 reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
159 <&gpio 7 GPIO_ACTIVE_LOW>;
160 };
161
162 &pcie0 {
163 mt76@0,0 {
164 reg = <0x0000 0 0 0 0>;
165 mediatek,mtd-eeprom = <&factory 0x8000>;
166 ieee80211-freq-limit = <5000000 6000000>;
167 };
168 };
169
170 &pcie1 {
171 mt76@0,0 {
172 reg = <0x0000 0 0 0 0>;
173 mediatek,mtd-eeprom = <&factory 0x0000>;
174 };
175 };
176
177 &ethernet {
178 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
179 };
180
181 &gmac0 {
182 nvmem-cells = <&macaddr_factory_e000>;
183 nvmem-cell-names = "mac-address";
184 };
185
186 &switch0 {
187 ports {
188 port@0 {
189 status = "okay";
190 label = "lan1";
191 };
192
193 port@1 {
194 status = "okay";
195 label = "lan2";
196 };
197
198 port@2 {
199 status = "okay";
200 label = "lan3";
201 };
202
203 port@3 {
204 status = "okay";
205 label = "lan4";
206 };
207
208 port@4 {
209 status = "okay";
210 label = "wan";
211 nvmem-cells = <&macaddr_factory_e006>;
212 nvmem-cell-names = "mac-address";
213 };
214 };
215 };
216
217 &state_default {
218 gpio {
219 groups = "wdt", "rgmii2", "jtag";
220 function = "gpio";
221 };
222 };
223
224 &factory {
225 compatible = "nvmem-cells";
226 #address-cells = <1>;
227 #size-cells = <1>;
228
229 macaddr_factory_e000: macaddr@e000 {
230 reg = <0xe000 0x6>;
231 };
232
233 macaddr_factory_e006: macaddr@e006 {
234 reg = <0xe006 0x6>;
235 };
236 };