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