Skip to content

Commit

Permalink
dt-bindings: soc: qcom: qcom,pmic-glink: add a gpio used to determine…
Browse files Browse the repository at this point in the history
… the Type-C port plug orientation

On SM8450 and SM8550 based platforms, the Type-C plug orientation is given on a
GPIO line for each connector which are set by the PMIC(s).

Document this optional Type-C connector property, and take the
assumption an active level represents an inverted/flipped orientation.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20231002-topic-sm8550-upstream-type-c-orientation-v2-1-125410d3ff95@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Neil Armstrong authored and Greg Kroah-Hartman committed Oct 5, 2023
1 parent e24bc29 commit 6568240
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ properties:
'#size-cells':
const: 0

orientation-gpios:
description: Array of input gpios for the Type-C connector orientation indication.
The GPIO indication is used to detect the orientation of the Type-C connector.
The array should contain a gpio entry for each PMIC Glink connector, in reg order.
It is defined that GPIO active level means "CC2" or Reversed/Flipped orientation.

patternProperties:
'^connector@\d$':
$ref: /schemas/connector/usb-connector.yaml#
Expand All @@ -44,6 +50,19 @@ patternProperties:
required:
- compatible

allOf:
- if:
not:
properties:
compatible:
contains:
enum:
- qcom,sm8450-pmic-glink
- qcom,sm8550-pmic-glink
then:
properties:
orientation-gpios: false

additionalProperties: false

examples:
Expand Down

0 comments on commit 6568240

Please sign in to comment.