1 .. SPDX-License-Identifier: GPL-2.0
3 =========================
4 MDIO bus and PHYs in ACPI
5 =========================
7 The PHYs on an MDIO bus [1] are probed and registered using
8 fwnode_mdiobus_register_phy().
10 Later, for connecting these PHYs to their respective MACs, the PHYs registered
11 on the MDIO bus have to be referenced.
13 This document introduces two _DSD properties that are to be used
14 for connecting PHYs on the MDIO bus [3] to the MAC layer.
16 These properties are defined in accordance with the "Device
17 Properties UUID For _DSD" [2] document and the
18 daffd814-6eba-4d8c-8a91-bc9bbf4aa301 UUID must be used in the Device
19 Data Descriptors containing them.
23 For each MAC node, a device property "phy-handle" is used to reference
24 the PHY that is registered on an MDIO bus. This is mandatory for
25 network interfaces that have PHYs connected to MAC via MDIO bus.
27 During the MDIO bus driver initialization, PHYs on this bus are probed
28 using the _ADR object as shown below and are registered on the MDIO bus.
42 Later, during the MAC driver initialization, the registered PHY devices
43 have to be retrieved from the MDIO bus. For this, the MAC driver needs
44 references to the previously registered PHYs which are provided
45 as device object references (e.g. \_SB.MDI0.PHY1).
49 The "phy-mode" _DSD property is used to describe the connection to
50 the PHY. The valid values for "phy-mode" are defined in [4].
52 The following ASL example illustrates the usage of these properties.
54 DSDT entry for MDIO node
55 ------------------------
57 The MDIO bus has an SoC component (MDIO controller) and a platform
58 component (PHYs on the MDIO bus).
61 This node describes the MDIO controller, MDI0
62 ---------------------------------------------
70 Name(_CRS, ResourceTemplate() {
71 Memory32Fixed(ReadWrite, MDI0_BASE, MDI_LEN)
72 Interrupt(ResourceConsumer, Level, ActiveHigh, Shared)
76 }) // end of _CRS for MDI0
81 The PHY1 and PHY2 nodes represent the PHYs connected to MDIO bus MDI0
82 ---------------------------------------------------------------------
95 DSDT entries representing MAC nodes
96 -----------------------------------
98 Below are the MAC nodes where PHY nodes are referenced.
99 phy-mode and phy-handle are used as explained earlier.
100 ------------------------------------------------------
102 Scope(\_SB.MCE0.PR17)
104 Name (_DSD, Package () {
105 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
107 Package (2) {"phy-mode", "rgmii-id"},
108 Package (2) {"phy-handle", \_SB.MDI0.PHY1}
113 Scope(\_SB.MCE0.PR18)
115 Name (_DSD, Package () {
116 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
118 Package (2) {"phy-mode", "rgmii-id"},
119 Package (2) {"phy-handle", \_SB.MDI0.PHY2}}
127 [1] Documentation/networking/phy.rst
129 [2] https://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf
131 [3] Documentation/firmware-guide/acpi/DSD-properties-rules.rst
133 [4] Documentation/devicetree/bindings/net/ethernet-controller.yaml