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