Devicetree
 help / color / mirror / Atom feed
* [PATCH v3 0/4] phy: cpcap-usb: improve charger detection and export cable state
@ 2026-07-05 10:11 Ivaylo Dimitrov
  2026-07-05 10:11 ` [PATCH v3 1/4] dt-bindings: phy: motorola,cpcap-usb: add chrg_det interrupt Ivaylo Dimitrov
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Ivaylo Dimitrov @ 2026-07-05 10:11 UTC (permalink / raw)
  To: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Aaro Koskinen, Andreas Kemnade, Kevin Hilman,
	Roger Quadros, Tony Lindgren, Linus Walleij, Bartosz Golaszewski
  Cc: linux-phy, devicetree, linux-kernel, linux-omap, linux-gpio,
	Ivaylo Dimitrov

The Motorola CPCAP USB PHY contains the hardware state machine used for
USB cable detection. Besides distinguishing USB peripheral and host
connections, it can also detect dedicated charging ports (DCP).

This series updates the Device Tree binding and corresponding mapphone
Device Tree to use the charger detection interrupt, adds DCP detection
support to the CPCAP USB PHY and finally exports the detected cable state
through the Extcon framework.

The existing driver already interprets the CPCAP USB detection state
machine to determine the attached cable type. This series extends that
logic to distinguish DCP connections and exposes the detected cable state
through Extcon using a standard kernel interface. It also makes the idle
UART mode optional, allowing the PHY to remain in its default USB
detection configuration unless UART support is explicitly requested.

The series has been tested on Motorola Droid 4 hardware.

Changes in v3:
- Drop "phy: cpcap-usb: Prevent line glitches from triggering sysrq"
- Fix DT schema interrupts order
- Fix boot cable detection

Changes in v2:
- add chrg_det interrupt instead of replacing se1
- Fix remove() race by cancelling detect_work before hardware teardown
- Restore SysRq state on all error paths
- Introduce CPCAP_UNKNOWN initial mode
- Snapshot enable_uart module parameter

Ivaylo Dimitrov (4):
  dt-bindings: phy: motorola,cpcap-usb: add chrg_det interrupt
  ARM: dts: ti: cpcap-mapphone: use charger detection interrupt for
    CPCAP USB PHY
  phy: cpcap-usb: add DCP detection and make UART idle mode optional
  phy: cpcap-usb: add extcon support

 .../bindings/phy/motorola,cpcap-usb-phy.yaml  |   6 +-
 .../dts/ti/omap/motorola-cpcap-mapphone.dtsi  |   6 +-
 drivers/phy/motorola/phy-cpcap-usb.c          | 320 +++++++++++++++---
 3 files changed, 279 insertions(+), 53 deletions(-)

-- 
2.39.5


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-07-06 21:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-05 10:11 [PATCH v3 0/4] phy: cpcap-usb: improve charger detection and export cable state Ivaylo Dimitrov
2026-07-05 10:11 ` [PATCH v3 1/4] dt-bindings: phy: motorola,cpcap-usb: add chrg_det interrupt Ivaylo Dimitrov
2026-07-05 10:19   ` sashiko-bot
2026-07-06 17:14   ` Conor Dooley
2026-07-06 21:25     ` Ivaylo Dimitrov
2026-07-05 10:11 ` [PATCH v3 2/4] ARM: dts: ti: cpcap-mapphone: use charger detection interrupt for CPCAP USB PHY Ivaylo Dimitrov
2026-07-05 10:11 ` [PATCH v3 3/4] phy: cpcap-usb: add DCP detection and make UART idle mode optional Ivaylo Dimitrov
2026-07-05 10:24   ` sashiko-bot
2026-07-05 10:11 ` [PATCH v3 4/4] phy: cpcap-usb: add extcon support Ivaylo Dimitrov
2026-07-05 10:25   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox