Re: [PATCHv2] phy: cpcap-usb: Add CPCAP PMIC USB support
From: Rob Herring
Date: Tue Mar 28 2017 - 22:04:37 EST
On Wed, Mar 22, 2017 at 04:46:02PM -0700, Tony Lindgren wrote:
> Some Motorola phones like droid 4 use a custom CPCAP PMIC that has a
> multiplexing USB PHY.
>
> This USB PHY can operate at least in four modes using pin multiplexing
> and two control GPIOS:
>
> - Pass through companion PHY for the SoC USB PHY
> - ULPI PHY for the SoC
> - Pass through USB for the modem
> - UART debug console for the SoC
>
> This patch adds support for droid 4 USB PHY and debug UART modes,
> support for other modes can be added later on as needed.
>
> Both peripheral and host mode are working for the USB. The
> host mode depends on the cpcap-charger driver for VBUS.
>
> VBUS and ID pin detection are done using cpcap-adc IIO ADC
> driver.
>
> Cc: devicetree@xxxxxxxxxxxxxxx
> Cc: Marcel Partap <mpartap@xxxxxxx>
> Cc: Michael Scott <michael.scott@xxxxxxxxxx>
> Tested-by: Sebastian Reichel <sre@xxxxxxxxxx>
> Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>
> ---
>
> Changes since v1:
>
> - Use iio_read_channel_processed() instead of iio_read_channel_scaled()
> as changed in the v2 of the ADC driver
>
> - Keep Tested-by from Sebastian Reichel <sre@xxxxxxxxxx> as the change
> from v1 is trivial
>
> ---
> .../devicetree/bindings/phy/phy-cpcap-usb.txt | 40 ++
Acked-by: Rob Herring <robh@xxxxxxxxxx>
> drivers/phy/Kconfig | 8 +
> drivers/phy/Makefile | 1 +
> drivers/phy/phy-cpcap-usb.c | 695 +++++++++++++++++++++
> 4 files changed, 744 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/phy/phy-cpcap-usb.txt
> create mode 100644 drivers/phy/phy-cpcap-usb.c