aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/dts
diff options
context:
space:
mode:
authorEdward Chow <equu@openmail.cc>2022-11-20 13:49:45 +0800
committerChristian Lamparter <chunkeey@gmail.com>2023-03-26 16:39:37 +0200
commitde3d60b982c7b8e1821b90b312db57287e74ede3 (patch)
tree4c48d130d3c2e9177f6b2def08403a290be98e02 /target/linux/ath79/dts
parentc2d1c32d1ef7f2797aa424a6c94d143e9ddaddc8 (diff)
downloadupstream-de3d60b982c7b8e1821b90b312db57287e74ede3.tar.gz
upstream-de3d60b982c7b8e1821b90b312db57287e74ede3.tar.bz2
upstream-de3d60b982c7b8e1821b90b312db57287e74ede3.zip
ath79: calibrate dlink dir-825 b1 with nvmem
Driver for both soc (2.4GHz Wifi) and pci (5 GHz) now pull the calibration data from the nvmem subsystem. This allows us to move the userspace caldata extraction for the pci-e ath9k supported wifi into the device-tree definition of the device. Currently, only ethernet devices uses the mac address of "mac-address-ascii" cells, while PCI ath9k devices uses the mac address within calibration data. Signed-off-by: Edward Chow <equu@openmail.cc> (restored switch configuration in 02_network, integrated caldata into partition) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'target/linux/ath79/dts')
-rw-r--r--target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts33
1 files changed, 31 insertions, 2 deletions
diff --git a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
index 6934a8f952..0e39be7d0b 100644
--- a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
+++ b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
@@ -139,7 +139,8 @@
ath9k0: wifi@0,11 {
compatible = "pci168c,0029";
reg = <0x8800 0 0 0 0>;
- qca,no-eeprom;
+ nvmem-cells = <&macaddr_lan>, <&cal_art_1000>;
+ nvmem-cell-names = "mac-address-ascii", "calibration";
#gpio-cells = <2>;
gpio-controller;
};
@@ -147,7 +148,9 @@
ath9k1: wifi@0,12 {
compatible = "pci168c,0029";
reg = <0x9000 0 0 0 0>;
- qca,no-eeprom;
+ nvmem-cells = <&macaddr_wan>, <&cal_art_5000>;
+ nvmem-cell-names = "mac-address-ascii", "calibration";
+ mac-address-increment = <1>;
#gpio-cells = <2>;
gpio-controller;
};
@@ -184,9 +187,28 @@
};
partition@660000 {
+ compatible = "nvmem-cells";
label = "caldata";
reg = <0x660000 0x010000>;
read-only;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_1000: cal@1000 {
+ reg = <0x1000 0xeb8>;
+ };
+
+ cal_art_5000: cal@5000 {
+ reg = <0x5000 0xeb8>;
+ };
+
+ macaddr_lan: macaddr@ffa0 {
+ reg = <0xffa0 0x11>;
+ };
+
+ macaddr_wan: macaddr@ffb4 {
+ reg = <0xffb4 0x11>;
+ };
};
fwconcat1: partition@670000 {
@@ -202,6 +224,9 @@
pll-data = <0x11110000 0x00001099 0x00991099>;
+ nvmem-cells = <&macaddr_lan>;
+ nvmem-cell-names = "mac-address-ascii";
+
fixed-link {
speed = <1000>;
full-duplex;
@@ -213,5 +238,9 @@
pll-data = <0x11110000 0x00001099 0x00991099>;
+ nvmem-cells = <&macaddr_wan>;
+ nvmem-cell-names = "mac-address-ascii";
+
phy-handle = <&phy4>;
};
+