STRUCT EXYNOS5_USBDRD_PHY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct exynos5_usbdrd_phy

okay so bestie, this is a Kernel API Manual page for struct exynos5_usbdrd_phy(9) β€” it's literally the driver data home for the USB 3.0 PHY, and we're about to read it together like it's the group chat lore 🫢


✨ NAME ✨

struct exynos5_usbdrd_phy β€” driver data for USB 3.0 PHY. that's it, that's the whole vibe: it's the struct that holds everything the driver needs to know about the PHY πŸ’–


🌸 SYNOPSIS 🌸

here's the whole struct, no cap, every field exactly where it lives:

struct exynos5_usbdrd_phy {
    struct device *dev;
    void __iomem *reg_phy;
    void __iomem *reg_pcs;
    void __iomem *reg_pma;
    struct clk_bulk_data *clks;
    struct clk_bulk_data *core_clks;
    const struct exynos5_usbdrd_phy_drvdata *drv_data;
    struct phy *hs_phy;
    struct mutex phy_mutex;
    struct phy_usb_instance {
      struct phy *phy;
      u32 index;
      struct regmap *reg_pmu;
      u32 pmu_offset;
      const struct exynos5_usbdrd_phy_config *phy_cfg;
    } phys[EXYNOS5_DRDPHYS_NUM];
    u32 extrefclk;
    struct regulator_bulk_data *regulators;
    struct typec_switch_dev *sw;
    enum typec_orientation orientation;
 };

πŸ¦‹ MEMBERS πŸ¦‹

okay now the fun part, member by member, main character energy only πŸ‘‘

  • dev β€” pointer to the device instance of this platform device. like, this is the "who am I" of the whole thing πŸͺͺ
  • reg_phy β€” the usb phy controller register memory base. the address where the register party starts ✨
  • reg_pcs β€” the usb phy physical coding sublayer register memory base. yes, PCS, physical coding sublayer, she has a full name πŸ’…
  • reg_pma β€” the usb phy physical media attachment register memory base. PMA, physical media attachment, also fancy πŸŽ€
  • clks β€” clocks for register access. you need these to even touch the registers, periodt ⏰
  • core_clks β€” core clocks for phy (ref, pipe3, utmi+, ITP, etc. as required). literally the whole list, "as required" and all 🌈
  • drv_data β€” pointer to the SoC level driver data structure. SoC-specific deets live here 🧚
  • hs_phy β€” pointer to the non-Samsung IP high-speed phy controller. not Samsung's IP, so it gets its own pointer 🫢
  • phy_mutex β€” mutex protecting phy_init/exit & TCPC callbacks. she's the bouncer keeping things from colliding πŸ”’
  • phys β€” array for 'EXYNOS5_DRDPHYS_NUM' number of PHY instances, each with its 'phy' and 'phy_cfg'. and inside each one there's struct phy *phy, u32 index, struct regmap *reg_pmu, u32 pmu_offset, and const struct exynos5_usbdrd_phy_config *phy_cfg β€” a whole little nested struct, we love a struct within a struct 😭
  • extrefclk β€” frequency select settings when using 'separate reference clocks' for SS and HS operations. SS and HS, both of them, separate clocks, iconic πŸ’«
  • regulators β€” regulators for phy. give the phy her power, she deserves it ⚑
  • sw β€” TypeC orientation switch handle. flips things around, lowkey πŸ”„
  • orientation β€” TypeC connector orientation β€” normal or flipped. just those two, normal or flipped, no in-between πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

want the source? go look at the kernel file ./drivers/phy/samsung/phy-exynos5-usbdrd.c β€” that's where this whole thing actually lives, iykyk πŸ“


ngl bestie, this is a kernel struct doc so the "danger" is mostly "read the fields before you poke them", but fr fr: the phy_mutex is there for a reason, respect the mutex πŸ’€

and that's the tea πŸ“ this page came from ./drivers/phy/samsung, dated October 2026, and it's literally titled struct exynos5_usbdrd_phy(9) β€” ate and left no crumbs πŸ‘‘πŸ’–βœ¨

πŸ“¦ where this page comes from