ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/staging/hauke.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 = <40000000>;
25
26 partitions {
27 compatible = "fixed-partitions";
28 #address-cells = <1>;
29 #size-cells = <1>;
30
31 uboot: partition@0 {
32 compatible = "nvmem-cells";
33 label = "u-boot";
34 reg = <0x0 0x20000>;
35 #address-cells = <1>;
36 #size-cells = <1>;
37 read-only;
38
39 eeprom_uboot_1f400: eeprom@1f400 {
40 reg = <0x1f400 0x200>;
41 };
42
43 macaddr_uboot_1fc20: macaddr@1fc20 {
44 reg = <0x1fc20 0x6>;
45 };
46 };
47
48 partition@20000 {
49 label = "config";
50 reg = <0x20000 0x10000>;
51 read-only;
52 };
53
54 firmware: partition@30000 {
55 compatible = "denx,uimage";
56 label = "firmware";
57 };
58 };
59 };
60 };
61
62 &ethernet {
63 nvmem-cells = <&macaddr_uboot_1fc20>;
64 nvmem-cell-names = "mac-address";
65 };
66
67 &ehci {
68 status = "okay";
69 };
70
71 &ohci {
72 status = "okay";
73 };
74
75 &pcie {
76 status = "okay";
77 };
78
79 &pcie0 {
80 wifi@0,0 {
81 compatible = "mediatek,mt76";
82 reg = <0x0000 0 0 0 0>;
83 mediatek,mtd-eeprom = <&uboot 0x1f800>;
84 ieee80211-freq-limit = <5000000 6000000>;
85
86 led {
87 led-sources = <0>;
88 led-active-low;
89 };
90 };
91 };
92
93 &wmac {
94 pinctrl-names = "default";
95 pinctrl-0 = <&wled_pins>;
96 nvmem-cells = <&eeprom_uboot_1f400>;
97 nvmem-cell-names = "eeprom";
98 };