ramips: add support for EnGenius ESR600
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_d-team_newifi-d2.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 = "d-team,newifi-d2", "mediatek,mt7621-soc";
10         model = "Newifi-D2";
11
12         aliases {
13                 led-boot = &led_power_blue;
14                 led-failsafe = &led_power_blue;
15                 led-running = &led_power_blue;
16                 led-upgrade = &led_power_blue;
17                 label-mac-device = &ethernet;
18         };
19
20         chosen {
21                 bootargs = "console=ttyS0,115200";
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26
27                 power-amber {
28                         label = "newifi-d2:amber:power";
29                         gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
30                 };
31
32                 led_power_blue: power-blue {
33                         label = "newifi-d2:blue:power";
34                         gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
35                 };
36
37                 internet-amber {
38                         label = "newifi-d2:amber:internet";
39                         gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
40                 };
41
42                 internet-blue {
43                         label = "newifi-d2:blue:internet";
44                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
45                 };
46
47                 wlan2g {
48                         label = "newifi-d2:blue:wlan2g";
49                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
50                 };
51
52                 wlan5g {
53                         label = "newifi-d2:blue:wlan5g";
54                         gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
55                 };
56
57                 usb {
58                         label = "newifi-d2:blue:usb";
59                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
60                         trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
61                         linux,default-trigger = "usbport";
62                 };
63         };
64
65         keys {
66                 compatible = "gpio-keys-polled";
67                 poll-interval = <20>;
68
69                 reset {
70                         label = "reset";
71                         gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
72                         linux,code = <KEY_RESTART>;
73                 };
74
75                 wps {
76                         label = "wps";
77                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
78                         linux,code = <KEY_WPS_BUTTON>;
79                 };
80         };
81
82         gpio_export {
83                 compatible = "gpio-export";
84                 #size-cells = <0>;
85
86                 power_usb3 {
87                         gpio-export,name = "power_usb3";
88                         gpio-export,output = <1>;
89                         gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
90                 };
91         };
92 };
93
94 &spi0 {
95         status = "okay";
96
97         m25p80@0 {
98                 compatible = "jedec,spi-nor";
99                 reg = <0>;
100                 spi-max-frequency = <10000000>;
101
102                 partitions {
103                         compatible = "fixed-partitions";
104                         #address-cells = <1>;
105                         #size-cells = <1>;
106
107                         partition@0 {
108                                 label = "u-boot";
109                                 reg = <0x0 0x30000>;
110                                 read-only;
111                         };
112
113                         partition@30000 {
114                                 label = "u-boot-env";
115                                 reg = <0x30000 0x10000>;
116                                 read-only;
117                         };
118
119                         factory: partition@40000 {
120                                 label = "factory";
121                                 reg = <0x40000 0x10000>;
122                                 read-only;
123                         };
124
125                         partition@50000 {
126                                 compatible = "denx,uimage";
127                                 label = "firmware";
128                                 reg = <0x50000 0x1fb0000>;
129                         };
130                 };
131         };
132 };
133
134 &pcie {
135         status = "okay";
136 };
137
138 &pcie0 {
139         mt76@0,0 {
140                 reg = <0x0000 0 0 0 0>;
141                 mediatek,mtd-eeprom = <&factory 0x8000>;
142                 ieee80211-freq-limit = <5000000 6000000>;
143         };
144 };
145
146 &pcie1 {
147         mt76@0,0 {
148                 reg = <0x0000 0 0 0 0>;
149                 mediatek,mtd-eeprom = <&factory 0x0000>;
150         };
151 };
152
153 &ethernet {
154         mtd-mac-address = <&factory 0xe000>;
155 };
156
157 &pinctrl {
158         state_default: pinctrl0 {
159                 gpio {
160                         ralink,group = "i2c", "jtag", "uart2", "uart3";
161                         ralink,function = "gpio";
162                 };
163         };
164 };