Lines Matching refs:padctl

432 to_tegra210_xusb_padctl(struct tegra_xusb_padctl *padctl)  in to_tegra210_xusb_padctl()  argument
434 return container_of(padctl, struct tegra210_xusb_padctl, base); in to_tegra210_xusb_padctl()
454 dev_dbg(lane->pad->padctl->dev, "lane = %s map to port = usb3-%d\n", in tegra210_usb3_lane_map()
464 static int tegra210_pex_uphy_enable(struct tegra_xusb_padctl *padctl) in tegra210_pex_uphy_enable() argument
466 struct tegra_xusb_pcie_pad *pcie = to_pcie_pad(padctl->pcie); in tegra210_pex_uphy_enable()
486 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL2); in tegra210_pex_uphy_enable()
491 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL2); in tegra210_pex_uphy_enable()
493 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL5); in tegra210_pex_uphy_enable()
498 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL5); in tegra210_pex_uphy_enable()
500 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL1); in tegra210_pex_uphy_enable()
502 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL1); in tegra210_pex_uphy_enable()
504 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL2); in tegra210_pex_uphy_enable()
506 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL2); in tegra210_pex_uphy_enable()
508 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL8); in tegra210_pex_uphy_enable()
510 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL8); in tegra210_pex_uphy_enable()
512 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL4); in tegra210_pex_uphy_enable()
520 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL4); in tegra210_pex_uphy_enable()
522 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL1); in tegra210_pex_uphy_enable()
529 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL1); in tegra210_pex_uphy_enable()
531 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL1); in tegra210_pex_uphy_enable()
533 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL1); in tegra210_pex_uphy_enable()
535 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL1); in tegra210_pex_uphy_enable()
538 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL1); in tegra210_pex_uphy_enable()
542 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL4); in tegra210_pex_uphy_enable()
544 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL4); in tegra210_pex_uphy_enable()
546 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL2); in tegra210_pex_uphy_enable()
548 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL2); in tegra210_pex_uphy_enable()
553 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL2); in tegra210_pex_uphy_enable()
565 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL2); in tegra210_pex_uphy_enable()
567 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL2); in tegra210_pex_uphy_enable()
572 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL2); in tegra210_pex_uphy_enable()
584 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL1); in tegra210_pex_uphy_enable()
586 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL1); in tegra210_pex_uphy_enable()
591 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL1); in tegra210_pex_uphy_enable()
603 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL8); in tegra210_pex_uphy_enable()
606 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL8); in tegra210_pex_uphy_enable()
611 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL8); in tegra210_pex_uphy_enable()
623 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL8); in tegra210_pex_uphy_enable()
625 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL8); in tegra210_pex_uphy_enable()
630 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL8); in tegra210_pex_uphy_enable()
642 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL8); in tegra210_pex_uphy_enable()
644 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL8); in tegra210_pex_uphy_enable()
648 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL1); in tegra210_pex_uphy_enable()
650 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL1); in tegra210_pex_uphy_enable()
652 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL2); in tegra210_pex_uphy_enable()
654 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL2); in tegra210_pex_uphy_enable()
656 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL8); in tegra210_pex_uphy_enable()
658 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL8); in tegra210_pex_uphy_enable()
667 for (i = 0; i < padctl->pcie->soc->num_lanes; i++) { in tegra210_pex_uphy_enable()
668 value = padctl_readl(padctl, XUSB_PADCTL_USB3_PAD_MUX); in tegra210_pex_uphy_enable()
670 padctl_writel(padctl, value, XUSB_PADCTL_USB3_PAD_MUX); in tegra210_pex_uphy_enable()
682 static void tegra210_pex_uphy_disable(struct tegra_xusb_padctl *padctl) in tegra210_pex_uphy_disable() argument
684 struct tegra_xusb_pcie_pad *pcie = to_pcie_pad(padctl->pcie); in tegra210_pex_uphy_disable()
693 for (i = 0; i < padctl->pcie->soc->num_lanes; i++) { in tegra210_pex_uphy_disable()
694 value = padctl_readl(padctl, XUSB_PADCTL_USB3_PAD_MUX); in tegra210_pex_uphy_disable()
696 padctl_writel(padctl, value, XUSB_PADCTL_USB3_PAD_MUX); in tegra210_pex_uphy_disable()
703 static int tegra210_sata_uphy_enable(struct tegra_xusb_padctl *padctl) in tegra210_sata_uphy_enable() argument
705 struct tegra_xusb_sata_pad *sata = to_sata_pad(padctl->sata); in tegra210_sata_uphy_enable()
706 struct tegra_xusb_lane *lane = tegra_xusb_find_lane(padctl, "sata", 0); in tegra210_sata_uphy_enable()
732 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL2); in tegra210_sata_uphy_enable()
737 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL2); in tegra210_sata_uphy_enable()
739 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL5); in tegra210_sata_uphy_enable()
744 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL5); in tegra210_sata_uphy_enable()
746 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL1); in tegra210_sata_uphy_enable()
748 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL1); in tegra210_sata_uphy_enable()
750 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL2); in tegra210_sata_uphy_enable()
752 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL2); in tegra210_sata_uphy_enable()
754 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL8); in tegra210_sata_uphy_enable()
756 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL8); in tegra210_sata_uphy_enable()
758 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL4); in tegra210_sata_uphy_enable()
773 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL4); in tegra210_sata_uphy_enable()
775 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL1); in tegra210_sata_uphy_enable()
788 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL1); in tegra210_sata_uphy_enable()
790 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL1); in tegra210_sata_uphy_enable()
792 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL1); in tegra210_sata_uphy_enable()
794 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL1); in tegra210_sata_uphy_enable()
797 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL1); in tegra210_sata_uphy_enable()
801 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL4); in tegra210_sata_uphy_enable()
803 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL4); in tegra210_sata_uphy_enable()
805 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL2); in tegra210_sata_uphy_enable()
807 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL2); in tegra210_sata_uphy_enable()
812 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL2); in tegra210_sata_uphy_enable()
824 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL2); in tegra210_sata_uphy_enable()
826 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL2); in tegra210_sata_uphy_enable()
831 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL2); in tegra210_sata_uphy_enable()
843 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL1); in tegra210_sata_uphy_enable()
845 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL1); in tegra210_sata_uphy_enable()
850 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL1); in tegra210_sata_uphy_enable()
862 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL8); in tegra210_sata_uphy_enable()
865 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL8); in tegra210_sata_uphy_enable()
870 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL8); in tegra210_sata_uphy_enable()
882 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL8); in tegra210_sata_uphy_enable()
884 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL8); in tegra210_sata_uphy_enable()
889 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL8); in tegra210_sata_uphy_enable()
901 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL8); in tegra210_sata_uphy_enable()
903 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL8); in tegra210_sata_uphy_enable()
907 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL1); in tegra210_sata_uphy_enable()
909 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL1); in tegra210_sata_uphy_enable()
911 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL2); in tegra210_sata_uphy_enable()
913 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL2); in tegra210_sata_uphy_enable()
915 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_S0_CTL8); in tegra210_sata_uphy_enable()
917 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_S0_CTL8); in tegra210_sata_uphy_enable()
926 for (i = 0; i < padctl->sata->soc->num_lanes; i++) { in tegra210_sata_uphy_enable()
927 value = padctl_readl(padctl, XUSB_PADCTL_USB3_PAD_MUX); in tegra210_sata_uphy_enable()
929 padctl_writel(padctl, value, XUSB_PADCTL_USB3_PAD_MUX); in tegra210_sata_uphy_enable()
941 static void tegra210_sata_uphy_disable(struct tegra_xusb_padctl *padctl) in tegra210_sata_uphy_disable() argument
943 struct tegra_xusb_sata_pad *sata = to_sata_pad(padctl->sata); in tegra210_sata_uphy_disable()
952 for (i = 0; i < padctl->sata->soc->num_lanes; i++) { in tegra210_sata_uphy_disable()
953 value = padctl_readl(padctl, XUSB_PADCTL_USB3_PAD_MUX); in tegra210_sata_uphy_disable()
955 padctl_writel(padctl, value, XUSB_PADCTL_USB3_PAD_MUX); in tegra210_sata_uphy_disable()
961 static void tegra210_aux_mux_lp0_clamp_disable(struct tegra_xusb_padctl *padctl) in tegra210_aux_mux_lp0_clamp_disable() argument
965 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_aux_mux_lp0_clamp_disable()
967 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_aux_mux_lp0_clamp_disable()
971 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_aux_mux_lp0_clamp_disable()
973 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_aux_mux_lp0_clamp_disable()
977 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_aux_mux_lp0_clamp_disable()
979 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_aux_mux_lp0_clamp_disable()
982 static void tegra210_aux_mux_lp0_clamp_enable(struct tegra_xusb_padctl *padctl) in tegra210_aux_mux_lp0_clamp_enable() argument
986 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_aux_mux_lp0_clamp_enable()
988 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_aux_mux_lp0_clamp_enable()
992 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_aux_mux_lp0_clamp_enable()
994 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_aux_mux_lp0_clamp_enable()
998 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_aux_mux_lp0_clamp_enable()
1000 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_aux_mux_lp0_clamp_enable()
1003 static int tegra210_uphy_init(struct tegra_xusb_padctl *padctl) in tegra210_uphy_init() argument
1005 if (padctl->pcie) in tegra210_uphy_init()
1006 tegra210_pex_uphy_enable(padctl); in tegra210_uphy_init()
1008 if (padctl->sata) in tegra210_uphy_init()
1009 tegra210_sata_uphy_enable(padctl); in tegra210_uphy_init()
1014 dev_dbg(padctl->dev, "PLLE is already in HW control\n"); in tegra210_uphy_init()
1016 tegra210_aux_mux_lp0_clamp_disable(padctl); in tegra210_uphy_init()
1022 tegra210_uphy_deinit(struct tegra_xusb_padctl *padctl) in tegra210_uphy_deinit() argument
1024 tegra210_aux_mux_lp0_clamp_enable(padctl); in tegra210_uphy_deinit()
1026 if (padctl->sata) in tegra210_uphy_deinit()
1027 tegra210_sata_uphy_disable(padctl); in tegra210_uphy_deinit()
1029 if (padctl->pcie) in tegra210_uphy_deinit()
1030 tegra210_pex_uphy_disable(padctl); in tegra210_uphy_deinit()
1033 static int tegra210_hsic_set_idle(struct tegra_xusb_padctl *padctl, in tegra210_hsic_set_idle() argument
1038 value = padctl_readl(padctl, XUSB_PADCTL_HSIC_PADX_CTL0(index)); in tegra210_hsic_set_idle()
1053 padctl_writel(padctl, value, XUSB_PADCTL_HSIC_PADX_CTL0(index)); in tegra210_hsic_set_idle()
1061 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb3_enable_phy_sleepwalk() local
1063 struct device *dev = padctl->dev; in tegra210_usb3_enable_phy_sleepwalk()
1071 mutex_lock(&padctl->lock); in tegra210_usb3_enable_phy_sleepwalk()
1073 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_enable_phy_sleepwalk()
1075 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_enable_phy_sleepwalk()
1079 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_enable_phy_sleepwalk()
1081 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_enable_phy_sleepwalk()
1085 mutex_unlock(&padctl->lock); in tegra210_usb3_enable_phy_sleepwalk()
1092 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb3_disable_phy_sleepwalk() local
1094 struct device *dev = padctl->dev; in tegra210_usb3_disable_phy_sleepwalk()
1102 mutex_lock(&padctl->lock); in tegra210_usb3_disable_phy_sleepwalk()
1104 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_disable_phy_sleepwalk()
1106 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_disable_phy_sleepwalk()
1110 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_disable_phy_sleepwalk()
1112 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_disable_phy_sleepwalk()
1114 mutex_unlock(&padctl->lock); in tegra210_usb3_disable_phy_sleepwalk()
1121 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb3_enable_phy_wake() local
1123 struct device *dev = padctl->dev; in tegra210_usb3_enable_phy_wake()
1131 mutex_lock(&padctl->lock); in tegra210_usb3_enable_phy_wake()
1133 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_usb3_enable_phy_wake()
1136 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_usb3_enable_phy_wake()
1140 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_usb3_enable_phy_wake()
1143 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_usb3_enable_phy_wake()
1145 mutex_unlock(&padctl->lock); in tegra210_usb3_enable_phy_wake()
1152 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb3_disable_phy_wake() local
1154 struct device *dev = padctl->dev; in tegra210_usb3_disable_phy_wake()
1162 mutex_lock(&padctl->lock); in tegra210_usb3_disable_phy_wake()
1164 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_usb3_disable_phy_wake()
1167 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_usb3_disable_phy_wake()
1171 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_usb3_disable_phy_wake()
1174 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_usb3_disable_phy_wake()
1176 mutex_unlock(&padctl->lock); in tegra210_usb3_disable_phy_wake()
1183 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb3_phy_remote_wake_detected() local
1190 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_usb3_phy_remote_wake_detected()
1199 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_utmi_enable_phy_wake() local
1203 mutex_lock(&padctl->lock); in tegra210_utmi_enable_phy_wake()
1205 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_utmi_enable_phy_wake()
1208 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_utmi_enable_phy_wake()
1212 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_utmi_enable_phy_wake()
1215 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_utmi_enable_phy_wake()
1217 mutex_unlock(&padctl->lock); in tegra210_utmi_enable_phy_wake()
1224 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_utmi_disable_phy_wake() local
1228 mutex_lock(&padctl->lock); in tegra210_utmi_disable_phy_wake()
1230 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_utmi_disable_phy_wake()
1233 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_utmi_disable_phy_wake()
1237 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_utmi_disable_phy_wake()
1240 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_utmi_disable_phy_wake()
1242 mutex_unlock(&padctl->lock); in tegra210_utmi_disable_phy_wake()
1249 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_utmi_phy_remote_wake_detected() local
1253 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_utmi_phy_remote_wake_detected()
1263 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_hsic_enable_phy_wake() local
1267 mutex_lock(&padctl->lock); in tegra210_hsic_enable_phy_wake()
1269 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_hsic_enable_phy_wake()
1272 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_hsic_enable_phy_wake()
1276 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_hsic_enable_phy_wake()
1279 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_hsic_enable_phy_wake()
1281 mutex_unlock(&padctl->lock); in tegra210_hsic_enable_phy_wake()
1288 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_hsic_disable_phy_wake() local
1292 mutex_lock(&padctl->lock); in tegra210_hsic_disable_phy_wake()
1294 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_hsic_disable_phy_wake()
1297 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_hsic_disable_phy_wake()
1301 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_hsic_disable_phy_wake()
1304 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_hsic_disable_phy_wake()
1306 mutex_unlock(&padctl->lock); in tegra210_hsic_disable_phy_wake()
1313 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_hsic_phy_remote_wake_detected() local
1317 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_0); in tegra210_hsic_phy_remote_wake_detected()
1338 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_pmc_utmi_enable_phy_sleepwalk() local
1339 struct tegra210_xusb_padctl *priv = to_tegra210_xusb_padctl(padctl); in tegra210_pmc_utmi_enable_phy_sleepwalk()
1349 value = padctl_readl(padctl, XUSB_PADCTL_USB2_BIAS_PAD_CTL1); in tegra210_pmc_utmi_enable_phy_sleepwalk()
1353 value = padctl_readl(padctl, XUSB_PADCTL_USB2_OTG_PADX_CTL1(port)); in tegra210_pmc_utmi_enable_phy_sleepwalk()
1510 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_pmc_utmi_disable_phy_sleepwalk() local
1511 struct tegra210_xusb_padctl *priv = to_tegra210_xusb_padctl(padctl); in tegra210_pmc_utmi_disable_phy_sleepwalk()
1559 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_pmc_hsic_enable_phy_sleepwalk() local
1560 struct tegra210_xusb_padctl *priv = to_tegra210_xusb_padctl(padctl); in tegra210_pmc_hsic_enable_phy_sleepwalk()
1660 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_pmc_hsic_disable_phy_sleepwalk() local
1661 struct tegra210_xusb_padctl *priv = to_tegra210_xusb_padctl(padctl); in tegra210_pmc_hsic_disable_phy_sleepwalk()
1695 static int tegra210_usb3_set_lfps_detect(struct tegra_xusb_padctl *padctl, in tegra210_usb3_set_lfps_detect() argument
1702 port = tegra_xusb_find_port(padctl, "usb3", index); in tegra210_usb3_set_lfps_detect()
1708 if (lane->pad == padctl->pcie) in tegra210_usb3_set_lfps_detect()
1713 value = padctl_readl(padctl, offset); in tegra210_usb3_set_lfps_detect()
1727 padctl_writel(padctl, value, offset); in tegra210_usb3_set_lfps_detect()
1801 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb2_phy_init() local
1807 port = tegra_xusb_find_usb2_port(padctl, index); in tegra210_usb2_phy_init()
1819 mutex_lock(&padctl->lock); in tegra210_usb2_phy_init()
1821 value = padctl_readl(padctl, XUSB_PADCTL_USB2_PAD_MUX); in tegra210_usb2_phy_init()
1826 padctl_writel(padctl, value, XUSB_PADCTL_USB2_PAD_MUX); in tegra210_usb2_phy_init()
1828 mutex_unlock(&padctl->lock); in tegra210_usb2_phy_init()
1836 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb2_phy_exit() local
1840 port = tegra_xusb_find_usb2_port(padctl, lane->index); in tegra210_usb2_phy_exit()
1855 static int tegra210_xusb_padctl_vbus_override(struct tegra_xusb_padctl *padctl, in tegra210_xusb_padctl_vbus_override() argument
1860 dev_dbg(padctl->dev, "%s vbus override\n", status ? "set" : "clear"); in tegra210_xusb_padctl_vbus_override()
1862 value = padctl_readl(padctl, XUSB_PADCTL_USB2_VBUS_ID); in tegra210_xusb_padctl_vbus_override()
1874 padctl_writel(padctl, value, XUSB_PADCTL_USB2_VBUS_ID); in tegra210_xusb_padctl_vbus_override()
1879 static int tegra210_xusb_padctl_id_override(struct tegra_xusb_padctl *padctl, in tegra210_xusb_padctl_id_override() argument
1884 dev_dbg(padctl->dev, "%s id override\n", status ? "set" : "clear"); in tegra210_xusb_padctl_id_override()
1886 value = padctl_readl(padctl, XUSB_PADCTL_USB2_VBUS_ID); in tegra210_xusb_padctl_id_override()
1891 padctl_writel(padctl, value, XUSB_PADCTL_USB2_VBUS_ID); in tegra210_xusb_padctl_id_override()
1894 value = padctl_readl(padctl, XUSB_PADCTL_USB2_VBUS_ID); in tegra210_xusb_padctl_id_override()
1908 padctl_writel(padctl, value, XUSB_PADCTL_USB2_VBUS_ID); in tegra210_xusb_padctl_id_override()
1917 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb2_phy_set_mode() local
1918 struct tegra_xusb_usb2_port *port = tegra_xusb_find_usb2_port(padctl, in tegra210_usb2_phy_set_mode()
1922 mutex_lock(&padctl->lock); in tegra210_usb2_phy_set_mode()
1928 tegra210_xusb_padctl_id_override(padctl, true); in tegra210_usb2_phy_set_mode()
1932 tegra210_xusb_padctl_vbus_override(padctl, true); in tegra210_usb2_phy_set_mode()
1942 tegra210_xusb_padctl_id_override(padctl, false); in tegra210_usb2_phy_set_mode()
1943 tegra210_xusb_padctl_vbus_override(padctl, false); in tegra210_usb2_phy_set_mode()
1947 mutex_unlock(&padctl->lock); in tegra210_usb2_phy_set_mode()
1957 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb2_phy_power_on() local
1964 port = tegra_xusb_find_usb2_port(padctl, index); in tegra210_usb2_phy_power_on()
1970 priv = to_tegra210_xusb_padctl(padctl); in tegra210_usb2_phy_power_on()
1972 mutex_lock(&padctl->lock); in tegra210_usb2_phy_power_on()
1975 value = padctl_readl(padctl, XUSB_PADCTL_SS_PORT_MAP); in tegra210_usb2_phy_power_on()
1980 padctl_writel(padctl, value, XUSB_PADCTL_SS_PORT_MAP); in tegra210_usb2_phy_power_on()
1982 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb2_phy_power_on()
1985 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb2_phy_power_on()
1989 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb2_phy_power_on()
1992 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb2_phy_power_on()
1996 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb2_phy_power_on()
1999 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb2_phy_power_on()
2002 value = padctl_readl(padctl, XUSB_PADCTL_USB2_BIAS_PAD_CTL0); in tegra210_usb2_phy_power_on()
2015 padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL0); in tegra210_usb2_phy_power_on()
2017 value = padctl_readl(padctl, XUSB_PADCTL_USB2_PORT_CAP); in tegra210_usb2_phy_power_on()
2027 padctl_writel(padctl, value, XUSB_PADCTL_USB2_PORT_CAP); in tegra210_usb2_phy_power_on()
2029 value = padctl_readl(padctl, XUSB_PADCTL_USB2_OTG_PADX_CTL0(index)); in tegra210_usb2_phy_power_on()
2038 padctl_writel(padctl, value, XUSB_PADCTL_USB2_OTG_PADX_CTL0(index)); in tegra210_usb2_phy_power_on()
2040 value = padctl_readl(padctl, XUSB_PADCTL_USB2_OTG_PADX_CTL1(index)); in tegra210_usb2_phy_power_on()
2052 padctl_writel(padctl, value, XUSB_PADCTL_USB2_OTG_PADX_CTL1(index)); in tegra210_usb2_phy_power_on()
2054 value = padctl_readl(padctl, in tegra210_usb2_phy_power_on()
2064 padctl_writel(padctl, value, in tegra210_usb2_phy_power_on()
2069 mutex_unlock(&padctl->lock); in tegra210_usb2_phy_power_on()
2077 value = padctl_readl(padctl, XUSB_PADCTL_USB2_BIAS_PAD_CTL1); in tegra210_usb2_phy_power_on()
2086 padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL1); in tegra210_usb2_phy_power_on()
2088 value = padctl_readl(padctl, XUSB_PADCTL_USB2_BIAS_PAD_CTL0); in tegra210_usb2_phy_power_on()
2090 padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL0); in tegra210_usb2_phy_power_on()
2094 value = padctl_readl(padctl, XUSB_PADCTL_USB2_BIAS_PAD_CTL1); in tegra210_usb2_phy_power_on()
2096 padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL1); in tegra210_usb2_phy_power_on()
2103 mutex_unlock(&padctl->lock); in tegra210_usb2_phy_power_on()
2108 mutex_unlock(&padctl->lock); in tegra210_usb2_phy_power_on()
2116 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb2_phy_power_off() local
2120 port = tegra_xusb_find_usb2_port(padctl, lane->index); in tegra210_usb2_phy_power_off()
2127 mutex_lock(&padctl->lock); in tegra210_usb2_phy_power_off()
2130 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb2_phy_power_off()
2133 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb2_phy_power_off()
2137 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb2_phy_power_off()
2140 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb2_phy_power_off()
2144 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb2_phy_power_off()
2147 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb2_phy_power_off()
2149 value = padctl_readl(padctl, XUSB_PADCTL_SS_PORT_MAP); in tegra210_usb2_phy_power_off()
2152 padctl_writel(padctl, value, XUSB_PADCTL_SS_PORT_MAP); in tegra210_usb2_phy_power_off()
2161 value = padctl_readl(padctl, XUSB_PADCTL_USB2_BIAS_PAD_CTL0); in tegra210_usb2_phy_power_off()
2163 padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL0); in tegra210_usb2_phy_power_off()
2166 mutex_unlock(&padctl->lock); in tegra210_usb2_phy_power_off()
2180 tegra210_usb2_pad_probe(struct tegra_xusb_padctl *padctl, in tegra210_usb2_pad_probe() argument
2196 err = tegra_xusb_pad_init(pad, padctl, np); in tegra210_usb2_pad_probe()
2297 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_hsic_phy_init() local
2300 value = padctl_readl(padctl, XUSB_PADCTL_USB2_PAD_MUX); in tegra210_hsic_phy_init()
2305 padctl_writel(padctl, value, XUSB_PADCTL_USB2_PAD_MUX); in tegra210_hsic_phy_init()
2320 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_hsic_phy_power_on() local
2329 padctl_writel(padctl, hsic->strobe_trim, in tegra210_hsic_phy_power_on()
2332 value = padctl_readl(padctl, XUSB_PADCTL_HSIC_PADX_CTL1(index)); in tegra210_hsic_phy_power_on()
2337 padctl_writel(padctl, value, XUSB_PADCTL_HSIC_PADX_CTL1(index)); in tegra210_hsic_phy_power_on()
2339 value = padctl_readl(padctl, XUSB_PADCTL_HSIC_PADX_CTL2(index)); in tegra210_hsic_phy_power_on()
2348 padctl_writel(padctl, value, XUSB_PADCTL_HSIC_PADX_CTL2(index)); in tegra210_hsic_phy_power_on()
2350 value = padctl_readl(padctl, XUSB_PADCTL_HSIC_PADX_CTL0(index)); in tegra210_hsic_phy_power_on()
2366 padctl_writel(padctl, value, XUSB_PADCTL_HSIC_PADX_CTL0(index)); in tegra210_hsic_phy_power_on()
2372 value = padctl_readl(padctl, XUSB_PADCTL_HSIC_PAD_TRK_CTL); in tegra210_hsic_phy_power_on()
2381 padctl_writel(padctl, value, XUSB_PADCTL_HSIC_PAD_TRK_CTL); in tegra210_hsic_phy_power_on()
2385 value = padctl_readl(padctl, XUSB_PADCTL_HSIC_PAD_TRK_CTL); in tegra210_hsic_phy_power_on()
2387 padctl_writel(padctl, value, XUSB_PADCTL_HSIC_PAD_TRK_CTL); in tegra210_hsic_phy_power_on()
2404 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_hsic_phy_power_off() local
2408 value = padctl_readl(padctl, XUSB_PADCTL_HSIC_PADX_CTL0(index)); in tegra210_hsic_phy_power_off()
2418 padctl_writel(padctl, value, XUSB_PADCTL_HSIC_PADX_CTL1(index)); in tegra210_hsic_phy_power_off()
2434 tegra210_hsic_pad_probe(struct tegra_xusb_padctl *padctl, in tegra210_hsic_pad_probe() argument
2450 err = tegra_xusb_pad_init(pad, padctl, np); in tegra210_hsic_pad_probe()
2498 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_uphy_lane_iddq_enable() local
2501 value = padctl_readl(padctl, lane->soc->regs.misc_ctl2); in tegra210_uphy_lane_iddq_enable()
2512 padctl_writel(padctl, value, lane->soc->regs.misc_ctl2); in tegra210_uphy_lane_iddq_enable()
2517 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_uphy_lane_iddq_disable() local
2520 value = padctl_readl(padctl, lane->soc->regs.misc_ctl2); in tegra210_uphy_lane_iddq_disable()
2531 padctl_writel(padctl, value, lane->soc->regs.misc_ctl2); in tegra210_uphy_lane_iddq_disable()
2567 if (!lane || !lane->pad || !lane->pad->padctl) in tegra210_lane_to_usb3_port()
2574 return tegra_xusb_find_usb3_port(lane->pad->padctl, port); in tegra210_lane_to_usb3_port()
2581 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb3_phy_power_on() local
2593 value = padctl_readl(padctl, XUSB_PADCTL_SS_PORT_MAP); in tegra210_usb3_phy_power_on()
2602 padctl_writel(padctl, value, XUSB_PADCTL_SS_PORT_MAP); in tegra210_usb3_phy_power_on()
2604 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_USB3_PADX_ECTL1(index)); in tegra210_usb3_phy_power_on()
2609 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_USB3_PADX_ECTL1(index)); in tegra210_usb3_phy_power_on()
2611 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_USB3_PADX_ECTL2(index)); in tegra210_usb3_phy_power_on()
2616 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_USB3_PADX_ECTL2(index)); in tegra210_usb3_phy_power_on()
2618 padctl_writel(padctl, XUSB_PADCTL_UPHY_USB3_PAD_ECTL3_RX_DFE_VAL, in tegra210_usb3_phy_power_on()
2621 value = padctl_readl(padctl, XUSB_PADCTL_UPHY_USB3_PADX_ECTL4(index)); in tegra210_usb3_phy_power_on()
2626 padctl_writel(padctl, value, XUSB_PADCTL_UPHY_USB3_PADX_ECTL4(index)); in tegra210_usb3_phy_power_on()
2628 padctl_writel(padctl, XUSB_PADCTL_UPHY_USB3_PAD_ECTL6_RX_EQ_CTRL_H_VAL, in tegra210_usb3_phy_power_on()
2631 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_phy_power_on()
2633 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_phy_power_on()
2637 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_phy_power_on()
2639 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_phy_power_on()
2643 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_phy_power_on()
2645 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_phy_power_on()
2654 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_usb3_phy_power_off() local
2666 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_phy_power_off()
2668 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_phy_power_off()
2672 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_phy_power_off()
2674 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_phy_power_off()
2678 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_phy_power_off()
2680 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM1); in tegra210_usb3_phy_power_off()
2732 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_pcie_phy_init() local
2734 mutex_lock(&padctl->lock); in tegra210_pcie_phy_init()
2736 tegra210_uphy_init(padctl); in tegra210_pcie_phy_init()
2738 mutex_unlock(&padctl->lock); in tegra210_pcie_phy_init()
2746 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_pcie_phy_power_on() local
2749 mutex_lock(&padctl->lock); in tegra210_pcie_phy_power_on()
2754 mutex_unlock(&padctl->lock); in tegra210_pcie_phy_power_on()
2761 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_pcie_phy_power_off() local
2764 mutex_lock(&padctl->lock); in tegra210_pcie_phy_power_off()
2769 mutex_unlock(&padctl->lock); in tegra210_pcie_phy_power_off()
2781 tegra210_pcie_pad_probe(struct tegra_xusb_padctl *padctl, in tegra210_pcie_pad_probe() argument
2797 err = tegra_xusb_pad_init(pad, padctl, np); in tegra210_pcie_pad_probe()
2902 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_sata_phy_init() local
2904 mutex_lock(&padctl->lock); in tegra210_sata_phy_init()
2906 tegra210_uphy_init(padctl); in tegra210_sata_phy_init()
2908 mutex_unlock(&padctl->lock); in tegra210_sata_phy_init()
2915 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_sata_phy_power_on() local
2918 mutex_lock(&padctl->lock); in tegra210_sata_phy_power_on()
2923 mutex_unlock(&padctl->lock); in tegra210_sata_phy_power_on()
2930 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra210_sata_phy_power_off() local
2933 mutex_lock(&padctl->lock); in tegra210_sata_phy_power_off()
2938 mutex_unlock(&padctl->lock); in tegra210_sata_phy_power_off()
2950 tegra210_sata_pad_probe(struct tegra_xusb_padctl *padctl, in tegra210_sata_pad_probe() argument
2966 err = tegra_xusb_pad_init(pad, padctl, np); in tegra210_sata_pad_probe()
3031 return tegra_xusb_find_lane(port->padctl, "usb2", port->index); in tegra210_usb2_port_map()
3054 return tegra_xusb_find_lane(port->padctl, "hsic", port->index); in tegra210_hsic_port_map()
3089 struct tegra_xusb_padctl *padctl; in tegra210_utmi_port_reset() local
3094 padctl = lane->pad->padctl; in tegra210_utmi_port_reset()
3096 value = padctl_readl(padctl, in tegra210_utmi_port_reset()
3101 tegra210_xusb_padctl_vbus_override(padctl, false); in tegra210_utmi_port_reset()
3102 tegra210_xusb_padctl_vbus_override(padctl, true); in tegra210_utmi_port_reset()
3145 struct tegra210_xusb_padctl *padctl; in tegra210_xusb_padctl_probe() local
3150 padctl = devm_kzalloc(dev, sizeof(*padctl), GFP_KERNEL); in tegra210_xusb_padctl_probe()
3151 if (!padctl) in tegra210_xusb_padctl_probe()
3154 padctl->base.dev = dev; in tegra210_xusb_padctl_probe()
3155 padctl->base.soc = soc; in tegra210_xusb_padctl_probe()
3157 err = tegra210_xusb_read_fuse_calibration(&padctl->fuse); in tegra210_xusb_padctl_probe()
3176 padctl->regmap = dev_get_regmap(&pdev->dev, "usb_sleepwalk"); in tegra210_xusb_padctl_probe()
3177 if (!padctl->regmap) in tegra210_xusb_padctl_probe()
3181 return &padctl->base; in tegra210_xusb_padctl_probe()
3184 static void tegra210_xusb_padctl_remove(struct tegra_xusb_padctl *padctl) in tegra210_xusb_padctl_remove() argument
3188 static void tegra210_xusb_padctl_save(struct tegra_xusb_padctl *padctl) in tegra210_xusb_padctl_save() argument
3190 struct tegra210_xusb_padctl *priv = to_tegra210_xusb_padctl(padctl); in tegra210_xusb_padctl_save()
3193 padctl_readl(padctl, XUSB_PADCTL_USB2_PAD_MUX); in tegra210_xusb_padctl_save()
3195 padctl_readl(padctl, XUSB_PADCTL_USB2_PORT_CAP); in tegra210_xusb_padctl_save()
3197 padctl_readl(padctl, XUSB_PADCTL_SS_PORT_MAP); in tegra210_xusb_padctl_save()
3199 padctl_readl(padctl, XUSB_PADCTL_USB3_PAD_MUX); in tegra210_xusb_padctl_save()
3202 static void tegra210_xusb_padctl_restore(struct tegra_xusb_padctl *padctl) in tegra210_xusb_padctl_restore() argument
3204 struct tegra210_xusb_padctl *priv = to_tegra210_xusb_padctl(padctl); in tegra210_xusb_padctl_restore()
3207 padctl_writel(padctl, priv->context.usb2_pad_mux, in tegra210_xusb_padctl_restore()
3209 padctl_writel(padctl, priv->context.usb2_port_cap, in tegra210_xusb_padctl_restore()
3211 padctl_writel(padctl, priv->context.ss_port_map, in tegra210_xusb_padctl_restore()
3214 list_for_each_entry(lane, &padctl->lanes, list) { in tegra210_xusb_padctl_restore()
3219 padctl_writel(padctl, priv->context.usb3_pad_mux, in tegra210_xusb_padctl_restore()
3222 list_for_each_entry(lane, &padctl->lanes, list) { in tegra210_xusb_padctl_restore()
3228 static int tegra210_xusb_padctl_suspend_noirq(struct tegra_xusb_padctl *padctl) in tegra210_xusb_padctl_suspend_noirq() argument
3230 mutex_lock(&padctl->lock); in tegra210_xusb_padctl_suspend_noirq()
3232 tegra210_uphy_deinit(padctl); in tegra210_xusb_padctl_suspend_noirq()
3234 tegra210_xusb_padctl_save(padctl); in tegra210_xusb_padctl_suspend_noirq()
3236 mutex_unlock(&padctl->lock); in tegra210_xusb_padctl_suspend_noirq()
3240 static int tegra210_xusb_padctl_resume_noirq(struct tegra_xusb_padctl *padctl) in tegra210_xusb_padctl_resume_noirq() argument
3242 mutex_lock(&padctl->lock); in tegra210_xusb_padctl_resume_noirq()
3244 tegra210_xusb_padctl_restore(padctl); in tegra210_xusb_padctl_resume_noirq()
3246 tegra210_uphy_init(padctl); in tegra210_xusb_padctl_resume_noirq()
3248 mutex_unlock(&padctl->lock); in tegra210_xusb_padctl_resume_noirq()