ramips/mt762x: convert devices to interrupt-driven gpio-keys
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_afoundry_ew1200.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "afoundry,ew1200", "mediatek,mt7621-soc";
10 model = "EW1200";
11
12 aliases {
13 led-boot = &led_run;
14 led-failsafe = &led_run;
15 led-running = &led_run;
16 led-upgrade = &led_run;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,57600";
21 };
22
23 palmbus: palmbus@1E000000 {
24 i2c@900 {
25 status = "okay";
26 };
27 };
28
29 keys {
30 compatible = "gpio-keys";
31
32 reset {
33 label = "reset";
34 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_RESTART>;
36 };
37 };
38
39 leds {
40 compatible = "gpio-leds";
41
42 led_run: run {
43 label = "ew1200:green:run";
44 gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
45 };
46
47 usb {
48 label = "ew1200:green:usb";
49 gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
50 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
51 linux,default-trigger = "usbport";
52 };
53 };
54 };
55
56 &sdhci {
57 status = "okay";
58 };
59
60 &spi0 {
61 status = "okay";
62
63 m25p80@0 {
64 compatible = "jedec,spi-nor";
65 reg = <0>;
66 spi-max-frequency = <10000000>;
67
68 partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 partition@0 {
74 label = "u-boot";
75 reg = <0x0 0x30000>;
76 read-only;
77 };
78
79 partition@30000 {
80 label = "u-boot-env";
81 reg = <0x30000 0x10000>;
82 read-only;
83 };
84
85 factory: partition@40000 {
86 label = "factory";
87 reg = <0x40000 0x10000>;
88 read-only;
89 };
90
91 partition@50000 {
92 compatible = "denx,uimage";
93 label = "firmware";
94 reg = <0x50000 0xfb0000>;
95 };
96 };
97 };
98 };
99
100 &pcie {
101 status = "okay";
102 };
103
104 &pcie0 {
105 mt76@0,0 {
106 reg = <0x0000 0 0 0 0>;
107 mediatek,mtd-eeprom = <&factory 0x8000>;
108 ieee80211-freq-limit = <5000000 6000000>;
109 };
110 };
111
112 &pcie1 {
113 mt76@0,0 {
114 reg = <0x0000 0 0 0 0>;
115 mediatek,mtd-eeprom = <&factory 0x0000>;
116 ieee80211-freq-limit = <2400000 2500000>;
117 };
118 };
119
120 &ethernet {
121 mtd-mac-address = <&factory 0xe000>;
122 };
123
124 &pinctrl {
125 state_default: pinctrl0 {
126 gpio {
127 ralink,group = "wdt", "rgmii2", "jtag", "mdio";
128 ralink,function = "gpio";
129 };
130 };
131 };