Re: Help unbricking AC750

2022-06-18 Thread Lech Perczak

Hi!

W dniu 2022-06-18 o 17:14, Luca Bertoncello pisze:

Hi!

I have an TP-Link AC750 Archer C2.
It worked with TP-Link Firmware and I wanted to install OpenWRT.

Unfortunately, something went really wrong and now the devices seems to
be bricked...
Only Power-LED is on, no other activity.

Has someone an idea how can I try to recover it?
If that's C2v1 and you attempted flashing it over TFTP without appending 
U-boot to the factory image first, then you might need to desolder the 
SPI flash chip and use an external programmer, for example one based on 
CH341 and reflash it externally with "flashrom" or similar tool. I 
recovered one unit that way, and found OpenWrt uImage where U-boot 
should have been.


Thanks a lot
Luca Bertoncello
(lucab...@lucabert.de)

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


--
Pozdrawiam,
Lech Perczak


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Help unbricking AC750

2022-06-18 Thread Luca Bertoncello
Am 18.06.2022 um 18:03 schrieb Michael Fuckner:
> I'd solder pins and connect to serial console and try if this still works

Thank you very much.
Unfortunately I don't have the possibility to do that myself...

I'll check in my circle of friends if someone can help me...

Regards
Luca Bertoncello
(lucab...@lucabert.de)

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Help unbricking AC750

2022-06-18 Thread Brice GIBOUDEAU via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
You can connect a serial interface to try a command line reflash if the uboot 
is still operational or as I see a winbond flash on the pictures it mean you 
can reflash it with a CH341 board the original firmware (exemple 
https://amzn.eu/d/5IDoawl).
I don’t know if you are use to that kind of recovery but your U-Boot looks 
broken.

> Le 18 juin 2022 à 18:02, Luca Bertoncello  a écrit :
> 
> Am 18.06.2022 um 17:55 schrieb Brice GIBOUDEAU:
>> Try the recovery procedure detailed on the device page. (Tftp, recovery).
> 
> I tried it, but no TFTP-Session will be started...
> I prepared the server, power off the router, hold the Reset and power on
> the device, but only the power LED will turn on...
> 
> Any other suggestion?
> 
> Thanks
> Luca Bertoncello
> (lucab...@lucabert.de)
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Help unbricking AC750

2022-06-18 Thread Michael Fuckner

I'd solder pins and connect to serial console and try if this still works

HT,
 Michael!

Am 18/06/2022 um 17:59 schrieb Luca Bertoncello:

Am 18.06.2022 um 17:55 schrieb Brice GIBOUDEAU:

Try the recovery procedure detailed on the device page. (Tftp, recovery).


I tried it, but no TFTP-Session will be started...
I prepared the server, power off the router, hold the Reset and power on
the device, but only the power LED will turn on...

Any other suggestion?

Thanks
Luca Bertoncello
(lucab...@lucabert.de)

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Help unbricking AC750

2022-06-18 Thread Luca Bertoncello
Am 18.06.2022 um 17:55 schrieb Brice GIBOUDEAU:
> Try the recovery procedure detailed on the device page. (Tftp, recovery).

I tried it, but no TFTP-Session will be started...
I prepared the server, power off the router, hold the Reset and power on
the device, but only the power LED will turn on...

Any other suggestion?

Thanks
Luca Bertoncello
(lucab...@lucabert.de)

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Help unbricking AC750

2022-06-18 Thread Brice GIBOUDEAU via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Try the recovery procedure detailed on the device page. (Tftp, recovery).



> Le 18 juin 2022 à 17:18, Luca Bertoncello  a écrit :
> 
> Hi!
> 
> I have an TP-Link AC750 Archer C2.
> It worked with TP-Link Firmware and I wanted to install OpenWRT.
> 
> Unfortunately, something went really wrong and now the devices seems to
> be bricked...
> Only Power-LED is on, no other activity.
> 
> Has someone an idea how can I try to recover it?
> 
> Thanks a lot
> Luca Bertoncello
> (lucab...@lucabert.de)
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Help unbricking AC750

2022-06-18 Thread Luca Bertoncello
Hi!

I have an TP-Link AC750 Archer C2.
It worked with TP-Link Firmware and I wanted to install OpenWRT.

Unfortunately, something went really wrong and now the devices seems to
be bricked...
Only Power-LED is on, no other activity.

Has someone an idea how can I try to recover it?

Thanks a lot
Luca Bertoncello
(lucab...@lucabert.de)

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v3 3/6] ath79: D-Link DAP-2680 A1: convert ath10k caldata to nvmem

2022-06-18 Thread Sander Vanheule
Hi Sebastian,

On Sat, 2022-06-18 at 11:45 +0200, Sebastian Schaper wrote:
> Tested successfully on DAP-2680, both radios are available and
> the MAC address assignment is correct for LAN and both radios.
> 
> Feel free to add my Tested-By to the commit message.
> 
> I also tested DAP-2660 as an example Wave-1 device from the series,
> both radios and MAC assignment are working fine here as well.

Thanks for testing!

> 
> Looking at other devices using pre-calibration, it seems the dts alias
> used for the nvmem cell also reflects the type of calibration data,
> maybe this could be used here as well, for the sake of consistency.

I've updated the node name and label for the pre-cal data, and merged the 
patches.

Best,
Sander

> 
> Best,
> Sebastian
> 
> 
> Am 18.06.22 um 10:55 schrieb Sander Vanheule:
> > Add the PCIe node for the ath10k radio to the devicetree, and refer to
> > the art partition for the pre-calibration data using nvmem-cells.
> > 
> > MAC address assignment is moved to '10_fix_wifi_mac', so the device can
> > then be removed from the caldata extraction script '11-ath10k-caldata'.
> > 
> > Cc: Sebastian Schaper 
> > Signed-off-by: Sander Vanheule 
> > ---
> >   .../linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts  | 14 ++
> >   .../etc/hotplug.d/firmware/11-ath10k-caldata   |  6 --
> >   .../etc/hotplug.d/ieee80211/10_fix_wifi_mac    |  7 ++-
> >   3 files changed, 20 insertions(+), 7 deletions(-)
> > 
> > diff --git a/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts
> > b/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts
> > index 0593fd29f418..a688293ce6bc 100644
> > --- a/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts
> > +++ b/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts
> > @@ -79,4 +79,18 @@
> >   
> >    {
> > status = "okay";
> > +
> > +   wifi@0,0 {
> > +   compatible = "qcom,ath10k";
> > +   reg = <0 0 0 0 0>;
> > +
> > +   nvmem-cells = <_ath10k>;
> > +   nvmem-cell-names = "pre-calibration";
> > +   };
> > +};
> > +
> > + {
> > +   cal_ath10k: calibration@5000 {
> > +   reg = <0x5000 0x2f20>;
> > +   };
> >   };
> > diff --git 
> > a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> > b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> > index cb4a5797ec31..1ce3f00c7e4f 100644
> > --- 
> > a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> > +++ 
> > b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
> > @@ -197,12 +197,6 @@ case "$FIRMWARE" in
> > /lib/firmware/ath10k/QCA9888/hw2.0/board.bin
> > rm /lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin
> > ;;
> > -   dlink,dap-2680-a1)
> > -   caldata_extract "art" 0x5000 0x2f20
> > -   ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a)
> > -   ln -sf /lib/firmware/ath10k/pre-cal-pci-\:00\:00.0.bin \
> > -   /lib/firmware/ath10k/QCA9888/hw2.0/board.bin
> > -   ;;
> > dlink,dir-842-c1|\
> > dlink,dir-842-c2|\
> > dlink,dir-842-c3)
> > diff --git 
> > a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
> > b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
> > index a4f82c54e271..d5a2471a99a9 100644
> > --- 
> > a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
> > +++ 
> > b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
> > @@ -27,12 +27,17 @@ case "$board" in
> > mtd_get_mac_ascii bdcfg "wlanmac" > 
> > /sys${DEVPATH}/macaddress
> > ;;
> > dlink,dap-2660-a1|\
> > -   dlink,dap-2680-a1|\
> > dlink,dap-2695-a1|\
> > dlink,dap-3662-a1)
> > [ "$PHYNBR" -eq 1 ] && \
> > mtd_get_mac_ascii bdcfg "wlanmac" > 
> > /sys${DEVPATH}/macaddress
> > ;;
> > +   dlink,dap-2680-a1)
> > +   [ "$PHYNBR" -eq 0 ] && \
> > +   mtd_get_mac_ascii bdcfg "wlanmac_a" > 
> > /sys${DEVPATH}/macaddress
> > +   [ "$PHYNBR" -eq 1 ] && \
> > +   mtd_get_mac_ascii bdcfg "wlanmac" > 
> > /sys${DEVPATH}/macaddress
> > +   ;;
> > iodata,wn-ac1600dgr)
> > # There is no eeprom data for 5 GHz wlan in "art" partition
> > # which would allow to patch the macaddress

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v3 3/6] ath79: D-Link DAP-2680 A1: convert ath10k caldata to nvmem

2022-06-18 Thread Sebastian Schaper

Tested successfully on DAP-2680, both radios are available and
the MAC address assignment is correct for LAN and both radios.

Feel free to add my Tested-By to the commit message.

I also tested DAP-2660 as an example Wave-1 device from the series,
both radios and MAC assignment are working fine here as well.

Looking at other devices using pre-calibration, it seems the dts alias
used for the nvmem cell also reflects the type of calibration data,
maybe this could be used here as well, for the sake of consistency.

Best,
Sebastian


Am 18.06.22 um 10:55 schrieb Sander Vanheule:

Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the pre-calibration data using nvmem-cells.

MAC address assignment is moved to '10_fix_wifi_mac', so the device can
then be removed from the caldata extraction script '11-ath10k-caldata'.

Cc: Sebastian Schaper 
Signed-off-by: Sander Vanheule 
---
  .../linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts  | 14 ++
  .../etc/hotplug.d/firmware/11-ath10k-caldata   |  6 --
  .../etc/hotplug.d/ieee80211/10_fix_wifi_mac|  7 ++-
  3 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts 
b/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts
index 0593fd29f418..a688293ce6bc 100644
--- a/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts
+++ b/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts
@@ -79,4 +79,18 @@
  
   {

status = "okay";
+
+   wifi@0,0 {
+   compatible = "qcom,ath10k";
+   reg = <0 0 0 0 0>;
+
+   nvmem-cells = <_ath10k>;
+   nvmem-cell-names = "pre-calibration";
+   };
+};
+
+ {
+   cal_ath10k: calibration@5000 {
+   reg = <0x5000 0x2f20>;
+   };
  };
diff --git 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index cb4a5797ec31..1ce3f00c7e4f 100644
--- 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -197,12 +197,6 @@ case "$FIRMWARE" in
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
rm /lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin
;;
-   dlink,dap-2680-a1)
-   caldata_extract "art" 0x5000 0x2f20
-   ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a)
-   ln -sf /lib/firmware/ath10k/pre-cal-pci-\:00\:00.0.bin \
-   /lib/firmware/ath10k/QCA9888/hw2.0/board.bin
-   ;;
dlink,dir-842-c1|\
dlink,dir-842-c2|\
dlink,dir-842-c3)
diff --git 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index a4f82c54e271..d5a2471a99a9 100644
--- 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -27,12 +27,17 @@ case "$board" in
mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress
;;
dlink,dap-2660-a1|\
-   dlink,dap-2680-a1|\
dlink,dap-2695-a1|\
dlink,dap-3662-a1)
[ "$PHYNBR" -eq 1 ] && \
mtd_get_mac_ascii bdcfg "wlanmac" > 
/sys${DEVPATH}/macaddress
;;
+   dlink,dap-2680-a1)
+   [ "$PHYNBR" -eq 0 ] && \
+   mtd_get_mac_ascii bdcfg "wlanmac_a" > 
/sys${DEVPATH}/macaddress
+   [ "$PHYNBR" -eq 1 ] && \
+   mtd_get_mac_ascii bdcfg "wlanmac" > 
/sys${DEVPATH}/macaddress
+   ;;
iodata,wn-ac1600dgr)
# There is no eeprom data for 5 GHz wlan in "art" partition
# which would allow to patch the macaddress


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v3 6/6] ath79: D-Link DAP-3662 A1: convert ath10k caldata to nvmem

2022-06-18 Thread Sander Vanheule
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

MAC address assignment is moved to '10_fix_wifi_mac', so the device can
then be removed from the caldata extraction script '11-ath10k-caldata'.

Cc: Sebastian Schaper 
Signed-off-by: Sander Vanheule 
---
 .../linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts  | 14 ++
 .../etc/hotplug.d/firmware/11-ath10k-caldata   |  4 
 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac|  7 ++-
 3 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts 
b/target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts
index 1ecc987a4f2c..27883f721cf5 100644
--- a/target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts
+++ b/target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts
@@ -93,4 +93,18 @@
 
  {
status = "okay";
+
+   wifi@0,0 {
+   compatible = "qcom,ath10k";
+   reg = <0 0 0 0 0>;
+
+   nvmem-cells = <_ath10k>;
+   nvmem-cell-names = "calibration";
+   };
+};
+
+ {
+   cal_ath10k: calibration@5000 {
+   reg = <0x5000 0x844>;
+   };
 };
diff --git 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 621f0c62b001..5c42ae4fac13 100644
--- 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -67,10 +67,6 @@ case "$FIRMWARE" in
caldata_extract "art" 0x5000 0x844
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) -1)
;;
-   dlink,dap-3662-a1)
-   caldata_extract "art" 0x5000 0x844
-   ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a)
-   ;;
dlink,dir-859-a1)
caldata_extract "art" 0x5000 0x844
ath10k_patch_mac $(mtd_get_mac_ascii devdata "wlan5mac")
diff --git 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index fc74d3dd4a00..95ff6083c7f8 100644
--- 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -26,13 +26,10 @@ case "$board" in
dlink,dap-3320-a1)
mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress
;;
-   dlink,dap-3662-a1)
-   [ "$PHYNBR" -eq 1 ] && \
-   mtd_get_mac_ascii bdcfg "wlanmac" > 
/sys${DEVPATH}/macaddress
-   ;;
dlink,dap-2660-a1|\
dlink,dap-2680-a1|\
-   dlink,dap-2695-a1)
+   dlink,dap-2695-a1|\
+   dlink,dap-3662-a1)
[ "$PHYNBR" -eq 0 ] && \
mtd_get_mac_ascii bdcfg "wlanmac_a" > 
/sys${DEVPATH}/macaddress
[ "$PHYNBR" -eq 1 ] && \
-- 
2.36.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v3 5/6] ath79: D-Link DAP-2695 A1: convert ath10k caldata to nvmem

2022-06-18 Thread Sander Vanheule
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

MAC address assignment is moved to '10_fix_wifi_mac', so the device can
then be removed from the caldata extraction script '11-ath10k-caldata'.

Cc: Sebastian Schaper 
Signed-off-by: Sander Vanheule 
---
 .../linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts  | 14 ++
 .../etc/hotplug.d/firmware/11-ath10k-caldata   |  1 -
 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac|  4 ++--
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts 
b/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts
index 91df50fb45d9..1985fa48d837 100644
--- a/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts
+++ b/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts
@@ -105,4 +105,18 @@
 
  {
status = "okay";
+
+   wifi@0,0 {
+   compatible = "qcom,ath10k";
+   reg = <0 0 0 0 0>;
+
+   nvmem-cells = <_ath10k>;
+   nvmem-cell-names = "calibration";
+   };
+};
+
+ {
+   cal_ath10k: calibration@5000 {
+   reg = <0x5000 0x844>;
+   };
 };
diff --git 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 079b9ab150d4..621f0c62b001 100644
--- 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -67,7 +67,6 @@ case "$FIRMWARE" in
caldata_extract "art" 0x5000 0x844
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) -1)
;;
-   dlink,dap-2695-a1|\
dlink,dap-3662-a1)
caldata_extract "art" 0x5000 0x844
ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a)
diff --git 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index fbd5344a1e82..fc74d3dd4a00 100644
--- 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -26,13 +26,13 @@ case "$board" in
dlink,dap-3320-a1)
mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress
;;
-   dlink,dap-2695-a1|\
dlink,dap-3662-a1)
[ "$PHYNBR" -eq 1 ] && \
mtd_get_mac_ascii bdcfg "wlanmac" > 
/sys${DEVPATH}/macaddress
;;
dlink,dap-2660-a1|\
-   dlink,dap-2680-a1)
+   dlink,dap-2680-a1|\
+   dlink,dap-2695-a1)
[ "$PHYNBR" -eq 0 ] && \
mtd_get_mac_ascii bdcfg "wlanmac_a" > 
/sys${DEVPATH}/macaddress
[ "$PHYNBR" -eq 1 ] && \
-- 
2.36.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v3 4/6] ath79: D-Link DAP-2660 A1: convert ath10k caldata to nvmem

2022-06-18 Thread Sander Vanheule
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

MAC address assignment is moved to '10_fix_wifi_mac', so the device can
then be removed from the caldata extraction script '11-ath10k-caldata'.

Cc: Sebastian Schaper 
Signed-off-by: Sander Vanheule 
---
 .../linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts  | 14 ++
 .../etc/hotplug.d/firmware/11-ath10k-caldata   |  1 -
 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac|  2 +-
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts 
b/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts
index 039007942631..93e2fc0d974d 100644
--- a/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts
+++ b/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts
@@ -79,4 +79,18 @@
 
  {
status = "okay";
+
+   wifi@0,0 {
+   compatible = "qcom,ath10k";
+   reg = <0 0 0 0 0>;
+
+   nvmem-cells = <_ath10k>;
+   nvmem-cell-names = "calibration";
+   };
+};
+
+ {
+   cal_ath10k: calibration@5000 {
+   reg = <0x5000 0x844>;
+   };
 };
diff --git 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 1ce3f00c7e4f..079b9ab150d4 100644
--- 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -67,7 +67,6 @@ case "$FIRMWARE" in
caldata_extract "art" 0x5000 0x844
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) -1)
;;
-   dlink,dap-2660-a1|\
dlink,dap-2695-a1|\
dlink,dap-3662-a1)
caldata_extract "art" 0x5000 0x844
diff --git 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index d5a2471a99a9..fbd5344a1e82 100644
--- 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -26,12 +26,12 @@ case "$board" in
dlink,dap-3320-a1)
mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress
;;
-   dlink,dap-2660-a1|\
dlink,dap-2695-a1|\
dlink,dap-3662-a1)
[ "$PHYNBR" -eq 1 ] && \
mtd_get_mac_ascii bdcfg "wlanmac" > 
/sys${DEVPATH}/macaddress
;;
+   dlink,dap-2660-a1|\
dlink,dap-2680-a1)
[ "$PHYNBR" -eq 0 ] && \
mtd_get_mac_ascii bdcfg "wlanmac_a" > 
/sys${DEVPATH}/macaddress
-- 
2.36.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v3 1/6] ath79: D-Link DAP-2xxx (QCA955x): move art partition to DTSI

2022-06-18 Thread Sander Vanheule
The art partition containing the radio calibration data is in the same
location for all supported devices. Move the definition to the base file
so the reference from the wmac node can refer to the same file.

Cc: Sebastian Schaper 
Signed-off-by: Sander Vanheule 
---
 target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts | 6 --
 target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts | 6 --
 target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts | 6 --
 target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts | 6 --
 target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi   | 6 ++
 5 files changed, 6 insertions(+), 24 deletions(-)

diff --git a/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts 
b/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts
index 622f4410b33f..039007942631 100644
--- a/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts
+++ b/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts
@@ -51,12 +51,6 @@
reg = <0xf5 0xa>;
read-only;
};
-
-   art: partition@ff {
-   label = "art";
-   reg = <0xff 0x1>;
-   read-only;
-   };
 };
 
  {
diff --git a/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts 
b/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts
index 7549c0a6970d..0593fd29f418 100644
--- a/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts
+++ b/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts
@@ -51,12 +51,6 @@
reg = <0xf5 0xa>;
read-only;
};
-
-   art: partition@ff {
-   label = "art";
-   reg = <0xff 0x1>;
-   read-only;
-   };
 };
 
  {
diff --git a/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts 
b/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts
index 99ff551adbb2..91df50fb45d9 100644
--- a/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts
+++ b/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts
@@ -63,12 +63,6 @@
reg = <0xfe 0x01>;
read-only;
};
-
-   art: partition@ff {
-   label = "art";
-   reg = <0xff 0x01>;
-   read-only;
-   };
 };
 
  {
diff --git a/target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts 
b/target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts
index 55ac061a56c8..1ecc987a4f2c 100644
--- a/target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts
+++ b/target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts
@@ -51,12 +51,6 @@
reg = <0xf6 0x9>;
read-only;
};
-
-   art: partition@ff {
-   label = "art";
-   reg = <0xff 0x1>;
-   read-only;
-   };
 };
 
  {
diff --git a/target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi 
b/target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi
index 1047dfddeb14..21fde53cc867 100644
--- a/target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi
+++ b/target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi
@@ -41,6 +41,12 @@
reg = <0x6 0x1>;
read-only;
};
+
+   art: partition@ff {
+   label = "art";
+   reg = <0xff 0x1>;
+   read-only;
+   };
};
};
 };
-- 
2.36.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v3 2/6] ath79: D-Link DAP-2xxx (QCA955x): convert ath9k caldata to nvmem

2022-06-18 Thread Sander Vanheule
Convert the calibration data reference for the ath9k radio to an
nvmem-cell, replacing the downstream mtd-cal-data property.

Cc: Sebastian Schaper 
Signed-off-by: Sander Vanheule 
---
Changes in v2:
- Put nvmem cell definition directly in partition node
---
 target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi 
b/target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi
index 21fde53cc867..3e254fa494ea 100644
--- a/target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi
+++ b/target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi
@@ -46,6 +46,14 @@
label = "art";
reg = <0xff 0x1>;
read-only;
+
+   compatible = "nvmem-cells";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   cal_ath9k: calibration@1000 {
+   reg = <0x1000 0x440>;
+   };
};
};
};
@@ -54,5 +62,6 @@
  {
status = "okay";
 
-   mtd-cal-data = < 0x1000>;
+   nvmem-cells = <_ath9k>;
+   nvmem-cell-names = "calibration";
 };
-- 
2.36.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v3 3/6] ath79: D-Link DAP-2680 A1: convert ath10k caldata to nvmem

2022-06-18 Thread Sander Vanheule
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the pre-calibration data using nvmem-cells.

MAC address assignment is moved to '10_fix_wifi_mac', so the device can
then be removed from the caldata extraction script '11-ath10k-caldata'.

Cc: Sebastian Schaper 
Signed-off-by: Sander Vanheule 
---
 .../linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts  | 14 ++
 .../etc/hotplug.d/firmware/11-ath10k-caldata   |  6 --
 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac|  7 ++-
 3 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts 
b/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts
index 0593fd29f418..a688293ce6bc 100644
--- a/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts
+++ b/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts
@@ -79,4 +79,18 @@
 
  {
status = "okay";
+
+   wifi@0,0 {
+   compatible = "qcom,ath10k";
+   reg = <0 0 0 0 0>;
+
+   nvmem-cells = <_ath10k>;
+   nvmem-cell-names = "pre-calibration";
+   };
+};
+
+ {
+   cal_ath10k: calibration@5000 {
+   reg = <0x5000 0x2f20>;
+   };
 };
diff --git 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index cb4a5797ec31..1ce3f00c7e4f 100644
--- 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -197,12 +197,6 @@ case "$FIRMWARE" in
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
rm /lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin
;;
-   dlink,dap-2680-a1)
-   caldata_extract "art" 0x5000 0x2f20
-   ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a)
-   ln -sf /lib/firmware/ath10k/pre-cal-pci-\:00\:00.0.bin \
-   /lib/firmware/ath10k/QCA9888/hw2.0/board.bin
-   ;;
dlink,dir-842-c1|\
dlink,dir-842-c2|\
dlink,dir-842-c3)
diff --git 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index a4f82c54e271..d5a2471a99a9 100644
--- 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -27,12 +27,17 @@ case "$board" in
mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress
;;
dlink,dap-2660-a1|\
-   dlink,dap-2680-a1|\
dlink,dap-2695-a1|\
dlink,dap-3662-a1)
[ "$PHYNBR" -eq 1 ] && \
mtd_get_mac_ascii bdcfg "wlanmac" > 
/sys${DEVPATH}/macaddress
;;
+   dlink,dap-2680-a1)
+   [ "$PHYNBR" -eq 0 ] && \
+   mtd_get_mac_ascii bdcfg "wlanmac_a" > 
/sys${DEVPATH}/macaddress
+   [ "$PHYNBR" -eq 1 ] && \
+   mtd_get_mac_ascii bdcfg "wlanmac" > 
/sys${DEVPATH}/macaddress
+   ;;
iodata,wn-ac1600dgr)
# There is no eeprom data for 5 GHz wlan in "art" partition
# which would allow to patch the macaddress
-- 
2.36.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v3 0/6] ath79: convert QCA955x-based D-Link DAP-2xxx to nvmem

2022-06-18 Thread Sander Vanheule
Convert the QCA955x based devices to nvmem-cell based calibration data
extraction, so this can be removed from the init scripts.

Changes in v3:
- Use "pre-calibration" for 11ac Wave-2 hardware instead of
  "calibration" (kept for Wave-1)

Changes in v2:
- Put nvmem cell definition directly into partition node

Sander Vanheule (6):
  ath79: D-Link DAP-2xxx (QCA955x): move art partition to DTSI
  ath79: D-Link DAP-2xxx (QCA955x): convert ath9k caldata to nvmem
  ath79: D-Link DAP-2680 A1: convert ath10k caldata to nvmem
  ath79: D-Link DAP-2660 A1: convert ath10k caldata to nvmem
  ath79: D-Link DAP-2695 A1: convert ath10k caldata to nvmem
  ath79: D-Link DAP-3662 A1: convert ath10k caldata to nvmem

 .../ath79/dts/qca9557_dlink_dap-2660-a1.dts   | 20 +--
 .../ath79/dts/qca9558_dlink_dap-2680-a1.dts   | 20 +--
 .../ath79/dts/qca9558_dlink_dap-2695-a1.dts   | 20 +--
 .../ath79/dts/qca9558_dlink_dap-3662-a1.dts   | 20 +--
 .../ath79/dts/qca955x_dlink_dap-2xxx.dtsi | 17 +++-
 .../etc/hotplug.d/firmware/11-ath10k-caldata  | 12 ---
 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac   |  2 ++
 7 files changed, 74 insertions(+), 37 deletions(-)

-- 
2.36.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v2 3/6] ath79: D-Link DAP-2680 A1: convert ath10k caldata to nvmem

2022-06-18 Thread Sander Vanheule
Hi Christian,

On Sat, 2022-06-18 at 02:24 +0200, Christian Lamparter wrote:
> Hi,
> 
> On 18/06/2022 01:26, Sebastian Schaper wrote:
> > unfortunately, testing these changes on DAP-2680 resulted in board-2.bin
> > not being loaded, the driver is only looking for board.bin instead.
> > 
> > [   12.476846] ath10k 5.15 driver, optimized for CT firmware, probing pci 
> > device: 0x46.
> > [   12.486197] ath10k_pci :00:00.0: enabling device ( -> 0002)
> > [   12.492883] ath10k_pci :00:00.0: pci irq legacy oper_irq_mode 1 
> > irq_mode 0 reset_mode 0
> > [   15.751865] ath10k_pci :00:00.0: qca9984/qca9994 hw1.0 target 
> > 0x0100 chip_id
> > 0x sub 168c:cafe
> > [   15.761962] ath10k_pci :00:00.0: kconfig debug 0 debugfs 1 tracing 0 
> > dfs 1 testmode 0
> > [   15.781211] ath10k_pci :00:00.0: firmware ver 
> > 10.4b-ct-9984-fW-13-5ae337bb1 api 5
> > features 
> > mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-
> > all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-
> > CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 7ea63dc5
> > [   18.114113] ath10k_pci :00:00.0: Loading BDF type 0
> > [   18.123845] ath10k_pci :00:00.0: failed to fetch board data for
> > bus=pci,vendor=168c,device=0046,subsystem-vendor=168c,subsystem-device=cafe 
> > from
> > ath10k/QCA9984/hw1.0/board-2.bin
> > [   18.737015] ath10k_pci :00:00.0: failed to fetch board-2.bin or 
> > board.bin from
> > ath10k/QCA9984/hw1.0
> > [   18.746595] ath10k_pci :00:00.0: failed to fetch board file: -12
> > [   18.767513] ath10k_pci :00:00.0: could not probe fw (-12)
> 
> Technically, the Wave-2 chips like the 9984 need the "pre-calibration"
> as the nvmem-cell-names string over "calibration". If you change it,
> it will  pick up the matching entry in board-2.bin...

Thanks, I wasn't aware of this. I'll update the patches and send a v3.


Best,
Sander

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel