This is an old revision of the document!
Overview
Discussion of low-level PHY structures and operations, starting at include/linux/phy/phy.h and seeing where it goes from there.
Structures -- struct phy and associated stuff
struct phy
struct phy {
struct device dev;
int id;
const struct phy_ops *ops;
struct mutex mutex;
int init_count;
int power_count;
struct phy_attrs attrs;
struct regulator *pwr;
};
Attributes
struct phy_attrs {
u32 bus_width;
enum phy_mode mode;
};
enum phy_mode {
PHY_MODE_INVALID,
PHY_MODE_USB_HOST,
PHY_MODE_USB_HOST_LS,
PHY_MODE_USB_HOST_FS,
PHY_MODE_USB_HOST_HS,
PHY_MODE_USB_HOST_SS,
PHY_MODE_USB_DEVICE,
PHY_MODE_USB_DEVICE_LS,
PHY_MODE_USB_DEVICE_FS,
PHY_MODE_USB_DEVICE_HS,
PHY_MODE_USB_DEVICE_SS,
PHY_MODE_USB_OTG,
PHY_MODE_SGMII,
PHY_MODE_2500SGMII,
PHY_MODE_QSGMII,
PHY_MODE_10GKR,
PHY_MODE_UFS_HS_A,
PHY_MODE_UFS_HS_B,
PHY_MODE_PCIE,
};