ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7620a_planex_mzk-750dhp.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-750dhp", "ralink,mt7620a-soc";
8 model = "Planex MZK-750DHP";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 wps {
21 label = "green:wps";
22 gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
23 };
24
25 led_power: power {
26 label = "green:power";
27 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
28 };
29
30 wlan5g {
31 label = "green:wlan5g";
32 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
33 };
34 };
35
36 keys {
37 compatible = "gpio-keys";
38
39 s1 {
40 label = "reset";
41 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_RESTART>;
43 };
44
45 s2 {
46 label = "wps";
47 gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_WPS_BUTTON>;
49 };
50 };
51 };
52
53 &gpio1 {
54 status = "okay";
55 };
56
57 &gpio2 {
58 status = "okay";
59 };
60
61 &spi0 {
62 status = "okay";
63
64 flash@0 {
65 compatible = "jedec,spi-nor";
66 reg = <0>;
67 spi-max-frequency = <10000000>;
68
69 partitions {
70 compatible = "fixed-partitions";
71 #address-cells = <1>;
72 #size-cells = <1>;
73
74 partition@0 {
75 label = "u-boot";
76 reg = <0x0 0x30000>;
77 read-only;
78 };
79
80 partition@30000 {
81 label = "u-boot-env";
82 reg = <0x30000 0x10000>;
83 read-only;
84 };
85
86 factory: partition@40000 {
87 compatible = "nvmem-cells";
88 label = "factory";
89 reg = <0x40000 0x10000>;
90 #address-cells = <1>;
91 #size-cells = <1>;
92 read-only;
93
94 eeprom_factory_0: eeprom@0 {
95 reg = <0x0 0x200>;
96 };
97
98 macaddr_factory_4: macaddr@4 {
99 reg = <0x4 0x6>;
100 };
101 };
102
103 partition@50000 {
104 compatible = "denx,uimage";
105 label = "firmware";
106 reg = <0x50000 0x7b0000>;
107 };
108 };
109 };
110 };
111
112 &state_default {
113 gpio {
114 groups = "i2c", "spi refclk", "rgmii1", "nd_sd";
115 function = "gpio";
116 };
117 };
118
119 &ethernet {
120 pinctrl-names = "default";
121 pinctrl-0 = <&ephy_pins>;
122
123 nvmem-cells = <&macaddr_factory_4>;
124 nvmem-cell-names = "mac-address";
125
126 mediatek,portmap = "llllw";
127 };
128
129 &wmac {
130 nvmem-cells = <&eeprom_factory_0>;
131 nvmem-cell-names = "eeprom";
132 };
133
134 &pcie {
135 status = "okay";
136 };
137
138 &pcie0 {
139 mt76@0,0 {
140 reg = <0x0000 0 0 0 0>;
141 mediatek,mtd-eeprom = <&factory 0x8000>;
142 };
143 };