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