[PATCH v3 0/3] ramips: mt7621-dts: fix dtc warning, links and pinctrl

Arınç ÜNAL arinc.unal at arinc9.com
Sun Feb 13 03:10:06 PST 2022


On 13/02/2022 13:19, Bjørn Mork wrote:
> Arınç ÜNAL <arinc.unal at arinc9.com> writes:
> 
>> Now that pinctrl properties are properly defined on the ethernet node,
>> GMAC1 will start working.
> 
> Not sure I understand this.  Surely GMAC1 was working fine before?
> You're just rearranging the pinctrl config, right?

No, my tests on a private mt7621a board with an external phy showed that 
neither PHY0/4 <-> GMAC1 nor external phy <-> GMAC1 worked until putting 
rgmii2_pins under the ethernet node. Basically we couldn't get traffic 
flow on the RGMII2 bus with any of the configurations.

This was also pointed out by DENG Qingfang on this thread:
https://lore.kernel.org/netdev/83a35aa3-6cb8-2bc4-2ff4-64278bbcd8c8@arinc9.com/T/

> 
> At least GMAC1 used to work when the ZyXEL WAP6805 support was added.
> This AP has a Quantenna SoC connected to the RGMII2 pins (mac to mac).
> Getting that to work was what motivated me to add MT7621 support in the
> mainline mtk_etc_soc driver, since the OpenWrt one didn't support both
> gmacs.

There's also mt7621_mikrotik_routerboard-760igs.dts which has got an SFP 
module as an external phy connected to GMAC1.

My theory is that the Mediatek SDK ethernet driver run from the 
bootloader on these devices must be configured to enable the rgmii2 
pins. The bootloader on the mt7621a board I tested didn't configure the 
rgmii bus or GE2 (second GMAC of the SoC) at all.

These are the related kconfigs from the Mediatek SDK ethernet driver:
CONFIG_GE2_RGMII_FORCE_1000=y
CONFIG_RAETH_GMAC2=y

Here's the Mediatek SDK ethernet driver if you'd like to take a look at 
the code:
https://git.archive.openwrt.org/?p=14.07/openwrt.git;a=blob;f=target/linux/ramips/patches-3.10/0216-NET-ralink-add-mt7621-SDK-ethernet-driver.patch

If my theory is correct, with this patch, we won't need to depend on the 
bootloader to enable the rgmii2 pins anymore.

Arınç



More information about the openwrt-devel mailing list