-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
phy: cpcap-usb: Add CPCAP PMIC USB support
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@vger.kernel.org Cc: Marcel Partap <mpartap@gmx.net> Cc: Michael Scott <michael.scott@linaro.org> Acked-by: Rob Herring <robh@kernel.org> Tested-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
- Loading branch information
Tony Lindgren
authored and
Kishon Vijay Abraham I
committed
Jun 6, 2017
1 parent
4a3449d
commit 6d6ce40
Showing
6 changed files
with
732 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Motorola CPCAP PMIC USB PHY binding | ||
|
||
Required properties: | ||
compatible: Shall be either "motorola,cpcap-usb-phy" or | ||
"motorola,mapphone-cpcap-usb-phy" | ||
#phy-cells: Shall be 0 | ||
interrupts: CPCAP PMIC interrupts used by the USB PHY | ||
interrupt-names: Interrupt names | ||
io-channels: IIO ADC channels used by the USB PHY | ||
io-channel-names: IIO ADC channel names | ||
vusb-supply: Regulator for the PHY | ||
|
||
Optional properties: | ||
pinctrl: Optional alternate pin modes for the PHY | ||
pinctrl-names: Names for optional pin modes | ||
mode-gpios: Optional GPIOs for configuring alternate modes | ||
|
||
Example: | ||
cpcap_usb2_phy: phy { | ||
compatible = "motorola,mapphone-cpcap-usb-phy"; | ||
pinctrl-0 = <&usb_gpio_mux_sel1 &usb_gpio_mux_sel2>; | ||
pinctrl-1 = <&usb_ulpi_pins>; | ||
pinctrl-2 = <&usb_utmi_pins>; | ||
pinctrl-3 = <&uart3_pins>; | ||
pinctrl-names = "default", "ulpi", "utmi", "uart"; | ||
#phy-cells = <0>; | ||
interrupts-extended = < | ||
&cpcap 15 0 &cpcap 14 0 &cpcap 28 0 &cpcap 19 0 | ||
&cpcap 18 0 &cpcap 17 0 &cpcap 16 0 &cpcap 49 0 | ||
&cpcap 48 1 | ||
>; | ||
interrupt-names = | ||
"id_ground", "id_float", "se0conn", "vbusvld", | ||
"sessvld", "sessend", "se1", "dm", "dp"; | ||
mode-gpios = <&gpio2 28 GPIO_ACTIVE_HIGH | ||
&gpio1 0 GPIO_ACTIVE_HIGH>; | ||
io-channels = <&cpcap_adc 2>, <&cpcap_adc 7>; | ||
io-channel-names = "vbus", "id"; | ||
vusb-supply = <&vusb>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# | ||
# Phy drivers for Motorola devices | ||
# | ||
config PHY_CPCAP_USB | ||
tristate "CPCAP PMIC USB PHY driver" | ||
depends on USB_SUPPORT && IIO | ||
select GENERIC_PHY | ||
select USB_PHY | ||
help | ||
Enable this for USB to work on Motorola phones and tablets | ||
such as Droid 4. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# | ||
# Makefile for the phy drivers. | ||
# | ||
|
||
obj-$(CONFIG_PHY_CPCAP_USB) += phy-cpcap-usb.o |
Oops, something went wrong.