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