Lines Matching refs:regmap
334 struct regmap *regmap; member
335 struct regmap *regmap_common_cdb;
336 struct regmap *regmap_phy_pcs_common_cdb;
337 struct regmap *regmap_phy_pma_common_cdb;
338 struct regmap *regmap_tx_lane_cdb[MAX_NUM_LANES];
339 struct regmap *regmap_rx_lane_cdb[MAX_NUM_LANES];
340 struct regmap *regmap_phy_pcs_lane_cdb[MAX_NUM_LANES];
341 struct regmap *regmap_dptx_phy_reg;
544 static void cdns_torrent_phy_write(struct regmap *regmap, u32 offset, u32 val) in cdns_torrent_phy_write() argument
546 regmap_write(regmap, offset, val); in cdns_torrent_phy_write()
549 static u32 cdns_torrent_phy_read(struct regmap *regmap, u32 offset) in cdns_torrent_phy_read() argument
553 regmap_read(regmap, offset, &val); in cdns_torrent_phy_read()
559 static void cdns_torrent_dp_write(struct regmap *regmap, u32 offset, u32 val) in cdns_torrent_dp_write() argument
561 regmap_write(regmap, offset, val); in cdns_torrent_dp_write()
564 static u32 cdns_torrent_dp_read(struct regmap *regmap, u32 offset) in cdns_torrent_dp_read() argument
568 regmap_read(regmap, offset, &val); in cdns_torrent_dp_read()
662 struct regmap *regmap = cdns_phy->regmap_common_cdb; in cdns_torrent_dp_enable_ssc_19_2mhz() local
664 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, 0x0001); in cdns_torrent_dp_enable_ssc_19_2mhz()
665 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, ctrl2_val); in cdns_torrent_dp_enable_ssc_19_2mhz()
666 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, ctrl3_val); in cdns_torrent_dp_enable_ssc_19_2mhz()
667 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL4_M0, 0x0003); in cdns_torrent_dp_enable_ssc_19_2mhz()
668 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, 0x0001); in cdns_torrent_dp_enable_ssc_19_2mhz()
669 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, ctrl2_val); in cdns_torrent_dp_enable_ssc_19_2mhz()
670 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, ctrl3_val); in cdns_torrent_dp_enable_ssc_19_2mhz()
671 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL4_M0, 0x0003); in cdns_torrent_dp_enable_ssc_19_2mhz()
678 struct regmap *regmap = cdns_phy->regmap_common_cdb; in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz() local
685 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x0119); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
686 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0x4000); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
687 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
688 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x00BC); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
689 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CTRL_M0, 0x0012); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
690 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x0119); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
691 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0x4000); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
692 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
693 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x00BC); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
694 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CTRL_M0, 0x0012); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
702 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x01FA); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
703 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0x4000); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
704 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
705 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x0152); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
706 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CTRL_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
707 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x01FA); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
708 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0x4000); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
709 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
710 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x0152); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
711 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CTRL_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
718 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x01C2); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
719 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0x0000); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
720 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
721 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x012C); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
722 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CTRL_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
723 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x01C2); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
724 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0x0000); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
725 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
726 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x012C); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
727 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CTRL_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
733 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x01A5); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
734 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0xE000); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
735 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
736 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x011A); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
737 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CTRL_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
738 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x01A5); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
739 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0xE000); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
740 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
741 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x011A); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
742 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CTRL_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
749 cdns_torrent_phy_write(regmap, CMN_PLL0_VCOCAL_PLLCNT_START, 0x025E); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
750 cdns_torrent_phy_write(regmap, CMN_PLL0_LOCK_PLLCNT_THR, 0x0005); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
751 cdns_torrent_phy_write(regmap, CMN_PLL1_VCOCAL_PLLCNT_START, 0x025E); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
752 cdns_torrent_phy_write(regmap, CMN_PLL1_LOCK_PLLCNT_THR, 0x0005); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
754 cdns_torrent_phy_write(regmap, CMN_PLL0_VCOCAL_PLLCNT_START, 0x0260); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
755 cdns_torrent_phy_write(regmap, CMN_PLL1_VCOCAL_PLLCNT_START, 0x0260); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
757 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
758 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL2_M0, 0x0000); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
759 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL3_M0, 0x0000); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
760 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL4_M0, 0x0000); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
761 cdns_torrent_phy_write(regmap, CMN_PLL0_LOCK_PLLCNT_THR, 0x0003); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
762 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
763 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL2_M0, 0x0000); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
764 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL3_M0, 0x0000); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
765 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL4_M0, 0x0000); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
766 cdns_torrent_phy_write(regmap, CMN_PLL1_LOCK_PLLCNT_THR, 0x0003); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
769 cdns_torrent_phy_write(regmap, CMN_PLL0_LOCK_REFCNT_START, 0x0099); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
770 cdns_torrent_phy_write(regmap, CMN_PLL0_LOCK_PLLCNT_START, 0x0099); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
771 cdns_torrent_phy_write(regmap, CMN_PLL1_LOCK_REFCNT_START, 0x0099); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
772 cdns_torrent_phy_write(regmap, CMN_PLL1_LOCK_PLLCNT_START, 0x0099); in cdns_torrent_dp_pma_cmn_vco_cfg_19_2mhz()
782 struct regmap *regmap = cdns_phy->regmap_common_cdb; in cdns_torrent_dp_enable_ssc_25mhz() local
784 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, 0x0001); in cdns_torrent_dp_enable_ssc_25mhz()
785 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, ctrl2_val); in cdns_torrent_dp_enable_ssc_25mhz()
786 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, 0x007F); in cdns_torrent_dp_enable_ssc_25mhz()
787 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL4_M0, 0x0003); in cdns_torrent_dp_enable_ssc_25mhz()
788 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, 0x0001); in cdns_torrent_dp_enable_ssc_25mhz()
789 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, ctrl2_val); in cdns_torrent_dp_enable_ssc_25mhz()
790 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, 0x007F); in cdns_torrent_dp_enable_ssc_25mhz()
791 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL4_M0, 0x0003); in cdns_torrent_dp_enable_ssc_25mhz()
798 struct regmap *regmap = cdns_phy->regmap_common_cdb; in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz() local
805 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x01B0); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
806 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0x0000); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
807 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
808 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x0120); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
809 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x01B0); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
810 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0x0000); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
811 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
812 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x0120); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
820 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x0184); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
821 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0xCCCD); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
822 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
823 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x0104); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
824 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x0184); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
825 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0xCCCD); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
826 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
827 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x0104); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
834 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x0159); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
835 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0x999A); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
836 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
837 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x00E7); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
838 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x0159); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
839 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0x999A); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
840 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
841 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x00E7); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
847 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x0144); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
848 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0x0000); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
849 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
850 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x00D8); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
851 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x0144); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
852 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0x0000); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
853 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
854 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x00D8); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
860 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CTRL_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
861 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CTRL_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
864 cdns_torrent_phy_write(regmap, in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
866 cdns_torrent_phy_write(regmap, in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
868 cdns_torrent_phy_write(regmap, in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
870 cdns_torrent_phy_write(regmap, in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
873 cdns_torrent_phy_write(regmap, in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
875 cdns_torrent_phy_write(regmap, in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
878 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
879 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL2_M0, 0x0000); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
880 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL3_M0, 0x0000); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
881 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL4_M0, 0x0000); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
882 cdns_torrent_phy_write(regmap, in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
884 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
885 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL2_M0, 0x0000); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
886 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL3_M0, 0x0000); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
887 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL4_M0, 0x0000); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
888 cdns_torrent_phy_write(regmap, in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
892 cdns_torrent_phy_write(regmap, CMN_PLL0_LOCK_REFCNT_START, 0x00C7); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
893 cdns_torrent_phy_write(regmap, CMN_PLL0_LOCK_PLLCNT_START, 0x00C7); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
894 cdns_torrent_phy_write(regmap, CMN_PLL1_LOCK_REFCNT_START, 0x00C7); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
895 cdns_torrent_phy_write(regmap, CMN_PLL1_LOCK_PLLCNT_START, 0x00C7); in cdns_torrent_dp_pma_cmn_vco_cfg_25mhz()
902 struct regmap *regmap = cdns_phy->regmap_common_cdb; in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz() local
909 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CP_PADJ_M0, 0x0028); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
910 cdns_torrent_phy_write(regmap, CMN_PLL0_DSM_FBH_OVRD_M0, 0x0022); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
911 cdns_torrent_phy_write(regmap, CMN_PLL1_DSM_FBH_OVRD_M0, 0x0022); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
912 cdns_torrent_phy_write(regmap, CMN_PLL1_DSM_FBL_OVRD_M0, 0x000C); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
918 cdns_torrent_phy_write(regmap, CMN_PLL0_DSM_DIAG_M0, 0x0004); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
919 cdns_torrent_phy_write(regmap, CMN_PLL1_DSM_DIAG_M0, 0x0004); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
920 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CP_PADJ_M0, 0x0509); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
921 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CP_PADJ_M0, 0x0509); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
922 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CP_IADJ_M0, 0x0F00); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
923 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CP_IADJ_M0, 0x0F00); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
924 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_FILT_PADJ_M0, 0x0F08); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
925 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_FILT_PADJ_M0, 0x0F08); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
926 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x0061); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
927 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x0061); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
928 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0x3333); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
929 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0x3333); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
930 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
931 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
932 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x0042); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
933 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x0042); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
934 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CTRL_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
935 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CTRL_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
940 cdns_torrent_phy_write(regmap, CMN_PLL0_DSM_DIAG_M0, 0x0004); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
941 cdns_torrent_phy_write(regmap, CMN_PLL1_DSM_DIAG_M0, 0x0004); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
942 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CP_PADJ_M0, 0x0509); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
943 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CP_PADJ_M0, 0x0509); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
944 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CP_IADJ_M0, 0x0F00); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
945 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CP_IADJ_M0, 0x0F00); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
946 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_FILT_PADJ_M0, 0x0F08); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
947 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_FILT_PADJ_M0, 0x0F08); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
948 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x0056); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
949 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x0056); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
950 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0x6666); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
951 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0x6666); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
952 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
953 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
954 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x003A); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
955 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x003A); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
956 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CTRL_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
957 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CTRL_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
961 cdns_torrent_phy_write(regmap, CMN_PLL0_DSM_DIAG_M0, 0x0004); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
962 cdns_torrent_phy_write(regmap, CMN_PLL1_DSM_DIAG_M0, 0x0004); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
963 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CP_PADJ_M0, 0x0509); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
964 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CP_PADJ_M0, 0x0509); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
965 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CP_IADJ_M0, 0x0F00); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
966 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CP_IADJ_M0, 0x0F00); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
967 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_FILT_PADJ_M0, 0x0F08); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
968 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_FILT_PADJ_M0, 0x0F08); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
969 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x0051); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
970 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x0051); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
971 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
972 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
973 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x0036); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
974 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x0036); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
975 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CTRL_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
976 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CTRL_M0, 0x0002); in cdns_torrent_dp_pma_cmn_vco_cfg_100mhz()
990 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg; in cdns_torrent_dp_set_pll_en() local
1023 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_PLLCLK_EN, pll_val); in cdns_torrent_dp_set_pll_en()
1026 ret = regmap_read_poll_timeout(regmap, in cdns_torrent_dp_set_pll_en()
1045 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg; in cdns_torrent_dp_set_power_state() local
1086 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_POWER_STATE_REQ, value); in cdns_torrent_dp_set_power_state()
1088 ret = regmap_read_poll_timeout(regmap, PHY_PMA_XCVR_POWER_STATE_ACK, in cdns_torrent_dp_set_power_state()
1091 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_POWER_STATE_REQ, 0x00000000); in cdns_torrent_dp_set_power_state()
1101 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg; in cdns_torrent_dp_run() local
1107 ret = regmap_read_poll_timeout(regmap, PHY_PMA_XCVR_PLLCLK_EN_ACK, in cdns_torrent_dp_run()
1133 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg; in cdns_torrent_dp_wait_pma_cmn_ready() local
1135 ret = regmap_read_poll_timeout(regmap, PHY_PMA_CMN_READY, reg, in cdns_torrent_dp_wait_pma_cmn_ready()
1307 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg; in cdns_torrent_dp_set_a0_pll() local
1308 u32 pwr_state = cdns_torrent_dp_read(regmap, in cdns_torrent_dp_set_a0_pll()
1310 u32 pll_clk_en = cdns_torrent_dp_read(regmap, in cdns_torrent_dp_set_a0_pll()
1335 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_POWER_STATE_REQ, pwr_state); in cdns_torrent_dp_set_a0_pll()
1336 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_PLLCLK_EN, pll_clk_en); in cdns_torrent_dp_set_a0_pll()
1345 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg; in cdns_torrent_dp_set_lanes() local
1348 value = cdns_torrent_dp_read(regmap, PHY_RESET); in cdns_torrent_dp_set_lanes()
1354 cdns_torrent_dp_write(regmap, PHY_RESET, value); in cdns_torrent_dp_set_lanes()
1357 cdns_torrent_dp_write(regmap, PHY_RESET, in cdns_torrent_dp_set_lanes()
1365 cdns_torrent_dp_write(regmap, PHY_RESET, value); in cdns_torrent_dp_set_lanes()
1371 cdns_torrent_dp_write(regmap, PHY_RESET, value); in cdns_torrent_dp_set_lanes()
1381 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_PLLCLK_EN, 0x0001); in cdns_torrent_dp_set_lanes()
1564 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg; in cdns_torrent_dp_common_init() local
1567 cdns_torrent_dp_write(regmap, PHY_AUX_CTRL, 0x0003); /* enable AUX */ in cdns_torrent_dp_common_init()
1580 cdns_torrent_dp_write(regmap, PHY_RESET, in cdns_torrent_dp_common_init()
1584 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_PLLCLK_EN, 0x0001); in cdns_torrent_dp_common_init()
1877 struct regmap *regmap; in cdns_torrent_refclk_driver_register() local
1911 regmap = cdns_phy->regmap_common_cdb; in cdns_torrent_refclk_driver_register()
1914 field = devm_regmap_field_alloc(dev, regmap, refclk_out_cmn_cfg[i]); in cdns_torrent_refclk_driver_register()
1937 static struct regmap *cdns_regmap_init(struct device *dev, void __iomem *base, in cdns_regmap_init()
1959 struct regmap *regmap; in cdns_torrent_dp_regfield_init() local
1961 regmap = cdns_phy->regmap_dptx_phy_reg; in cdns_torrent_dp_regfield_init()
1962 field = devm_regmap_field_alloc(dev, regmap, phy_reset_ctrl); in cdns_torrent_dp_regfield_init()
1976 struct regmap *regmap; in cdns_torrent_regfield_init() local
1979 regmap = cdns_phy->regmap_phy_pcs_common_cdb; in cdns_torrent_regfield_init()
1980 field = devm_regmap_field_alloc(dev, regmap, phy_pll_cfg); in cdns_torrent_regfield_init()
1987 regmap = cdns_phy->regmap_phy_pcs_common_cdb; in cdns_torrent_regfield_init()
1988 field = devm_regmap_field_alloc(dev, regmap, phy_pipe_cmn_ctrl1_0); in cdns_torrent_regfield_init()
1995 regmap = cdns_phy->regmap_common_cdb; in cdns_torrent_regfield_init()
1996 field = devm_regmap_field_alloc(dev, regmap, cmn_cdiag_refclk_ovrd_4); in cdns_torrent_regfield_init()
2003 regmap = cdns_phy->regmap_phy_pma_common_cdb; in cdns_torrent_regfield_init()
2004 field = devm_regmap_field_alloc(dev, regmap, phy_pma_cmn_ctrl_1); in cdns_torrent_regfield_init()
2011 regmap = cdns_phy->regmap_phy_pma_common_cdb; in cdns_torrent_regfield_init()
2012 field = devm_regmap_field_alloc(dev, regmap, phy_pma_cmn_ctrl_2); in cdns_torrent_regfield_init()
2019 regmap = cdns_phy->regmap_phy_pma_common_cdb; in cdns_torrent_regfield_init()
2020 field = devm_regmap_field_alloc(dev, regmap, phy_pma_pll_raw_ctrl); in cdns_torrent_regfield_init()
2028 regmap = cdns_phy->regmap_phy_pcs_lane_cdb[i]; in cdns_torrent_regfield_init()
2029 field = devm_regmap_field_alloc(dev, regmap, phy_pcs_iso_link_ctrl_1); in cdns_torrent_regfield_init()
2044 struct regmap *regmap; in cdns_torrent_dp_regmap_init() local
2051 regmap = cdns_regmap_init(dev, base, block_offset, in cdns_torrent_dp_regmap_init()
2054 if (IS_ERR(regmap)) { in cdns_torrent_dp_regmap_init()
2056 return PTR_ERR(regmap); in cdns_torrent_dp_regmap_init()
2058 cdns_phy->regmap_dptx_phy_reg = regmap; in cdns_torrent_dp_regmap_init()
2068 struct regmap *regmap; in cdns_torrent_regmap_init() local
2078 regmap = cdns_regmap_init(dev, sd_base, block_offset, in cdns_torrent_regmap_init()
2081 if (IS_ERR(regmap)) { in cdns_torrent_regmap_init()
2083 return PTR_ERR(regmap); in cdns_torrent_regmap_init()
2085 cdns_phy->regmap_tx_lane_cdb[i] = regmap; in cdns_torrent_regmap_init()
2089 regmap = cdns_regmap_init(dev, sd_base, block_offset, in cdns_torrent_regmap_init()
2092 if (IS_ERR(regmap)) { in cdns_torrent_regmap_init()
2094 return PTR_ERR(regmap); in cdns_torrent_regmap_init()
2096 cdns_phy->regmap_rx_lane_cdb[i] = regmap; in cdns_torrent_regmap_init()
2100 regmap = cdns_regmap_init(dev, sd_base, block_offset, in cdns_torrent_regmap_init()
2103 if (IS_ERR(regmap)) { in cdns_torrent_regmap_init()
2105 return PTR_ERR(regmap); in cdns_torrent_regmap_init()
2107 cdns_phy->regmap_phy_pcs_lane_cdb[i] = regmap; in cdns_torrent_regmap_init()
2111 regmap = cdns_regmap_init(dev, sd_base, block_offset, in cdns_torrent_regmap_init()
2114 if (IS_ERR(regmap)) { in cdns_torrent_regmap_init()
2116 return PTR_ERR(regmap); in cdns_torrent_regmap_init()
2118 cdns_phy->regmap_common_cdb = regmap; in cdns_torrent_regmap_init()
2121 regmap = cdns_regmap_init(dev, sd_base, block_offset, in cdns_torrent_regmap_init()
2124 if (IS_ERR(regmap)) { in cdns_torrent_regmap_init()
2126 return PTR_ERR(regmap); in cdns_torrent_regmap_init()
2128 cdns_phy->regmap_phy_pcs_common_cdb = regmap; in cdns_torrent_regmap_init()
2131 regmap = cdns_regmap_init(dev, sd_base, block_offset, in cdns_torrent_regmap_init()
2134 if (IS_ERR(regmap)) { in cdns_torrent_regmap_init()
2136 return PTR_ERR(regmap); in cdns_torrent_regmap_init()
2138 cdns_phy->regmap_phy_pma_common_cdb = regmap; in cdns_torrent_regmap_init()
2155 struct regmap *regmap; in cdns_torrent_phy_init() local
2174 regmap = cdns_phy->regmap_common_cdb; in cdns_torrent_phy_init()
2183 regmap_write(regmap, reg_pairs[i].off, in cdns_torrent_phy_init()
2192 regmap = cdns_phy->regmap_tx_lane_cdb[i + inst->mlane]; in cdns_torrent_phy_init()
2194 regmap_write(regmap, reg_pairs[j].off, in cdns_torrent_phy_init()
2204 regmap = cdns_phy->regmap_phy_pcs_common_cdb; in cdns_torrent_phy_init()
2206 regmap_write(regmap, reg_pairs[i].off, in cdns_torrent_phy_init()
2215 regmap = cdns_phy->regmap_common_cdb; in cdns_torrent_phy_init()
2217 regmap_write(regmap, reg_pairs[i].off, in cdns_torrent_phy_init()
2227 regmap = cdns_phy->regmap_tx_lane_cdb[i + inst->mlane]; in cdns_torrent_phy_init()
2229 regmap_write(regmap, reg_pairs[j].off, in cdns_torrent_phy_init()
2240 regmap = cdns_phy->regmap_rx_lane_cdb[i + inst->mlane]; in cdns_torrent_phy_init()
2242 regmap_write(regmap, reg_pairs[j].off, in cdns_torrent_phy_init()
2286 struct regmap *regmap; in cdns_torrent_phy_configure_multilink() local
2330 regmap = cdns_phy->regmap_common_cdb; in cdns_torrent_phy_configure_multilink()
2340 regmap_write(regmap, reg_pairs[i].off, in cdns_torrent_phy_configure_multilink()
2349 regmap = cdns_phy->regmap_tx_lane_cdb[i + mlane]; in cdns_torrent_phy_configure_multilink()
2351 regmap_write(regmap, reg_pairs[j].off, in cdns_torrent_phy_configure_multilink()
2361 regmap = cdns_phy->regmap_phy_pcs_common_cdb; in cdns_torrent_phy_configure_multilink()
2363 regmap_write(regmap, reg_pairs[i].off, in cdns_torrent_phy_configure_multilink()
2372 regmap = cdns_phy->regmap_common_cdb; in cdns_torrent_phy_configure_multilink()
2374 regmap_write(regmap, reg_pairs[i].off, in cdns_torrent_phy_configure_multilink()
2384 regmap = cdns_phy->regmap_tx_lane_cdb[i + mlane]; in cdns_torrent_phy_configure_multilink()
2386 regmap_write(regmap, reg_pairs[j].off, in cdns_torrent_phy_configure_multilink()
2397 regmap = cdns_phy->regmap_rx_lane_cdb[i + mlane]; in cdns_torrent_phy_configure_multilink()
2399 regmap_write(regmap, reg_pairs[j].off, in cdns_torrent_phy_configure_multilink()