Skip to content

Commit

Permalink
ipq806x: utilize nvmem-cells for pre-calibration data
Browse files Browse the repository at this point in the history
converts extraction entries from 11-ath10k-caldata into
nvmem-cells in the individual board's device-tree file.

The patch also moves previously existing referenced
nvmem-cells data nodes which were placed at the end
back into the partitions node. As well as removing
some duplicated properties from qcom-ipq8065-xr500.dts's
art (the included nighthawk.dtsi defines those already).

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
  • Loading branch information
chunkeey committed Feb 4, 2022
1 parent a1693a8 commit 2047058
Show file tree
Hide file tree
Showing 11 changed files with 169 additions and 139 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ case "$FIRMWARE" in
asrock,g10)
caldata_extract "0:art" 0x1000 0x2f20
;;
buffalo,wxr-2533dhp |\
nec,wg2600hp |\
nec,wg2600hp3 |\
tplink,vr2600v)
caldata_extract "ART" 0x1000 0x2f20
;;
linksys,ea7500-v1 |\
linksys,ea8500)
caldata_extract "art" 0x1000 0x2f20
Expand All @@ -38,16 +32,6 @@ case "$FIRMWARE" in
CI_UBIPART=art
caldata_extract_ubi "ART" 0x1000 0x2f20
;;
netgear,d7800 |\
netgear,r7500v2 |\
netgear,r7800 |\
netgear,xr500)
caldata_extract "art" 0x1000 0x2f20
;;
tplink,ad7200 |\
tplink,c2600)
caldata_extract "radio" 0x1000 0x2f20
;;
zyxel,nbg6817)
caldata_extract "0:art" 0x1000 0x2f20
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:appsblenv ethaddr) 1)
Expand All @@ -62,12 +46,6 @@ case "$FIRMWARE" in
asrock,g10)
caldata_extract "0:art" 0x5000 0x2f20
;;
buffalo,wxr-2533dhp |\
nec,wg2600hp |\
nec,wg2600hp3 |\
tplink,vr2600v)
caldata_extract "ART" 0x5000 0x2f20
;;
edgecore,ecw5410)
caldata_extract "0:art" 0x1000 0x2f20
;;
Expand All @@ -81,16 +59,6 @@ case "$FIRMWARE" in
CI_UBIPART=art
caldata_extract_ubi "ART" 0x5000 0x2f20
;;
netgear,d7800 |\
netgear,r7500v2 |\
netgear,r7800 |\
netgear,xr500)
caldata_extract "art" 0x5000 0x2f20
;;
tplink,ad7200 |\
tplink,c2600)
caldata_extract "radio" 0x5000 0x2f20
;;
zyxel,nbg6817)
caldata_extract "0:art" 0x5000 0x2f20
ath10k_patch_mac $(mtd_get_mac_ascii 0:appsblenv ethaddr)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,17 @@
label = "ART";
reg = <0x02e0000 0x0040000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

precal_ART_1000: precal@1000 {
reg = <0x1000 0x2f20>;
};

precal_ART_5000: precal@5000 {
reg = <0x5000 0x2f20>;
};
};

partition@320000 {
Expand Down Expand Up @@ -360,8 +371,8 @@

qcom,ath10k-calibration-variant = "NEC-Platforms-WG2600HP3";

nvmem-cells = <&macaddr_PRODUCTDATA_12>;
nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_PRODUCTDATA_12>, <&precal_ART_1000>;
nvmem-cell-names = "mac-address", "pre-calibration";
};
};
};
Expand All @@ -383,8 +394,8 @@
ieee80211-freq-limit = <2400000 2483000>;
qcom,ath10k-calibration-variant = "NEC-Platforms-WG2600HP3";

nvmem-cells = <&macaddr_PRODUCTDATA_c>;
nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_PRODUCTDATA_c>, <&precal_ART_5000>;
nvmem-cell-names = "mac-address", "pre-calibration";
};
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,17 @@
label = "radio";
reg = <0x1b0000 0x40000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

precal_radio_1000: precal@1000 {
reg = <0x1000 0x2f20>;
};

precal_radio_5000: precal@5000 {
reg = <0x5000 0x2f20>;
};
};

partition@1f0000 {
Expand Down Expand Up @@ -266,8 +277,8 @@
compatible = "pci168c,0040";
reg = <0x00010000 0 0 0 0>;

nvmem-cells = <&macaddr_defaultmac_8>;
nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_defaultmac_8>, <&precal_radio_1000>;
nvmem-cell-names = "mac-address", "pre-calibration";
mac-address-increment = <(-1)>;
};
};
Expand All @@ -287,8 +298,8 @@
compatible = "pci168c,0040";
reg = <0x00010000 0 0 0 0>;

nvmem-cells = <&macaddr_defaultmac_8>;
nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_defaultmac_8>, <&precal_radio_5000>;
nvmem-cell-names = "mac-address", "pre-calibration";
};
};
};
Expand Down
43 changes: 24 additions & 19 deletions target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@
compatible = "pci168c,0040";
reg = <0x00010000 0 0 0 0>;

nvmem-cells = <&macaddr_art_6>;
nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_art_6>, <&precal_art_1000>;
nvmem-cell-names = "mac-address", "pre-calibration";
mac-address-increment = <(1)>;
};
};
Expand All @@ -217,8 +217,8 @@
compatible = "pci168c,0040";
reg = <0x00010000 0 0 0 0>;

nvmem-cells = <&macaddr_art_6>;
nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_art_6>, <&precal_art_5000>;
nvmem-cell-names = "mac-address", "pre-calibration";
mac-address-increment = <(2)>;
};
};
Expand Down Expand Up @@ -274,10 +274,29 @@
read-only;
};

art: art@1200000 {
art@1200000 {
label = "art";
reg = <0x1200000 0x0140000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};

macaddr_art_6: macaddr@6 {
reg = <0x6 0x6>;
};

precal_art_1000: precal@1000 {
reg = <0x1000 0x2f20>;
};

precal_art_5000: precal@5000 {
reg = <0x5000 0x2f20>;
};
};

artbak: art@1340000 {
Expand Down Expand Up @@ -369,17 +388,3 @@
&adm_dma {
status = "okay";
};

&art {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};

macaddr_art_6: macaddr@6 {
reg = <0x6 0x6>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@
compatible = "pci168c,0040";
reg = <0x00010000 0 0 0 0>;

nvmem-cells = <&macaddr_art_6>;
nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_art_6>, <&precal_art_1000>;
nvmem-cell-names = "mac-address", "pre-calibration";
mac-address-increment = <(1)>;
};
};
Expand All @@ -221,8 +221,8 @@
compatible = "pci168c,0040";
reg = <0x00010000 0 0 0 0>;

nvmem-cells = <&macaddr_art_6>;
nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_art_6>, <&precal_art_5000>;
nvmem-cell-names = "mac-address", "pre-calibration";
mac-address-increment = <(2)>;
};
};
Expand Down Expand Up @@ -268,10 +268,29 @@
read-only;
};

art: art@1200000 {
art@1200000 {
label = "art";
reg = <0x1200000 0x0140000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};

macaddr_art_6: macaddr@6 {
reg = <0x6 0x6>;
};

precal_art_1000: precal@1000 {
reg = <0x1000 0x2f20>;
};

precal_art_5000: precal@5000 {
reg = <0x5000 0x2f20>;
};
};

artbak: art@1340000 {
Expand Down Expand Up @@ -353,17 +372,3 @@
full-duplex;
};
};

&art {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};

macaddr_art_6: macaddr@6 {
reg = <0x6 0x6>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,18 @@
label = "ART";
reg = <0xfc0000 0x40000>;
read-only;

compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

precal_ART_1000: precal@1000 {
reg = <0x1000 0x2f20>;
};

precal_ART_5000: precal@5000 {
reg = <0x5000 0x2f20>;
};
};
};
};
Expand All @@ -295,8 +307,8 @@
compatible = "pci168c,0040";
reg = <0x00010000 0 0 0 0>;

nvmem-cells = <&macaddr_defaultmac_0>;
nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_defaultmac_0>, <&precal_ART_1000>;
nvmem-cell-names = "mac-address", "pre-calibration";
mac-address-increment = <(-1)>;
};
};
Expand All @@ -316,8 +328,8 @@
compatible = "pci168c,0040";
reg = <0x00010000 0 0 0 0>;

nvmem-cells = <&macaddr_defaultmac_0>;
nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_defaultmac_0>, <&precal_ART_5000>;
nvmem-cell-names = "mac-address", "pre-calibration";
};
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,17 @@
label = "ART";
reg = <0x2e0000 0x40000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

precal_ART_1000: precal@1000 {
reg = <0x1000 0x2f20>;
};

precal_ART_5000: precal@5000 {
reg = <0x5000 0x2f20>;
};
};

TP@320000 {
Expand Down Expand Up @@ -331,8 +342,8 @@
compatible = "pci168c,0040";
reg = <0x00010000 0 0 0 0>;

nvmem-cells = <&macaddr_PRODUCTDATA_12>;
nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_PRODUCTDATA_12>, <&precal_ART_1000>;
nvmem-cell-names = "mac-address", "pre-calibration";
};
};
};
Expand All @@ -351,8 +362,8 @@
compatible = "pci168c,0040";
reg = <0x00010000 0 0 0 0>;

nvmem-cells = <&macaddr_PRODUCTDATA_c>;
nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_PRODUCTDATA_c>, <&precal_ART_5000>;
nvmem-cell-names = "mac-address", "pre-calibration";
};
};
};
Expand Down
Loading

0 comments on commit 2047058

Please sign in to comment.