AnsweredAssumed Answered

How can we redectect usb charger?

Question asked by Prosper Van on Jun 26, 2020
Latest reply on Jul 3, 2020 by IvanRuiz

We have a condition where the usb power pins makes connections without the data pins when charger D+/D– detection occurs. Thus the usb charger is detect as SCP which we're relying on to set charging current. Is there a way to trigger a redetection or how an implementation can be made?


Using imx7

static int imx7d_charger_primary_detection(struct imx_usbmisc_data *data)

    /* Check if it is a charger */
    val = readl(usbmisc->base + MX7D_USB_OTG_PHY_STATUS);
    if (!(val & MX7D_USB_OTG_PHY_STATUS_CHRGDET)) {
        // We're landing in here when we normally wouldn't

        dev_dbg(charger->dev, "It is a standard downstream port\n");
        charger->psy_desc.type = POWER_SUPPLY_TYPE_USB;
        charger->max_current = 500;
    return 0;