ath79: convert mtd-mac-address to nvmem implementation
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9331_alfa-network_ap121f.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9331.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 label-mac-device = &wmac;
11 led-boot = &led_vpn;
12 led-failsafe = &led_vpn;
13 led-upgrade = &led_vpn;
14 };
15
16 keys {
17 compatible = "gpio-keys";
18
19 reset {
20 label = "reset";
21 linux,code = <KEY_RESTART>;
22 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
23 debounce-interval = <60>;
24 };
25
26 switch {
27 label = "switch";
28 linux,code = <BTN_0>;
29 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
30 debounce-interval = <60>;
31 };
32 };
33
34 leds {
35 compatible = "gpio-leds";
36
37 lan {
38 label = "green:lan";
39 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
40 };
41
42 led_vpn: vpn {
43 label = "green:vpn";
44 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
45 };
46
47 wlan {
48 label = "green:wlan";
49 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
50 linux,default-trigger = "phy0tpt";
51 };
52 };
53 };
54
55 &eth0 {
56 status = "okay";
57
58 nvmem-cells = <&macaddr_art_0>;
59 nvmem-cell-names = "mac-address";
60
61 gmac-config {
62 device = <&gmac>;
63 switch-phy-addr-swap = <0>;
64 switch-phy-swap = <0>;
65 };
66 };
67
68 &eth1 {
69 status = "okay";
70
71 compatible = "syscon", "simple-mfd";
72 };
73
74 &spi {
75 status = "okay";
76
77 flash@0 {
78 compatible = "jedec,spi-nor";
79 reg = <0>;
80 spi-max-frequency = <50000000>;
81 m25p,fast-read;
82
83 partitions {
84 compatible = "fixed-partitions";
85 #address-cells = <1>;
86 #size-cells = <1>;
87
88 partition@0 {
89 label = "u-boot";
90 reg = <0x000000 0x030000>;
91 read-only;
92 };
93
94 partition@30000 {
95 label = "u-boot-env";
96 reg = <0x030000 0x010000>;
97 };
98
99 art: partition@40000 {
100 label = "art";
101 reg = <0x040000 0x010000>;
102 read-only;
103 };
104
105 partition@50000 {
106 compatible = "denx,uimage";
107 label = "firmware";
108 reg = <0x050000 0xfb0000>;
109 };
110 };
111 };
112 };
113
114 &usb {
115 status = "okay";
116 };
117
118 &usb_phy {
119 status = "okay";
120 };
121
122 &wmac {
123 status = "okay";
124
125 mtd-cal-data = <&art 0x1000>;
126 };
127
128 &art {
129 compatible = "nvmem-cells";
130 #address-cells = <1>;
131 #size-cells = <1>;
132
133 macaddr_art_0: macaddr@0 {
134 reg = <0x0 0x6>;
135 };
136 };