def47d51990b78bcd0a522ef0033e5d3e888cdd9
[oweals/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         keys {
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         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
74                 partitions {
75                         compatible = "fixed-partitions";
76                         #address-cells = <1>;
77                         #size-cells = <1>;
78
79                         partition@0 {
80                                 label = "u-boot";
81                                 reg = <0x0 0x30000>;
82                                 read-only;
83                         };
84
85                         partition@30000 {
86                                 label = "u-boot-env";
87                                 reg = <0x30000 0x10000>;
88                                 read-only;
89                         };
90
91                         factory: partition@40000 {
92                                 label = "factory";
93                                 reg = <0x40000 0x10000>;
94                                 read-only;
95                         };
96
97                         partition@50000 {
98                                 compatible = "denx,uimage";
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 };