ramips: add support for XiaoYu XY-C5
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_iodata_wn-gx300gr.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 = "iodata,wn-gx300gr", "mediatek,mt7621-soc";
10         model = "I-O DATA WN-GX300GR";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17         };
18
19         chosen {
20                 bootargs = "console=ttyS0,115200";
21         };
22
23         leds {
24                 compatible = "gpio-leds";
25
26                 led_power: power {
27                         label = "wn-gx300gr:green:power";
28                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
29                 };
30
31                 wps {
32                         label = "wn-gx300gr:green:wps";
33                         gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
34                 };
35         };
36
37         keys {
38                 compatible = "gpio-keys-polled";
39                 poll-interval = <20>;
40
41                 reset {
42                         label = "reset";
43                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
44                         linux,code = <KEY_RESTART>;
45                 };
46
47                 wps {
48                         label = "wps";
49                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
50                         linux,code = <KEY_WPS_BUTTON>;
51                 };
52
53                 auto {
54                         label = "auto";
55                         gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
56                         linux,code = <BTN_0>;
57                         linux,input-type = <EV_SW>;
58                 };
59
60                 custom {
61                         label = "custom";
62                         gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
63                         linux,code = <BTN_0>;
64                         linux,input-type = <EV_SW>;
65                 };
66         };
67 };
68
69 &spi0 {
70         status = "okay";
71
72         m25p80@0 {
73                 compatible = "jedec,spi-nor";
74                 reg = <0>;
75                 spi-max-frequency = <10000000>;
76
77                 partitions {
78                         compatible = "fixed-partitions";
79                         #address-cells = <1>;
80                         #size-cells = <1>;
81
82                         partition@0 {
83                                 label = "Bootloader";
84                                 reg = <0x0 0x30000>;
85                                 read-only;
86                         };
87
88                         partition@30000 {
89                                 label = "Config";
90                                 reg = <0x30000 0x10000>;
91                                 read-only;
92                         };
93
94                         factory: partition@40000 {
95                                 label = "factory";
96                                 reg = <0x40000 0x10000>;
97                                 read-only;
98                         };
99
100                         partition@50000 {
101                                 label = "iNIC_rf";
102                                 reg = <0x50000 0x10000>;
103                                 read-only;
104                         };
105
106                         partition@60000 {
107                                 compatible = "denx,uimage";
108                                 label = "firmware";
109                                 reg = <0x60000 0x770000>;
110                         };
111
112                         partition@7d0000 {
113                                 label = "Key";
114                                 reg = <0x7d0000 0x10000>;
115                                 read-only;
116                         };
117
118                         partition@7e0000 {
119                                 label = "backup";
120                                 reg = <0x7e0000 0x10000>;
121                                 read-only;
122                         };
123
124                         partition@7f0000 {
125                                 label = "storage";
126                                 reg = <0x7f0000 0x10000>;
127                                 read-only;
128                         };
129                 };
130         };
131 };
132
133 &ethernet {
134         mtd-mac-address = <&factory 0x4>;
135 };
136
137 &pinctrl {
138         state_default: pinctrl0 {
139                 gpio {
140                         ralink,group = "uart2", "uart3", "jtag";
141                         ralink,function = "gpio";
142                 };
143         };
144 };
145
146 &pcie {
147         status = "okay";
148 };
149
150 &pcie0 {
151         mt76@0,0 {
152                 reg = <0x0000 0 0 0 0>;
153                 mediatek,mtd-eeprom = <&factory 0x0>;
154         };
155 };
156
157 &xhci {
158         status = "disabled";
159 };