ath79: add support for ZyXEL NWA1121-NI
[openwrt/openwrt.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 #address-cells = <1>;
97 #size-cells = <1>;
98
99 macaddr_mib0_4b: macaddr@4b {
100 reg = <0x4b 0x11>;
101 };
102
103 macaddr_mib0_66: macaddr@66 {
104 reg = <0x66 0x11>;
105 };
106 };
107
108 art: partition@ff0000 {
109 label = "art";
110 reg = <0xff0000 0x010000>;
111 read-only;
112
113 compatible = "nvmem-cells";
114 #address-cells = <1>;
115 #size-cells = <1>;
116
117 calibration_ath9k: calibration@1000 {
118 reg = <0x1000 0x440>;
119 };
120
121 macaddr_art_1002: macaddr@1002 {
122 reg = <0x1002 0x6>;
123 };
124 };
125 };
126 };
127 };
128
129 &mdio0 {
130 status = "okay";
131
132 phy0: ethernet-phy@0 {
133 reg = <0>;
134 phy-mode = "rgmii";
135 };
136 };
137
138 &eth0 {
139 status = "okay";
140
141 pll-data = <0x06000000 0x00000101 0x00001313>;
142
143 nvmem-cells = <&macaddr_art_1002>;
144 nvmem-cell-names = "mac-address";
145
146 phy-mode = "rgmii-id";
147 phy-handle = <&phy0>;
148
149 gmac-config {
150 device = <&gmac>;
151 rxdv-delay = <3>;
152 rxd-delay = <3>;
153 txen-delay = <3>;
154 txd-delay = <3>;
155 rgmii-gmac0 = <1>;
156 };
157 };
158
159 &wmac {
160 status = "okay";
161
162 ieee80211-freq-limit = <2402000 2482000>;
163
164 nvmem-cells = <&macaddr_mib0_4b>, <&calibration_ath9k>;
165 nvmem-cell-names = "mac-address-ascii", "calibration";
166 };