ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7620a_microduino_microwrt.dts
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "microduino,microwrt", "ralink,mt7620a-soc";
8 model = "Microduino MicroWRT";
9
10 chosen {
11 bootargs = "console=ttyS0,115200";
12 };
13
14 keys {
15 compatible = "gpio-keys";
16
17 reset {
18 label = "reset";
19 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
20 linux,code = <KEY_RESTART>;
21 };
22
23 wps {
24 label = "wps";
25 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_WPS_BUTTON>;
27 };
28 };
29 };
30
31 &spi0 {
32 status = "okay";
33
34 flash@0 {
35 compatible = "jedec,spi-nor";
36 reg = <0>;
37 spi-max-frequency = <10000000>;
38
39 partitions {
40 compatible = "fixed-partitions";
41 #address-cells = <1>;
42 #size-cells = <1>;
43
44 partition@0 {
45 label = "u-boot";
46 reg = <0x0 0x20000>;
47 read-only;
48 };
49
50 partition@20000 {
51 label = "u-boot-env";
52 reg = <0x20000 0x10000>;
53 read-only;
54 };
55
56 factory: partition@30000 {
57 compatible = "nvmem-cells";
58 label = "factory";
59 reg = <0x30000 0x10000>;
60 #address-cells = <1>;
61 #size-cells = <1>;
62 read-only;
63
64 eeprom_factory_0: eeprom@0 {
65 reg = <0x0 0x200>;
66 };
67
68 macaddr_factory_4: macaddr@4 {
69 reg = <0x4 0x6>;
70 };
71 };
72
73 partition@40000 {
74 compatible = "denx,uimage";
75 label = "firmware";
76 reg = <0x40000 0xfc0000>;
77 };
78 };
79 };
80 };
81
82 &ehci {
83 status = "okay";
84 };
85
86 &ohci {
87 status = "okay";
88 };
89
90 &ethernet {
91 pinctrl-names = "default";
92 pinctrl-0 = <&ephy_pins>;
93
94 nvmem-cells = <&macaddr_factory_4>;
95 nvmem-cell-names = "mac-address";
96
97 mediatek,portmap = "llllw";
98 };
99
100 &wmac {
101 nvmem-cells = <&eeprom_factory_0>;
102 nvmem-cell-names = "eeprom";
103 };
104
105 &state_default {
106 default {
107 groups = "wled", "i2c", "wdt", "uartf";
108 function = "gpio";
109 };
110 };