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