Fresh pull from upstream
[librecmc/librecmc.git] / target / linux / ramips / dts / YOUKU-YK1.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8         compatible = "YOUKU-YK1", "ralink,mt7620a-soc";
9         model = "YOUKU YK1";
10
11         gpio-leds {
12                 compatible = "gpio-leds";
13                 wan {
14                         label = "youku-yk1:blue:wan";
15                         gpios = <&gpio2 4 1>;
16                 };
17                 air {
18                         label = "youku-yk1:blue:air";
19                         gpios = <&gpio3 0 1>;
20                 };
21                 usb {
22                         label = "youku-yk1:blue:usb";
23                         gpios = <&gpio1 11 1>;
24                 };
25                 power {
26                         label = "youku-yk1:blue:power";
27                         gpios = <&gpio1 5 1>;
28                 };
29         };
30
31         gpio-keys-polled {
32                 compatible = "gpio-keys-polled";
33                 #address-cells = <1>;
34                 #size-cells = <0>;
35                 poll-interval = <20>;
36                 reset {
37                         label = "reset";
38                         gpios = <&gpio0 1 1>;
39                         linux,code = <KEY_RESTART>;
40                 };
41         };
42 };
43
44 &gpio0 {
45         status = "okay";
46 };
47
48 &gpio1 {
49         status = "okay";
50 };
51
52 &gpio2 {
53         status = "okay";
54 };
55
56 &gpio3 {
57         status = "okay";
58 };
59
60 &spi0 {
61         status = "okay";
62
63         m25p80@0 {
64                 #address-cells = <1>;
65                 #size-cells = <1>;
66                 compatible = "jedec,spi-nor";
67                 reg = <0>;
68                 linux,modalias = "m25p80", "w25q256";
69                 spi-max-frequency = <10000000>;
70
71                 partition@0 {
72                         label = "u-boot";
73                         reg = <0x0 0x30000>;
74                         read-only;
75                 };
76
77                 partition@30000 {
78                         label = "u-boot-env";
79                         reg = <0x30000 0x10000>;
80                         read-only;
81                 };
82
83                 factory: partition@40000 {
84                         label = "factory";
85                         reg = <0x40000 0x10000>;
86                         read-only;
87                 };
88
89                 partition@50000 {
90                         label = "firmware";
91                         reg = <0x50000 0x1fb0000>;
92                 };
93         };
94 };
95
96 &pinctrl {
97         state_default: pinctrl0 {
98                 default {
99                         ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd";
100                         ralink,function = "gpio";
101                 };
102         };
103 };
104
105 &ethernet {
106         pinctrl-names = "default";
107         pinctrl-0 = <&ephy_pins>;
108         mtd-mac-address = <&factory 0x4>;
109         mediatek,portmap = "llllw";
110 };
111
112 &wmac {
113         ralink,mtd-eeprom = <&factory 0>;
114 };
115
116 &sdhci {
117         status = "okay";
118 };
119
120 &ehci {
121         status = "okay";
122 };
123
124 &ohci {
125         status = "okay";
126 };