fd4395985cec740f7beb51aff8e20d9bd286df01
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_youku_yk-l2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "youku,yk-l2", "mediatek,mt7621-soc";
10 model = "Youku YK-L2";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_wps;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 led_power: power {
27 label = "blue:power";
28 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
29 default-state = "on";
30 };
31
32 led_wps: wps {
33 label = "blue:wps";
34 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
35 };
36
37 usb {
38 label = "blue:usb";
39 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
40 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
41 linux,default-trigger = "usbport";
42 };
43 };
44
45 keys {
46 compatible = "gpio-keys";
47
48 reset {
49 label = "reset";
50 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_RESTART>;
52 };
53
54 wps {
55 label = "wps";
56 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_WPS_BUTTON>;
58 };
59 };
60 };
61
62 &sdhci {
63 status = "okay";
64 };
65
66 &xhci {
67 status = "okay";
68 };
69
70 &spi0 {
71 status = "okay";
72
73 flash@0 {
74 compatible = "jedec,spi-nor";
75 reg = <0>;
76 spi-max-frequency = <10000000>;
77
78 partitions {
79 compatible = "fixed-partitions";
80 #address-cells = <1>;
81 #size-cells = <1>;
82
83 partition@0 {
84 label = "u-boot";
85 reg = <0x0 0x30000>;
86 read-only;
87 };
88
89 partition@30000 {
90 label = "u-boot-env";
91 reg = <0x30000 0x10000>;
92 read-only;
93 };
94
95 factory: partition@40000 {
96 label = "factory";
97 reg = <0x40000 0x10000>;
98 read-only;
99 };
100
101 partition@50000 {
102 compatible = "denx,uimage";
103 label = "firmware";
104 reg = <0x50000 0xfb0000>;
105 };
106 };
107 };
108 };
109
110 &pcie {
111 status = "okay";
112 };
113
114 &pcie0 {
115 wifi@0,0 {
116 compatible = "pci14c3,7603";
117 reg = <0x0000 0 0 0 0>;
118 mediatek,mtd-eeprom = <&factory 0x0000>;
119 ieee80211-freq-limit = <2400000 2500000>;
120 led {
121 led-active-low;
122 };
123 };
124 };
125
126 &pcie1 {
127 wifi@0,0 {
128 compatible = "pci14c3,7662";
129 reg = <0x0000 0 0 0 0>;
130 mediatek,mtd-eeprom = <&factory 0x8000>;
131 ieee80211-freq-limit = <5000000 6000000>;
132 led {
133 led-sources = <2>;
134 led-active-low;
135 };
136 };
137 };
138
139 &gmac0 {
140 mtd-mac-address = <&factory 0xe000>;
141 };
142
143 &switch0 {
144 ports {
145 port@0 {
146 status = "okay";
147 label = "lan1";
148 };
149
150 port@1 {
151 status = "okay";
152 label = "lan2";
153 };
154
155 port@2 {
156 status = "okay";
157 label = "lan3";
158 };
159
160 port@3 {
161 status = "okay";
162 label = "lan4";
163 };
164
165 port@4 {
166 status = "okay";
167 label = "wan";
168 mtd-mac-address = <&factory 0xe006>;
169 };
170 };
171 };
172
173 &state_default {
174 gpio {
175 groups = "jtag", "wdt";
176 function = "gpio";
177 };
178 };