![]() |
RT-Thread RTOS
An open source embedded real-time operating system
|
Consumers reference PHY providers with standard graph properties. Requires **RT_USING_OFW**.
| Property | Role |
|---|---|
**phys** | Phandle list to PHY provider node(s) |
**#phy-cells** | On provider — specifier length per entry |
**phy-names** | Optional string ID per entry (for **rt_phye_get_by_name**) |
Example (SATA host):
If **ofw_parse** fails, **get_by_index** returns **rt_err_ptr(err)**.
Provider platform driver must **rt_phye_register** in **probe** after **rt_dm_dev_bind_fwdata**.
| Element | Role |
|---|---|
**compatible** | Selects PHY driver (SoC or generic) |
**#phy-cells** | Usually 0 or mode/lane index |
**clocks / resets / regulators** | Handled in provider **probe**, not by core |
Cell semantics are driver-specific — document in BSP binding and implement in **ofw_parse**.
| Issue | Mitigation |
|---|---|
| Provider not probed | **rt_platform_ofw_request** before **rt_ofw_data** (core does this) |
**ofw_parse omitted** | **#phy-cells ignored** — wrong mode if cells non-zero |
| Index / name mismatch | **phy-names** must align with **phys** order |
Missing **phys** | **get_by_index** returns NULL — fail host **probe** |