ramips: improve netis WF-2881 support
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_xiaoyu_xy-c5.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 = "xiaoyu,xy-c5", "mediatek,mt7621-soc";
10         model = "XiaoYu XY-C5";
11
12         aliases {
13                 led-boot = &led_sys;
14                 led-failsafe = &led_sys;
15                 led-running = &led_sys;
16                 led-upgrade = &led_sys;
17                 label-mac-device = &ethernet;
18         };
19
20         chosen {
21                 bootargs = "console=ttyS0,57600";
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26
27                 work {
28                         label = "xy-c5:green:work";
29                         gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
30                 };
31
32                 led_sys: sys {
33                         label = "xy-c5:green:sys";
34                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
35                 };
36         };
37
38         keys {
39                 compatible = "gpio-keys";
40
41                 reset {
42                         label = "reset";
43                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
44                         linux,code = <KEY_RESTART>;
45                 };
46         };
47 };
48
49 &spi0 {
50         status = "okay";
51
52         flash@0 {
53                 compatible = "jedec,spi-nor";
54                 reg = <0>;
55                 spi-max-frequency = <25000000>;
56
57                 partitions {
58                         compatible = "fixed-partitions";
59                         #address-cells = <1>;
60                         #size-cells = <1>;
61
62                         partition@0 {
63                                 label = "u-boot";
64                                 reg = <0x0 0x30000>;
65                                 read-only;
66                         };
67
68                         partition@30000 {
69                                 label = "u-boot-env";
70                                 reg = <0x30000 0x10000>;
71                                 read-only;
72                         };
73
74                         factory: partition@40000 {
75                                 label = "factory";
76                                 reg = <0x40000 0x10000>;
77                                 read-only;
78                         };
79
80                         partition@50000 {
81                                 compatible = "denx,uimage";
82                                 label = "firmware";
83                                 reg = <0x50000 0x1fb0000>;
84                         };
85                 };
86         };
87 };
88
89 &pcie {
90         status = "okay";
91 };
92
93 &ethernet {
94         mtd-mac-address = <&factory 0x4>;
95 };
96
97 &pinctrl {
98         state_default: pinctrl0 {
99                 gpio {
100                         ralink,group = "uart3", "wdt";
101                         ralink,function = "gpio";
102                 };
103         };
104 };