drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c

Source file repositories/reference/linux-study-clean/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c

File Facts

System
Linux kernel
Corpus path
drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
Extension
.c
Size
80029 bytes
Lines
2565
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct lcpll_config {
	unsigned long long rate;
	u8 lcvco_mode_en;
	u8 pi_en;
	u8 clk_en_100m;
	u8 pms_mdiv;
	u8 pms_mdiv_afc;
	u8 pms_pdiv;
	u8 pms_refdiv;
	u8 pms_sdiv;
	u8 sdm_deno;
	u8 sdm_num_sign;
	u8 sdm_num;
	u8 sdc_n;
};

struct ropll_config {
	unsigned long long rate;
	u8 pms_mdiv;
	u8 pms_mdiv_afc;
	u8 pms_pdiv;
	u8 pms_refdiv;
	u8 pms_sdiv;
	u8 sdm_en;
	u8 sdm_deno;
	u8 sdm_num_sign;
	u8 sdm_num;
	u8 sdc_n;
	u8 sdc_num;
	u8 sdc_deno;
};

struct tx_drv_ctrl {
	u8 tx_drv_lvl_ctrl;
	u8 tx_drv_post_lvl_ctrl;
	u8 ana_tx_drv_idrv_idn_ctrl;
	u8 ana_tx_drv_idrv_iup_ctrl;
	u8 ana_tx_drv_accdrv_en;
	u8 ana_tx_drv_accdrv_ctrl;
	u8 tx_drv_pre_lvl_ctrl;
	u8 ana_tx_jeq_en;
	u8 tx_jeq_even_ctrl;
	u8 tx_jeq_odd_ctrl;
};

enum rk_hdptx_reset {
	RST_APB = 0,
	RST_INIT,
	RST_CMN,
	RST_LANE,
	RST_MAX
};

#define MAX_HDPTX_PHY_NUM	2

struct rk_hdptx_phy_cfg {
	unsigned int num_phys;
	unsigned int phy_ids[MAX_HDPTX_PHY_NUM];
};

struct rk_hdptx_hdmi_cfg {
	enum phy_hdmi_mode mode;
	unsigned long long rate;
	unsigned int bpc;
};

struct rk_hdptx_phy {
	struct device *dev;
	struct regmap *regmap;
	struct regmap *grf;

	int phy_id;
	struct phy *phy;
	struct rk_hdptx_hdmi_cfg hdmi_cfg;
	struct clk_bulk_data *clks;
	int nr_clks;
	struct reset_control_bulk_data rsts[RST_MAX];

	/* clk provider */
	struct clk_hw hw;
	bool restrict_rate_change;

	atomic_t usage_count;

	/* used for dp mode */
	unsigned int link_rate;
	unsigned int lanes;
};

static const struct lcpll_config rk_hdptx_frl_lcpll_cfg[] = {

Annotation

Implementation Notes