Re: [PATCH v1] net: dsa: qca8k: implement DT-based ports <-> phy translation

2019-02-06 Thread Christian Lamparter
On Wednesday, February 6, 2019 11:29:18 PM CET Florian Fainelli wrote: > On 2/6/19 1:57 PM, Christian Lamparter wrote: > > On Tuesday, February 5, 2019 11:29:36 PM CET Florian Fainelli wrote: > >> On 2/5/19 2:12 PM, Christian Lamparter wrote: > >>> On Tuesday, February 5, 2019 10:29:34 PM CET Andre

Re: [PATCH v1] net: dsa: qca8k: implement DT-based ports <-> phy translation

2019-02-06 Thread Florian Fainelli
On 2/6/19 2:29 PM, Florian Fainelli wrote: > On 2/6/19 1:57 PM, Christian Lamparter wrote: >> On Tuesday, February 5, 2019 11:29:36 PM CET Florian Fainelli wrote: >>> On 2/5/19 2:12 PM, Christian Lamparter wrote: On Tuesday, February 5, 2019 10:29:34 PM CET Andrew Lunn wrote: >> For now, I

Re: [PATCH v1] net: dsa: qca8k: implement DT-based ports <-> phy translation

2019-02-06 Thread Florian Fainelli
On 2/6/19 1:57 PM, Christian Lamparter wrote: > On Tuesday, February 5, 2019 11:29:36 PM CET Florian Fainelli wrote: >> On 2/5/19 2:12 PM, Christian Lamparter wrote: >>> On Tuesday, February 5, 2019 10:29:34 PM CET Andrew Lunn wrote: > For now, I added the DT binding update to the patch as well

Re: [PATCH v1] net: dsa: qca8k: implement DT-based ports <-> phy translation

2019-02-06 Thread Christian Lamparter
On Tuesday, February 5, 2019 11:29:36 PM CET Florian Fainelli wrote: > On 2/5/19 2:12 PM, Christian Lamparter wrote: > > On Tuesday, February 5, 2019 10:29:34 PM CET Andrew Lunn wrote: > >>> For now, I added the DT binding update to the patch as well. > >>> But if this is indeed the way to go, it'l

Re: [PATCH v1] net: dsa: qca8k: implement DT-based ports <-> phy translation

2019-02-05 Thread Florian Fainelli
On 2/5/19 2:12 PM, Christian Lamparter wrote: > On Tuesday, February 5, 2019 10:29:34 PM CET Andrew Lunn wrote: >>> For now, I added the DT binding update to the patch as well. >>> But if this is indeed the way to go, it'll get a separate patch. >> >> Hi Christian >> >> You need to be careful with

Re: [PATCH v1] net: dsa: qca8k: implement DT-based ports <-> phy translation

2019-02-05 Thread Christian Lamparter
On Tuesday, February 5, 2019 10:29:34 PM CET Andrew Lunn wrote: > > For now, I added the DT binding update to the patch as well. > > But if this is indeed the way to go, it'll get a separate patch. > > Hi Christian > > You need to be careful with the DT binding. You need to keep backwards > comp

Re: [PATCH v1] net: dsa: qca8k: implement DT-based ports <-> phy translation

2019-02-05 Thread Andrew Lunn
> For now, I added the DT binding update to the patch as well. > But if this is indeed the way to go, it'll get a separate patch. Hi Christian You need to be careful with the DT binding. You need to keep backwards compatible with it. An old DT blob needs to keep working. I don't think this is tr

Re: [PATCH v1] net: dsa: qca8k: implement DT-based ports <-> phy translation

2019-02-05 Thread Christian Lamparter
On Tuesday, February 5, 2019 2:09:35 PM CET Andrew Lunn wrote: > > The trick here is that priv->bus is not the internal > > bus instead it's set to the SoC's (external) mii bus in qca8k_sw_probe()). > > So this isn't a slave bus! And as stated in the qca8k, the the external > > and internal PHY bus

Re: [PATCH v1] net: dsa: qca8k: implement DT-based ports <-> phy translation

2019-02-05 Thread Andrew Lunn
> The trick here is that priv->bus is not the internal > bus instead it's set to the SoC's (external) mii bus in qca8k_sw_probe()). > So this isn't a slave bus! And as stated in the qca8k, the the external > and internal PHY bus are not mapped 1:1. > > >From what I can tell from the datasheet, the

Re: [PATCH v1] net: dsa: qca8k: implement DT-based ports <-> phy translation

2019-02-05 Thread Christian Lamparter
On Tuesday, February 5, 2019 3:45:33 AM CET Andrew Lunn wrote: > On Mon, Feb 04, 2019 at 10:35:55PM +0100, Christian Lamparter wrote: > > The QCA8337 enumerates 5 PHYs on the MDC/MDIO access: PHY0-PHY4. > > Based on the System Block Diagram in Section 1.2 of the > > QCA8337's datasheet. These PHYs

Re: [PATCH v1] net: dsa: qca8k: implement DT-based ports <-> phy translation

2019-02-04 Thread Andrew Lunn
On Mon, Feb 04, 2019 at 10:35:55PM +0100, Christian Lamparter wrote: > The QCA8337 enumerates 5 PHYs on the MDC/MDIO access: PHY0-PHY4. > Based on the System Block Diagram in Section 1.2 of the > QCA8337's datasheet. These PHYs are internally connected > to MACs of PORT 1 - PORT 5. However, neither

Re: [PATCH v1] net: dsa: qca8k: implement DT-based ports <-> phy translation

2019-02-04 Thread Christian Lamparter
Hello Andrew and Florian. I concated both replies into this post. On Monday, February 4, 2019 11:26:41 PM CET Andrew Lunn wrote: > On Mon, Feb 04, 2019 at 10:35:55PM +0100, Christian Lamparter wrote: > > The QCA8337 enumerates 5 PHYs on the MDC/MDIO access: PHY0-PHY4. > > Based on the System Bloc

Re: [PATCH v1] net: dsa: qca8k: implement DT-based ports <-> phy translation

2019-02-04 Thread Andrew Lunn
On Mon, Feb 04, 2019 at 10:35:55PM +0100, Christian Lamparter wrote: > The QCA8337 enumerates 5 PHYs on the MDC/MDIO access: PHY0-PHY4. > Based on the System Block Diagram in Section 1.2 of the > QCA8337's datasheet. These PHYs are internally connected > to MACs of PORT 1 - PORT 5. Hi Christian I

Re: [PATCH v1] net: dsa: qca8k: implement DT-based ports <-> phy translation

2019-02-04 Thread Florian Fainelli
On 2/4/19 1:35 PM, Christian Lamparter wrote: > The QCA8337 enumerates 5 PHYs on the MDC/MDIO access: PHY0-PHY4. > Based on the System Block Diagram in Section 1.2 of the > QCA8337's datasheet. These PHYs are internally connected > to MACs of PORT 1 - PORT 5. However, neither qca8k's slave > mdio a

[PATCH v1] net: dsa: qca8k: implement DT-based ports <-> phy translation

2019-02-04 Thread Christian Lamparter
The QCA8337 enumerates 5 PHYs on the MDC/MDIO access: PHY0-PHY4. Based on the System Block Diagram in Section 1.2 of the QCA8337's datasheet. These PHYs are internally connected to MACs of PORT 1 - PORT 5. However, neither qca8k's slave mdio access functions qca8k_phy_read()/qca8k_phy_write() nor t