drivers/phy/ti/phy-ti-pipe3.c
Source file repositories/reference/linux-study-clean/drivers/phy/ti/phy-ti-pipe3.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/phy/ti/phy-ti-pipe3.c- Extension
.c- Size
- 24585 bytes
- Lines
- 948
- Domain
- Driver Families
- Bucket
- drivers/phy
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/platform_device.hlinux/property.hlinux/slab.hlinux/phy/phy.hlinux/of.hlinux/clk.hlinux/err.hlinux/io.hlinux/pm_runtime.hlinux/delay.hlinux/phy/omap_control_phy.hlinux/of_platform.hlinux/mfd/syscon.hlinux/regmap.h
Detected Declarations
struct pipe3_dpll_paramsstruct pipe3_dpll_mapstruct pipe3_settingsstruct ti_pipe3struct pipe3_dataenum pipe3_modefunction ti_pipe3_readlfunction ti_pipe3_writelfunction ti_pipe3_power_offfunction ti_pipe3_power_onfunction ti_pipe3_dpll_wait_lockfunction ti_pipe3_dpll_programfunction ti_pipe3_calibratefunction ti_pipe3_initfunction ti_pipe3_exitfunction ti_pipe3_get_clkfunction ti_pipe3_put_devicefunction ti_pipe3_get_sysctrlfunction ti_pipe3_get_tx_rx_basefunction ti_pipe3_get_pll_basefunction ti_pipe3_probefunction ti_pipe3_removefunction ti_pipe3_enable_clocksfunction ti_pipe3_disable_clocks
Annotated Snippet
struct pipe3_dpll_params {
u16 m;
u8 n;
u8 freq:3;
u8 sd;
u32 mf;
};
struct pipe3_dpll_map {
unsigned long rate;
struct pipe3_dpll_params params;
};
struct pipe3_settings {
u8 ana_interface;
u8 ana_losd;
u8 dig_fastlock;
u8 dig_lbw;
u8 dig_stepcnt;
u8 dig_stl;
u8 dig_thr;
u8 dig_thr_mode;
u8 dig_2ndo_sdm_mode;
u8 dig_hs_rate;
u8 dig_ovrd_hs_rate;
u8 dll_trim_sel;
u8 dll_phint_rate;
u8 eq_lev;
u8 eq_ftc;
u8 eq_ctl;
u8 eq_ovrd_lev;
u8 eq_ovrd_ftc;
};
struct ti_pipe3 {
void __iomem *pll_ctrl_base;
void __iomem *phy_rx;
void __iomem *phy_tx;
struct device *dev;
struct device *control_dev;
struct clk *wkupclk;
struct clk *sys_clk;
struct clk *refclk;
struct clk *div_clk;
struct pipe3_dpll_map *dpll_map;
struct regmap *phy_power_syscon; /* ctrl. reg. acces */
struct regmap *pcs_syscon; /* ctrl. reg. acces */
struct regmap *dpll_reset_syscon; /* ctrl. reg. acces */
unsigned int dpll_reset_reg; /* reg. index within syscon */
unsigned int power_reg; /* power reg. index within syscon */
unsigned int pcie_pcs_reg; /* pcs reg. index in syscon */
bool sata_refclk_enabled;
enum pipe3_mode mode;
struct pipe3_settings settings;
};
static struct pipe3_dpll_map dpll_map_usb[] = {
{12000000, {1250, 5, 4, 20, 0} }, /* 12 MHz */
{16800000, {3125, 20, 4, 20, 0} }, /* 16.8 MHz */
{19200000, {1172, 8, 4, 20, 65537} }, /* 19.2 MHz */
{20000000, {1000, 7, 4, 10, 0} }, /* 20 MHz */
{26000000, {1250, 12, 4, 20, 0} }, /* 26 MHz */
{38400000, {3125, 47, 4, 20, 92843} }, /* 38.4 MHz */
{ }, /* Terminator */
};
static struct pipe3_dpll_map dpll_map_sata[] = {
{12000000, {625, 4, 4, 6, 0} }, /* 12 MHz */
{16800000, {625, 6, 4, 7, 0} }, /* 16.8 MHz */
{19200000, {625, 7, 4, 6, 0} }, /* 19.2 MHz */
{20000000, {750, 9, 4, 6, 0} }, /* 20 MHz */
{26000000, {750, 12, 4, 6, 0} }, /* 26 MHz */
{38400000, {625, 15, 4, 6, 0} }, /* 38.4 MHz */
{ }, /* Terminator */
};
struct pipe3_data {
enum pipe3_mode mode;
struct pipe3_dpll_map *dpll_map;
struct pipe3_settings settings;
};
static struct pipe3_data data_usb = {
.mode = PIPE3_MODE_USBSS,
.dpll_map = dpll_map_usb,
.settings = {
/* DRA75x TRM Table 26-17 Preferred USB3_PHY_RX SCP Register Settings */
.ana_interface = INTERFACE_MODE_USBSS,
.ana_losd = 0xa,
.dig_fastlock = 1,
Annotation
- Immediate include surface: `linux/module.h`, `linux/platform_device.h`, `linux/property.h`, `linux/slab.h`, `linux/phy/phy.h`, `linux/of.h`, `linux/clk.h`, `linux/err.h`.
- Detected declarations: `struct pipe3_dpll_params`, `struct pipe3_dpll_map`, `struct pipe3_settings`, `struct ti_pipe3`, `struct pipe3_data`, `enum pipe3_mode`, `function ti_pipe3_readl`, `function ti_pipe3_writel`, `function ti_pipe3_power_off`, `function ti_pipe3_power_on`.
- Atlas domain: Driver Families / drivers/phy.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.