ramips: add support for XiaoYu XY-C5
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_wevo_w2914ns-v2.dtsi
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7         compatible = "wevo,w2914ns-v2", "mediatek,mt7621-soc";
8
9         chosen {
10                 bootargs = "console=ttyS0,57600";
11         };
12
13         keys {
14                 compatible = "gpio-keys-polled";
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
31 &xhci {
32         status = "okay";
33 };
34
35 &spi0 {
36         status = "okay";
37
38         m25p80@0 {
39                 compatible = "jedec,spi-nor";
40                 reg = <0>;
41                 spi-max-frequency = <10000000>;
42
43                 partitions {
44                         compatible = "fixed-partitions";
45                         #address-cells = <1>;
46                         #size-cells = <1>;
47
48                         partition@0 {
49                                 label = "u-boot";
50                                 reg = <0x0 0x30000>;
51                                 read-only;
52                         };
53
54                         partition@30000 {
55                                 label = "u-boot-env";
56                                 reg = <0x30000 0x10000>;
57                                 read-only;
58                         };
59
60                         factory: partition@40000 {
61                                 label = "factory";
62                                 reg = <0x40000 0x10000>;
63                                 read-only;
64                         };
65
66                         partition@50000 {
67                                 compatible = "denx,uimage";
68                                 label = "firmware";
69                                 reg = <0x50000 0xfb0000>;
70                         };
71                 };
72         };
73 };
74
75 &pcie {
76         status = "okay";
77 };
78
79 &pcie0 {
80         wifi@0,0 {
81                 compatible = "pci14c3,7603";
82                 reg = <0x0000 0 0 0 0>;
83                 mediatek,mtd-eeprom = <&factory 0x0000>;
84         };
85 };
86
87 &pcie1 {
88         wifi@0,0 {
89                 compatible = "pci14c3,7662";
90                 reg = <0x0000 0 0 0 0>;
91                 mediatek,mtd-eeprom = <&factory 0x8000>;
92                 ieee80211-freq-limit = <5000000 6000000>;
93         };
94 };
95
96 &ethernet {
97         mtd-mac-address = <&factory 0xe000>;
98 };
99
100 &pinctrl {
101         state_default: pinctrl0 {
102                 gpio {
103                         ralink,group = "wdt", "rgmii2", "jtag", "mdio";
104                         ralink,function = "gpio";
105                 };
106         };
107 };