ramips: add support for XiaoYu XY-C5
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620n_kingston_mlw221.dts
1 /dts-v1/;
2
3 #include "mt7620n.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "kingston,mlw221", "ralink,mt7620n-soc";
10         model = "Kingston MLW221";
11
12         aliases {
13                 led-boot = &led_system;
14                 led-failsafe = &led_system;
15                 led-running = &led_system;
16                 led-upgrade = &led_system;
17         };
18
19         leds {
20                 compatible = "gpio-leds";
21
22                 led_system: system {
23                         label = "mlw221:blue:system";
24                         gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
25                 };
26
27                 wifi {
28                         label = "mlw221:blue:wifi";
29                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
30                 };
31         };
32
33         keys {
34                 compatible = "gpio-keys-polled";
35                 poll-interval = <20>;
36
37                 reset {
38                         label = "reset";
39                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
40                         linux,code = <KEY_RESTART>;
41                 };
42
43                 system {
44                         label = "system";
45                         gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
46                         linux,code = <KEY_RFKILL>;
47                 };
48         };
49 };
50
51 &gpio0 {
52         status = "okay";
53 };
54
55 &gpio2 {
56         status = "okay";
57 };
58
59 &gpio3 {
60         status = "okay";
61 };
62
63 &spi0 {
64         status = "okay";
65
66         m25p80@0 {
67                 compatible = "jedec,spi-nor";
68                 reg = <0>;
69                 spi-max-frequency = <10000000>;
70
71                 partitions {
72                         compatible = "fixed-partitions";
73                         #address-cells = <1>;
74                         #size-cells = <1>;
75
76                         partition@0 {
77                                 label = "u-boot";
78                                 reg = <0x0 0x30000>;
79                                 read-only;
80                         };
81
82                         partition@30000 {
83                                 label = "u-boot-env";
84                                 reg = <0x30000 0x10000>;
85                                 read-only;
86                         };
87
88                         factory: partition@40000 {
89                                 label = "factory";
90                                 reg = <0x40000 0x10000>;
91                                 read-only;
92                         };
93
94                         partition@50000 {
95                                 compatible = "denx,uimage";
96                                 label = "firmware";
97                                 reg = <0x50000 0xf60000>;
98                         };
99
100                         partition@fb0000 {
101                                 label = "user-config";
102                                 reg = <0xfb0000 0x50000>;
103                         };
104                 };
105         };
106 };
107
108 &ehci {
109         status = "okay";
110 };
111
112 &ohci {
113         status = "okay";
114 };
115
116 &ethernet {
117         mtd-mac-address = <&factory 0x4>;
118         mediatek,portmap = "wllll";
119 };
120
121 &wmac {
122         ralink,mtd-eeprom = <&factory 0>;
123 };
124
125 &pinctrl {
126         state_default: pinctrl0 {
127                 default {
128                         ralink,group = "i2c", "ephy", "wled";
129                         ralink,function = "gpio";
130                 };
131         };
132 };