LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
linux-kernel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, Marek Vasut <marex@denx.de>,
David Jander <david@protonic.nl>,
Quentin Schulz <quentin.schulz@bootlin.com>
Subject: Re: [PATCH v1] net: phy: tja11xx: add TJA1102 support
Date: Tue, 3 Mar 2020 14:59:36 +0100 [thread overview]
Message-ID: <20200303135936.GG31977@lunn.ch> (raw)
In-Reply-To: <20200303073715.32301-1-o.rempel@pengutronix.de>
Hi Oleksij
> 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".
Why-o-why do silicon vendors make devices with invalid PHY IDs!?!?!
Did you try avoiding the compatible string. We know PHY 0 will probe
as normal. From its PHY ID we know it is a dual device. Could the
probe of PHY 0 register PHY 1?
No idea if it will work, but could nxp-tja11xx.c register is fixup for
PHY_ID_TJA1102. That fixup would do something like:
void tja1102_fixup(struct phy_device *phydev_phy0)
{
struct mii_bus *bus = phydev_phy0->mdio.mii;
struct phy_device *phydev_phy1;
phydev_phy1 = phy_device_create(bus, phydev_phy0->addr + 1,
PHY_ID_TJA1102, FALSE, NULL);
if (phydev_phy1)
phy_device_register(phydev_phy1);
}
I think the issue here is, it will deadlock when scanning for fixup
for phydev_phy1. So this basic idea, but maybe hooked in somewhere
else?
Something like this might also help vsc8584 which is a quad PHY with
some shared registers?
Andrew
next prev parent reply other threads:[~2020-03-03 13:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-03 7:37 [PATCH v1] net: phy: tja11xx: add TJA1102 support Oleksij Rempel
2020-03-03 8:46 ` Heiner Kallweit
2020-03-03 8:56 ` Marc Kleine-Budde
2020-03-03 19:50 ` Heiner Kallweit
2020-03-03 12:18 ` Marek Vasut
2020-03-03 12:29 ` Marc Kleine-Budde
2020-03-03 13:59 ` Andrew Lunn [this message]
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=20200303135936.GG31977@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=david@protonic.nl \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marex@denx.de \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=quentin.schulz@bootlin.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).