I am debugging an USB device disconnect issue, where our current "top candidate" for the root cause is an over-current on the USB.
I have seen in `Documentation/devicetree/bindings/usb/atmel-usb.txt`:
Code: Select all
- atmel,vbus-gpio: If present, specifies a gpio that needs to be
activated for the bus to be powered.
- atmel,oc-gpio: If present, specifies a gpio that needs to be
activated for the overcurrent detection.
Code: Select all
board->vbus_pin = of_get_named_gpio_flags(np, "atmel,vbus-gpio", 0, &flags);
if (gpio_is_valid(udc->board.vbus_pin)) {
retval = devm_gpio_request(dev, udc->board.vbus_pin,
"udc_vbus");
if (retval) {
DBG("request vbus pin failed\n");
goto err_unprepare_iclk;
}
gpio_direction_input(udc->board.vbus_pin);
But if I grep for the "atmel,oc-gpio" string in the kernel (5.4) tree, it is only present in DTS and Documentation.
So do I need to defined a gpio via "atmel,oc-gpio" and assert it so that the kernel driver detects over-current? Or is this for some totally different reasons?
Many thanks for any pointers!
P.S. I have seen in the code also that the undocumented "atmel,vbus-polled" and "atmel,pullup-gpio"
