From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: i.MX6S/DL and QCA8334 switch using DSA driver - CPU port not working Date: Mon, 30 Apr 2018 15:20:25 +0200 Message-ID: <20180430132025.GF10066@lunn.ch> References: <037faf3c-8e8f-a696-8312-d1380c3b8656@gmail.com> <649c06a4-ca63-cb38-f105-ffd9dc17f5d2@gmail.com> <20180426140629.GB15370@lunn.ch> <48c029f1-1632-573f-c628-86b4972d668c@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, Vivien Didelot , Florian Fainelli To: Michal =?utf-8?B?Vm9rw6HEjQ==?= Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:44947 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752312AbeD3NU1 (ORCPT ); Mon, 30 Apr 2018 09:20:27 -0400 Content-Disposition: inline In-Reply-To: <48c029f1-1632-573f-c628-86b4972d668c@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: > Using rgmii-id for the port is not valid as the qca8k driver does not support > that mode. It only supports rgmii and sgmii. I think this is actually not > correct. When phy-mode is set to rgmii for port the qca8k driver configures > internal delays in the switch. So it behaves like rgmii-id I think. > > Should not it be: > > --- a/drivers/net/dsa/qca8k.c > +++ b/drivers/net/dsa/qca8k.c > @@ -474,7 +474,7 @@ qca8k_set_pad_ctrl(struct qca8k_priv *priv, int port, int mode) > * PHY or MAC. > */ > switch (mode) { > - case PHY_INTERFACE_MODE_RGMII: > + case PHY_INTERFACE_MODE_RGMII_ID: > qca8k_write(priv, reg, > QCA8K_PORT_PAD_RGMII_EN | > QCA8K_PORT_PAD_RGMII_TX_DELAY(3) | We have to be careful cleaning this up. It has the potential to break existing boards when using an old device tree blob. Andrew