Lines Matching refs:padctl

140 to_tegra186_xusb_padctl(struct tegra_xusb_padctl *padctl)  in to_tegra186_xusb_padctl()  argument
142 return container_of(padctl, struct tegra186_xusb_padctl, base); in to_tegra186_xusb_padctl()
184 static void tegra186_utmi_bias_pad_power_on(struct tegra_xusb_padctl *padctl) in tegra186_utmi_bias_pad_power_on() argument
186 struct tegra186_xusb_padctl *priv = to_tegra186_xusb_padctl(padctl); in tegra186_utmi_bias_pad_power_on()
187 struct device *dev = padctl->dev; in tegra186_utmi_bias_pad_power_on()
191 mutex_lock(&padctl->lock); in tegra186_utmi_bias_pad_power_on()
194 mutex_unlock(&padctl->lock); in tegra186_utmi_bias_pad_power_on()
202 value = padctl_readl(padctl, XUSB_PADCTL_USB2_BIAS_PAD_CTL1); in tegra186_utmi_bias_pad_power_on()
207 padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL1); in tegra186_utmi_bias_pad_power_on()
209 value = padctl_readl(padctl, XUSB_PADCTL_USB2_BIAS_PAD_CTL0); in tegra186_utmi_bias_pad_power_on()
213 padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL0); in tegra186_utmi_bias_pad_power_on()
217 value = padctl_readl(padctl, XUSB_PADCTL_USB2_BIAS_PAD_CTL1); in tegra186_utmi_bias_pad_power_on()
219 padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL1); in tegra186_utmi_bias_pad_power_on()
221 mutex_unlock(&padctl->lock); in tegra186_utmi_bias_pad_power_on()
224 static void tegra186_utmi_bias_pad_power_off(struct tegra_xusb_padctl *padctl) in tegra186_utmi_bias_pad_power_off() argument
226 struct tegra186_xusb_padctl *priv = to_tegra186_xusb_padctl(padctl); in tegra186_utmi_bias_pad_power_off()
229 mutex_lock(&padctl->lock); in tegra186_utmi_bias_pad_power_off()
232 mutex_unlock(&padctl->lock); in tegra186_utmi_bias_pad_power_off()
237 mutex_unlock(&padctl->lock); in tegra186_utmi_bias_pad_power_off()
241 value = padctl_readl(padctl, XUSB_PADCTL_USB2_BIAS_PAD_CTL1); in tegra186_utmi_bias_pad_power_off()
243 padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL1); in tegra186_utmi_bias_pad_power_off()
247 mutex_unlock(&padctl->lock); in tegra186_utmi_bias_pad_power_off()
253 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra_phy_xusb_utmi_pad_power_on() local
255 struct device *dev = padctl->dev; in tegra_phy_xusb_utmi_pad_power_on()
262 port = tegra_xusb_find_usb2_port(padctl, index); in tegra_phy_xusb_utmi_pad_power_on()
268 tegra186_utmi_bias_pad_power_on(padctl); in tegra_phy_xusb_utmi_pad_power_on()
272 value = padctl_readl(padctl, XUSB_PADCTL_USB2_OTG_PADX_CTL0(index)); in tegra_phy_xusb_utmi_pad_power_on()
274 padctl_writel(padctl, value, XUSB_PADCTL_USB2_OTG_PADX_CTL0(index)); in tegra_phy_xusb_utmi_pad_power_on()
276 value = padctl_readl(padctl, XUSB_PADCTL_USB2_OTG_PADX_CTL1(index)); in tegra_phy_xusb_utmi_pad_power_on()
278 padctl_writel(padctl, value, XUSB_PADCTL_USB2_OTG_PADX_CTL1(index)); in tegra_phy_xusb_utmi_pad_power_on()
284 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra_phy_xusb_utmi_pad_power_down() local
291 value = padctl_readl(padctl, XUSB_PADCTL_USB2_OTG_PADX_CTL0(index)); in tegra_phy_xusb_utmi_pad_power_down()
293 padctl_writel(padctl, value, XUSB_PADCTL_USB2_OTG_PADX_CTL0(index)); in tegra_phy_xusb_utmi_pad_power_down()
295 value = padctl_readl(padctl, XUSB_PADCTL_USB2_OTG_PADX_CTL1(index)); in tegra_phy_xusb_utmi_pad_power_down()
297 padctl_writel(padctl, value, XUSB_PADCTL_USB2_OTG_PADX_CTL1(index)); in tegra_phy_xusb_utmi_pad_power_down()
301 tegra186_utmi_bias_pad_power_off(padctl); in tegra_phy_xusb_utmi_pad_power_down()
308 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra186_utmi_phy_power_on() local
309 struct tegra186_xusb_padctl *priv = to_tegra186_xusb_padctl(padctl); in tegra186_utmi_phy_power_on()
312 struct device *dev = padctl->dev; in tegra186_utmi_phy_power_on()
315 port = tegra_xusb_find_usb2_port(padctl, index); in tegra186_utmi_phy_power_on()
321 value = padctl_readl(padctl, XUSB_PADCTL_USB2_PAD_MUX); in tegra186_utmi_phy_power_on()
324 padctl_writel(padctl, value, XUSB_PADCTL_USB2_PAD_MUX); in tegra186_utmi_phy_power_on()
326 value = padctl_readl(padctl, XUSB_PADCTL_USB2_PORT_CAP); in tegra186_utmi_phy_power_on()
338 padctl_writel(padctl, value, XUSB_PADCTL_USB2_PORT_CAP); in tegra186_utmi_phy_power_on()
340 value = padctl_readl(padctl, XUSB_PADCTL_USB2_OTG_PADX_CTL0(index)); in tegra186_utmi_phy_power_on()
361 padctl_writel(padctl, value, XUSB_PADCTL_USB2_OTG_PADX_CTL0(index)); in tegra186_utmi_phy_power_on()
363 value = padctl_readl(padctl, XUSB_PADCTL_USB2_OTG_PADX_CTL1(index)); in tegra186_utmi_phy_power_on()
368 padctl_writel(padctl, value, XUSB_PADCTL_USB2_OTG_PADX_CTL1(index)); in tegra186_utmi_phy_power_on()
386 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra186_utmi_phy_init() local
389 struct device *dev = padctl->dev; in tegra186_utmi_phy_init()
392 port = tegra_xusb_find_usb2_port(padctl, index); in tegra186_utmi_phy_init()
413 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra186_utmi_phy_exit() local
416 struct device *dev = padctl->dev; in tegra186_utmi_phy_exit()
419 port = tegra_xusb_find_usb2_port(padctl, index); in tegra186_utmi_phy_exit()
446 tegra186_usb2_pad_probe(struct tegra_xusb_padctl *padctl, in tegra186_usb2_pad_probe() argument
450 struct tegra186_xusb_padctl *priv = to_tegra186_xusb_padctl(padctl); in tegra186_usb2_pad_probe()
463 err = tegra_xusb_pad_init(pad, padctl, np); in tegra186_usb2_pad_probe()
531 return tegra_xusb_find_lane(port->padctl, "usb2", port->index); in tegra186_usb2_port_map()
590 return tegra_xusb_find_lane(port->padctl, "usb3", port->index); in tegra186_usb3_port_map()
602 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra186_usb3_phy_power_on() local
606 struct device *dev = padctl->dev; in tegra186_usb3_phy_power_on()
609 port = tegra_xusb_find_usb3_port(padctl, index); in tegra186_usb3_phy_power_on()
615 usb2 = tegra_xusb_find_usb2_port(padctl, port->port); in tegra186_usb3_phy_power_on()
622 mutex_lock(&padctl->lock); in tegra186_usb3_phy_power_on()
624 value = padctl_readl(padctl, XUSB_PADCTL_SS_PORT_CAP); in tegra186_usb3_phy_power_on()
636 padctl_writel(padctl, value, XUSB_PADCTL_SS_PORT_CAP); in tegra186_usb3_phy_power_on()
638 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_1); in tegra186_usb3_phy_power_on()
640 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM_1); in tegra186_usb3_phy_power_on()
644 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_1); in tegra186_usb3_phy_power_on()
646 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM_1); in tegra186_usb3_phy_power_on()
650 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_1); in tegra186_usb3_phy_power_on()
652 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM_1); in tegra186_usb3_phy_power_on()
654 mutex_unlock(&padctl->lock); in tegra186_usb3_phy_power_on()
662 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra186_usb3_phy_power_off() local
665 struct device *dev = padctl->dev; in tegra186_usb3_phy_power_off()
668 port = tegra_xusb_find_usb3_port(padctl, index); in tegra186_usb3_phy_power_off()
674 mutex_lock(&padctl->lock); in tegra186_usb3_phy_power_off()
676 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_1); in tegra186_usb3_phy_power_off()
678 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM_1); in tegra186_usb3_phy_power_off()
682 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_1); in tegra186_usb3_phy_power_off()
684 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM_1); in tegra186_usb3_phy_power_off()
688 value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM_1); in tegra186_usb3_phy_power_off()
690 padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM_1); in tegra186_usb3_phy_power_off()
692 mutex_unlock(&padctl->lock); in tegra186_usb3_phy_power_off()
716 tegra186_usb3_pad_probe(struct tegra_xusb_padctl *padctl, in tegra186_usb3_pad_probe() argument
732 err = tegra_xusb_pad_init(pad, padctl, np); in tegra186_usb3_pad_probe()
790 tegra186_xusb_read_fuse_calibration(struct tegra186_xusb_padctl *padctl) in tegra186_xusb_read_fuse_calibration() argument
792 struct device *dev = padctl->base.dev; in tegra186_xusb_read_fuse_calibration()
797 count = padctl->base.soc->ports.usb2.count; in tegra186_xusb_read_fuse_calibration()
815 padctl->calib.hs_curr_level = level; in tegra186_xusb_read_fuse_calibration()
817 padctl->calib.hs_squelch = (value >> HS_SQUELCH_SHIFT) & in tegra186_xusb_read_fuse_calibration()
819 padctl->calib.hs_term_range_adj = (value >> HS_TERM_RANGE_ADJ_SHIFT) & in tegra186_xusb_read_fuse_calibration()
830 padctl->calib.rpd_ctrl = (value >> RPD_CTRL_SHIFT) & RPD_CTRL_MASK; in tegra186_xusb_read_fuse_calibration()
856 static void tegra186_xusb_padctl_remove(struct tegra_xusb_padctl *padctl) in tegra186_xusb_padctl_remove() argument