drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
Source file repositories/reference/linux-study-clean/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c- Extension
.c- Size
- 64132 bytes
- Lines
- 1717
- 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
dt-bindings/phy/phy.hlinux/bitfield.hlinux/clk.hlinux/hw_bitfield.hlinux/init.hlinux/kernel.hlinux/mfd/syscon.hlinux/module.hlinux/mod_devicetable.hlinux/of.hlinux/phy/phy.hlinux/platform_device.hlinux/pm_runtime.hlinux/regmap.hlinux/reset.h
Detected Declarations
struct hs_drv_res_cfgstruct samsung_mipi_dcphy_plat_datastruct samsung_mipi_dcphystruct samsung_mipi_dphy_timingenum hs_drv_res_ohmfunction samsung_mipi_dcphy_bias_block_enablefunction samsung_mipi_dphy_lane_enablefunction samsung_mipi_dphy_lane_disablefunction samsung_mipi_dcphy_pll_configurefunction samsung_mipi_dcphy_pll_enablefunction samsung_mipi_dcphy_pll_disablefunction samsung_mipi_dphy_get_timingfunction samsung_mipi_dcphy_pll_round_ratefunction samsung_mipi_dphy_clk_lane_timing_initfunction samsung_mipi_dphy_data_lane_timing_initfunction samsung_mipi_dphy_power_onfunction samsung_mipi_dcphy_power_onfunction samsung_mipi_dcphy_power_offfunction samsung_mipi_dcphy_pll_ssc_modulation_calcfunction samsung_mipi_dcphy_pll_calc_ratefunction samsung_mipi_dcphy_configurefunction samsung_mipi_dcphy_initfunction samsung_mipi_dcphy_exitfunction samsung_mipi_dcphy_probefunction samsung_mipi_dcphy_runtime_suspendfunction samsung_mipi_dcphy_runtime_resume
Annotated Snippet
struct hs_drv_res_cfg {
enum hs_drv_res_ohm clk_hs_drv_up_ohm;
enum hs_drv_res_ohm clk_hs_drv_down_ohm;
enum hs_drv_res_ohm data_hs_drv_up_ohm;
enum hs_drv_res_ohm data_hs_drv_down_ohm;
};
struct samsung_mipi_dcphy_plat_data {
const struct hs_drv_res_cfg *dphy_hs_drv_res_cfg;
u32 dphy_tx_max_lane_kbps;
};
struct samsung_mipi_dcphy {
struct device *dev;
struct clk *ref_clk;
struct clk *pclk;
struct regmap *regmap;
struct regmap *grf_regmap;
struct reset_control *m_phy_rst;
struct reset_control *s_phy_rst;
struct reset_control *apb_rst;
struct reset_control *grf_apb_rst;
unsigned int lanes;
struct phy *phy;
u8 type;
const struct samsung_mipi_dcphy_plat_data *pdata;
struct {
unsigned long long rate;
u8 prediv;
u16 fbdiv;
long dsm;
u8 scaler;
bool ssc_en;
u8 mfr;
u8 mrr;
} pll;
};
struct samsung_mipi_dphy_timing {
unsigned int max_lane_mbps;
u8 clk_prepare;
u8 clk_zero;
u8 clk_post;
u8 clk_trail_eot;
u8 hs_prepare;
u8 hs_zero;
u8 hs_trail_eot;
u8 lpx;
u8 hs_exit;
u8 hs_settle;
};
/*
* Timing values taken from rk3588 vendor kernel.
* Not documented in hw documentation.
*/
static const
struct samsung_mipi_dphy_timing samsung_mipi_dphy_timing_table[] = {
{6500, 32, 117, 31, 28, 30, 56, 27, 24, 44, 37},
{6490, 32, 116, 31, 28, 30, 56, 27, 24, 44, 37},
{6480, 32, 116, 31, 28, 30, 56, 27, 24, 44, 37},
{6470, 32, 116, 31, 28, 30, 56, 27, 24, 44, 37},
{6460, 32, 116, 31, 28, 30, 56, 27, 24, 44, 37},
{6450, 32, 115, 31, 28, 30, 56, 27, 24, 44, 37},
{6440, 32, 115, 31, 28, 30, 56, 27, 24, 44, 37},
{6430, 31, 116, 31, 28, 30, 55, 27, 24, 44, 37},
{6420, 31, 116, 31, 28, 30, 55, 27, 24, 44, 37},
{6410, 31, 116, 31, 27, 30, 55, 27, 24, 44, 37},
{6400, 31, 115, 30, 27, 30, 55, 27, 23, 43, 36},
{6390, 31, 115, 30, 27, 30, 55, 27, 23, 43, 36},
{6380, 31, 115, 30, 27, 30, 55, 27, 23, 43, 36},
{6370, 31, 115, 30, 27, 30, 55, 26, 23, 43, 36},
{6360, 31, 114, 30, 27, 30, 54, 26, 23, 43, 36},
{6350, 31, 114, 30, 27, 30, 54, 26, 23, 43, 36},
{6340, 31, 114, 30, 27, 30, 54, 26, 23, 43, 36},
{6330, 31, 114, 30, 27, 30, 54, 26, 23, 43, 36},
{6320, 31, 113, 30, 27, 30, 54, 26, 23, 43, 36},
{6310, 31, 113, 30, 27, 30, 54, 26, 23, 43, 36},
{6300, 31, 113, 30, 27, 30, 54, 26, 23, 43, 36},
{6290, 31, 113, 30, 27, 29, 54, 26, 23, 43, 36},
{6280, 31, 112, 30, 27, 29, 54, 26, 23, 43, 36},
{6270, 31, 112, 30, 27, 29, 54, 26, 23, 43, 36},
{6260, 31, 112, 30, 27, 29, 54, 26, 23, 43, 36},
{6250, 31, 112, 30, 27, 29, 54, 26, 23, 42, 36},
{6240, 30, 113, 30, 27, 29, 54, 26, 23, 42, 36},
{6230, 30, 112, 30, 27, 29, 54, 26, 23, 42, 35},
{6220, 30, 112, 30, 27, 29, 53, 26, 23, 42, 35},
{6210, 30, 112, 30, 27, 29, 53, 26, 23, 42, 35},
Annotation
- Immediate include surface: `dt-bindings/phy/phy.h`, `linux/bitfield.h`, `linux/clk.h`, `linux/hw_bitfield.h`, `linux/init.h`, `linux/kernel.h`, `linux/mfd/syscon.h`, `linux/module.h`.
- Detected declarations: `struct hs_drv_res_cfg`, `struct samsung_mipi_dcphy_plat_data`, `struct samsung_mipi_dcphy`, `struct samsung_mipi_dphy_timing`, `enum hs_drv_res_ohm`, `function samsung_mipi_dcphy_bias_block_enable`, `function samsung_mipi_dphy_lane_enable`, `function samsung_mipi_dphy_lane_disable`, `function samsung_mipi_dcphy_pll_configure`, `function samsung_mipi_dcphy_pll_enable`.
- 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.