ramips: mt7628: use nvmem-layout
[openwrt/staging/hauke.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 label = "rom";
57 reg = <0x7d0000 0x10000>;
58 read-only;
59
60 nvmem-layout {
61 compatible = "fixed-layout";
62 #address-cells = <1>;
63 #size-cells = <1>;
64
65 macaddr_rom_f100: macaddr@f100 {
66 reg = <0xf100 0x6>;
67 };
68 };
69 };
70
71 partition@7e0000 {
72 label = "romfile";
73 reg = <0x7e0000 0x10000>;
74 };
75
76 radio: partition@7f0000 {
77 label = "radio";
78 reg = <0x7f0000 0x10000>;
79 read-only;
80
81 nvmem-layout {
82 compatible = "fixed-layout";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 eeprom_radio_0: eeprom@0 {
87 reg = <0x0 0x400>;
88 };
89
90 eeprom_radio_8000: eeprom@8000 {
91 reg = <0x8000 0x200>;
92 };
93 };
94 };
95 };
96 };
97 };
98
99 &wmac {
100 status = "okay";
101
102 nvmem-cells = <&eeprom_radio_0>, <&macaddr_rom_f100>;
103 nvmem-cell-names = "eeprom", "mac-address";
104 };
105
106 &ethernet {
107 nvmem-cells = <&macaddr_rom_f100>;
108 nvmem-cell-names = "mac-address";
109 };
110
111 &esw {
112 mediatek,portmap = <0x3e>;
113 };