ramips/mt762x: convert devices to interrupt-driven gpio-keys
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_wavlink_wl-wn570ha1.dts
1 /dts-v1/;
2 #include <dt-bindings/input/input.h>
3 #include <dt-bindings/gpio/gpio.h>
4
5 #include "mt7628an.dtsi"
6
7 / {
8 compatible = "wavlink,wl-wn570ha1", "mediatek,mt7628an-soc";
9 model = "Wavlink WL-WN570HA1";
10
11 chosen {
12 bootargs = "console=ttyS0,57600";
13 };
14
15 keys {
16 compatible = "gpio-keys";
17
18 reset {
19 label = "reset";
20 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
21 linux,code = <KEY_RESTART>;
22 };
23 };
24
25 leds {
26 compatible = "gpio-leds";
27
28 power {
29 label = "wl-wn570ha1:green:power";
30 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
31 default-state = "keep";
32 };
33
34 wan {
35 label = "wl-wn570ha1:green:wan";
36 gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
37 };
38
39 wifi-high {
40 label = "wl-wn570ha1:green:wifi-high";
41 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
42 };
43
44 wifi-med {
45 label = "wl-wn570ha1:green:wifi-med";
46 gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
47 };
48
49 wifi-low {
50 label = "wl-wn570ha1:green:wifi-low";
51 gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
52 };
53
54 wifi {
55 label = "wl-wn570ha1:green:wifi";
56 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
57 };
58 };
59 };
60
61 &pinctrl {
62 state_default: pinctrl0 {
63 gpio {
64 ralink,group = "i2c", "wled_an", "p0led_an", "wdt", "refclk";
65 ralink,function = "gpio";
66 };
67 };
68 };
69
70 &pcie {
71 status = "okay";
72 };
73
74 &pcie0 {
75 wifi@0,0 {
76 reg = <0x0000 0 0 0 0>;
77 mediatek,mtd-eeprom = <&factory 0x8000>;
78 ieee80211-freq-limit = <5000000 6000000>;
79 };
80 };
81
82 &spi0 {
83 status = "okay";
84
85 flash@0 {
86 compatible = "jedec,spi-nor";
87 reg = <0>;
88 spi-max-frequency = <10000000>;
89
90 partitions {
91 compatible = "fixed-partitions";
92 #address-cells = <1>;
93 #size-cells = <1>;
94
95 partition@0 {
96 label = "u-boot";
97 reg = <0x0 0x30000>;
98 read-only;
99 };
100
101 partition@30000 {
102 label = "u-boot-env";
103 reg = <0x30000 0x10000>;
104 read-only;
105 };
106
107 factory: partition@40000 {
108 label = "factory";
109 reg = <0x40000 0x10000>;
110 read-only;
111 };
112
113 partition@50000 {
114 compatible = "denx,uimage";
115 label = "firmware";
116 reg = <0x50000 0x7b0000>;
117 };
118 };
119 };
120 };
121
122 &wmac {
123 status = "okay";
124 };
125
126 &ethernet {
127 mtd-mac-address = <&factory 0x2e>;
128 mediatek,portmap = "llllw";
129 };