RFC acpi: Add acpi mdio support code
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 10 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | acpi: Add acpi mdio support codedrivers/ drivers/ drivers/ +2 more | +259 | 4 replies | |
| 2/3 | net: qcom/emac: split phy_config to mdio bus create and get phy devicedrivers/ | +56 | 0 replies | |
| 3/3 | net: qcom/emac: add phy-handle support for ACPIdrivers/ drivers/ | +70 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/3] acpi: Add acpi mdio support code
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.txtDocumentation/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
Signature · 1 line
2.18.0