ramips: convert MT7628 EEPROM to NVMEM format
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_tplink_8m-split-uboot.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 chosen {
10 bootargs = "console=ttyS0,115200";
11 };
12
13 aliases {
14 label-mac-device = &ethernet;
15 };
16 };
17
18 &spi0 {
19 status = "okay";
20
21 flash@0 {
22 compatible = "jedec,spi-nor";
23 reg = <0>;
24 spi-max-frequency = <10000000>;
25
26 partitions {
27 compatible = "fixed-partitions";
28 #address-cells = <1>;
29 #size-cells = <1>;
30
31 partition@0 {
32 label = "factory-uboot";
33 reg = <0x0 0x30000>;
34 read-only;
35 };
36
37 partition@30000 {
38 label = "boot";
39 reg = <0x30000 0x20000>;
40 read-only;
41 };
42
43 partition@50000 {
44 compatible = "tplink,firmware";
45 label = "firmware";
46 reg = <0x50000 0x770000>;
47 };
48
49 partition@7c0000 {
50 label = "config";
51 reg = <0x7c0000 0x10000>;
52 read-only;
53 };
54
55 rom: partition@7d0000 {
56 compatible = "nvmem-cells";
57 label = "rom";
58 reg = <0x7d0000 0x10000>;
59 #address-cells = <1>;
60 #size-cells = <1>;
61 read-only;
62
63 macaddr_rom_f100: macaddr@f100 {
64 reg = <0xf100 0x6>;
65 };
66 };
67
68 partition@7e0000 {
69 label = "romfile";
70 reg = <0x7e0000 0x10000>;
71 };
72
73 radio: partition@7f0000 {
74 compatible = "nvmem-cells";
75 label = "radio";
76 reg = <0x7f0000 0x10000>;
77 #address-cells = <1>;
78 #size-cells = <1>;
79 read-only;
80
81 eeprom_radio_0: eeprom@0 {
82 reg = <0x0 0x400>;
83 };
84 };
85 };
86 };
87 };
88
89 &wmac {
90 status = "okay";
91
92 nvmem-cells = <&eeprom_radio_0>, <&macaddr_rom_f100>;
93 nvmem-cell-names = "eeprom", "mac-address";
94 };
95
96 &ethernet {
97 nvmem-cells = <&macaddr_rom_f100>;
98 nvmem-cell-names = "mac-address";
99 };
100
101 &esw {
102 mediatek,portmap = <0x3e>;
103 };