ramips: set F5D8235 v1 usb led trigger via devicetree
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / TL-MR3020V3.dts
1 /dts-v1/;
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "tplink,tl-mr3020-v3", "mediatek,mt7628an-soc";
10 model = "TP-Link TL-MR3020 v3";
11
12 aliases {
13 led-status = &led_power;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,115200";
18 };
19
20 memory@0 {
21 device_type = "memory";
22 reg = <0x0 0x4000000>;
23 };
24
25 gpio-keys-polled {
26 compatible = "gpio-keys-polled";
27 poll-interval = <20>;
28
29 wps {
30 label = "wps";
31 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_WPS_BUTTON>;
33 };
34
35 modec1 {
36 label = "sw1";
37 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
38 linux,code = <BTN_0>;
39 };
40
41 modec2 {
42 label = "sw2";
43 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
44 linux,code = <BTN_1>;
45 };
46 };
47
48 gpio-leds {
49 compatible = "gpio-leds";
50
51 led_power: power {
52 label = "tl-mr3020-v3:green:power";
53 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
54 default-state = "on";
55 };
56
57 wan {
58 label = "tl-mr3020-v3:green:3g";
59 gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
60 trigger-sources = <&ehci_port1>, <&ohci_port1>;
61 linux,default-trigger = "usbport";
62 };
63
64 wlan {
65 label = "tl-mr3020-v3:green:wlan";
66 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
67 };
68
69 wps {
70 label = "tl-mr3020-v3:green:wps";
71 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
72 };
73
74 lan {
75 label = "tl-mr3020-v3:green:lan";
76 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
77 };
78 };
79 };
80
81 &spi0 {
82 status = "okay";
83
84 m25p80@0 {
85 compatible = "jedec,spi-nor";
86 reg = <0>;
87 spi-max-frequency = <10000000>;
88 m25p,chunked-io = <32>;
89
90 partitions {
91 compatible = "fixed-partitions";
92 #address-cells = <1>;
93 #size-cells = <1>;
94
95 partition@0 {
96 label = "boot";
97 reg = <0x0 0x20000>;
98 read-only;
99 };
100
101 partition@20000 {
102 label = "firmware";
103 reg = <0x20000 0x7a0000>;
104 };
105
106 partition@7c0000 {
107 label = "config";
108 reg = <0x7c0000 0x10000>;
109 read-only;
110 };
111
112 factory: partition@7d0000 {
113 label = "factory";
114 reg = <0x7d0000 0x30000>;
115 read-only;
116 };
117 };
118 };
119 };
120
121 &ehci {
122 status = "okay";
123 };
124
125 &ohci {
126 status = "okay";
127 };
128
129 &pinctrl {
130 state_default: pinctrl0 {
131 gpio {
132 ralink,group = "i2s", "refclk", "wdt", "p2led_an", "p1led_an", "p0led_an", "wled_an";
133 ralink,function = "gpio";
134 };
135 };
136 };
137
138 &wmac {
139 status = "okay";
140 mtd-mac-address = <&factory 0xf100>;
141 mediatek,mtd-eeprom = <&factory 0x20000>;
142 };
143
144 &ethernet {
145 mtd-mac-address = <&factory 0xf100>;
146 };