ramips: convert MT7628 EEPROM to NVMEM format
[openwrt/staging/stintel.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 label = "art";
64 reg = <0x1e000 0x2000>;
65 read-only;
66 };
67
68 partition@20000 {
69 label = "config";
70 reg = <0x20000 0x10000>;
71 };
72
73 partition@30000 {
74 label = "u-boot2";
75 reg = <0x30000 0x10000>;
76 };
77
78 partition@40000 {
79 compatible = "denx,uimage";
80 label = "firmware";
81 reg = <0x40000 0x7c0000>;
82 };
83 };
84 };
85 };
86
87 &ethernet {
88 pinctrl-names = "default";
89 nvmem-cells = <&macaddr_factory_d>;
90 nvmem-cell-names = "mac-address";
91 };
92
93 &esw {
94 mediatek,portmap = <0x2f>;
95 };
96
97 &wmac {
98 status = "okay";
99
100 nvmem-cells = <&eeprom_factory_0>;
101 nvmem-cell-names = "eeprom";
102 };
103
104 &pcie {
105 status = "okay";
106 };
107
108 &pcie0 {
109 mt76@0,0 {
110 reg = <0x0000 0 0 0 0>;
111 mediatek,mtd-eeprom = <&art 0x1000>;
112 ieee80211-freq-limit = <5000000 6000000>;
113 };
114 };