I'm currently working on D-Link DAP-2660, which is similar to DAP-2695 (just with AC1200 and a white plastic case instead of plenum-rated metal).
Both wireless interfaces are working, I have a working factory-flashable image (tested on A2, but should also work for A1; the difference is apparently that A2 need some padding to make the image file bigger...), now the only issue is that I couldn't get the AR8035 Gigabit Ethernet PHY (AR8035) to work with 1000BASE-T, however it will work fine as long as the remote NIC is set to 10 or 100 Mbit/s fixed rate.
The PLL clock values for the GMAC were determined from the bootloader, i.e. entering recovery with different fixed link rates and dumping the corresponding GMAC PLL register values as written by the OEM uboot, as described here for DAP-2360.
// edit 2020-09-09: fixed green led mapping
But still no success
Is there anything left to be configured in the .dts that i overlooked?
Does someone own this device and could help testing?
I have enabled wifi by default using dap2660 and dlinktest as ESSID / PSK, to avoid lock-out of the device. Beware that UART is 2.5 V for this device! (two CP2102 dongles died figuring this out ) It is however safe to just connect RX and GND to read the bootlog, the 2.5V level is sufficient to be interpreted as high.
The DD-WRT folks seem to have this device supported and working, but not even using a devicetree based target in the first place...
The .dts is indeed redundant in some parts, as it is the result of trying multiple gmac configurations I found with other ath79 devices (e.g. the gmac-config node is probably irrelevant).
While the DAP-2695 is quite similar in terms of the software platform (i.e. flash layout and factory format), the major difference regarding ethernet ports is that it actually has a built-in gigabit switch for the two LAN ports, while DAP-2660 uses a single AR8035 PHY instead. There are other ath79 devices with this phy, but none of the configs worked.
The values for pll-data were extracted from the GMAC registers after being initialized by the OEM u-boot, so I assumed these would also apply to OpenWRT, but I will once again try different values here, especially the one from DAP-2695 (which also explicitly overrides the default one from the .dtsi).
Maybe it's also relevant how to set the rx/tx delays, though I hadn't figured out yet how to find those values, those are probably individual bits from the AR933X_GMAC_REG_ETH_CFG register?
The phy id 4 etc. seems to be correct, also 10/100 Mbit is working flawless. I can post a bootlog later containing the gmac and phy initialisation.
As long as the switch is the built-in switch and not an external chip, the qca955x.dtsi should have the right values. But your board is apparently unique and needs extra gmac config...
I am guessing you need to base your DTS after these boards, which seem to almost have what you're trying to do now
There is no built-in switch with the QCA955x series, the only QCA devices that actually have a gigabit switch built-in are IMHO from the ipq family, while QCA9533, QCA9563 etc. just come with fast ethernet switches (however the GMAC can be connected to an external gigabit phy or switch, e.g. DIR-842).
The devolo devices are actually were I stole the gmac-config snippet from, hoping it might change anything, but it didn't...
It's curious that I've had the same problem with DAP-2360 (see the other thread linked above), I'm almost about to try to port this device to ar71xx just to see whether it works
Currently, this is what DAP-2660 prints on boot regarding the phy:
[ 0.418560] libphy: Fixed MDIO Bus: probed
[ 0.425467] ag71xx 19000000.eth: invalid MAC address, using random address
[ 0.749606] libphy: ag71xx_mdio: probed
[ 0.755354] ag71xx 19000000.eth: connected to PHY at mdio.0:04 [uid=004dd072, driver=Atheros 8035 ethernet]
[ 0.765802] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rgmii
[ 0.772275] i2c /dev entries driver
[ 0.777462] NET: Registered protocol family 10
[ 0.786299] Segment Routing with IPv6
[ 0.790163] NET: Registered protocol family 17
[ 0.794751] 8021q: 802.1Q VLAN Support v1.8
I'm gonna install DD-WRT now and check the bootlog just to see how they got Gigabit working with this device
This is very curious, I installed DD-WRT and it will initialize the GMAC PLL register for 1000BASE-T mode as 0x8f000000 (rather than 0x56000000 as in DAP-2695, 0x16000000 as in the qca955x dtsi, 0xae000000 as in the devolo dts or 0x96000000 which I had initially dumped from DAP-2660 uboot). Does DD-WRT alter the CPU frequency?
Even more curious: with DD-WRT the device will only work with gigabit, the link will also synchronize to 100Base-T but with no connectivity at all (the same problem as I have, just the other way round)
so apparently neither 0x80000101 nor 0x00000101 seems to be the right gmac pll setting for 100 Mbit still wondering how to figure these out, when I can't trust the config written by the bootloader...
Indeed I've refrained from trusting the ubuntu network manager about this by now, and rather put an old 10/100 switch in between, and it was actually working with 100Mbit initially.
So, not quite sure if the problem was related to the PLL clock, or just me trying to bridge the wireless STA interface to LAN (to have it connected both to the internet as well as letting me access the device over WiFi, to see what happens when messing around with the ethernet port)… since it's so annyoing to change ip configuration on both ends all the time
I should probably try iperf once again
For qca955x the MII PLL register is at 0x18050028, so you could just run md 0x18050028 1
from the uboot shell for each link speed, as described in the DAP-2360 thread linked above.
Ethernet is working fine now for Gigabit and 100BASE-T, but at 10BASE-T the connection is unstable (with retransmissions), however this also applies to the OEM firmware (as well as DD-WRT, which only supports Gigabit).
I got a DAP-2660. It has 1 eth. port. I am wondering if yours is similar. it's actually an ETH POE. Im not getting great throughput with the 5G connected as client and the Eth0 hardwired into the wan on my main router.