From: Wang Dongsheng <dongsheng.wang@hxt-semitech.com>
To: <andrew@lunn.ch>, <timur@kernel.org>
Cc: Wang Dongsheng <dongsheng.wang@hxt-semitech.com>,
<yu.zheng@hxt-semitech.com>, <f.fainelli@gmail.com>,
<rjw@rjwysocki.net>, <linux-acpi@vger.kernel.org>,
<netdev@vger.kernel.org>
Subject: [RFC PATCH 0/3] acpi: Add acpi mdio support code
Date: Thu, 8 Nov 2018 15:21:29 +0800 [thread overview]
Message-ID: <cover.1541660504.git.dongsheng.wang@hxt-semitech.com> (raw)
In-Reply-To: <20181029124044.GB9174@lunn.ch>
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 }, }
})
}
Device (MACO) {
Name (_DSD, Package () {
ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
Package () { Package () { "phy-handle", \_SB.MDIO, "ethernet-phy@0" }, }
})
}
Tested: QDF2400 (ACPI), buildin/insmod/rmmod
[1]:
Documentation/acpi/dsd/data-node-references.txt
Documentation/acpi/dsd/graph.txt
[2]:
Documentation/devicetree/bindings/phy/phy-bindings.txt
https://lore.kernel.org/patchwork/patch/597296/
Wang Dongsheng (3):
acpi: Add acpi mdio support code
net: qcom/emac: split phy_config to mdio bus create and get phy device
net: qcom/emac: add phy-handle support for ACPI
drivers/acpi/Kconfig | 6 +
drivers/acpi/Makefile | 1 +
drivers/acpi/acpi_mdio.c | 167 ++++++++++++++++++
drivers/net/ethernet/qualcomm/emac/emac-mac.c | 19 +-
drivers/net/ethernet/qualcomm/emac/emac-phy.c | 142 ++++++++++-----
drivers/net/phy/mdio_bus.c | 3 +
include/linux/acpi_mdio.h | 82 +++++++++
7 files changed, 369 insertions(+), 51 deletions(-)
create mode 100644 drivers/acpi/acpi_mdio.c
create mode 100644 include/linux/acpi_mdio.h
--
2.18.0
next prev parent reply other threads:[~2018-11-08 16:57 UTC|newest]
Thread overview: 39+ 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 ` [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 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 ` Wang Dongsheng [this message]
2018-11-08 7:22 ` [RFC PATCH 1/3] acpi: Add acpi mdio support code 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 ` [RFC PATCH 3/3] net: qcom/emac: add phy-handle support for ACPI Wang Dongsheng
2018-11-08 23:23 ` [RFC PATCH 0/3] acpi: Add acpi mdio support code Andrew Lunn
2018-11-09 0:37 ` 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=cover.1541660504.git.dongsheng.wang@hxt-semitech.com \
--to=dongsheng.wang@hxt-semitech.com \
--cc=andrew@lunn.ch \
--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 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).