From: Andrew Lunn <andrew@lunn.ch>
To: "Wang, Dongsheng" <dongsheng.wang@hxt-semitech.com>
Cc: Timur Tabi <timur@codeaurora.org>,
"hpuranik@codeaurora.org" <hpuranik@codeaurora.org>,
"Zheng, Joey" <yu.zheng@hxt-semitech.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Marcin Wojtas <mw@semihalf.com>
Subject: Re: Re: [RFC] net: qcom/emac: mdiobus-dev fwnode should point to emac-adev
Date: Tue, 30 Jan 2018 14:21:41 +0100 [thread overview]
Message-ID: <20180130132141.GG16547@lunn.ch> (raw)
In-Reply-To: <em016b6f4e-72bc-4aa0-b1c6-e65d963421cd@bjl0091>
On Fri, Jan 26, 2018 at 07:20:42AM +0000, Wang, Dongsheng wrote:
> Hi, Timur && Andrew,
>
> Please correct me if there is any problem with my understanding.
>
> GPIO is a general property of devices, the property point to
> an entity such as device tree or ACPI table, we also can directly
> implement it in device node.
>
> For ACPI, there is _DSD that should include GPIO property if we need it.
> No matter which devices implement it, MAC or MDIO also can implement a
> _DSD.
> We can explicitly define a GPIO property in MDIO, but I think this
> may conflict with the existing definition of ACPI. ACPI guys may not
> agree to do this because there already has _DSD. We just need to use
> _DSD to notify GPIO layer there may have a Device Specific Data for
> this device.
>
> So far MDIO owns external PHY "reset" as an optional feature and MDIO
> is integrated in MAC, so we need to point the MAC adev to
> MDIO->dev.fwnode.
> And most importantly this feature does not depend on SoC, this feature
> depends on MotherBoard design.
Hi Wang
We have two different GPIO reset lines within the MDIO/PHY layer. If
the GPIO is at the MDIO bus node of DT, the reset applies to all PHYs
connected to the bus. This is the code in__mdiobus_register(). If the
GPIO is in the PHY node, the reset applies to just that PHY. This is
the code in mdiobus_register_gpiod() & mdio_device_reset().
These resets are used at different times. The MDIO reset is used once,
before probing the MDIO bus. The PHY reset is used before probing the
individual PHY.
Does your GPIO reset one PHY, or all the PHYs? This determines where
in belongs. Is it the ACPI device which represents the MDIO bus, or
the ACPI device which represents the PHY?
You need to extend the functions i listed above to look in your ACPI
tables to find the _DSD properties which include the GPIO information.
Please work with Marcin Wojtas to achieve this. We will not accept
anything other than a generic solution which works for everybody.
Andrew
next prev parent reply other threads:[~2018-01-30 13:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-25 6:14 [RFC] net: qcom/emac: mdiobus-dev fwnode should point to emac-adev Wang Dongsheng
2018-01-25 14:15 ` Andrew Lunn
2018-01-25 15:40 ` Timur Tabi
2018-01-25 15:59 ` Andrew Lunn
2018-01-25 16:05 ` Timur Tabi
2018-01-26 7:20 ` Wang, Dongsheng
2018-01-30 13:21 ` Andrew Lunn [this message]
2018-01-25 14:36 ` Timur Tabi
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=20180130132141.GG16547@lunn.ch \
--to=andrew@lunn.ch \
--cc=dongsheng.wang@hxt-semitech.com \
--cc=hpuranik@codeaurora.org \
--cc=mw@semihalf.com \
--cc=netdev@vger.kernel.org \
--cc=timur@codeaurora.org \
--cc=yu.zheng@hxt-semitech.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).