[OpenWrt-Devel] Lantiq xrx200: Access to ethernet phy registers (MDIO) from userspace

Martin Schiller ms at dev.tdt.de
Tue Sep 17 02:51:39 EDT 2019

On 2019-09-16 22:43, Hauke Mehrtens wrote:
> On 9/16/19 7:09 PM, Martin Blumenstingl wrote:
>> Hi Martin,
>> On Mon, Sep 16, 2019 at 12:54 PM Martin Schiller <ms at dev.tdt.de> 
>> wrote:
>>> Hi!
>>> I am searching for a possibility to disable Auto Negotiation of an
>>> PEF7072 which is attached to MAC1 of the Lantiq xrx200 switch.
>>> The xrx200-net driver does not seem to have support for that.
>> I don't know about xrx200-net, but ...
>>> Accessing the STD_CRTL register on the mdio bus from uboot with the 
>>> mdio
>>> command works like expected.
>>> Any suggestions how to do that from linux userspace?
>> ... my (limited) understanding is that this is one of the benefits of 
>> DSA:
>> you get one interface per port - with that you can use for example
>> ethtool to disable auto negotiation for one port
>> kernel source reference: [0]
> I also do not know if xrx200-net supports that or if it is possible 
> with
> swconfig at all. There is also a DSA driver for this switch in the
> mainline kernel:
> https://elixir.bootlin.com/linux/latest/source/drivers/net/dsa/lantiq_gswip.c
> This driver should support everything the xrx200-net driver supports
> plus some extras.
> I would prefer to use the DSA driver also in OpenWrt, but we need a way
> to migrate the existing configurations which are based on swconfig to 
> DSA.
> You could try the fixed-link attribute in device tree to model this 
> with
> DSA.

Thanks for your answers.

Switching to DSA would be nice, but it's too much work I can't afford 
right now.

Disabling ANEG in the DTS is not enough, because I also need a way to 
ANEG on and off at runtime.

Meanwhile I found out that there is a mechanism with swconfig to 
the link attributes:


I will try to integrate this into the "old" xrx200-net driver.


openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list