ca762c3bca40741166e2dcea4aa11eba65ad4d8c
[openwrt/staging/jow.git] / target / linux / ath79 / dts / ar9344_alfa-network_n5q.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9344.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "ALFA Network N5Q";
10 compatible = "alfa-network,n5q", "qca,ar9344";
11
12 aliases {
13 label-mac-device = &wmac;
14 led-boot = &led_signal4;
15 led-failsafe = &led_signal4;
16 led-upgrade = &led_signal4;
17 };
18
19 gpio-export {
20 compatible = "gpio-export";
21 #size-cells = <0>;
22
23 watchdog-enable {
24 gpio-export,name = "watchdog-enable";
25 gpio-export,output = <1>;
26 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
27 };
28 };
29
30 keys {
31 compatible = "gpio-keys";
32
33 reset {
34 label = "reset";
35 linux,code = <KEY_RESTART>;
36 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
37 debounce-interval = <60>;
38 };
39 };
40
41 leds {
42 compatible = "gpio-leds";
43
44 lan1 {
45 label = "green:lan1";
46 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
47 };
48
49 lan2 {
50 label = "green:lan2";
51 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
52 };
53
54 led_signal4: signal4 {
55 label = "green:signal4";
56 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
57 };
58
59 signal1 {
60 label = "red:signal1";
61 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
62 };
63
64 signal2 {
65 label = "orange:signal2";
66 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
67 };
68
69 signal3 {
70 label = "green:signal3";
71 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
72 };
73
74 wlan {
75 label = "green:wlan";
76 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
77 linux,default-trigger = "phy0tpt";
78 };
79 };
80
81 watchdog {
82 compatible = "linux,wdt-gpio";
83 gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
84 hw_algo = "toggle";
85 hw_margin_ms = <25000>;
86 always-running;
87 };
88 };
89
90 &eth0 {
91 status = "okay";
92
93 nvmem-cells = <&macaddr_art_0>;
94 nvmem-cell-names = "mac-address";
95 phy-handle = <&swphy4>;
96 };
97
98 &eth1 {
99 status = "okay";
100
101 nvmem-cells = <&macaddr_art_6>;
102 nvmem-cell-names = "mac-address";
103 };
104
105 &ref {
106 clock-frequency = <40000000>;
107 };
108
109 &spi {
110 status = "okay";
111
112 flash@0 {
113 compatible = "jedec,spi-nor";
114 reg = <0>;
115 spi-max-frequency = <50000000>;
116 m25p,fast-read;
117
118 partitions {
119 compatible = "fixed-partitions";
120 #address-cells = <1>;
121 #size-cells = <1>;
122
123 partition@0 {
124 label = "u-boot";
125 reg = <0x000000 0x060000>;
126 read-only;
127 };
128
129 partition@60000 {
130 label = "u-boot-env";
131 reg = <0x060000 0x010000>;
132 };
133
134 partition@70000 {
135 label = "art";
136 reg = <0x070000 0x010000>;
137 read-only;
138
139 compatible = "nvmem-cells";
140 #address-cells = <1>;
141 #size-cells = <1>;
142
143 cal_art_1000: cal@1000 {
144 reg = <0x1000 0x440>;
145 };
146
147 macaddr_art_0: macaddr@0 {
148 reg = <0x0 0x6>;
149 };
150
151 macaddr_art_6: macaddr@6 {
152 reg = <0x6 0x6>;
153 };
154
155 macaddr_art_1002: macaddr@1002 {
156 reg = <0x1002 0x6>;
157 };
158 };
159
160 partition@80000 {
161 compatible = "denx,uimage";
162 label = "firmware";
163 reg = <0x080000 0xf80000>;
164 };
165 };
166 };
167 };
168
169 &wmac {
170 status = "okay";
171
172 nvmem-cells = <&cal_art_1000>, <&macaddr_art_1002>;
173 nvmem-cell-names = "calibration", "mac-address";
174 };