ramips: mt7628: use nvmem-layout
[openwrt/staging/stintel.git] / target / linux / ramips / dts / mt7628an_tplink_8m.dtsi
1 #include "mt7628an.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/gpio/gpio.h>
5
6 / {
7 chosen {
8 bootargs = "console=ttyS0,115200";
9 };
10
11 aliases {
12 label-mac-device = &ethernet;
13 };
14 };
15
16 &spi0 {
17 status = "okay";
18
19 flash@0 {
20 compatible = "jedec,spi-nor";
21 reg = <0>;
22 spi-max-frequency = <10000000>;
23
24 partitions {
25 compatible = "fixed-partitions";
26 #address-cells = <1>;
27 #size-cells = <1>;
28
29 partition@0 {
30 label = "boot";
31 reg = <0x0 0x20000>;
32 read-only;
33 };
34
35 partition@20000 {
36 compatible = "tplink,firmware";
37 label = "firmware";
38 reg = <0x20000 0x7a0000>;
39 };
40
41 partition@7c0000 {
42 label = "config";
43 reg = <0x7c0000 0x10000>;
44 read-only;
45 };
46
47 factory: partition@7d0000 {
48 label = "factory";
49 reg = <0x7d0000 0x30000>;
50 read-only;
51
52 nvmem-layout {
53 compatible = "fixed-layout";
54 #address-cells = <1>;
55 #size-cells = <1>;
56
57 macaddr_factory_f100: macaddr@f100 {
58 reg = <0xf100 0x6>;
59 };
60
61 eeprom_factory_20000: eeprom@20000 {
62 reg = <0x20000 0x400>;
63 };
64
65 eeprom_factory_28000: eeprom@28000 {
66 reg = <0x28000 0x200>;
67 };
68 };
69 };
70 };
71 };
72 };
73
74 &wmac {
75 status = "okay";
76
77 nvmem-cells = <&eeprom_factory_20000>, <&macaddr_factory_f100>;
78 nvmem-cell-names = "eeprom", "mac-address";
79 };
80
81 &ethernet {
82 nvmem-cells = <&macaddr_factory_f100>;
83 nvmem-cell-names = "mac-address";
84 };