Lines Matching full:regmap

12 #include <regmap.h>
326 struct regmap *regmap; member
327 struct regmap *grf;
475 static inline void rockchip_grf_write(struct regmap *grf, uint reg, uint mask, in rockchip_grf_write()
534 regmap_update_bits(hdptx->regmap, LANE_REG(lane, 0x0c44), in rockchip_hdptx_phy_set_voltage()
540 regmap_update_bits(hdptx->regmap, LANE_REG(lane, 0x0c44), in rockchip_hdptx_phy_set_voltage()
547 regmap_update_bits(hdptx->regmap, LANE_REG(lane, 0x0c44), in rockchip_hdptx_phy_set_voltage()
553 regmap_update_bits(hdptx->regmap, LANE_REG(lane, 0x0c0c), in rockchip_hdptx_phy_set_voltage()
558 regmap_update_bits(hdptx->regmap, LANE_REG(lane, 0x0c10), in rockchip_hdptx_phy_set_voltage()
564 regmap_update_bits(hdptx->regmap, LANE_REG(lane, 0x0c18), in rockchip_hdptx_phy_set_voltage()
574 regmap_update_bits(hdptx->regmap, LANE_REG(lane, 0x0c1c), in rockchip_hdptx_phy_set_voltage()
580 regmap_update_bits(hdptx->regmap, LANE_REG(lane, 0x0c6c), in rockchip_hdptx_phy_set_voltage()
583 regmap_update_bits(hdptx->regmap, LANE_REG(lane, 0x0c58), in rockchip_hdptx_phy_set_voltage()
586 regmap_update_bits(hdptx->regmap, LANE_REG(lane, 0x0c40), in rockchip_hdptx_phy_set_voltage()
627 regmap_update_bits(hdptx->regmap, 0x081c, LANE_EN, in rockchip_hdptx_phy_set_rate()
644 regmap_update_bits(hdptx->regmap, 0x0254, DP_TX_LINK_BW, in rockchip_hdptx_phy_set_rate()
648 regmap_update_bits(hdptx->regmap, 0x01d0, in rockchip_hdptx_phy_set_rate()
652 regmap_update_bits(hdptx->regmap, 0x01d4, in rockchip_hdptx_phy_set_rate()
655 regmap_update_bits(hdptx->regmap, 0x01d8, in rockchip_hdptx_phy_set_rate()
658 regmap_update_bits(hdptx->regmap, 0x0264, SSC_EN, in rockchip_hdptx_phy_set_rate()
661 regmap_update_bits(hdptx->regmap, 0x01d0, in rockchip_hdptx_phy_set_rate()
665 regmap_update_bits(hdptx->regmap, 0x01d4, in rockchip_hdptx_phy_set_rate()
668 regmap_update_bits(hdptx->regmap, 0x01d8, in rockchip_hdptx_phy_set_rate()
671 regmap_update_bits(hdptx->regmap, 0x0264, SSC_EN, in rockchip_hdptx_phy_set_rate()
689 regmap_update_bits(hdptx->regmap, 0x081c, LANE_EN, in rockchip_hdptx_phy_set_rate()
733 regmap_update_bits(hdptx->regmap, 0x0020, OVRD_LCPLL_EN | LCPLL_EN, in rockchip_hdptx_phy_dp_pll_init()
736 regmap_update_bits(hdptx->regmap, 0x00f4, OVRD_ROPLL_EN | ROPLL_EN, in rockchip_hdptx_phy_dp_pll_init()
739 regmap_update_bits(hdptx->regmap, 0x0138, ANA_ROPLL_PI_EN, in rockchip_hdptx_phy_dp_pll_init()
741 regmap_write(hdptx->regmap, 0x0144, FIELD_PREP(ROPLL_PMS_MDIV, 0x87)); in rockchip_hdptx_phy_dp_pll_init()
742 regmap_write(hdptx->regmap, 0x0148, FIELD_PREP(ROPLL_PMS_MDIV, 0x71)); in rockchip_hdptx_phy_dp_pll_init()
743 regmap_write(hdptx->regmap, 0x014c, FIELD_PREP(ROPLL_PMS_MDIV, 0x71)); in rockchip_hdptx_phy_dp_pll_init()
744 regmap_write(hdptx->regmap, 0x0154, in rockchip_hdptx_phy_dp_pll_init()
746 regmap_write(hdptx->regmap, 0x0158, in rockchip_hdptx_phy_dp_pll_init()
748 regmap_write(hdptx->regmap, 0x015c, in rockchip_hdptx_phy_dp_pll_init()
750 regmap_write(hdptx->regmap, 0x0164, in rockchip_hdptx_phy_dp_pll_init()
753 regmap_write(hdptx->regmap, 0x0168, in rockchip_hdptx_phy_dp_pll_init()
756 regmap_update_bits(hdptx->regmap, 0x016c, ROPLL_PMS_SDIV_HBR2, in rockchip_hdptx_phy_dp_pll_init()
758 regmap_update_bits(hdptx->regmap, 0x0178, ANA_ROPLL_SDM_EN, in rockchip_hdptx_phy_dp_pll_init()
760 regmap_update_bits(hdptx->regmap, 0x0178, in rockchip_hdptx_phy_dp_pll_init()
764 regmap_update_bits(hdptx->regmap, 0x0178, ROPLL_SDC_FRACTIONAL_EN_RBR, in rockchip_hdptx_phy_dp_pll_init()
766 regmap_update_bits(hdptx->regmap, 0x0178, ROPLL_SDC_FRACTIONAL_EN_HBR, in rockchip_hdptx_phy_dp_pll_init()
768 regmap_update_bits(hdptx->regmap, 0x0178, ROPLL_SDC_FRACTIONAL_EN_HBR2, in rockchip_hdptx_phy_dp_pll_init()
770 regmap_update_bits(hdptx->regmap, 0x017c, in rockchip_hdptx_phy_dp_pll_init()
774 regmap_write(hdptx->regmap, 0x0180, in rockchip_hdptx_phy_dp_pll_init()
776 regmap_write(hdptx->regmap, 0x0184, in rockchip_hdptx_phy_dp_pll_init()
778 regmap_write(hdptx->regmap, 0x0188, in rockchip_hdptx_phy_dp_pll_init()
780 regmap_update_bits(hdptx->regmap, 0x0190, in rockchip_hdptx_phy_dp_pll_init()
787 regmap_write(hdptx->regmap, 0x0194, in rockchip_hdptx_phy_dp_pll_init()
789 regmap_write(hdptx->regmap, 0x0198, in rockchip_hdptx_phy_dp_pll_init()
791 regmap_write(hdptx->regmap, 0x019c, in rockchip_hdptx_phy_dp_pll_init()
793 regmap_update_bits(hdptx->regmap, 0x01a4, ROPLL_SDC_N_RBR, in rockchip_hdptx_phy_dp_pll_init()
795 regmap_update_bits(hdptx->regmap, 0x01a8, in rockchip_hdptx_phy_dp_pll_init()
799 regmap_write(hdptx->regmap, 0x01b0, in rockchip_hdptx_phy_dp_pll_init()
801 regmap_write(hdptx->regmap, 0x01b4, in rockchip_hdptx_phy_dp_pll_init()
803 regmap_write(hdptx->regmap, 0x01b8, in rockchip_hdptx_phy_dp_pll_init()
805 regmap_write(hdptx->regmap, 0x01c0, in rockchip_hdptx_phy_dp_pll_init()
807 regmap_write(hdptx->regmap, 0x01c4, in rockchip_hdptx_phy_dp_pll_init()
809 regmap_write(hdptx->regmap, 0x01c8, in rockchip_hdptx_phy_dp_pll_init()
811 regmap_update_bits(hdptx->regmap, 0x01d0, in rockchip_hdptx_phy_dp_pll_init()
815 regmap_update_bits(hdptx->regmap, 0x01dc, ANA_ROPLL_SSC_CLK_DIV_SEL, in rockchip_hdptx_phy_dp_pll_init()
817 regmap_update_bits(hdptx->regmap, 0x0118, in rockchip_hdptx_phy_dp_pll_init()
821 regmap_update_bits(hdptx->regmap, 0x011c, in rockchip_hdptx_phy_dp_pll_init()
826 regmap_update_bits(hdptx->regmap, 0x0204, ANA_PLL_CD_TX_SER_RATE_SEL, in rockchip_hdptx_phy_dp_pll_init()
828 regmap_update_bits(hdptx->regmap, 0x025c, DIG_CLK_SEL, in rockchip_hdptx_phy_dp_pll_init()
830 regmap_update_bits(hdptx->regmap, 0x021c, ANA_PLL_TX_HS_CLK_EN, in rockchip_hdptx_phy_dp_pll_init()
832 regmap_update_bits(hdptx->regmap, 0x0204, in rockchip_hdptx_phy_dp_pll_init()
836 regmap_update_bits(hdptx->regmap, 0x0264, CMN_ROPLL_ALONE_MODE, in rockchip_hdptx_phy_dp_pll_init()
838 regmap_update_bits(hdptx->regmap, 0x0208, ANA_PLL_CD_VREG_GAIN_CTRL, in rockchip_hdptx_phy_dp_pll_init()
840 regmap_update_bits(hdptx->regmap, 0x00f0, ANA_LCPLL_RESERVED7, in rockchip_hdptx_phy_dp_pll_init()
842 regmap_update_bits(hdptx->regmap, 0x020c, ANA_PLL_CD_VREG_ICTRL, in rockchip_hdptx_phy_dp_pll_init()
844 regmap_update_bits(hdptx->regmap, 0x0214, ANA_PLL_SYNC_LOSS_DET_MODE, in rockchip_hdptx_phy_dp_pll_init()
846 regmap_update_bits(hdptx->regmap, 0x0210, PLL_LCRO_CLK_SEL, in rockchip_hdptx_phy_dp_pll_init()
848 regmap_update_bits(hdptx->regmap, 0x0268, HS_SPEED_SEL, in rockchip_hdptx_phy_dp_pll_init()
850 regmap_update_bits(hdptx->regmap, 0x026c, LS_SPEED_SEL, in rockchip_hdptx_phy_dp_pll_init()
859 regmap_update_bits(hdptx->regmap, 0x0414, ANA_SB_TX_HLVL_PROG, in rockchip_hdptx_phy_dp_aux_init()
861 regmap_update_bits(hdptx->regmap, 0x0418, ANA_SB_TX_LLVL_PROG, in rockchip_hdptx_phy_dp_aux_init()
863 regmap_update_bits(hdptx->regmap, 0x044c, in rockchip_hdptx_phy_dp_aux_init()
867 regmap_update_bits(hdptx->regmap, 0x0450, in rockchip_hdptx_phy_dp_aux_init()
871 regmap_update_bits(hdptx->regmap, 0x0454, in rockchip_hdptx_phy_dp_aux_init()
875 regmap_update_bits(hdptx->regmap, 0x0458, in rockchip_hdptx_phy_dp_aux_init()
878 regmap_update_bits(hdptx->regmap, 0x045c, in rockchip_hdptx_phy_dp_aux_init()
881 regmap_update_bits(hdptx->regmap, 0x0460, in rockchip_hdptx_phy_dp_aux_init()
884 regmap_update_bits(hdptx->regmap, 0x0468, SB_TG_CNT_RUN_NO_7_0, in rockchip_hdptx_phy_dp_aux_init()
886 regmap_update_bits(hdptx->regmap, 0x046c, in rockchip_hdptx_phy_dp_aux_init()
890 regmap_update_bits(hdptx->regmap, 0x0470, SB_AFC_STB_NUM, in rockchip_hdptx_phy_dp_aux_init()
892 regmap_update_bits(hdptx->regmap, 0x0474, SB_TG_OSC_CNT_MIN, in rockchip_hdptx_phy_dp_aux_init()
894 regmap_update_bits(hdptx->regmap, 0x0478, SB_TG_OSC_CNT_MAX, in rockchip_hdptx_phy_dp_aux_init()
896 regmap_update_bits(hdptx->regmap, 0x047c, SB_PWM_AFC_CTRL, in rockchip_hdptx_phy_dp_aux_init()
898 regmap_update_bits(hdptx->regmap, 0x0434, ANA_SB_DMRX_LPBK_DATA, in rockchip_hdptx_phy_dp_aux_init()
900 regmap_update_bits(hdptx->regmap, 0x0440, in rockchip_hdptx_phy_dp_aux_init()
904 regmap_update_bits(hdptx->regmap, 0x043c, ANA_SB_VREG_GAIN_CTRL, in rockchip_hdptx_phy_dp_aux_init()
906 regmap_update_bits(hdptx->regmap, 0x0408, ANA_SB_RXTERM_OFFSP, in rockchip_hdptx_phy_dp_aux_init()
908 regmap_update_bits(hdptx->regmap, 0x040c, ANA_SB_RXTERM_OFFSN, in rockchip_hdptx_phy_dp_aux_init()
910 regmap_update_bits(hdptx->regmap, 0x047c, SB_RCAL_RSTN, in rockchip_hdptx_phy_dp_aux_init()
912 regmap_update_bits(hdptx->regmap, 0x0410, SB_AUX_EN, in rockchip_hdptx_phy_dp_aux_init()
914 regmap_update_bits(hdptx->regmap, 0x0480, SB_AUX_EN_IN, in rockchip_hdptx_phy_dp_aux_init()
916 regmap_update_bits(hdptx->regmap, 0x040c, OVRD_SB_RX_RESCAL_DONE, in rockchip_hdptx_phy_dp_aux_init()
918 regmap_update_bits(hdptx->regmap, 0x0410, OVRD_SB_EN, in rockchip_hdptx_phy_dp_aux_init()
920 regmap_update_bits(hdptx->regmap, 0x0408, OVRD_SB_RXTERM_EN, in rockchip_hdptx_phy_dp_aux_init()
922 regmap_update_bits(hdptx->regmap, 0x043c, OVRD_SB_VREG_EN, in rockchip_hdptx_phy_dp_aux_init()
924 regmap_update_bits(hdptx->regmap, 0x0410, OVRD_SB_AUX_EN, in rockchip_hdptx_phy_dp_aux_init()
937 regmap_update_bits(hdptx->regmap, 0x040c, SB_RX_RESCAL_DONE, in rockchip_hdptx_phy_dp_aux_init()
940 regmap_update_bits(hdptx->regmap, 0x0410, SB_EN, in rockchip_hdptx_phy_dp_aux_init()
943 regmap_update_bits(hdptx->regmap, 0x0408, SB_RXRERM_EN, in rockchip_hdptx_phy_dp_aux_init()
946 regmap_update_bits(hdptx->regmap, 0x043c, SB_VREG_EN, in rockchip_hdptx_phy_dp_aux_init()
949 regmap_update_bits(hdptx->regmap, 0x0410, SB_AUX_EN, in rockchip_hdptx_phy_dp_aux_init()
977 regmap_update_bits(hdptx->regmap, LANE_REG(lane, 0x0c04), in rockchip_hdptx_phy_reset()
1001 regmap_update_bits(hdptx->regmap, LANE_REG(lane, 0x0c78), in rockchip_hdptx_phy_power_on()
1011 regmap_update_bits(hdptx->regmap, 0x0800, PROTOCOL_SEL, in rockchip_hdptx_phy_power_on()
1013 regmap_update_bits(hdptx->regmap, 0x0818, DATA_BUS_WIDTH, in rockchip_hdptx_phy_power_on()
1015 regmap_update_bits(hdptx->regmap, 0x0818, BUS_WIDTH_SEL, in rockchip_hdptx_phy_power_on()
1025 regmap_update_bits(hdptx->regmap, 0x0800, PROTOCOL_SEL, in rockchip_hdptx_phy_power_on()
1055 ret = regmap_init_mem(dev, &hdptx->regmap); in rockchip_hdptx_phy_probe()
1067 dev_err(dev, "unable to find regmap: %d\n", ret); in rockchip_hdptx_phy_probe()