STRUCT APPLE_ATCPHY(9)
π struct apple_atcphy(9)
okay so this is a page from the Kernel API Manual and it's literally all about struct apple_atcphy β the Apple Type-C PHY device struct. yes bestie, the whole page is one struct. and she's a big one. let's get into it π«Ά
β¨ NAME β¨
struct apple_atcphy β the Apple Type-C PHY device struct. that's it, that's the vibe. iconic behavior tbh π
πΈ SYNOPSIS πΈ
struct apple_atcphy {
struct device_node *np;
struct device *dev;
struct {
struct apple_tunable *axi2af;
struct apple_tunable *common[2];
struct apple_tunable *lane_usb3[2];
struct apple_tunable *lane_dp[2];
struct apple_tunable *lane_usb4[2];
} tunables;
enum atcphy_mode mode;
bool swap_lanes;
int dp_link_rate;
bool pipehandler_up;
struct {
void __iomem *core;
void __iomem *axi2af;
void __iomem *usb2phy;
void __iomem *pipehandler;
void __iomem *lpdptx;
} regs;
struct {
struct resource *core;
struct resource *axi2af;
} res;
struct {
struct phy *usb2;
struct phy *usb3;
struct phy *dp;
} phys;
struct phy_provider *phy_provider;
struct reset_controller_dev rcdev;
struct mutex lock;
};
like. look at her. nested structs for days. we love a structured queen π
π Members π
time for the member-by-member vibe check, no skips, no cuts, fr fr:
npβ Device node pointerdevβ Device pointertunablesβ Firmware-provided tunable parameterstunables.axi2afβ AXI to AF interface tunablestunables.commonβ Common tunables for all lanestunables.lane_usb3β USB3 lane-specific tunablestunables.lane_dpβ DisplayPort lane-specific tunablestunables.lane_usb4β USB4 lane-specific tunablesmodeβ Current PHY operating modeswap_lanesβ True if lanes must be swapped due to cable orientationdp_link_rateβ DisplayPort link ratepipehandler_upβ True if the PIPE mux ("pipehandler") is set to USB3 or USB4 moderegsβ Memory-mapped registersregs.coreβ Core registersregs.axi2afβ AXI to Apple Fabric interface registersregs.usb2phyβ USB2 PHY registersregs.pipehandlerβ USB3 PIPE interface ("pipehandler") registersregs.lpdptxβ DisplayPort registersresβ Resources for memory-mapped registers, used to verify that tunables aren't out of boundsres.coreβ Core register resourceres.axi2afβ AXI to Apple Fabric interface resourcephysβ PHY instancesphys.usb2β USB2 PHY instancephys.usb3β USB3 PHY instancephys.dpβ DisplayPort PHY instancephy_providerβ PHY provider instancercdevβ Reset controller devicelockβ Mutex for synchronizing register access across PHY, Type-C switch/mux and reset controller
bestie note: that lock mutex is doing the Lord's work β it keeps register access in sync across the PHY, the Type-C switch/mux and the reset controller. three whole worlds, one mutex. main character energy for real π
π₯ SEE ALSO π₯
go touch grass in the kernel source, iykyk:
- Kernel file
./drivers/phy/apple/atc.c enum atcphy_pipehandler_state(9)enum atcphy_mode(9)
and that's the page!! π this lovely little manual lives at ./drivers/phy/apple, dated October 2026, and it's from the Kernel API Manual. bye bestie, go read atc.c π¦β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms