Lines Matching defs:regmap

23 #include <linux/regmap.h>
362 struct regmap *regmap_common_cdb;
363 struct regmap *regmap_phy_pcs_common_cdb;
364 struct regmap *regmap_phy_pma_common_cdb;
365 struct regmap *regmap_tx_lane_cdb[MAX_NUM_LANES];
366 struct regmap *regmap_rx_lane_cdb[MAX_NUM_LANES];
367 struct regmap *regmap_phy_pcs_lane_cdb[MAX_NUM_LANES];
368 struct regmap *regmap_dptx_phy_reg;
594 static void cdns_torrent_phy_write(struct regmap *regmap, u32 offset, u32 val)
596 regmap_write(regmap, offset, val);
599 static u32 cdns_torrent_phy_read(struct regmap *regmap, u32 offset)
603 regmap_read(regmap, offset, &val);
609 static void cdns_torrent_dp_write(struct regmap *regmap, u32 offset, u32 val)
611 regmap_write(regmap, offset, val);
614 static u32 cdns_torrent_dp_read(struct regmap *regmap, u32 offset)
618 regmap_read(regmap, offset, &val);
714 struct regmap *regmap = cdns_phy->regmap_common_cdb;
716 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, 0x0001);
717 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, ctrl2_val);
718 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, ctrl3_val);
719 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL4_M0, 0x0003);
720 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, 0x0001);
721 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, ctrl2_val);
722 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, ctrl3_val);
723 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL4_M0, 0x0003);
730 struct regmap *regmap = cdns_phy->regmap_common_cdb;
737 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x0119);
738 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0x4000);
739 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002);
740 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x00BC);
741 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CTRL_M0, 0x0012);
742 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x0119);
743 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0x4000);
744 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002);
745 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x00BC);
746 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CTRL_M0, 0x0012);
754 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x01FA);
755 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0x4000);
756 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002);
757 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x0152);
758 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CTRL_M0, 0x0002);
759 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x01FA);
760 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0x4000);
761 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002);
762 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x0152);
763 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CTRL_M0, 0x0002);
770 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x01C2);
771 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0x0000);
772 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002);
773 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x012C);
774 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CTRL_M0, 0x0002);
775 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x01C2);
776 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0x0000);
777 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002);
778 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x012C);
779 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CTRL_M0, 0x0002);
785 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x01A5);
786 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0xE000);
787 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002);
788 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x011A);
789 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CTRL_M0, 0x0002);
790 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x01A5);
791 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0xE000);
792 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002);
793 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x011A);
794 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CTRL_M0, 0x0002);
801 cdns_torrent_phy_write(regmap, CMN_PLL0_VCOCAL_PLLCNT_START, 0x025E);
802 cdns_torrent_phy_write(regmap, CMN_PLL0_LOCK_PLLCNT_THR, 0x0005);
803 cdns_torrent_phy_write(regmap, CMN_PLL1_VCOCAL_PLLCNT_START, 0x025E);
804 cdns_torrent_phy_write(regmap, CMN_PLL1_LOCK_PLLCNT_THR, 0x0005);
806 cdns_torrent_phy_write(regmap, CMN_PLL0_VCOCAL_PLLCNT_START, 0x0260);
807 cdns_torrent_phy_write(regmap, CMN_PLL1_VCOCAL_PLLCNT_START, 0x0260);
809 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, 0x0002);
810 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL2_M0, 0x0000);
811 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL3_M0, 0x0000);
812 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL4_M0, 0x0000);
813 cdns_torrent_phy_write(regmap, CMN_PLL0_LOCK_PLLCNT_THR, 0x0003);
814 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, 0x0002);
815 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL2_M0, 0x0000);
816 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL3_M0, 0x0000);
817 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL4_M0, 0x0000);
818 cdns_torrent_phy_write(regmap, CMN_PLL1_LOCK_PLLCNT_THR, 0x0003);
821 cdns_torrent_phy_write(regmap, CMN_PLL0_LOCK_REFCNT_START, 0x0099);
822 cdns_torrent_phy_write(regmap, CMN_PLL0_LOCK_PLLCNT_START, 0x0099);
823 cdns_torrent_phy_write(regmap, CMN_PLL1_LOCK_REFCNT_START, 0x0099);
824 cdns_torrent_phy_write(regmap, CMN_PLL1_LOCK_PLLCNT_START, 0x0099);
834 struct regmap *regmap = cdns_phy->regmap_common_cdb;
836 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, 0x0001);
837 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, ctrl2_val);
838 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, 0x007F);
839 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL4_M0, 0x0003);
840 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, 0x0001);
841 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, ctrl2_val);
842 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, 0x007F);
843 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL4_M0, 0x0003);
850 struct regmap *regmap = cdns_phy->regmap_common_cdb;
857 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x01B0);
858 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0x0000);
859 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002);
860 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x0120);
861 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x01B0);
862 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0x0000);
863 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002);
864 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x0120);
872 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x0184);
873 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0xCCCD);
874 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002);
875 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x0104);
876 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x0184);
877 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0xCCCD);
878 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002);
879 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x0104);
886 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x0159);
887 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0x999A);
888 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002);
889 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x00E7);
890 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x0159);
891 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0x999A);
892 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002);
893 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x00E7);
899 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x0144);
900 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0x0000);
901 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002);
902 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x00D8);
903 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x0144);
904 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0x0000);
905 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002);
906 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x00D8);
912 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CTRL_M0, 0x0002);
913 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CTRL_M0, 0x0002);
916 cdns_torrent_phy_write(regmap,
918 cdns_torrent_phy_write(regmap,
920 cdns_torrent_phy_write(regmap,
922 cdns_torrent_phy_write(regmap,
925 cdns_torrent_phy_write(regmap,
927 cdns_torrent_phy_write(regmap,
930 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, 0x0002);
931 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL2_M0, 0x0000);
932 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL3_M0, 0x0000);
933 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL4_M0, 0x0000);
934 cdns_torrent_phy_write(regmap,
936 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, 0x0002);
937 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL2_M0, 0x0000);
938 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL3_M0, 0x0000);
939 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL4_M0, 0x0000);
940 cdns_torrent_phy_write(regmap,
944 cdns_torrent_phy_write(regmap, CMN_PLL0_LOCK_REFCNT_START, 0x00C7);
945 cdns_torrent_phy_write(regmap, CMN_PLL0_LOCK_PLLCNT_START, 0x00C7);
946 cdns_torrent_phy_write(regmap, CMN_PLL1_LOCK_REFCNT_START, 0x00C7);
947 cdns_torrent_phy_write(regmap, CMN_PLL1_LOCK_PLLCNT_START, 0x00C7);
954 struct regmap *regmap = cdns_phy->regmap_common_cdb;
962 cdns_torrent_phy_write(regmap, CMN_PLL0_DSM_FBH_OVRD_M0, 0x0022);
965 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CP_PADJ_M0, 0x0028);
966 cdns_torrent_phy_write(regmap, CMN_PLL1_DSM_FBH_OVRD_M0, 0x0022);
967 cdns_torrent_phy_write(regmap, CMN_PLL1_DSM_FBL_OVRD_M0, 0x000C);
975 cdns_torrent_phy_write(regmap, CMN_PLL0_DSM_DIAG_M0, 0x0004);
976 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CP_PADJ_M0, 0x0509);
977 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CP_IADJ_M0, 0x0F00);
978 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_FILT_PADJ_M0, 0x0F08);
979 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x0061);
980 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0x3333);
981 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002);
982 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x0042);
983 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CTRL_M0, 0x0002);
986 cdns_torrent_phy_write(regmap, CMN_PLL1_DSM_DIAG_M0, 0x0004);
987 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CP_PADJ_M0, 0x0509);
988 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CP_IADJ_M0, 0x0F00);
989 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_FILT_PADJ_M0, 0x0F08);
990 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x0061);
991 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0x3333);
992 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002);
993 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x0042);
994 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CTRL_M0, 0x0002);
1001 cdns_torrent_phy_write(regmap, CMN_PLL0_DSM_DIAG_M0, 0x0004);
1002 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CP_PADJ_M0, 0x0509);
1003 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CP_IADJ_M0, 0x0F00);
1004 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_FILT_PADJ_M0, 0x0F08);
1005 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x0056);
1006 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0x6666);
1007 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002);
1008 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x003A);
1009 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CTRL_M0, 0x0002);
1012 cdns_torrent_phy_write(regmap, CMN_PLL1_DSM_DIAG_M0, 0x0004);
1013 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CP_PADJ_M0, 0x0509);
1014 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CP_IADJ_M0, 0x0F00);
1015 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_FILT_PADJ_M0, 0x0F08);
1016 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x0056);
1017 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0x6666);
1018 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002);
1019 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x003A);
1020 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CTRL_M0, 0x0002);
1026 cdns_torrent_phy_write(regmap, CMN_PLL0_DSM_DIAG_M0, 0x0004);
1027 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CP_PADJ_M0, 0x0509);
1028 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CP_IADJ_M0, 0x0F00);
1029 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_FILT_PADJ_M0, 0x0F08);
1030 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x0051);
1031 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002);
1032 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x0036);
1033 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CTRL_M0, 0x0002);
1036 cdns_torrent_phy_write(regmap, CMN_PLL1_DSM_DIAG_M0, 0x0004);
1037 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CP_PADJ_M0, 0x0509);
1038 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CP_IADJ_M0, 0x0F00);
1039 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_FILT_PADJ_M0, 0x0F08);
1040 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x0051);
1041 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002);
1042 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x0036);
1043 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CTRL_M0, 0x0002);
1081 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg;
1094 pll_val = cdns_torrent_dp_read(regmap, PHY_PMA_XCVR_PLLCLK_EN);
1106 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_PLLCLK_EN, pll_val);
1109 ret = regmap_read_poll_timeout(regmap,
1129 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg;
1152 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_POWER_STATE_REQ, value);
1154 ret = regmap_read_poll_timeout(regmap, PHY_PMA_XCVR_POWER_STATE_ACK,
1157 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_POWER_STATE_REQ, 0x00000000);
1168 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg;
1174 ret = regmap_read_poll_timeout(regmap, PHY_PMA_XCVR_PLLCLK_EN_ACK,
1200 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg;
1202 ret = regmap_read_poll_timeout(regmap, PHY_PMA_CMN_READY, reg,
1416 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg;
1417 u32 pwr_state = cdns_torrent_dp_read(regmap,
1419 u32 pll_clk_en = cdns_torrent_dp_read(regmap,
1430 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_POWER_STATE_REQ, pwr_state);
1431 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_PLLCLK_EN, pll_clk_en);
1441 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg;
1448 value = cdns_torrent_dp_read(regmap, PHY_RESET);
1460 cdns_torrent_dp_write(regmap, PHY_RESET, value);
1463 cdns_torrent_dp_write(regmap, PHY_RESET,
1476 cdns_torrent_dp_write(regmap, PHY_RESET, value);
1487 cdns_torrent_dp_write(regmap, PHY_RESET, value);
1497 value = cdns_torrent_dp_read(regmap, PHY_PMA_XCVR_PLLCLK_EN);
1499 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_PLLCLK_EN, value);
1684 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg;
1688 cdns_torrent_dp_write(regmap, PHY_AUX_CTRL, 0x0003); /* enable AUX */
1702 val = cdns_torrent_dp_read(regmap, PHY_RESET);
1705 cdns_torrent_dp_write(regmap, PHY_RESET, val);
1708 val = cdns_torrent_dp_read(regmap, PHY_PMA_XCVR_PLLCLK_EN);
1710 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_PLLCLK_EN, val);
2025 struct regmap *regmap;
2059 regmap = cdns_phy->regmap_common_cdb;
2062 field = devm_regmap_field_alloc(dev, regmap, refclk_out_cmn_cfg[i]);
2085 static struct regmap *cdns_regmap_init(struct device *dev, void __iomem *base,
2107 struct regmap *regmap;
2109 regmap = cdns_phy->regmap_dptx_phy_reg;
2110 field = devm_regmap_field_alloc(dev, regmap, phy_reset_ctrl);
2124 struct regmap *regmap;
2127 regmap = cdns_phy->regmap_phy_pcs_common_cdb;
2128 field = devm_regmap_field_alloc(dev, regmap, phy_pll_cfg);
2135 regmap = cdns_phy->regmap_phy_pcs_common_cdb;
2136 field = devm_regmap_field_alloc(dev, regmap, phy_pipe_cmn_ctrl1_0);
2143 regmap = cdns_phy->regmap_common_cdb;
2144 field = devm_regmap_field_alloc(dev, regmap, cmn_cdiag_refclk_ovrd_4);
2151 regmap = cdns_phy->regmap_phy_pma_common_cdb;
2152 field = devm_regmap_field_alloc(dev, regmap, phy_pma_cmn_ctrl_1);
2159 regmap = cdns_phy->regmap_phy_pma_common_cdb;
2160 field = devm_regmap_field_alloc(dev, regmap, phy_pma_cmn_ctrl_2);
2167 regmap = cdns_phy->regmap_phy_pma_common_cdb;
2168 field = devm_regmap_field_alloc(dev, regmap, phy_pma_pll_raw_ctrl);
2176 regmap = cdns_phy->regmap_phy_pcs_lane_cdb[i];
2177 field = devm_regmap_field_alloc(dev, regmap, phy_pcs_iso_link_ctrl_1);
2192 struct regmap *regmap;
2199 regmap = cdns_regmap_init(dev, base, block_offset,
2202 if (IS_ERR(regmap)) {
2203 dev_err(dev, "Failed to init DPTX PHY regmap\n");
2204 return PTR_ERR(regmap);
2206 cdns_phy->regmap_dptx_phy_reg = regmap;
2216 struct regmap *regmap;
2226 regmap = cdns_regmap_init(dev, sd_base, block_offset,
2229 if (IS_ERR(regmap)) {
2230 dev_err(dev, "Failed to init tx lane CDB regmap\n");
2231 return PTR_ERR(regmap);
2233 cdns_phy->regmap_tx_lane_cdb[i] = regmap;
2237 regmap = cdns_regmap_init(dev, sd_base, block_offset,
2240 if (IS_ERR(regmap)) {
2241 dev_err(dev, "Failed to init rx lane CDB regmap\n");
2242 return PTR_ERR(regmap);
2244 cdns_phy->regmap_rx_lane_cdb[i] = regmap;
2248 regmap = cdns_regmap_init(dev, sd_base, block_offset,
2251 if (IS_ERR(regmap)) {
2252 dev_err(dev, "Failed to init PHY PCS lane CDB regmap\n");
2253 return PTR_ERR(regmap);
2255 cdns_phy->regmap_phy_pcs_lane_cdb[i] = regmap;
2259 regmap = cdns_regmap_init(dev, sd_base, block_offset,
2262 if (IS_ERR(regmap)) {
2263 dev_err(dev, "Failed to init common CDB regmap\n");
2264 return PTR_ERR(regmap);
2266 cdns_phy->regmap_common_cdb = regmap;
2269 regmap = cdns_regmap_init(dev, sd_base, block_offset,
2272 if (IS_ERR(regmap)) {
2273 dev_err(dev, "Failed to init PHY PCS common CDB regmap\n");
2274 return PTR_ERR(regmap);
2276 cdns_phy->regmap_phy_pcs_common_cdb = regmap;
2279 regmap = cdns_regmap_init(dev, sd_base, block_offset,
2282 if (IS_ERR(regmap)) {
2283 dev_err(dev, "Failed to init PHY PMA common CDB regmap\n");
2284 return PTR_ERR(regmap);
2286 cdns_phy->regmap_phy_pma_common_cdb = regmap;
2304 struct regmap *regmap;
2329 regmap = cdns_phy->regmap_common_cdb;
2338 regmap_write(regmap, reg_pairs[i].off,
2350 regmap = cdns_phy->regmap_tx_lane_cdb[i + inst->mlane];
2352 regmap_write(regmap, reg_pairs[j].off,
2365 regmap = cdns_phy->regmap_phy_pcs_common_cdb;
2367 regmap_write(regmap, reg_pairs[i].off,
2379 regmap = cdns_phy->regmap_phy_pma_common_cdb;
2381 regmap_write(regmap, reg_pairs[i].off,
2393 regmap = cdns_phy->regmap_common_cdb;
2395 regmap_write(regmap, reg_pairs[i].off,
2408 regmap = cdns_phy->regmap_tx_lane_cdb[i + inst->mlane];
2410 regmap_write(regmap, reg_pairs[j].off,
2424 regmap = cdns_phy->regmap_rx_lane_cdb[i + inst->mlane];
2426 regmap_write(regmap, reg_pairs[j].off,
2470 struct regmap *regmap;
2514 regmap = cdns_phy->regmap_common_cdb;
2524 regmap_write(regmap, reg_pairs[i].off,
2535 regmap = cdns_phy->regmap_tx_lane_cdb[i + mlane];
2537 regmap_write(regmap, reg_pairs[j].off,
2549 regmap = cdns_phy->regmap_phy_pcs_common_cdb;
2551 regmap_write(regmap, reg_pairs[i].off,
2562 regmap = cdns_phy->regmap_common_cdb;
2564 regmap_write(regmap, reg_pairs[i].off,
2576 regmap = cdns_phy->regmap_tx_lane_cdb[i + mlane];
2578 regmap_write(regmap, reg_pairs[j].off,
2591 regmap = cdns_phy->regmap_rx_lane_cdb[i + mlane];
2593 regmap_write(regmap, reg_pairs[j].off,