From: Andrew Lunn <andrew@lunn.ch>
To: Wang Dongsheng <dongsheng.wang@hxt-semitech.com>
Cc: timur@kernel.org, yu.zheng@hxt-semitech.com,
f.fainelli@gmail.com, rjw@rjwysocki.net,
linux-acpi@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [RFC PATCH 0/3] acpi: Add acpi mdio support code
Date: Fri, 9 Nov 2018 00:23:53 +0100 [thread overview]
Message-ID: <20181108232353.GL5259@lunn.ch> (raw)
In-Reply-To: <cover.1541660504.git.dongsheng.wang@hxt-semitech.com>
On Thu, Nov 08, 2018 at 03:21:29PM +0800, Wang Dongsheng wrote:
> Originally I just push "phy-handle" support for ACPI on the QCOM QDF2400
> platform. After some discussion and following Andrew's advice, I send
> out with a generic version of ACPI.
>
> Current there is no clear documentation about MDIO/PHY for ACPI, so when
> I reading some documents about ACPI [1], I think we just need to reuse the
> DT binding in the ACPI.[2]. However, this series of patches are not
> fully compatible with all contents specified in DT binding.
>
> The most important thing about this iseries is link the phy device and
> fwnode of acpi. Besides, we need to carry out bus scan at the mdio
> register. Therefore, I am not compatible with more DT binding properties
> in this series of patches. More support will be in the follow-up patches
> support, or some people do the support.
>
> Example:
> Based on ACPI doc:
> Documentation/acpi/dsd/data-node-references.txt
> Documentation/acpi/dsd/graph.txt
> With _DSD device properties we can finally do this:
> Device (MDIO) {
> Name (_DSD, Package () {
> ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
> Package () { Package () { "ethernet-phy@0", PHY0 }, }
> })
> Name (PHY0, Package() {
> ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
> Package () { Package () { "reg", 0x0 }, }
> })
I don't know much about ACPI. I do know DT. MDIO busses can have
multiple PHYs on them. Is the following valid to list two PHYs?
Device (MDIO) {
Name (_DSD, Package () {
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
Package () { Package () { "ethernet-phy@0", PHY0 }, }
})
Name (PHY0, Package() {
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
Package () { Package () { "reg", 0x0 }, }
})
Name (_DSD, Package () {
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
Package () { Package () { "ethernet-phy@10", PHY1 }, }
})
Name (PHY1, Package() {
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
Package () { Package () { "reg", 0x10 }, }
})
}
An MDIO bus can also have more than PHYs on them. There can be
Ethernet switches. Broadcom also have some with generic PHY devices on
them, and other odd things. That means whatever is on an MDIO bus is a
device in the Linux device model. How does that work? Do we need some
form Device (PHY) {}?
Device (MDIO) {
Device (PHY) {
Name (_DSD, Package () {
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
Package () { Package () { "ethernet-phy@0", PHY0 }, }
})
Name (PHY0, Package() {
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
Package () { Package () { "reg", 0x0 }, }
})
}
Device (PHY) {
Name (_DSD, Package () {
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
Package () { Package () { "ethernet-phy@10", PHY1 }, }
})
Name (PHY1, Package() {
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
Package () { Package () { "reg", 0x10 }, }
})
Device (SWITCH) {
Name (_DSD, Package () {
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
Package () { Package () { "switch@11", SWITCH0 }, }
})
Name (SWITCH0, Package() {
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
Package () { Package () { "reg", 0x11 }, }
})
}
}
I'm just trying to ensure whatever is defined is flexible enough that
we really can later support everything which DT does. We have PHYs on
MDIO busses, inside switches, which are on MDIO busses, which are
inside Ethernet interfaces, etc.
An MDIO bus is very similar to an i2c bus. How is that described in
ACPI? Anything we can learn from that?
Thanks
Andrew
next prev parent reply other threads:[~2018-11-08 23:23 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-17 8:53 [PATCH v2 0/4] net: qcom/emac: add shared mdio bus support Wang Dongsheng
2018-09-17 8:53 ` Wang Dongsheng
2018-09-17 8:53 ` [PATCH v2 1/4] net: qcom/emac: split phy_config to mdio bus create and get phy device Wang Dongsheng
2018-09-17 8:53 ` [PATCH v2 2/4] dt-bindings: net: qcom: Add binding for shared mdio bus Wang Dongsheng
2018-09-17 8:53 ` Wang Dongsheng
2018-09-17 14:50 ` Andrew Lunn
2018-09-17 16:47 ` Wang, Dongsheng
2018-09-17 16:54 ` Florian Fainelli
2018-09-18 8:47 ` Wang, Dongsheng
2018-09-18 12:35 ` Andrew Lunn
2018-09-19 9:19 ` Wang, Dongsheng
2018-09-19 12:25 ` Andrew Lunn
2018-09-19 14:05 ` Timur Tabi
2018-09-19 15:20 ` Andrew Lunn
2018-09-20 13:42 ` Timur Tabi
2018-10-25 10:08 ` [PATCH v3 0/2] net: qcom/emac: add shared mdio bus support Wang Dongsheng
2018-10-25 10:08 ` [PATCH v3 1/2] net: qcom/emac: split phy_config to mdio bus create and get phy device Wang Dongsheng
2018-10-25 10:09 ` [PATCH v3 2/2] net: qcom/emac: add phy-handle support for ACPI Wang Dongsheng
2018-10-25 19:24 ` Andrew Lunn
2018-10-26 2:18 ` Wang, Dongsheng
2018-10-26 2:37 ` Timur Tabi
2018-10-26 3:04 ` Wang, Dongsheng
2018-10-26 13:13 ` Andrew Lunn
2018-10-29 2:39 ` Wang, Dongsheng
2018-10-29 12:40 ` Andrew Lunn
2018-10-30 5:15 ` Wang, Dongsheng
2018-11-08 7:21 ` [RFC PATCH 0/3] acpi: Add acpi mdio support code Wang Dongsheng
2018-11-08 7:21 ` Wang Dongsheng
2018-11-08 7:22 ` [RFC PATCH 1/3] " Wang Dongsheng
2018-11-08 7:22 ` Wang Dongsheng
2018-11-08 7:45 ` Rafael J. Wysocki
2018-11-08 7:55 ` Wang, Dongsheng
2018-11-08 8:01 ` Rafael J. Wysocki
2018-11-12 17:25 ` Andrew Lunn
2018-11-08 7:22 ` [RFC PATCH 2/3] net: qcom/emac: split phy_config to mdio bus create and get phy device Wang Dongsheng
2018-11-08 7:22 ` Wang Dongsheng
2018-11-08 7:22 ` [RFC PATCH 3/3] net: qcom/emac: add phy-handle support for ACPI Wang Dongsheng
2018-11-08 7:22 ` Wang Dongsheng
2018-11-08 23:23 ` Andrew Lunn [this message]
2018-11-09 0:37 ` [RFC PATCH 0/3] acpi: Add acpi mdio support code Timur Tabi
2018-11-10 9:10 ` Wang, Dongsheng
2018-11-12 17:20 ` Andrew Lunn
2018-11-13 7:36 ` Wang, Dongsheng
2018-11-12 2:52 ` Wang, Dongsheng
2018-09-20 1:33 ` [PATCH v2 2/4] dt-bindings: net: qcom: Add binding for shared mdio bus Wang, Dongsheng
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=20181108232353.GL5259@lunn.ch \
--to=andrew@lunn.ch \
--cc=dongsheng.wang@hxt-semitech.com \
--cc=f.fainelli@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=timur@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.