Lines Matching refs:usb_phy

137 	struct sun4i_usb_phy_plat *usb_phy;
145 struct sun4i_usb_phy_plat *usb_phy = &phy_data->usb_phy[phy->id];
146 u32 temp, usbc_bit = BIT(usb_phy->id * 2);
190 struct sun4i_usb_phy_plat *usb_phy = &data->usb_phy[phy->id];
193 if (!usb_phy->pmu)
200 if (data->cfg->type == sun8i_a83t_phy && usb_phy->id == 2)
204 reg_value = readl(usb_phy->pmu);
211 writel(reg_value, usb_phy->pmu);
217 struct sun4i_usb_phy_plat *usb_phy = &data->usb_phy[phy->id];
224 usb_phy->power_on_count++;
225 if (usb_phy->power_on_count != 1)
228 if (usb_phy->gpio_vbus >= 0)
229 gpio_set_value(usb_phy->gpio_vbus, SUNXI_GPIO_PULL_UP);
237 struct sun4i_usb_phy_plat *usb_phy = &data->usb_phy[phy->id];
239 usb_phy->power_on_count--;
240 if (usb_phy->power_on_count != 0)
243 if (usb_phy->gpio_vbus >= 0)
244 gpio_set_value(usb_phy->gpio_vbus, SUNXI_GPIO_PULL_DISABLE);
267 struct sun4i_usb_phy_plat *usb_phy = &data->usb_phy[phy->id];
270 setbits_le32(&data->ccm->usb_clk_cfg, usb_phy->rst_mask);
280 if (usb_phy->pmu && data->cfg->enable_pmu_unk1) {
281 val = readl(usb_phy->pmu + REG_PMU_UNK1);
282 writel(val & ~2, usb_phy->pmu + REG_PMU_UNK1);
285 if (usb_phy->id == 0)
310 struct sun4i_usb_phy_plat *usb_phy = &data->usb_phy[phy->id];
323 clrbits_le32(&data->ccm->usb_clk_cfg, usb_phy->rst_mask);
348 struct sun4i_usb_phy_plat *usb_phy = &data->usb_phy[phy->id];
351 debug("%s: id_det = %d\n", __func__, usb_phy->gpio_id_det);
353 if (usb_phy->gpio_vbus_det < 0)
354 return usb_phy->gpio_vbus_det;
356 err = gpio_get_value(usb_phy->gpio_vbus_det);
364 err = gpio_get_value(usb_phy->gpio_vbus_det);
373 struct sun4i_usb_phy_plat *usb_phy = &data->usb_phy[phy->id];
375 debug("%s: id_det = %d\n", __func__, usb_phy->gpio_id_det);
377 if (usb_phy->gpio_id_det < 0)
378 return usb_phy->gpio_id_det;
380 return gpio_get_value(usb_phy->gpio_id_det);
414 data->usb_phy = plat;