9e444200484ad449a57af5ee541ca98ff135caed
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7240_dlink_dir-615-e4.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7240.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "D-Link DIR-615 E4";
10 compatible = "dlink,dir-615-e4", "qca,ar7240";
11
12 aliases {
13 led-boot = &led_power_amber;
14 led-failsafe = &led_power_amber;
15 led-running = &led_power_green;
16 led-upgrade = &led_power_amber;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 reset {
23 label = "reset";
24 linux,code = <KEY_RESTART>;
25 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
26 debounce-interval = <60>;
27 };
28
29 wps {
30 label = "wps";
31 linux,code = <KEY_WPS_BUTTON>;
32 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
33 debounce-interval = <60>;
34 };
35 };
36
37 leds {
38 compatible = "gpio-leds";
39 pinctrl-names = "default";
40 pinctrl-0 = <&switch_led_pins>;
41
42 led_power_green: power_green {
43 label = "green:power";
44 gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
45 };
46
47 led_power_amber: power_amber {
48 label = "amber:power";
49 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
50 };
51
52 wps {
53 label = "blue:wps";
54 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
55 };
56
57 lan1 {
58 label = "green:lan1";
59 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
60 };
61
62 lan2 {
63 label = "green:lan2";
64 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
65 };
66
67 lan3 {
68 label = "green:lan3";
69 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
70 };
71
72 lan4 {
73 label = "green:lan4";
74 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
75 };
76
77 wan_amber {
78 label = "amber:wan";
79 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
80 };
81
82 wan_green {
83 label = "green:wan";
84 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
85 };
86 };
87
88 ath9k-leds {
89 compatible = "gpio-leds";
90
91 wlan {
92 label = "green:wlan";
93 gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
94 linux,default-trigger = "phy0tpt";
95 };
96 };
97 };
98
99 &spi {
100 status = "okay";
101
102 flash@0 {
103 compatible = "jedec,spi-nor";
104 reg = <0>;
105 spi-max-frequency = <33000000>;
106
107 partitions {
108 compatible = "fixed-partitions";
109 #address-cells = <1>;
110 #size-cells = <1>;
111
112 partition@0 {
113 reg = <0x0 0x30000>;
114 label = "u-boot";
115 read-only;
116 };
117
118 partition@30000 {
119 reg = <0x30000 0x10000>;
120 label = "nvram";
121 read-only;
122 };
123
124 partition@40000 {
125 compatible = "denx,uimage";
126 reg = <0x40000 0x3b0000>;
127 label = "firmware";
128 };
129
130 partition@3f0000 {
131 reg = <0x3f0000 0x10000>;
132 label = "art";
133 read-only;
134 };
135 };
136 };
137 };
138
139 &eth1 {
140 status = "okay";
141 };
142
143 &pcie {
144 status = "okay";
145
146 ath9k: wifi@0,0 {
147 compatible = "pci168c,002b";
148 reg = <0x0000 0 0 0 0>;
149 qca,no-eeprom;
150 #gpio-cells = <2>;
151 gpio-controller;
152 };
153 };
154
155 &pinmux {
156 switch_led_pins: pinmux_switch_led_pins {
157 pinctrl-single,bits = <0x0 0x0 0xf8>;
158 };
159 };
160
161 &uart {
162 status = "okay";
163 };