ramips: add support for indicating the boot state using multiple leds
[openwrt/openwrt.git] / target / linux / ramips / dts / 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 memory@0 {
20 device_type = "memory";
21 reg = <0x0 0x8000000>;
22 };
23
24 chosen {
25 bootargs = "console=ttyS0,57600";
26 };
27
28 palmbus: palmbus@1E000000 {
29 i2c@900 {
30 status = "okay";
31 };
32 };
33
34 gpio-keys-polled {
35 compatible = "gpio-keys-polled";
36 poll-interval = <20>;
37
38 reset {
39 label = "reset";
40 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_RESTART>;
42 };
43 };
44
45 gpio-leds {
46 compatible = "gpio-leds";
47
48 led_run: run {
49 label = "ew1200:green:run";
50 gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
51 };
52
53 usb {
54 label = "ew1200:green:usb";
55 gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
56 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
57 linux,default-trigger = "usbport";
58 };
59 };
60 };
61
62 &sdhci {
63 status = "okay";
64 };
65
66 &spi0 {
67 status = "okay";
68
69 m25p80@0 {
70 compatible = "jedec,spi-nor";
71 reg = <0>;
72 spi-max-frequency = <10000000>;
73 m25p,chunked-io = <32>;
74
75 partitions {
76 compatible = "fixed-partitions";
77 #address-cells = <1>;
78 #size-cells = <1>;
79
80 partition@0 {
81 label = "u-boot";
82 reg = <0x0 0x30000>;
83 read-only;
84 };
85
86 partition@30000 {
87 label = "u-boot-env";
88 reg = <0x30000 0x10000>;
89 read-only;
90 };
91
92 factory: partition@40000 {
93 label = "factory";
94 reg = <0x40000 0x10000>;
95 read-only;
96 };
97
98 partition@50000 {
99 label = "firmware";
100 reg = <0x50000 0xfb0000>;
101 };
102 };
103 };
104 };
105
106 &pcie {
107 status = "okay";
108 };
109
110 &pcie0 {
111 mt76@0,0 {
112 reg = <0x0000 0 0 0 0>;
113 mediatek,mtd-eeprom = <&factory 0x8000>;
114 ieee80211-freq-limit = <5000000 6000000>;
115 };
116 };
117
118 &pcie1 {
119 mt76@0,0 {
120 reg = <0x0000 0 0 0 0>;
121 mediatek,mtd-eeprom = <&factory 0x0000>;
122 ieee80211-freq-limit = <2400000 2500000>;
123 };
124 };
125
126 &ethernet {
127 mtd-mac-address = <&factory 0xe000>;
128 };
129
130 &pinctrl {
131 state_default: pinctrl0 {
132 gpio {
133 ralink,group = "wdt", "rgmii2", "jtag", "mdio";
134 ralink,function = "gpio";
135 };
136 };
137 };