From: Neil Armstrong <neil.armstrong@linaro.org>
To: Rob Herring <robh@kernel.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: Re: [PATCH v2 1/8] dt-bindings: connector: usb-connector: add a gpio used to determine the Type-C port plug orientation
Date: Thu, 8 Jun 2023 18:35:31 +0200 [thread overview]
Message-ID: <64a23128-12cf-9f35-c938-14b6b03af475@linaro.org> (raw)
In-Reply-To: <20230608154751.GA2750742-robh@kernel.org>
Hi Rob,
On 08/06/2023 17:47, Rob Herring wrote:
> On Wed, Jun 07, 2023 at 10:05:00AM +0200, 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.
>>
>> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> 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
>
> There's no such GPIO on a USB-C connector. Please explain this h/w
> better (in the commit message and/or description). Perhaps it is simple
> enough logic to leave the GPIO here. Perhaps there's more to the h/w you
> are not (yet) describing.
The h/w has an I/O line representing the usb-c orientation at any time
which is driven by the PMIC in charge of the USB-C connector(s).
On this platform, the usb-c connector orientation is only unconditionally
given by this I/O connected to a GPIO line, howerver we get an altmode
event with the orientation, but only when an altmode state has been
negociated. AFAIK there's no other way or events returning this
orientation change unconditionally unlike previous HW generations.
This is why representing it as a gpio is simple but useful since there's
a lot of passive usb-c controllers also reflecting this orientation info
in a same way to be consumed by superspeed switches for example.
As an alternative I didn't find a way that fits the current bindings
to get this simple binary information.
Neil
>
> Rob
next prev parent reply other threads:[~2023-06-08 16:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 8:04 [PATCH v2 0/8] arm64: qcom: add Type-C Altmode support Neil Armstrong
2023-06-07 8:05 ` [PATCH v2 1/8] dt-bindings: connector: usb-connector: add a gpio used to determine the Type-C port plug orientation Neil Armstrong
2023-06-08 15:47 ` Rob Herring
2023-06-08 16:35 ` Neil Armstrong [this message]
2023-06-07 8:05 ` [PATCH v2 2/8] soc: qcom: pmic_glink_altmode: handle safe mode when disconnect Neil Armstrong
2023-06-07 8:05 ` [PATCH v2 3/8] usb: ucsi: glink: use the connector orientation GPIO to provide switch events Neil Armstrong
2023-06-07 8:05 ` [PATCH v2 4/8] qcom: pmic_glink_altmode: add retimer-switch support Neil Armstrong
2023-06-07 8:05 ` [PATCH v2 5/8] qcom: pmic_glink: enable altmode for SM8550 Neil Armstrong
2023-06-07 8:05 ` [PATCH v2 6/8] arm64: dts: qcom: sm8550: add ports subnodes in usb/dp qmpphy node Neil Armstrong
2023-06-07 8:05 ` [PATCH v2 7/8] arm64: dts: qcom: sm8550-mtp: add pmic glink port/endpoints Neil Armstrong
2023-06-08 10:31 ` Krzysztof Kozlowski
2023-06-07 8:05 ` [PATCH v2 8/8] arm64: dts: qcom: sm8550-qrd: " Neil Armstrong
2023-06-08 10:28 ` Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=64a23128-12cf-9f35-c938-14b6b03af475@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).