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