ath79: WNDR3700/3800/MAC: utilize nvmem for caldata fetching
[openwrt/staging/thess.git] / target / linux / ath79 / dts / ar7161_netgear_wndr3700.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7161_netgear_wndr.dtsi"
4
5 / {
6 compatible = "netgear,wndr3700", "qca,ar7161";
7 model = "Netgear WNDR3700";
8
9 aliases {
10 label-mac-device = &eth0;
11 };
12 };
13
14 &partitions {
15 partition@0 {
16 label = "u-boot";
17 reg = <0x000000 0x050000>;
18 read-only;
19 };
20
21 partition@50000 {
22 label = "u-boot-env";
23 reg = <0x050000 0x020000>;
24 };
25
26 partition@70000 {
27 label = "firmware";
28 reg = <0x070000 0x780000>;
29 compatible = "openwrt,uimage", "denx,uimage";
30 openwrt,ih-magic = <0x33373030>;
31 openwrt,ih-type = <IH_TYPE_FILESYSTEM>;
32 };
33
34 art: partition@7f0000 {
35 label = "art";
36 reg = <0x7f0000 0x010000>;
37 read-only;
38 };
39 };
40
41 &ath9k0 {
42 nvmem-cells = <&macaddr_art_c>, <&cal_art_1000>;
43 nvmem-cell-names = "mac-address", "calibration";
44 };
45
46 &ath9k1 {
47 nvmem-cells = <&macaddr_art_0>, <&cal_art_5000>;
48 nvmem-cell-names = "mac-address", "calibration";
49
50 /* The original WNDR3700(v1) variant have four antennae dedicated
51 * to the 5GHz radio as well. Again, two antennae are available for
52 * each chain to switch between. The following configuration is the
53 * default setting which taken from the vendor's wifi
54 * code for that radio.
55 *
56 * All possible options [GPIO6,GPIO7,GPIO8,GPIO9]:
57 * [0,1,0,1], [0,1,1,0], [1,0,0,1], [1,0,1,0]
58 */
59 antenna-demux {
60 gpio-hog;
61 line-name = "fixed antenna group 2";
62 gpios = <6 GPIO_ACTIVE_LOW>,
63 <7 GPIO_ACTIVE_HIGH>,
64 <8 GPIO_ACTIVE_HIGH>,
65 <9 GPIO_ACTIVE_LOW>;
66 output-high;
67 };
68 };
69
70 &eth0 {
71 nvmem-cells = <&macaddr_art_0>;
72 nvmem-cell-names = "mac-address";
73 };
74
75 &eth1 {
76 nvmem-cells = <&macaddr_art_6>;
77 nvmem-cell-names = "mac-address";
78 };
79
80 &art {
81 compatible = "nvmem-cells";
82 #address-cells = <1>;
83 #size-cells = <1>;
84
85 macaddr_art_0: macaddr@0 {
86 reg = <0x0 0x6>;
87 };
88
89 macaddr_art_6: macaddr@6 {
90 reg = <0x6 0x6>;
91 };
92
93 macaddr_art_c: macaddr@c {
94 reg = <0xc 0x6>;
95 };
96
97 cal_art_1000: cal@1000 {
98 reg = <0x1000 0xeb8>;
99 };
100
101 cal_art_5000: cal@5000 {
102 reg = <0x5000 0xeb8>;
103 };
104 };