ramips: add support for WeVO W2914NS v2
[openwrt/openwrt.git] / target / linux / ramips / dts / W2914NSV2.dtsi
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 chosen {
8 bootargs = "console=ttyS0,57600";
9 };
10
11 gpio-keys-polled {
12 compatible = "gpio-keys-polled";
13 #address-cells = <1>;
14 #size-cells = <0>;
15 poll-interval = <20>;
16
17 reset {
18 label = "reset";
19 gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
20 linux,code = <KEY_RESTART>;
21 };
22
23 wps {
24 label = "wps";
25 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_WPS_BUTTON>;
27 };
28 };
29
30 gpio-leds {
31 compatible = "gpio-leds";
32
33 // Only USB LED is connected to GPIO.
34 // All of other LEDs are connected directly to
35 // switch, WiFi chip, Vcc, so they are not controllable
36 // via GPIO
37
38 usb {
39 label = "w2914nsv2:green:usb";
40 gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
41 };
42 };
43 };
44
45 &xhci {
46 status = "okay";
47 };
48
49 &spi0 {
50 status = "okay";
51
52 m25p80@0 {
53 #address-cells = <1>;
54 #size-cells = <1>;
55 compatible = "jedec,spi-nor";
56 reg = <0>;
57 spi-max-frequency = <10000000>;
58
59 partition@0 {
60 label = "u-boot";
61 reg = <0x0 0x30000>;
62 read-only;
63 };
64
65 partition@30000 {
66 label = "u-boot-env";
67 reg = <0x30000 0x10000>;
68 read-only;
69 };
70
71 factory: partition@40000 {
72 label = "factory";
73 reg = <0x40000 0x10000>;
74 read-only;
75 };
76
77 partition@50000 {
78 label = "firmware";
79 reg = <0x50000 0xfb0000>;
80 };
81 };
82 };
83
84 &pcie {
85 status = "okay";
86
87 pcie0 {
88 wifi@14c3,7662 {
89 compatible = "pci14c3,7662";
90 reg = <0x0000 0 0 0 0>;
91 mediatek,mtd-eeprom = <&factory 0x0000>;
92 mediatek,5ghz = <0>;
93 };
94 };
95
96 pcie1 {
97 wifi@14c3,7603 {
98 compatible = "pci14c3,7603";
99 reg = <0x0000 0 0 0 0>;
100 mediatek,mtd-eeprom = <&factory 0x8000>;
101 mediatek,2ghz = <0>;
102 };
103 };
104 };
105
106 &ethernet {
107 mtd-mac-address = <&factory 0xe000>;
108 };
109
110 &pinctrl {
111 state_default: pinctrl0 {
112 gpio {
113 ralink,group = "wdt", "rgmii2", "jtag", "mdio";
114 ralink,function = "gpio";
115 };
116 };
117 };