mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] usb: typec: ucsi_ccg: Add CC orientation sensing via GPIO
@ 2026-11-23  9:10 Akash Kumar
  2026-11-23  9:10 ` [PATCH v2 1/2] dt-bindings: usb: cypress,cypd4226: Add orientation-gpios property Akash Kumar
  2026-11-23  9:10 ` [PATCH v2 2/2] usb: typec: ucsi_ccg: Add CC orientation sensing via GPIO Akash Kumar
  0 siblings, 2 replies; 6+ messages in thread
From: Akash Kumar @ 2026-11-23  9:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Dmitry Baryshkov, Krzysztof Kozlowski, Conor Dooley,
	Heikki Krogerus
  Cc: linux-usb, linux-kernel, linux-arm-msm, devicetree

From: Akash Kumar <akakum@qti.qualcomm.com>

The CCGx chip has no HPI register exposing CC polarity, so on boards
that wire a sense line to the connector, pick it up via an optional
orientation-gpios property and report it through typec_set_orientation().

Patch 1 adds the dt-binding property, patch 2 wires it up in the
ucsi_ccg driver.

Changes in v2:
- Reworked ucsi_ccg_connector_status() to return early when the GPIO
  read fails instead of wrapping the call in typec_set_orientation()
  in a positive-case conditional (Heikki Krogerus).

Akash Kumar (2):
  dt-bindings: usb: cypress,cypd4226: Add orientation-gpios property
  usb: typec: ucsi_ccg: Add CC orientation sensing via GPIO

 .../bindings/usb/cypress,cypd4226.yaml        | 10 +++
 drivers/usb/typec/ucsi/ucsi_ccg.c             | 77 ++++++++++++++++++-
 2 files changed, 86 insertions(+), 1 deletion(-)


base-commit: 8e31dedb9ad496ea7dd7064d77d6f7d459c1c90f
prerequisite-patch-id: 0ffa67d7d9ce66074ffa2e070249ee5b0cbedb2e
prerequisite-patch-id: 65ba14bc52b50cdf47ecdce1f4b3fe678704955e
-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH v2 0/2] usb: typec: ucsi_ccg: Add CC orientation-gpios support
@ 2026-11-17 14:09 Akash Kumar
  2026-11-17 14:09 ` [PATCH v2 1/2] dt-bindings: usb: cypress,cypd4226: Add orientation-gpios property Akash Kumar
  0 siblings, 1 reply; 6+ messages in thread
From: Akash Kumar @ 2026-11-17 14:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wayne Chang, Akash Kumar, Heikki Krogerus
  Cc: linux-usb, devicetree, linux-kernel

The CCGx Type-C PD controller has no HPI register exposing CC
polarity, so UCSI status alone cannot tell the typec class which way
a connector is plugged in. This series adds an optional
orientation-gpios property so boards that wire a board-level
CC-orientation sense line to the connector can still report
orientation through typec_set_orientation().

Patch 1 documents the new orientation-gpios property on
cypress,cypd4226.yaml, ordered by connector number (an entry may be
left as <0> for connectors with no sense line).

Patch 2 wires it up in ucsi_ccg: acquire an optional GPIO per
connector in probe(), indexed by the connector's reg property, and
use it from new update_connector/connector_status UCSI ops to set
typec_cap.orientation_aware and drive typec_set_orientation().

Signed-off-by: Akash Kumar <akash.kumar@oss.qualcomm.com>
---
Changes in v2:
- Correct sender/author identity to akash.kumar@oss.qualcomm.com
  (no functional changes)
- Link to v1: https://lore.kernel.org/r/20261117-ucsi-ccg-cc-orientation-v1-0-a0fb052c7fcd@qti.qualcomm.com

---
Akash Kumar (2):
      dt-bindings: usb: cypress,cypd4226: Add orientation-gpios property
      usb: typec: ucsi_ccg: Add CC orientation sensing via GPIO

 .../devicetree/bindings/usb/cypress,cypd4226.yaml  | 10 +++
 drivers/usb/typec/ucsi/ucsi_ccg.c                  | 76 +++++++++++++++++++++-
 2 files changed, 85 insertions(+), 1 deletion(-)
---
base-commit: 2c46a57079874df3a60770278f08404f5d0f782d
change-id: 20261117-ucsi-ccg-cc-orientation-cd3e221ed635

Best regards,
-- 
Akash Kumar <akakum@qti.qualcomm.com>


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

end of thread, other threads:[~2026-11-23  9:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23  9:10 [PATCH v2 0/2] usb: typec: ucsi_ccg: Add CC orientation sensing via GPIO Akash Kumar
2026-11-23  9:10 ` [PATCH v2 1/2] dt-bindings: usb: cypress,cypd4226: Add orientation-gpios property Akash Kumar
2026-11-23  9:10 ` [PATCH v2 2/2] usb: typec: ucsi_ccg: Add CC orientation sensing via GPIO Akash Kumar
  -- strict thread matches above, loose matches on Subject: below --
2026-11-17 14:09 [PATCH v2 0/2] usb: typec: ucsi_ccg: Add CC orientation-gpios support Akash Kumar
2026-11-17 14:09 ` [PATCH v2 1/2] dt-bindings: usb: cypress,cypd4226: Add orientation-gpios property Akash Kumar
2026-11-20 14:50   ` Heikki Krogerus
2026-11-23  9:01     ` Akash Kumar

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

all inboxes | Powered by JetHome®