ramips: add support for TP-Link RE200 v1
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620a_youku_yk1.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "youku,yk1", "ralink,mt7620a-soc";
10         model = "YOUKU YK1";
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         leds {
20                 compatible = "gpio-leds";
21
22                 wan {
23                         label = "yk1:blue:wan";
24                         gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
25                 };
26
27                 air {
28                         label = "yk1:blue:air";
29                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
30                 };
31
32                 usb {
33                         label = "yk1:blue:usb";
34                         gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
35                         trigger-sources = <&ohci_port1>, <&ehci_port1>;
36                         linux,default-trigger = "usbport";
37                 };
38
39                 led_power: power {
40                         label = "yk1:blue:power";
41                         gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
42                 };
43         };
44
45         keys {
46                 compatible = "gpio-keys";
47
48                 reset {
49                         label = "reset";
50                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
51                         linux,code = <KEY_RESTART>;
52                 };
53         };
54 };
55
56 &gpio0 {
57         status = "okay";
58 };
59
60 &gpio1 {
61         status = "okay";
62 };
63
64 &gpio2 {
65         status = "okay";
66 };
67
68 &gpio3 {
69         status = "okay";
70 };
71
72 &spi0 {
73         status = "okay";
74
75         m25p80@0 {
76                 compatible = "mx25l25635f", "jedec,spi-nor";
77                 reg = <0>;
78                 spi-max-frequency = <25000000>;
79                 m25p,fast-read;
80
81                 partitions {
82                         compatible = "fixed-partitions";
83                         #address-cells = <1>;
84                         #size-cells = <1>;
85
86                         partition@0 {
87                                 label = "u-boot";
88                                 reg = <0x0 0x30000>;
89                                 read-only;
90                         };
91
92                         partition@30000 {
93                                 label = "u-boot-env";
94                                 reg = <0x30000 0x10000>;
95                                 read-only;
96                         };
97
98                         factory: partition@40000 {
99                                 label = "factory";
100                                 reg = <0x40000 0x10000>;
101                                 read-only;
102                         };
103
104                         partition@50000 {
105                                 compatible = "denx,uimage";
106                                 label = "firmware";
107                                 reg = <0x50000 0x1fb0000>;
108                         };
109                 };
110         };
111 };
112
113 &state_default {
114         default {
115                 ralink,group = "i2c", "rgmii1", "ephy", "wled";
116                 ralink,function = "gpio";
117         };
118 };
119
120 &ethernet {
121         pinctrl-names = "default";
122         mtd-mac-address = <&factory 0x4>;
123         mediatek,portmap = "llllw";
124 };
125
126 &wmac {
127         ralink,mtd-eeprom = <&factory 0>;
128 };
129
130 &sdhci {
131         status = "okay";
132 };
133
134 &ehci {
135         status = "okay";
136 };
137
138 &ohci {
139         status = "okay";
140 };