ramips: DTS style improvements for mt7621_wevo_w2914ns-v2.dtsi
[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         chosen {
8                 bootargs = "console=ttyS0,57600";
9         };
10
11         keys {
12                 compatible = "gpio-keys";
13
14                 reset {
15                         label = "reset";
16                         gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
17                         linux,code = <KEY_RESTART>;
18                 };
19
20                 wps {
21                         label = "wps";
22                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
23                         linux,code = <KEY_WPS_BUTTON>;
24                 };
25         };
26 };
27
28 &spi0 {
29         status = "okay";
30
31         flash@0 {
32                 compatible = "jedec,spi-nor";
33                 reg = <0>;
34                 spi-max-frequency = <80000000>;
35                 m25p,fast-read;
36
37                 partitions {
38                         compatible = "fixed-partitions";
39                         #address-cells = <1>;
40                         #size-cells = <1>;
41
42                         partition@0 {
43                                 label = "u-boot";
44                                 reg = <0x0 0x30000>;
45                                 read-only;
46                         };
47
48                         partition@30000 {
49                                 label = "u-boot-env";
50                                 reg = <0x30000 0x10000>;
51                                 read-only;
52                         };
53
54                         factory: partition@40000 {
55                                 label = "factory";
56                                 reg = <0x40000 0x10000>;
57                                 read-only;
58                         };
59
60                         partition@50000 {
61                                 compatible = "denx,uimage";
62                                 label = "firmware";
63                                 reg = <0x50000 0xfb0000>;
64                         };
65                 };
66         };
67 };
68
69 &pcie {
70         status = "okay";
71 };
72
73 &pcie0 {
74         wifi@0,0 {
75                 compatible = "mediatek,mt76";
76                 reg = <0x0000 0 0 0 0>;
77                 mediatek,mtd-eeprom = <&factory 0x0>;
78
79                 led {
80                         led-sources = <0>;
81                         led-active-low;
82                 };
83         };
84 };
85
86 &pcie1 {
87         wifi@0,0 {
88                 compatible = "mediatek,mt76";
89                 reg = <0x0000 0 0 0 0>;
90                 mediatek,mtd-eeprom = <&factory 0x8000>;
91                 ieee80211-freq-limit = <5000000 6000000>;
92
93                 led {
94                         led-sources = <2>;
95                         led-active-low;
96                 };
97         };
98 };
99
100 &ethernet {
101         mtd-mac-address = <&factory 0xe000>;
102 };
103
104 &state_default {
105         gpio {
106                 ralink,group = "wdt", "rgmii2";
107                 ralink,function = "gpio";
108         };
109 };