mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Armstrong <neil.armstrong@linaro.org>
To: Bjorn Andersson <andersson@kernel.org>
Cc: Andy Gross <agross@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH 1/4] dt-bindings: soc: qcom: qcom,pmic-glink: add a gpio used to determine the Type-C port plug orientation
Date: Wed, 20 Sep 2023 18:54:53 +0200	[thread overview]
Message-ID: <c1611e72-aace-4386-b239-91f49e8dd26c@linaro.org> (raw)
In-Reply-To: <zigqqjepj54v5vnmhm3r3knwrjd2rfw2njds4ul7vmxq3nfrua@rkupccyyxziw>

On 20/09/2023 18:50, Bjorn Andersson wrote:
> On Mon, Aug 14, 2023 at 10:09:41AM +0200, Neil Armstrong wrote:
>> On 04/08/2023 18:03, Bjorn Andersson wrote:
>>> On Fri, Aug 04, 2023 at 03:50:07PM +0200, Neil Armstrong wrote:
>>>> On SM8450 and SM8550 based platforms, the Type-C plug orientation is given on a
>>>> GPIO line set by the PMIC.
>>>>
>>>> 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>
>>>> ---
>>>>    .../devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml  | 18 ++++++++++++++++++
>>>>    1 file changed, 18 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml
>>>> index bceb479f74c5..1b0a00b19a54 100644
>>>> --- a/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml
>>>> +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml
>>>> @@ -35,6 +35,11 @@ properties:
>>>>      '#size-cells':
>>>>        const: 0
>>>> +  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.
>>>
>>> This is a per-connector/port property, as such be part of the connector
>>> sub nodes rather than as a property of the shared pmic_glink entity.
>>
>> This has been rejected by Rob, Dmitry & Krzysztof in:
>> https://lore.kernel.org/all/0fbf55e7-2140-751d-5347-f907a46ef78c@linaro.org/
>> &
>> https://lore.kernel.org/all/20230608154751.GA2750742-robh@kernel.org/
>>
>> Indeed the "GPIO" is not part of the physical USB-C connector, but a property,
>> and it's not part of the PMIC GLINK firmware either, so ?
>>
>> The PMIC function which generates this signal is handled by the PMIC GLINK
>> firmware, so this representation is the most accurate.
>>
> 
> I don't think we reached a conclusion on the discussion that followed.
> If this indeed is the path forward, please document clearly how the next
> person should proceed when the need for handling multiple ports with
> this scheme arise.

Sure, I'll explicit this is an array of gpios, one for each port, I thought I wrote
it but seems I forgot to add it to the description.

Neil

> 
> Thanks,
> Bjorn
> 
>> Neil
>>
>>>
>>> Regards,
>>> Bjorn
>>>
>>>> +    maxItems: 1
>>>> +
>>>>    patternProperties:
>>>>      '^connector@\d$':
>>>>        $ref: /schemas/connector/usb-connector.yaml#
>>>> @@ -44,6 +49,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:
>>>>
>>>> -- 
>>>> 2.34.1
>>>>
>>


  reply	other threads:[~2023-09-20 16:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-04 13:50 [PATCH 0/4] arm64: qcom: sm8550: retrieve USB-C port orientation from gpio Neil Armstrong
2023-08-04 13:50 ` [PATCH 1/4] dt-bindings: soc: qcom: qcom,pmic-glink: add a gpio used to determine the Type-C port plug orientation Neil Armstrong
2023-08-04 16:03   ` Bjorn Andersson
2023-08-14  8:09     ` Neil Armstrong
2023-09-20 16:50       ` Bjorn Andersson
2023-09-20 16:54         ` Neil Armstrong [this message]
2023-08-04 13:50 ` [PATCH 2/4] usb: ucsi: glink: use the connector orientation GPIO to provide switch events Neil Armstrong
2023-08-04 13:50 ` [PATCH 3/4] arm64: dts: qcom: sm8550-mtp: add orientation gpio Neil Armstrong
2023-08-04 13:50 ` [PATCH 4/4] arm64: dts: qcom: sm8550-qrd: " Neil Armstrong

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=c1611e72-aace-4386-b239-91f49e8dd26c@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=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=robh+dt@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

all inboxes | Powered by JetHome®