On some platforms, the Type-C plug orientation is given on a GPIO line.
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>
---
Documentation/devicetree/bindings/connector/usb-connector.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml
index ae515651fc6b..c3884eed6ba4 100644
--- a/Documentation/devicetree/bindings/connector/usb-connector.yaml
+++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml
@@ -114,6 +114,11 @@ properties:
description: Set this property if the Type-C connector has no power delivery support.
type: boolean
+ orientation-gpios:
+ description: An input gpio for Type-C connector orientation, used to detect orientation
+ of the Type-C connector. GPIO active level means "CC2" or Reversed/Flipped orientation.
+ maxItems: 1
+
# The following are optional properties for "usb-c-connector" with power
# delivery support.
source-pdos:
--
2.34.1
On 01/06/2023 17:07, Neil Armstrong wrote: > On some platforms, the Type-C plug orientation is given on a GPIO line. > > 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> > --- > Documentation/devicetree/bindings/connector/usb-connector.yaml | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml > index ae515651fc6b..c3884eed6ba4 100644 > --- a/Documentation/devicetree/bindings/connector/usb-connector.yaml > +++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml > @@ -114,6 +114,11 @@ properties: > description: Set this property if the Type-C connector has no power delivery support. > type: boolean > > + orientation-gpios: > + description: An input gpio for Type-C connector orientation, used to detect orientation > + of the Type-C connector. GPIO active level means "CC2" or Reversed/Flipped orientation. > + maxItems: 1 Should this be a property of the connector or of the parent device node? I mean, unlike usb-b-connector (where ID and Vbus can be simple GPIOs nearly directly connected to the pins of the connector) for the USB-C the orientation is not a connector's GPIO, but rather some additional not elementary logic. > + > # The following are optional properties for "usb-c-connector" with power > # delivery support. > source-pdos: > -- With best wishes Dmitry
On 03/06/2023 22:22, Dmitry Baryshkov wrote: > On 01/06/2023 17:07, Neil Armstrong wrote: >> On some platforms, the Type-C plug orientation is given on a GPIO line. >> >> 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> >> --- >> Documentation/devicetree/bindings/connector/usb-connector.yaml | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml >> index ae515651fc6b..c3884eed6ba4 100644 >> --- a/Documentation/devicetree/bindings/connector/usb-connector.yaml >> +++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml >> @@ -114,6 +114,11 @@ properties: >> description: Set this property if the Type-C connector has no power delivery support. >> type: boolean >> + orientation-gpios: >> + description: An input gpio for Type-C connector orientation, used to detect orientation >> + of the Type-C connector. GPIO active level means "CC2" or Reversed/Flipped orientation. >> + maxItems: 1 > > Should this be a property of the connector or of the parent device node? I mean, unlike usb-b-connector (where ID and Vbus can be simple GPIOs nearly directly connected to the pins of the connector) for the USB-C the orientation is not a connector's GPIO, but rather some additional not elementary logic. I don't see the issue, orientation is a property of the connector itself, even if it's provided by another ic. Neil > >> + >> # The following are optional properties for "usb-c-connector" with power >> # delivery support. >> source-pdos: >> >
On 05/06/2023 10:30, Neil Armstrong wrote: > On 03/06/2023 22:22, Dmitry Baryshkov wrote: >> On 01/06/2023 17:07, Neil Armstrong wrote: >>> On some platforms, the Type-C plug orientation is given on a GPIO line. >>> >>> 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> >>> --- >>> Documentation/devicetree/bindings/connector/usb-connector.yaml | 5 >>> +++++ >>> 1 file changed, 5 insertions(+) >>> >>> diff --git >>> a/Documentation/devicetree/bindings/connector/usb-connector.yaml >>> b/Documentation/devicetree/bindings/connector/usb-connector.yaml >>> index ae515651fc6b..c3884eed6ba4 100644 >>> --- a/Documentation/devicetree/bindings/connector/usb-connector.yaml >>> +++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml >>> @@ -114,6 +114,11 @@ properties: >>> description: Set this property if the Type-C connector has no >>> power delivery support. >>> type: boolean >>> + orientation-gpios: >>> + description: An input gpio for Type-C connector orientation, >>> used to detect orientation >>> + of the Type-C connector. GPIO active level means "CC2" or >>> Reversed/Flipped orientation. >>> + maxItems: 1 >> >> Should this be a property of the connector or of the parent device >> node? I mean, unlike usb-b-connector (where ID and Vbus can be simple >> GPIOs nearly directly connected to the pins of the connector) for the >> USB-C the orientation is not a connector's GPIO, but rather some >> additional not elementary logic. > > I don't see the issue, orientation is a property of the connector itself, > even if it's provided by another ic. I'd argue that the _gpio_ is not a property of the connector itself. Generic USB-C connector will not have such orientation GPIO. But probably it is a minor issue. >> >>> + >>> # The following are optional properties for "usb-c-connector" >>> with power >>> # delivery support. >>> source-pdos: >>> >> > -- With best wishes Dmitry
On 01/06/2023 16:07, Neil Armstrong wrote: > On some platforms, the Type-C plug orientation is given on a GPIO line. > Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
© 2016 - 2026 Red Hat, Inc.