ramips: set F5D8235 v1 usb led trigger via devicetree
[openwrt/openwrt.git] / target / linux / ramips / dts / U7628-01.dtsi
1 /*
2 * BSD LICENSE
3 *
4 * Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
5 * Copyright(c) 2017 Piotr Dymacz <pepe2k@gmail.com>.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * * Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in
16 * the documentation and/or other materials provided with the
17 * distribution.
18 * * Neither the name of Broadcom Corporation nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35 #include "mt7628an.dtsi"
36
37 #include <dt-bindings/gpio/gpio.h>
38 #include <dt-bindings/input/input.h>
39
40 / {
41 compatible = "unielec,u7628-01", "mediatek,mt7628an-soc";
42
43 aliases {
44 led-status = &led_power;
45 };
46
47 chosen {
48 bootargs = "console=ttyS0,115200";
49 };
50
51 gpio-keys-polled {
52 compatible = "gpio-keys-polled";
53 poll-interval = <20>;
54 reset {
55 label = "reset";
56 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_RESTART>;
58 };
59 };
60
61 gpio-leds {
62 compatible = "gpio-leds";
63
64 led_power: power {
65 label = "u7628-01:green:power";
66 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
67 };
68
69 wlan {
70 label = "u7628-01:green:wlan";
71 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
72 };
73
74 wan {
75 label = "u7628-01:green:wan";
76 gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
77 };
78
79 lan1 {
80 label = "u7628-01:green:lan1";
81 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
82 };
83
84 lan2 {
85 label = "u7628-01:green:lan2";
86 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
87 };
88
89 lan3 {
90 label = "u7628-01:green:lan3";
91 gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
92 };
93
94 lan4 {
95 label = "u7628-01:green:lan4";
96 gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
97 };
98
99 usb {
100 label = "u7628-01:green:usb";
101 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
102 trigger-sources = <&ohci_port1>, <&ehci_port1>;
103 linux,default-trigger = "usbport";
104 };
105 };
106 };
107
108 &gpio0 {
109 status = "okay";
110 };
111
112 &gpio1 {
113 status = "okay";
114 };
115
116 &pcie {
117 status = "okay";
118 };
119
120 &ethernet {
121 mtd-mac-address = <&factory 0x28>;
122 };
123
124 &wmac {
125 status = "okay";
126 ralink,mtd-eeprom = <&factory 0x0>;
127 };
128
129 &pinctrl {
130 state_default: pinctrl0 {
131 gpio {
132 ralink,group = "gpio", "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", "refclk", "wdt", "wled_an";
133 ralink,function = "gpio";
134 };
135 };
136 };