ramips: set F5D8235 v1 usb led trigger via devicetree
[openwrt/openwrt.git] / target / linux / ramips / dts / EX2700.dts
1 /*
2 * Device Tree file for the Netgear EX2700
3 *
4 * Copyright (C) 2016 Joseph C. Lehner <joseph.c.lehner@gmail.com>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11 /dts-v1/;
12
13 #include "mt7620a.dtsi"
14
15 #include <dt-bindings/gpio/gpio.h>
16 #include <dt-bindings/input/input.h>
17
18 / {
19 compatible = "netgear,ex2700", "ralink,mt7620a-soc";
20 model = "Netgear EX2700";
21
22 aliases {
23 led-status = &led_power_green;
24 };
25
26 chosen {
27 bootargs = "console=ttyS0,57600";
28 };
29
30 gpio-leds {
31 compatible = "gpio-leds";
32
33 led_power_green: power_g {
34 label = "ex2700:green:power";
35 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
36 default-state = "on";
37 };
38
39 power_r {
40 label = "ex2700:red:power";
41 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
42 };
43
44 device_g {
45 label = "ex2700:green:device";
46 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
47 };
48
49 device_r {
50 label = "ex2700:red:device";
51 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
52 };
53
54 router_g {
55 label = "ex2700:green:router";
56 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
57 };
58
59 router_r {
60 label = "ex2700:red:router";
61 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
62 };
63
64 wps {
65 label = "ex2700:green:wps";
66 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
67 };
68 };
69
70 gpio-keys-polled {
71 compatible = "gpio-keys-polled";
72 poll-interval = <20>;
73
74 reset {
75 label = "reset";
76 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
77 linux,code = <KEY_RESTART>;
78 };
79
80 wps {
81 label = "wps";
82 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
83 linux,code = <KEY_WPS_BUTTON>;
84 };
85 };
86 };
87
88 &gpio0 {
89 status = "okay";
90 };
91
92 &gpio1 {
93 status = "okay";
94 };
95
96 &spi0 {
97 status = "okay";
98
99 m25p80@0 {
100 compatible = "jedec,spi-nor";
101 reg = <0>;
102 spi-max-frequency = <10000000>;
103
104 partitions {
105 compatible = "fixed-partitions";
106 #address-cells = <1>;
107 #size-cells = <1>;
108
109 partition@0 {
110 label = "u-boot";
111 reg = <0x0 0x30000>;
112 read-only;
113 };
114
115 partition@30000 {
116 label = "u-boot-env";
117 reg = <0x30000 0x10000>;
118 read-only;
119 };
120
121 partition@40000 {
122 label = "firmware";
123 reg = <0x40000 0x3b0000>;
124 };
125
126 art: partition@3f0000 {
127 label = "art";
128 reg = <0x3f0000 0x10000>;
129 read-only;
130 };
131 };
132 };
133 };
134
135 &ethernet {
136 mtd-mac-address = <&art 0x0>;
137 };
138
139 &wmac {
140 mtd-mac-address = <&art 0x6>;
141 ralink,mtd-eeprom = <&art 0x1000>;
142 };
143
144 &pinctrl {
145 state_default: pinctrl0 {
146 default {
147 ralink,group = "i2c", "uartf", "spi refclk";
148 ralink,function = "gpio";
149 };
150 };
151 };