ramips: fix multi colour led handling
[openwrt/openwrt.git] / target / linux / ramips / dts / MZK-EX300NP.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-ex300np", "ralink,mt7620a-soc";
10 model = "Planex MZK-EX300NP";
11
12 aliases {
13 led-status = &led_wps;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 wifi {
20 label = "mzk-ex300np:green:wifi";
21 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
22 };
23
24 led_wps: wps {
25 label = "mzk-ex300np:green:wps";
26 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
27 };
28
29 rep {
30 label = "mzk-ex300np:blue:rep";
31 gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
32 };
33
34 wifi1 {
35 label = "mzk-ex300np:blue:wifi1";
36 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
37 };
38
39 wifi2 {
40 label = "mzk-ex300np:blue:wifi2";
41 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
42 };
43
44 wifi3 {
45 label = "mzk-ex300np:blue:wifi3";
46 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
47 };
48 };
49
50 gpio-keys-polled {
51 compatible = "gpio-keys-polled";
52 poll-interval = <20>;
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 m25p80@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
107 partition@50000 {
108 label = "firmware";
109 reg = <0x50000 0x730000>;
110 };
111
112 partition@780000 {
113 label = "Udata";
114 reg = <0x780000 0x80000>;
115 };
116 };
117 };
118 };
119
120 &pinctrl {
121 state_default: pinctrl0 {
122 gpio {
123 ralink,group = "i2c", "spi refclk", "rgmii1", "wled";
124 ralink,function = "gpio";
125 };
126 };
127 };
128
129 &ethernet {
130 pinctrl-names = "default";
131 pinctrl-0 = <&ephy_pins>;
132 mtd-mac-address = <&factory 0x4>;
133 mediatek,portmap = "llllw";
134 };
135
136 &wmac {
137 ralink,mtd-eeprom = <&factory 0>;
138 };