ramips: convert mtd-mac-address to nvmem implementation
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_iptime.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 label-mac-device = &ethernet;
11 };
12 };
13
14 &gpio1 {
15 status = "okay";
16 };
17
18 &spi0 {
19 status = "okay";
20
21 flash@0 {
22 compatible = "jedec,spi-nor";
23 reg = <0>;
24 spi-max-frequency = <50000000>;
25
26 partitions {
27 compatible = "fixed-partitions";
28 #address-cells = <1>;
29 #size-cells = <1>;
30
31 uboot: partition@0 {
32 label = "u-boot";
33 reg = <0x0 0x20000>;
34 read-only;
35 };
36
37 partition@20000 {
38 label = "config";
39 reg = <0x20000 0x10000>;
40 read-only;
41 };
42
43 firmware: partition@30000 {
44 compatible = "denx,uimage";
45 label = "firmware";
46 };
47 };
48 };
49 };
50
51 &ethernet {
52 nvmem-cells = <&macaddr_uboot_1fc20>;
53 nvmem-cell-names = "mac-address";
54 };
55
56 &ehci {
57 status = "okay";
58 };
59
60 &ohci {
61 status = "okay";
62 };
63
64 &pcie {
65 status = "okay";
66 };
67
68 &pcie0 {
69 wifi@0,0 {
70 compatible = "mediatek,mt76";
71 reg = <0x0000 0 0 0 0>;
72 mediatek,mtd-eeprom = <&uboot 0x1f800>;
73 ieee80211-freq-limit = <5000000 6000000>;
74
75 led {
76 led-sources = <0>;
77 led-active-low;
78 };
79 };
80 };
81
82 &wmac {
83 pinctrl-names = "default";
84 pinctrl-0 = <&wled_pins>;
85
86 ralink,mtd-eeprom = <&uboot 0x1f400>;
87 };
88
89 &uboot {
90 compatible = "nvmem-cells";
91 #address-cells = <1>;
92 #size-cells = <1>;
93
94 macaddr_uboot_1fc20: macaddr@1fc20 {
95 reg = <0x1fc20 0x6>;
96 };
97 };