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