ramips: mt7620a: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7620a_planex_mzk-ex300np.dts
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "planex,mzk-ex300np", "ralink,mt7620a-soc";
8 model = "Planex MZK-EX300NP";
9
10 aliases {
11 led-boot = &led_wps;
12 led-failsafe = &led_wps;
13 led-running = &led_wps;
14 led-upgrade = &led_wps;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 wifi {
21 label = "green:wifi";
22 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
23 };
24
25 led_wps: wps {
26 label = "green:wps";
27 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
28 };
29
30 rep {
31 label = "blue:rep";
32 gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
33 };
34
35 wifi1 {
36 label = "blue:wifi1";
37 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
38 };
39
40 wifi2 {
41 label = "blue:wifi2";
42 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
43 };
44
45 wifi3 {
46 label = "blue:wifi3";
47 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
48 };
49 };
50
51 keys {
52 compatible = "gpio-keys";
53
54 reset {
55 label = "reset";
56 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_RESTART>;
58 };
59
60 wps {
61 label = "wps";
62 gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
63 linux,code = <KEY_RFKILL>;
64 };
65 };
66 };
67
68 &gpio1 {
69 status = "okay";
70 };
71
72 &gpio3 {
73 status = "okay";
74 };
75
76 &spi0 {
77 status = "okay";
78
79 flash@0 {
80 compatible = "jedec,spi-nor";
81 reg = <0>;
82 spi-max-frequency = <10000000>;
83
84 partitions {
85 compatible = "fixed-partitions";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 partition@0 {
90 label = "u-boot";
91 reg = <0x0 0x30000>;
92 read-only;
93 };
94
95 partition@30000 {
96 label = "u-boot-env";
97 reg = <0x30000 0x10000>;
98 read-only;
99 };
100
101 factory: partition@40000 {
102 label = "factory";
103 reg = <0x40000 0x10000>;
104 read-only;
105
106 nvmem-layout {
107 compatible = "fixed-layout";
108 #address-cells = <1>;
109 #size-cells = <1>;
110
111 eeprom_factory_0: eeprom@0 {
112 reg = <0x0 0x200>;
113 };
114
115 macaddr_factory_4: macaddr@4 {
116 reg = <0x4 0x6>;
117 };
118 };
119 };
120
121 partition@50000 {
122 compatible = "denx,uimage";
123 label = "firmware";
124 reg = <0x50000 0x730000>;
125 };
126
127 partition@780000 {
128 label = "Udata";
129 reg = <0x780000 0x80000>;
130 };
131 };
132 };
133 };
134
135 &state_default {
136 gpio {
137 groups = "i2c", "spi refclk", "rgmii1", "wled";
138 function = "gpio";
139 };
140 };
141
142 &ethernet {
143 pinctrl-names = "default";
144 pinctrl-0 = <&ephy_pins>;
145
146 nvmem-cells = <&macaddr_factory_4>;
147 nvmem-cell-names = "mac-address";
148
149 mediatek,portmap = "llllw";
150 };
151
152 &wmac {
153 nvmem-cells = <&eeprom_factory_0>;
154 nvmem-cell-names = "eeprom";
155 };