ath79: move usb led trigger node to SoC dtsi
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9331_tplink_tl-mr3040-v2.dts
1 // SPDX-License-Identifier: GPL-2.0-only
2
3 #include "ar9331.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "TP-Link TL-MR3040 V2";
10 compatible = "tplink,tl-mr3040-v2", "qca,ar9331";
11
12 aliases {
13 led-boot = &led_lan;
14 led-failsafe = &led_lan;
15 label-mac-device = &eth0;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 pinctrl-names = "default";
22 pinctrl-0 = <&switch_led_disable_pins>;
23
24 wlan {
25 label = "green:wlan";
26 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
27 linux,default-trigger = "phy0tpt";
28 };
29
30 led_lan: lan {
31 label = "green:lan";
32 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
33 };
34
35 led3g {
36 label = "green:3g";
37 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
38 trigger-sources = <&hub_port>;
39 linux,default-trigger = "usbport";
40 };
41 };
42
43 keys {
44 compatible = "gpio-keys";
45
46 reset {
47 label = "reset";
48 linux,code = <KEY_RESTART>;
49 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
50 debounce-interval = <60>;
51 };
52
53 sw1 {
54 label = "sw1";
55 linux,input-type = <EV_SW>;
56 linux,code = <BTN_0>;
57 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
58 debounce-interval = <60>;
59 };
60
61 sw2 {
62 label = "sw2";
63 linux,input-type = <EV_SW>;
64 linux,code = <BTN_1>;
65 gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
66 debounce-interval = <60>;
67 };
68 };
69
70 reg_usb_vbus: reg_usb_vbus {
71 compatible = "regulator-fixed";
72 regulator-name = "usb_vbus";
73 regulator-min-microvolt = <5000000>;
74 regulator-max-microvolt = <5000000>;
75 gpio = <&gpio 18 GPIO_ACTIVE_HIGH>;
76 enable-active-high;
77 };
78 };
79
80 &ref {
81 clock-frequency = <25000000>;
82 };
83
84 &usb {
85 dr_mode = "host";
86 vbus-supply = <&reg_usb_vbus>;
87 status = "okay";
88 };
89
90 &usb_phy {
91 status = "okay";
92 };
93
94 &spi {
95 status = "okay";
96
97 flash@0 {
98 compatible = "jedec,spi-nor";
99 spi-max-frequency = <50000000>;
100 reg = <0>;
101
102 partitions {
103 compatible = "fixed-partitions";
104 #address-cells = <1>;
105 #size-cells = <1>;
106
107 uboot: partition@0 {
108 label = "u-boot";
109 reg = <0x000000 0x020000>;
110 read-only;
111 };
112
113 partition@20000 {
114 compatible = "tplink,firmware";
115 label = "firmware";
116 reg = <0x020000 0x3d0000>;
117 };
118
119 art: partition@3f0000 {
120 label = "art";
121 reg = <0x3f0000 0x010000>;
122 read-only;
123 };
124 };
125 };
126 };
127
128 &eth0 {
129 status = "okay";
130
131 nvmem-cells = <&macaddr_uboot_1fc00>;
132 nvmem-cell-names = "mac-address";
133 gmac-config {
134 device = <&gmac>;
135
136 switch-phy-addr-swap = <0>;
137 switch-phy-swap = <0>;
138 };
139 };
140
141 &eth1 {
142 status = "okay";
143
144 compatible = "syscon", "simple-mfd";
145 };
146
147 &wmac {
148 status = "okay";
149
150 mtd-cal-data = <&art 0x1000>;
151 nvmem-cells = <&macaddr_uboot_1fc00>;
152 nvmem-cell-names = "mac-address";
153 };
154
155 &uboot {
156 compatible = "nvmem-cells";
157 #address-cells = <1>;
158 #size-cells = <1>;
159
160 macaddr_uboot_1fc00: macaddr@1fc00 {
161 reg = <0x1fc00 0x6>;
162 };
163 };