Jump to content

Mainline:Broadcom Kona/BCM590xx/USB

From dissonant.dev wiki
Downstream drivers: drivers/mfd/bcmpmu59xxx-accy-core.c, bcmpmu59xxx-accy-detect.c, drivers/mfd/bcmpmu59xxx-accy.c which is unused?, drivers/mfd/bcm590xx-usb.c for the BCM59055; drivers/usb/otg/bcm_otg_adp.c, drivers/usb/otg/bcmpmu59xxx_otg_xceiv.c, and to some extent external MUIC drivers which hook into the BCM59xxx drivers:

The BCM590xx PMUs are capable of USB port management and cable detection.

Glossary

Some terms get mentioned repeatedly in USB OTG code. These are common terms related to either the USB 2.0 spec or the USB OTG spec, and appear often in other drivers as well.

  • VBUS - the 5V power rail in an USB cable. When the device is charging or plugged in as a peripheral (e.g. to a computer), the voltage is provided by the charger; when an USB OTG dongle is plugged in (the device operates in host mode), it needs to provide its own voltage. Most PMUs, the BCM590xx included, provide a "VBUS boost" (VBUSB) mode to enable VBUS from the device for host mode and disable it for peripheral mode/charging.
  • ID - The ID pin on the microUSB connector. A floating (not connected to ground) ID pin indicates that the device is to be connected as a peripheral; a grounded ID pin indicates the device should act as the host, and different resistance values between GND and ID can be used to switch between different device types (per the USB Carkit standard).
  • ADP - From USB OTG docs: "The Attach Detection Protocol (ADP) allows an SRP-capable Targeted Host or peripheral-only B-device to detect when a remote device has been attached or detached when VBUS is not present."[1]
  • SRP - Stands for Session Request Protocol. An SRP request can be sent by an USB peripheral to the host device to enable VBUS.
  • BC1.2 - the USB Battery Charging 1.2 specification. (Code might use "BC" or "BC12" to refer to it.)