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