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