ramips: mt7620a: convert to nvmem-layout
[openwrt/staging/hauke.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 nvmem-layout {
60 compatible = "fixed-layout";
61 #address-cells = <1>;
62 #size-cells = <1>;
63
64 eeprom_factory_0: eeprom@0 {
65 reg = <0x0 0x200>;
66 };
67
68 eeprom_factory_8000: eeprom@8000 {
69 reg = <0x8000 0x200>;
70 };
71
72 macaddr_factory_4: macaddr@4 {
73 reg = <0x4 0x6>;
74 };
75 };
76 };
77
78 partition@50000 {
79 compatible = "denx,uimage";
80 label = "firmware";
81 reg = <0x50000 0xf70000>;
82 };
83
84 partition@fc0000 {
85 label = "oem";
86 reg = <0xfc0000 0x20000>;
87 read-only;
88 };
89
90 bdinfo: partition@fe0000 {
91 label = "bdinfo";
92 reg = <0xfe0000 0x10000>;
93 read-only;
94 };
95
96 partition@ff0000 {
97 label = "backup";
98 reg = <0xff0000 0x10000>;
99 read-only;
100 };
101 };
102 };
103 };
104
105 &ethernet {
106 nvmem-cells = <&macaddr_factory_4>;
107 nvmem-cell-names = "mac-address";
108
109 mediatek,portmap = "wllll";
110 };
111
112 &sdhci {
113 status = "okay";
114 };
115
116 &wmac {
117 nvmem-cells = <&eeprom_factory_0>;
118 nvmem-cell-names = "eeprom";
119 };
120
121 &state_default {
122 gpio {
123 groups = "uartf", "wled";
124 function = "gpio";
125 };
126 };