ramips: convert MT7628 EEPROM to NVMEM format
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7628an_hiwifi_hc5x61a.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 compatible = "hiwifi,hc5x61a", "mediatek,mt7628an-soc";
10
11 aliases {
12 led-boot = &led_system;
13 led-failsafe = &led_system;
14 led-running = &led_system;
15 led-upgrade = &led_system;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200";
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
28 linux,code = <KEY_RESTART>;
29 };
30 };
31 };
32
33 &spi0 {
34 status = "okay";
35
36 flash@0 {
37 compatible = "jedec,spi-nor";
38 reg = <0>;
39 spi-max-frequency = <80000000>;
40 m25p,fast-read;
41
42 partitions {
43 compatible = "fixed-partitions";
44 #address-cells = <1>;
45 #size-cells = <1>;
46
47 partition@0 {
48 label = "u-boot";
49 reg = <0x0 0x30000>;
50 read-only;
51 };
52
53 partition@30000 {
54 label = "hw_panic";
55 reg = <0x30000 0x10000>;
56 read-only;
57 };
58
59 factory: partition@40000 {
60 compatible = "nvmem-cells";
61 label = "factory";
62 reg = <0x40000 0x10000>;
63 #address-cells = <1>;
64 #size-cells = <1>;
65 read-only;
66
67 eeprom_factory_0: eeprom@0 {
68 reg = <0x0 0x400>;
69 };
70
71 macaddr_factory_4: macaddr@4 {
72 reg = <0x4 0x6>;
73 };
74
75 macaddr_factory_2e: macaddr@2e {
76 reg = <0x2e 0x6>;
77 };
78 };
79
80 partition@50000 {
81 compatible = "denx,uimage";
82 label = "firmware";
83 reg = <0x50000 0xf70000>;
84 };
85
86 partition@fc0000 {
87 label = "oem";
88 reg = <0xfc0000 0x20000>;
89 read-only;
90 };
91
92 bdinfo: partition@fe0000 {
93 label = "bdinfo";
94 reg = <0xfe0000 0x10000>;
95 read-only;
96 };
97
98 partition@ff0000 {
99 label = "backup";
100 reg = <0xff0000 0x10000>;
101 read-only;
102 };
103 };
104 };
105 };
106
107 &ethernet {
108 nvmem-cells = <&macaddr_factory_4>;
109 nvmem-cell-names = "mac-address";
110 };
111
112 &wmac {
113 status = "okay";
114
115 nvmem-cells = <&eeprom_factory_0>;
116 nvmem-cell-names = "eeprom";
117 };