devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>,
	Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Rob Herring <robh+dt@kernel.org>
Cc: 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>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v5 4/4] net: phy: tja11xx: add delayed registration of TJA1102 PHY1
Date: Wed, 22 Apr 2020 20:21:27 -0700	[thread overview]
Message-ID: <7615d9a6-4c21-5668-33af-fe9a71424f90@gmail.com> (raw)
In-Reply-To: <20200422092456.24281-5-o.rempel@pengutronix.de>



On 4/22/2020 2:24 AM, Oleksij Rempel wrote:
> TJA1102 is a dual PHY package with PHY0 having proper PHYID and PHY1
> having no ID. On one hand it is possible to for PHY detection by
> compatible, on other hand we should be able to reset complete chip
> before PHY1 configured it, and we need to define dependencies for proper
> power management.
> 
> We can solve it by defining PHY1 as child of PHY0:
> 	tja1102_phy0: ethernet-phy@4 {
> 		reg = <0x4>;
> 
> 		interrupts-extended = <&gpio5 8 IRQ_TYPE_LEVEL_LOW>;
> 
> 		reset-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
> 		reset-assert-us = <20>;
> 		reset-deassert-us = <2000>;
> 
> 		tja1102_phy1: ethernet-phy@5 {
> 			reg = <0x5>;
> 
> 			interrupts-extended = <&gpio5 8 IRQ_TYPE_LEVEL_LOW>;
> 		};
> 	};
> 
> The PHY1 should be a subnode of PHY0 and registered only after PHY0 was
> completely reset and initialized.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>

You did not expand too much on why you had to use a workqueue to 
register the second PHY instance?
-- 
Florian

  parent reply	other threads:[~2020-04-23  3:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22  9:24 [PATCH net-next v5 0/4] add TJA1102 support Oleksij Rempel
2020-04-22  9:24 ` [PATCH net-next v5 1/4] dt-bindings: net: phy: Add support for NXP TJA11xx Oleksij Rempel
2020-04-22 13:49   ` Andrew Lunn
2020-04-23  3:15   ` Florian Fainelli
2020-04-22  9:24 ` [PATCH net-next v5 2/4] net: phy: tja11xx: add initial TJA1102 support Oleksij Rempel
2020-04-22 13:44   ` Andrew Lunn
2020-04-23  3:17   ` Florian Fainelli
2020-04-22  9:24 ` [PATCH net-next v5 3/4] net: mdio: of: export part of of_mdiobus_register_phy() Oleksij Rempel
2020-04-22 13:45   ` Andrew Lunn
2020-04-23  3:18   ` Florian Fainelli
2020-04-22  9:24 ` [PATCH net-next v5 4/4] net: phy: tja11xx: add delayed registration of TJA1102 PHY1 Oleksij Rempel
2020-04-22 13:48   ` Andrew Lunn
2020-04-23  3:21   ` Florian Fainelli [this message]
2020-04-23  2:41 ` [PATCH net-next v5 0/4] add TJA1102 support David Miller

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=7615d9a6-4c21-5668-33af-fe9a71424f90@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=david@protonic.nl \
    --cc=devicetree@vger.kernel.org \
    --cc=hkallweit1@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=robh+dt@kernel.org \
    /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).