ath79: replace "mac-address-ascii" with "mac-base"
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar9342_zyxel_nwa11xx.dtsi
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 #include <dt-bindings/mtd/partitions/uimage.h>
8
9 / {
10 keys {
11 compatible = "gpio-keys";
12
13 reset {
14 label = "reset";
15 linux,code = <KEY_RESTART>;
16 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
17 };
18 };
19
20 virtual_flash {
21 compatible = "mtd-concat";
22
23 devices = <&fwconcat0 &fwconcat1>;
24
25 partitions {
26 compatible = "fixed-partitions";
27 #address-cells = <1>;
28 #size-cells = <1>;
29
30 partition@0 {
31 compatible = "openwrt,uimage", "denx,uimage";
32 openwrt,ih-magic = <IH_MAGIC_OKLI>;
33 label = "firmware";
34 reg = <0x0 0x0>;
35 };
36 };
37 };
38 };
39
40 &ref {
41 clock-frequency = <40000000>;
42 };
43
44 &spi {
45 status = "okay";
46
47 flash@0 {
48 compatible = "jedec,spi-nor";
49 reg = <0>;
50 spi-max-frequency = <50000000>;
51
52 partitions {
53 compatible = "fixed-partitions";
54 #address-cells = <1>;
55 #size-cells = <1>;
56
57 partition@0 {
58 label = "u-boot";
59 reg = <0x000000 0x040000>;
60 read-only;
61 };
62
63 partition@40000 {
64 label = "u-boot-env";
65 reg = <0x040000 0x010000>;
66 };
67
68 fwconcat0: partition@50000 {
69 label = "fwconcat0";
70 reg = <0x050000 0x800000>;
71 };
72
73 partition@850000 {
74 label = "loader";
75 reg = <0x850000 0x010000>;
76 read-only;
77 };
78
79 fwconcat1: partition@860000 {
80 label = "fwconcat1";
81 reg = <0x860000 0x740000>;
82 };
83
84 partition@fa0000 {
85 label = "config";
86 reg = <0xfa0000 0x040000>;
87 read-only;
88 };
89
90 partition@fe0000 {
91 label = "mib0";
92 reg = <0xfe0000 0x010000>;
93 read-only;
94
95 compatible = "nvmem-cells";
96
97 nvmem-layout {
98 compatible = "fixed-layout";
99 #address-cells = <1>;
100 #size-cells = <1>;
101
102 macaddr_mib0_4b: macaddr@4b {
103 compatible = "mac-base";
104 reg = <0x4b 0x11>;
105 #nvmem-cell-cells = <1>;
106 };
107
108 macaddr_mib0_66: macaddr@66 {
109 compatible = "mac-base";
110 reg = <0x66 0x11>;
111 #nvmem-cell-cells = <1>;
112 };
113 };
114 };
115
116 art: partition@ff0000 {
117 label = "art";
118 reg = <0xff0000 0x010000>;
119 read-only;
120
121 compatible = "nvmem-cells";
122 #address-cells = <1>;
123 #size-cells = <1>;
124
125 calibration_ath9k: calibration@1000 {
126 reg = <0x1000 0x440>;
127 };
128
129 macaddr_art_1002: macaddr@1002 {
130 reg = <0x1002 0x6>;
131 };
132 };
133 };
134 };
135 };
136
137 &mdio0 {
138 status = "okay";
139
140 phy0: ethernet-phy@0 {
141 reg = <0>;
142 phy-mode = "rgmii";
143 };
144 };
145
146 &eth0 {
147 status = "okay";
148
149 pll-data = <0x06000000 0x00000101 0x00001313>;
150
151 nvmem-cells = <&macaddr_art_1002>;
152 nvmem-cell-names = "mac-address";
153
154 phy-mode = "rgmii-id";
155 phy-handle = <&phy0>;
156
157 gmac-config {
158 device = <&gmac>;
159 rxdv-delay = <3>;
160 rxd-delay = <3>;
161 txen-delay = <3>;
162 txd-delay = <3>;
163 rgmii-gmac0 = <1>;
164 };
165 };
166
167 &wmac {
168 status = "okay";
169
170 ieee80211-freq-limit = <2402000 2482000>;
171
172 nvmem-cells = <&macaddr_mib0_4b 0>, <&calibration_ath9k>;
173 nvmem-cell-names = "mac-address", "calibration";
174 };