ath79: convert mtd-mac-address to nvmem implementation
[openwrt/staging/stintel.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 art: partition@70000 {
135 label = "art";
136 reg = <0x070000 0x010000>;
137 read-only;
138 };
139
140 partition@80000 {
141 compatible = "denx,uimage";
142 label = "firmware";
143 reg = <0x080000 0xf80000>;
144 };
145 };
146 };
147 };
148
149 &wmac {
150 status = "okay";
151
152 mtd-cal-data = <&art 0x1000>;
153 };
154
155 &art {
156 compatible = "nvmem-cells";
157 #address-cells = <1>;
158 #size-cells = <1>;
159
160 macaddr_art_0: macaddr@0 {
161 reg = <0x0 0x6>;
162 };
163
164 macaddr_art_6: macaddr@6 {
165 reg = <0x6 0x6>;
166 };
167 };