LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
Oleksij Rempel <o.rempel@pengutronix.de>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>
Cc: Marek Vasut <marex@denx.de>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Pengutronix Kernel Team <kernel@pengutronix.de>,
David Jander <david@protonic.nl>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH v1] net: phy: tja11xx: add TJA1102 support
Date: Tue, 3 Mar 2020 20:50:40 +0100 [thread overview]
Message-ID: <9dae8f4a-43b0-e379-9b14-5a2a21640044@gmail.com> (raw)
In-Reply-To: <35d02d3d-0fd8-1fce-1f60-90a4a1377c78@pengutronix.de>
On 03.03.2020 09:56, Marc Kleine-Budde wrote:
> On 3/3/20 9:46 AM, Heiner Kallweit wrote:
>> On 03.03.2020 08:37, Oleksij Rempel wrote:
>>> TJA1102 is an dual T1 PHY chip. Both PHYs are separately addressable.
>>> PHY 0 can be identified by PHY ID. PHY 1 has no PHY ID and can be
>>> configured in device tree by setting compatible =
>>> "ethernet-phy-id0180.dc81".
> ^^^^^^^^^^^^^^^^^^^^^^^^
>
>> I'm not sure I understand what you're doing here. The two ports of the chip
>> are separate PHY's on individual MDIO bus addresses?
>
> Yes, Port 0 and Port 1 have seperate MFIO bus addresses, but only Port 0
> has a proper phy_id (== PHY_ID_TJA1102), while Port 1 just has 0.
>
> Currently we register Port 1 via the device tree compatible
> "ethernet-phy-id0180.dc81".
>
Thanks for the explanation. Missed that part, then reading the PHY ID
of the chip is skipped. For checking whether we are port 0 or 1 it wouldn't
even be needed to read both PHY ID registers.
One drawback of the solution might be that it works on DT-configured
systems only (not sure how relevant this is). A little bit more detailed
comment may be helpful, to avoid misunderstandings like mine.
>> Reading the PHY ID registers here seems to repeat what phylib did already
>> to populate phydev->phy_id. If port 1 has PHD ID 0 then the driver wouldn't
>> bind and tja11xx_probe() would never be called (see phy_bus_match)
>
> But we "force" it via the DT compatible. Another option would be to make
> up a phyid for Port 1 and hope that it doesn't collide with a real phy
> id in other or upcoming chips. But that sounds not like a clean solution
> either.
>
> Marc
>
Heiner
next prev parent reply other threads:[~2020-03-03 19:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-03 7:37 Oleksij Rempel
2020-03-03 8:46 ` Heiner Kallweit
2020-03-03 8:56 ` Marc Kleine-Budde
2020-03-03 19:50 ` Heiner Kallweit [this message]
2020-03-03 12:18 ` Marek Vasut
2020-03-03 12:29 ` Marc Kleine-Budde
2020-03-03 13:59 ` Andrew Lunn
2020-03-03 15:36 ` Oleksij Rempel
2020-03-03 12:42 Christian Herber
2020-03-03 12:53 ` Marc Kleine-Budde
2020-03-03 12:55 ` Oleksij Rempel
2020-03-03 14:09 ` Andrew Lunn
2020-03-03 14:11 ` Marc Kleine-Budde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9dae8f4a-43b0-e379-9b14-5a2a21640044@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=david@protonic.nl \
--cc=f.fainelli@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marex@denx.de \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--subject='Re: [PATCH v1] net: phy: tja11xx: add TJA1102 support' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).