ramips: convert mtd-mac-address to nvmem implementation
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_asiarf_ap7621.dtsi
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 keys {
10 compatible = "gpio-keys";
11
12 reset {
13 label = "reset";
14 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
15 linux,code = <KEY_RESTART>;
16 };
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 wlan1 {
23 label = "orange:wlan1";
24 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
25 };
26
27 wlan0 {
28 label = "orange:wlan0";
29 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
30 };
31 };
32 };
33
34 &sdhci {
35 status = "okay";
36 };
37
38 &spi0 {
39 status = "okay";
40
41 flash@0 {
42 compatible = "jedec,spi-nor";
43 reg = <0>;
44 spi-max-frequency = <40000000>;
45
46 partitions {
47 compatible = "fixed-partitions";
48 #address-cells = <1>;
49 #size-cells = <1>;
50
51 partition@0 {
52 label = "u-boot";
53 reg = <0x0 0x30000>;
54 read-only;
55 };
56
57 partition@30000 {
58 label = "u-boot-env";
59 reg = <0x30000 0x2000>;
60 };
61
62 partition@32000 {
63 label = "2860";
64 reg = <0x32000 0x4000>;
65 };
66
67 partition@36000 {
68 label = "rtdev";
69 reg = <0x36000 0x2000>;
70 };
71
72 partition@38000 {
73 label = "Reserve";
74 reg = <0x38000 0x8000>;
75 };
76
77 factory: partition@40000 {
78 label = "factory";
79 reg = <0x40000 0x10000>;
80 read-only;
81 };
82
83 partition@50000 {
84 label = "firmware";
85 reg = <0x50000 0xfa0000>;
86 compatible = "denx,uimage";
87 };
88
89 partition@ff0000 {
90 label = "nvram";
91 reg = <0xff0000 0x10000>;
92 read-only;
93 };
94 };
95 };
96 };
97
98 &pcie {
99 status = "okay";
100 };
101
102 &gmac0 {
103 nvmem-cells = <&macaddr_factory_e000>;
104 nvmem-cell-names = "mac-address";
105 };
106
107 &state_default {
108 gpio {
109 groups = "wdt", "jtag";
110 function = "gpio";
111 };
112 };
113
114 &factory {
115 compatible = "nvmem-cells";
116 #address-cells = <1>;
117 #size-cells = <1>;
118
119 macaddr_factory_e000: macaddr@e000 {
120 reg = <0xe000 0x6>;
121 };
122 };