Lines Matching refs:csiphy
351 static void csiphy_hw_version_read(struct csiphy_device *csiphy, in csiphy_hw_version_read() argument
357 csiphy->base + CSIPHY_3PH_CMN_CSI_COMMON_CTRLn(6)); in csiphy_hw_version_read()
359 hw_version = readl_relaxed(csiphy->base + in csiphy_hw_version_read()
361 hw_version |= readl_relaxed(csiphy->base + in csiphy_hw_version_read()
363 hw_version |= readl_relaxed(csiphy->base + in csiphy_hw_version_read()
365 hw_version |= readl_relaxed(csiphy->base + in csiphy_hw_version_read()
375 static void csiphy_reset(struct csiphy_device *csiphy) in csiphy_reset() argument
377 writel_relaxed(0x1, csiphy->base + CSIPHY_3PH_CMN_CSI_COMMON_CTRLn(0)); in csiphy_reset()
379 writel_relaxed(0x0, csiphy->base + CSIPHY_3PH_CMN_CSI_COMMON_CTRLn(0)); in csiphy_reset()
384 struct csiphy_device *csiphy = dev; in csiphy_isr() local
389 u8 val = readl_relaxed(csiphy->base + in csiphy_isr()
392 writel_relaxed(val, csiphy->base + in csiphy_isr()
396 writel_relaxed(0x1, csiphy->base + CSIPHY_3PH_CMN_CSI_COMMON_CTRLn(10)); in csiphy_isr()
397 writel_relaxed(0x0, csiphy->base + CSIPHY_3PH_CMN_CSI_COMMON_CTRLn(10)); in csiphy_isr()
400 writel_relaxed(0x0, csiphy->base + in csiphy_isr()
438 static void csiphy_gen1_config_lanes(struct csiphy_device *csiphy, in csiphy_gen1_config_lanes() argument
454 writel_relaxed(val, csiphy->base + CSIPHY_3PH_LNn_CFG1(l)); in csiphy_gen1_config_lanes()
457 writel_relaxed(val, csiphy->base + CSIPHY_3PH_LNn_CFG2(l)); in csiphy_gen1_config_lanes()
460 writel_relaxed(val, csiphy->base + CSIPHY_3PH_LNn_CFG3(l)); in csiphy_gen1_config_lanes()
464 writel_relaxed(val, csiphy->base + CSIPHY_3PH_LNn_CFG5(l)); in csiphy_gen1_config_lanes()
467 writel_relaxed(val, csiphy->base + CSIPHY_3PH_LNn_CFG6(l)); in csiphy_gen1_config_lanes()
470 writel_relaxed(val, csiphy->base + CSIPHY_3PH_LNn_CFG7(l)); in csiphy_gen1_config_lanes()
474 writel_relaxed(val, csiphy->base + CSIPHY_3PH_LNn_CFG8(l)); in csiphy_gen1_config_lanes()
477 writel_relaxed(val, csiphy->base + CSIPHY_3PH_LNn_CFG9(l)); in csiphy_gen1_config_lanes()
480 writel_relaxed(val, csiphy->base + CSIPHY_3PH_LNn_TEST_IMP(l)); in csiphy_gen1_config_lanes()
483 writel_relaxed(val, csiphy->base + in csiphy_gen1_config_lanes()
488 writel_relaxed(val, csiphy->base + CSIPHY_3PH_LNn_CFG1(l)); in csiphy_gen1_config_lanes()
490 if (csiphy->camss->res->version == CAMSS_660) in csiphy_gen1_config_lanes()
494 writel_relaxed(val, csiphy->base + CSIPHY_3PH_LNn_CFG4(l)); in csiphy_gen1_config_lanes()
497 writel_relaxed(val, csiphy->base + CSIPHY_3PH_LNn_MISC1(l)); in csiphy_gen1_config_lanes()
500 static void csiphy_gen2_config_lanes(struct csiphy_device *csiphy, in csiphy_gen2_config_lanes() argument
507 switch (csiphy->camss->res->version) { in csiphy_gen2_config_lanes()
537 writel_relaxed(val, csiphy->base + r->reg_addr); in csiphy_gen2_config_lanes()
570 static void csiphy_lanes_enable(struct csiphy_device *csiphy, in csiphy_lanes_enable() argument
579 settle_cnt = csiphy_settle_cnt_calc(link_freq, csiphy->timer_clk_rate); in csiphy_lanes_enable()
585 writel_relaxed(val, csiphy->base + CSIPHY_3PH_CMN_CSI_COMMON_CTRLn(5)); in csiphy_lanes_enable()
588 writel_relaxed(val, csiphy->base + CSIPHY_3PH_CMN_CSI_COMMON_CTRLn(6)); in csiphy_lanes_enable()
591 writel_relaxed(val, csiphy->base + CSIPHY_3PH_CMN_CSI_COMMON_CTRLn(7)); in csiphy_lanes_enable()
594 writel_relaxed(val, csiphy->base + CSIPHY_3PH_CMN_CSI_COMMON_CTRLn(0)); in csiphy_lanes_enable()
596 if (csiphy_is_gen2(csiphy->camss->res->version)) in csiphy_lanes_enable()
597 csiphy_gen2_config_lanes(csiphy, settle_cnt); in csiphy_lanes_enable()
599 csiphy_gen1_config_lanes(csiphy, cfg, settle_cnt); in csiphy_lanes_enable()
603 writel_relaxed(0, csiphy->base + CSIPHY_3PH_CMN_CSI_COMMON_CTRLn(i)); in csiphy_lanes_enable()
606 static void csiphy_lanes_disable(struct csiphy_device *csiphy, in csiphy_lanes_disable() argument
609 writel_relaxed(0, csiphy->base + in csiphy_lanes_disable()
612 writel_relaxed(0, csiphy->base + in csiphy_lanes_disable()