ramips: set F5D8235 v1 usb led trigger via devicetree
[openwrt/openwrt.git] / target / linux / ramips / dts / kng_rc.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 = "zyxel,keenetic-viva", "ralink,mt7620a-soc";
10 model = "ZyXEL Keenetic Viva";
11
12 aliases {
13 led-status = &led_power_green;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 wan {
20 label = "kng_rc:green:wan";
21 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
22 };
23
24 usb {
25 label = "kng_rc:green:usb";
26 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
27 trigger-sources = <&ohci_port1>, <&ehci_port1>;
28 linux,default-trigger = "usbport";
29 };
30
31 power_alert {
32 label = "kng_rc:red:power";
33 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
34 };
35
36 wifi {
37 label = "kng_rc:green:wifi";
38 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
39 };
40
41 led_power_green: power {
42 label = "kng_rc:green:power";
43 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
44 };
45 };
46
47 gpio-keys-polled {
48 compatible = "gpio-keys";
49 poll-interval = <20>;
50
51 reset {
52 label = "reset";
53 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_RESTART>;
55 };
56
57 wps {
58 label = "wps";
59 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
60 linux,code = <KEY_WPS_BUTTON>;
61 };
62
63 fn {
64 label = "fn";
65 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
66 linux,code = <BTN_0>;
67 };
68 };
69
70 gpio_export {
71 compatible = "gpio-export";
72 #size-cells = <0>;
73
74 usb_power {
75 gpio-export,name = "usb";
76 gpio-export,output = <1>;
77 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
78 };
79 };
80
81 rtl8367rb {
82 compatible = "realtek,rtl8367b";
83 cpu_port = <7>;
84 realtek,extif2 = <1 0 1 1 1 1 1 1 2>;
85 mii-bus = <&mdio0>;
86 };
87 };
88
89 &spi0 {
90 status = "okay";
91
92 m25p80@0 {
93 compatible = "jedec,spi-nor";
94 reg = <0>;
95 spi-max-frequency = <10000000>;
96
97 partitions {
98 compatible = "fixed-partitions";
99 #address-cells = <1>;
100 #size-cells = <1>;
101
102 partition@0 {
103 label = "u-boot";
104 reg = <0x0 0x30000>;
105 read-only;
106 };
107
108 partition@30000 {
109 label = "u-boot-env";
110 reg = <0x30000 0x10000>;
111 read-only;
112 };
113
114 factory: partition@40000 {
115 label = "factory";
116 reg = <0x40000 0x10000>;
117 read-only;
118 };
119
120 partition@50000 {
121 label = "firmware";
122 reg = <0x50000 0xfb0000>;
123 };
124 };
125 };
126 };
127
128 &pinctrl {
129 state_default: pinctrl0 {
130 gpio {
131 ralink,group = "i2c", "uartf";
132 ralink,function = "gpio";
133 };
134 };
135 };
136
137 &ethernet {
138 status = "okay";
139 pinctrl-names = "default";
140 pinctrl-0 = <&rgmii2_pins &mdio_pins>;
141 mtd-mac-address = <&factory 0x00004>;
142
143 port@4 {
144 status = "okay";
145 mediatek,fixed-link = <1000 1 1 1>;
146 phy-mode = "rgmii";
147 phy-handle = <&phy4>;
148 };
149
150 mdio0: mdio-bus {
151 status = "okay";
152
153 phy4: ethernet-phy@4 {
154 reg = <4>;
155 phy-mode = "rgmii";
156 };
157 };
158 };
159
160 &gsw {
161 mediatek,port4 = "gmac";
162 };
163
164 &wmac {
165 ralink,mtd-eeprom = <&factory 0>;
166 };
167
168 &ehci {
169 status = "okay";
170 };
171
172 &ohci {
173 status = "okay";
174 };