drivers/staging/media/ipu7/ipu7-isys-csi-phy.c

Source file repositories/reference/linux-study-clean/drivers/staging/media/ipu7/ipu7-isys-csi-phy.c

File Facts

System
Linux kernel
Corpus path
drivers/staging/media/ipu7/ipu7-isys-csi-phy.c
Extension
.c
Size
30687 bytes
Lines
1042
Domain
Driver Families
Bucket
drivers/staging
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct ddlcal_counter_ref_s {
	u16 min_mbps;
	u16 max_mbps;

	u16 ddlcal_counter_ref;
};

struct ddlcal_params {
	u16 min_mbps;
	u16 max_mbps;
	u16 oa_lanex_hsrx_cdphy_sel_fast;
	u16 ddlcal_max_phase;
	u16 phase_bound;
	u16 ddlcal_dll_fbk;
	u16 ddlcal_ddl_coarse_bank;
	u16 fjump_deskew;
	u16 min_eye_opening_deskew;
};

struct i_thssettle_params {
	u16 min_mbps;
	u16 max_mbps;
	u16 i_thssettle;
};

 /* lane2 for 4l3t, lane1 for 2l2t */
struct oa_lane_clk_div_params {
	u16 min_mbps;
	u16 max_mbps;
	u16 oa_lane_hsrx_hs_clk_div;
};

struct cdr_fbk_cap_prog_params {
	u16 min_mbps;
	u16 max_mbps;
	u16 val;
};

static const struct ddlcal_counter_ref_s table0[] = {
	{ 1500, 1999, 118 },
	{ 2000, 2499, 157 },
	{ 2500, 3499, 196 },
	{ 3500, 4499, 274 },
	{ 4500, 4500, 352 },
	{ }
};

static const struct ddlcal_params table1[] = {
	{ 1500, 1587, 0, 143, 167, 17, 3, 4, 29 },
	{ 1588, 1687, 0, 135, 167, 15, 3, 4, 27 },
	{ 1688, 1799, 0, 127, 135, 15, 2, 4, 26 },
	{ 1800, 1928, 0, 119, 135, 13, 2, 3, 24 },
	{ 1929, 2076, 0, 111, 135, 13, 2, 3, 23 },
	{ 2077, 2249, 0, 103, 135, 11, 2, 3, 21 },
	{ 2250, 2454, 0, 95, 103, 11, 1, 3, 19 },
	{ 2455, 2699, 0, 87, 103, 9, 1, 3, 18 },
	{ 2700, 2999, 0, 79, 103, 9, 1, 2, 16 },
	{ 3000, 3229, 0, 71, 71, 7, 1, 2, 15 },
	{ 3230, 3599, 1, 87, 103, 9, 1, 3, 18 },
	{ 3600, 3999, 1, 79, 103, 9, 1, 2, 16 },
	{ 4000, 4499, 1, 71, 103, 7, 1, 2, 15 },
	{ 4500, 4500, 1, 63, 71, 7, 0, 2, 13 },
	{ }
};

static const struct i_thssettle_params table2[] = {
	{ 80, 124, 24 },
	{ 125, 249, 20 },
	{ 250, 499, 16 },
	{ 500, 749, 14 },
	{ 750, 1499, 13 },
	{ 1500, 4500, 12 },
	{ }
};

static const struct oa_lane_clk_div_params table6[] = {
	{ 80, 159, 0x1 },
	{ 160, 319, 0x2 },
	{ 320, 639, 0x3 },
	{ 640, 1279, 0x4 },
	{ 1280, 2560, 0x5 },
	{ 2561, 4500, 0x6 },
	{ }
};

static const struct cdr_fbk_cap_prog_params table7[] = {
	{ 80, 919, 0 },
	{ 920, 1029, 1 },
	{ 1030, 1169, 2 },
	{ 1170, 1349, 3 },

Annotation

Implementation Notes