ramips: add support for indicating the boot state using multiple leds
[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-boot = &led_wps;
14 led-failsafe = &led_wps;
15 led-running = &led_wps;
16 led-upgrade = &led_wps;
17 };
18
19 gpio-leds {
20 compatible = "gpio-leds";
21
22 wifi {
23 label = "mzk-ex300np:green:wifi";
24 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
25 };
26
27 led_wps: wps {
28 label = "mzk-ex300np:green:wps";
29 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
30 };
31
32 rep {
33 label = "mzk-ex300np:blue:rep";
34 gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
35 };
36
37 wifi1 {
38 label = "mzk-ex300np:blue:wifi1";
39 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
40 };
41
42 wifi2 {
43 label = "mzk-ex300np:blue:wifi2";
44 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
45 };
46
47 wifi3 {
48 label = "mzk-ex300np:blue:wifi3";
49 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
50 };
51 };
52
53 gpio-keys-polled {
54 compatible = "gpio-keys-polled";
55 poll-interval = <20>;
56
57 reset {
58 label = "reset";
59 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
60 linux,code = <KEY_RESTART>;
61 };
62
63 wps {
64 label = "wps";
65 gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
66 linux,code = <KEY_RFKILL>;
67 };
68 };
69 };
70
71 &gpio1 {
72 status = "okay";
73 };
74
75 &gpio3 {
76 status = "okay";
77 };
78
79 &spi0 {
80 status = "okay";
81
82 m25p80@0 {
83 compatible = "jedec,spi-nor";
84 reg = <0>;
85 spi-max-frequency = <10000000>;
86
87 partitions {
88 compatible = "fixed-partitions";
89 #address-cells = <1>;
90 #size-cells = <1>;
91
92 partition@0 {
93 label = "u-boot";
94 reg = <0x0 0x30000>;
95 read-only;
96 };
97
98 partition@30000 {
99 label = "u-boot-env";
100 reg = <0x30000 0x10000>;
101 read-only;
102 };
103
104 factory: partition@40000 {
105 label = "factory";
106 reg = <0x40000 0x10000>;
107 read-only;
108 };
109
110 partition@50000 {
111 label = "firmware";
112 reg = <0x50000 0x730000>;
113 };
114
115 partition@780000 {
116 label = "Udata";
117 reg = <0x780000 0x80000>;
118 };
119 };
120 };
121 };
122
123 &pinctrl {
124 state_default: pinctrl0 {
125 gpio {
126 ralink,group = "i2c", "spi refclk", "rgmii1", "wled";
127 ralink,function = "gpio";
128 };
129 };
130 };
131
132 &ethernet {
133 pinctrl-names = "default";
134 pinctrl-0 = <&ephy_pins>;
135 mtd-mac-address = <&factory 0x4>;
136 mediatek,portmap = "llllw";
137 };
138
139 &wmac {
140 ralink,mtd-eeprom = <&factory 0>;
141 };