Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ath79: add support for D-link DAP-1720 A1 #13984

Merged
merged 1 commit into from Nov 26, 2023
Merged

Conversation

raenye
Copy link
Contributor

@raenye raenye commented Nov 15, 2023

D-Link DAP-1720 rev A1 is a mains-powered AC1750 Wi-Fi range extender, manufactured by Alpha Networks [8WAPAC28.1A1G].
(in square brackets: PCB silkscreen markings)

Specifications:

  • CPU (Qualcomm Atheros QCA9563-AL3A [U5]):
    775 MHz single core MIPS 74Kc;
  • RAM (Winbond W9751G6KB-25J [U3]):
    64 MiB DDR2;
  • ROM (Winbond W25Q128FV [U16]):
    16 MiB SPI NOR flash;
  • Ethernet (AR8033-AL1A PHY [U1], no switch):
    1 GbE RJ45 port (no PHY LEDs);
  • Wi-Fi
    • 2.4 GHz (Qualcomm Atheros QCA9563-AL3A [U5]):
      3x3 802.11n;
    • 5 GHz (Qualcomm Atheros QCA9880-BR4A [U9]):
      3x3 802.11ac Wave 1;
    • 3 foldable dual-band antennas (U.fl) [P1],[P2],[P3];
  • GPIO LEDs:
    • RSSI low (red/green) [D2];
    • RSSI medium (green) [D3];
    • RSSI high (green) [D4];
    • status (red/green) [D5];
  • GPIO buttons:
    • WPS [SW1], co-located with status LED;
    • reset [SW4], accessible via hole in the side;
  • Serial/UART: Tx-Gnd-3v3-Rx [JP1], Tx is the square pin, 1.25mm pitch;
    125000-8-n-1 in U-boot, 115200-8-n-1 in kernel;
  • Misc:
    • 12V VCC [JP2], fed from internal 12V/1A AC to DC converter;
    • on/off slide switch [SW2] (disconnects VCC mechanically);
    • unpopulated footprints for a Wi-Fi LED [D1];
    • unpopulated footprints for a 4-pin 3-position slide switch [SW3];

MAC addresses:

  • Label = LAN;
  • 2.4 GHz WiFi = LAN;
  • 5 GHz WiFi = LAN+2;

Installation:

  • factory.bin can be used to install OpenWrt from OEM firmware via the standard upgrade webpage at http://192.168.0.50/UpdateFirmware.html
  • recovery.bin can be used to install OpenWrt (or revert to OEM firmware) from D-Link Web Recovery. To enter web recovery, keep reset button pressed and then power on the device. Reset button can be released when the red status LED is bright; it will then blink slowly. Set static IP to 192.168.0.10, navigate to http://192.168.0.50 and upload 'recovery.bin'. Note that in web recovery mode the device ignores ping and DHCP requests.

Note: 802.11s is not supported by the default ath10k driver and firmware, but is supported by the non-CT driver and firmware variants. The -smallbuffers driver variant is recommended due to RAM size.

Co-developed-by: @protectivedad

@raenye
Copy link
Contributor Author

raenye commented Nov 15, 2023

If #13930 is merged before this, I'll update the makefile to create also factory.bin.

@github-actions github-actions bot added core packages pull request/issue for core (in-tree) packages target/ath79 pull request/issue for ath79 target labels Nov 15, 2023
@raenye
Copy link
Contributor Author

raenye commented Nov 15, 2023

EDIT: I got an ieee80211_link_info_change_notify warning on another device too (ramips/mt7621, not even ath79) running kernel 5.15., so I moved this to a separate issue #14030.

@raenye
Copy link
Contributor Author

raenye commented Nov 19, 2023

@neheb maybe you know why my DTS makes dmesg spit a handful of the following warning:

OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions

@neheb
Copy link
Contributor

neheb commented Nov 19, 2023

No idea. Might be a problem with ath79 dtsi files. Not sure.

};

partition@ff0000 {
label = "art"; // vendor calls it `radiocfg`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't you use the names the vendor used for the partitions OpenWrt does not directly access?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

art, uboot, etc seemed more common. It seems to only matter within the DTS.
Should I change?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok fine with me.

@hauke
Copy link
Member

hauke commented Nov 22, 2023

What does the [U5] and so on in your commit description mean?

@raenye
Copy link
Contributor Author

raenye commented Nov 22, 2023

What does the [U5] and so on in your commit description mean?

PCB silkscreen text.
EDIT: added a line in the commit text about it.

@raenye raenye force-pushed the dap-1720 branch 2 times, most recently from 33e2728 to aa247f0 Compare November 25, 2023 22:18
@neheb
Copy link
Contributor

neheb commented Nov 25, 2023

@Rayne if that OF warning still appears,

#address-cells = <1>;
#size-cells = <1>;

is needed before partitions under flash.

@raenye
Copy link
Contributor Author

raenye commented Nov 25, 2023

is needed before partitions under flash.

Thanks @neheb. Is this needed both within flash@0 and within partitions?

P.S. you pinged Rayne; I'm raenye :)

@neheb
Copy link
Contributor

neheb commented Nov 25, 2023

Just the former. Apparently that warning gets triggered when the parent is missing those.

@raenye
Copy link
Contributor Author

raenye commented Nov 25, 2023

@neheb I see I have this warning on my mt7621 device too.
In fact, it seems all mt7621 devices have it wrong.
Should I (in a separate PR) fix all DTs using a NOR* flash?

*For some reason I don't get this warning on Xiaomi Redmi AX6S mt7622 which has a NAND flash.

@neheb
Copy link
Contributor

neheb commented Nov 26, 2023

Feel free to do so. Although @mpratt14 changes it to a debug warning instead of an error. Given that it’s not upstream, makes sense to fix it.

@mpratt14
Copy link
Contributor

yeah, "bad cell count" from lack of defining address-cells and size-cells in the partitions is in the entirety of openwrt, in all subtargets

the reason is, partitions and their sub nodes are only just recently having address translation because of the addition of of_platform_populate() being used in mtdcore, and that was done to make the nvmem driver capable of using the partitions nodes as nvmem providers (which are usually standalone devices)

basically, the kernel is parsing the data in the nodes as if they were real physical devices in the SOC with a bus address range and registers and so on, but they aren't, the nodes are literally just info for the virtual flash space. the error is meant to tell the developer why the device isn't working in the case of the dts being written wrong, but it doesn't mean anything for nodes not representing a real device.

@raenye
Copy link
Contributor Author

raenye commented Nov 26, 2023

it doesn't mean anything for nodes not representing a real device.

I prefer less warnings :)

@mpratt14
Copy link
Contributor

I prefer less warnings :)

same here, that's why I was hoping my PR with a commit that silences it gets accepted before it's 1 year old zzzzzz

maybe I should put that in a separate PR by itself...

@raenye
Copy link
Contributor Author

raenye commented Nov 26, 2023

my PR with a commit that silences it gets accepted

Which one? e74219c in #11302?
I think you should; as you said, there are two unrelated problems there, and most of the work has to do with the devlink one.

D-Link DAP-1720 rev A1 is a mains-powered AC1750 Wi-Fi range extender,
manufactured by Alpha Networks [8WAPAC28.1A1G].
(in square brackets: PCB silkscreen markings)

Specifications:
* CPU (Qualcomm Atheros QCA9563-AL3A [U5]):
  775 MHz single core MIPS 74Kc;
* RAM (Winbond W9751G6KB-25J [U3]):
  64 MiB DDR2;
* ROM (Winbond W25Q128FV [U16]):
  16 MiB SPI NOR flash;
* Ethernet (AR8033-AL1A PHY [U1], no switch):
  1 GbE RJ45 port (no PHY LEDs);
* Wi-Fi
  * 2.4 GHz (Qualcomm Atheros QCA9563-AL3A [U5]):
    3x3 802.11n;
  * 5 GHz (Qualcomm Atheros QCA9880-BR4A [U9]):
    3x3 802.11ac Wave 1;
  * 3 foldable dual-band antennas (U.fl) [P1],[P2],[P3];
* GPIO LEDs:
  * RSSI low (red/green) [D2];
  * RSSI medium (green) [D3];
  * RSSI high (green) [D4];
  * status (red/green) [D5];
* GPIO buttons:
  * WPS [SW1], co-located with status LED;
  * reset [SW4], accessible via hole in the side;
* Serial/UART:
  Tx-Gnd-3v3-Rx [JP1], Tx is the square pin, 1.25mm pitch;
  125000-8-n-1 in U-boot, 115200-8-n-1 in kernel;
* Misc:
  * 12V VCC [JP2], fed from internal 12V/1A AC to DC converter;
  * on/off slide switch [SW2] (disconnects VCC mechanically);
  * unpopulated footprints for a Wi-Fi LED [D1];
  * unpopulated footprints for a 4-pin 3-position slide switch (SW3);

MAC addresses:
* Label = LAN;
* 2.4 GHz WiFi = LAN;
* 5 GHz WiFi = LAN+2;

Installation:
* `factory.bin` can be used to install OpenWrt from OEM firmware via the
  standard upgrade webpage at http://192.168.0.50/UpdateFirmware.html
* `recovery.bin` can be used to install OpenWrt (or revert to OEM
  firmware) from D-Link Web Recovery. To enter web recovery, keep reset
  button pressed and then power on the device. Reset button can be
  released when the red status LED is bright; it will then blink slowly.
  Set static IP to 192.168.0.10, navigate to http://192.168.0.50 and
  upload 'recovery.bin'. Note that in web recovery mode the device
  ignores ping and DHCP requests.

Note: 802.11s is not supported by the default `ath10k` driver and
firmware, but is supported by the non-CT driver and firmware variants.
The `-smallbuffers` driver variant is recommended due to RAM size.

Co-developed-by: Anthony Sepa <protectivedad@gmail.com>
Signed-off-by: Rani Hod <rani.hod@gmail.com>
@openwrt-bot openwrt-bot merged commit e29f4a3 into openwrt:main Nov 26, 2023
6 checks passed
@raenye raenye deleted the dap-1720 branch November 27, 2023 00:10
@neheb
Copy link
Contributor

neheb commented Dec 2, 2023

@raenye here's the kicker.

it fixes a runtime warning but introduces a compile time warning(currently suppressed) saying that it's unnecessary. Confusingly, ath79 throws the runtime warning but mt7621 does not. It's some very strange dts interaction.

@mpratt14
Copy link
Contributor

mpratt14 commented Dec 2, 2023

what's the compile time warning say?

@neheb
Copy link
Contributor

neheb commented Dec 2, 2023

It’s the bad cell count one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core packages pull request/issue for core (in-tree) packages target/ath79 pull request/issue for ath79 target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants