ramips: convert mt76 PCIe NIC EEPROM to NVMEM format for legacy SoCs
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_mercury_mac1200r-v2.dts
1 #include "mt7628an.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "mercury,mac1200r-v2", "mediatek,mt7628an-soc";
8 model = "Mercury MAC1200R v2";
9
10 aliases {
11 led-boot = &led_status;
12 led-failsafe = &led_status;
13 led-running = &led_status;
14 led-upgrade = &led_status;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 led_status: status {
21 label = "green:status";
22 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
23 };
24 };
25 };
26
27 &spi0 {
28 status = "okay";
29
30 flash@0 {
31 compatible = "jedec,spi-nor";
32 reg = <0>;
33 spi-max-frequency = <10000000>;
34
35 partitions {
36 compatible = "fixed-partitions";
37 #address-cells = <1>;
38 #size-cells = <1>;
39
40 partition@0 {
41 label = "u-boot";
42 reg = <0x0 0x1d800>;
43 };
44
45 factory: partition@1d800 {
46 compatible = "nvmem-cells";
47 label = "factory_info";
48 reg = <0x1d800 0x800>;
49 #address-cells = <1>;
50 #size-cells = <1>;
51 read-only;
52
53 eeprom_factory_0: eeprom@0 {
54 reg = <0x0 0x400>;
55 };
56
57 macaddr_factory_d: macaddr@d {
58 reg = <0xd 0x6>;
59 };
60 };
61
62 art: partition@1e000 {
63 compatible = "nvmem-cells";
64 label = "art";
65 reg = <0x1e000 0x2000>;
66 #address-cells = <1>;
67 #size-cells = <1>;
68 read-only;
69
70 eeprom_art_1000: eeprom@1000 {
71 reg = <0x1000 0x200>;
72 };
73 };
74
75 partition@20000 {
76 label = "config";
77 reg = <0x20000 0x10000>;
78 };
79
80 partition@30000 {
81 label = "u-boot2";
82 reg = <0x30000 0x10000>;
83 };
84
85 partition@40000 {
86 compatible = "denx,uimage";
87 label = "firmware";
88 reg = <0x40000 0x7c0000>;
89 };
90 };
91 };
92 };
93
94 &ethernet {
95 pinctrl-names = "default";
96 nvmem-cells = <&macaddr_factory_d>;
97 nvmem-cell-names = "mac-address";
98 };
99
100 &esw {
101 mediatek,portmap = <0x2f>;
102 };
103
104 &wmac {
105 status = "okay";
106
107 nvmem-cells = <&eeprom_factory_0>;
108 nvmem-cell-names = "eeprom";
109 };
110
111 &pcie {
112 status = "okay";
113 };
114
115 &pcie0 {
116 mt76@0,0 {
117 reg = <0x0000 0 0 0 0>;
118 nvmem-cells = <&eeprom_art_1000>;
119 nvmem-cell-names = "eeprom";
120 ieee80211-freq-limit = <5000000 6000000>;
121 };
122 };