[1/4] dt-bindings: soc: qcom: qcom,pmic-glink: add a gpio used to determine the Type-C port plug orientation
Message ID | 20230804-topic-sm8550-upstream-type-c-orientation-v1-1-36dd3edec7bf@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:44a:b0:3f2:4152:657d with SMTP id ez10csp309163vqb; Fri, 4 Aug 2023 07:41:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHKicwkFErix90K7VRU2fh30aHk5pKeuE6dBGCR8OsqMk0BoH9EIC4nBr95CX+xRVwzuT0S X-Received: by 2002:a05:6a00:a29:b0:67f:830f:b809 with SMTP id p41-20020a056a000a2900b0067f830fb809mr2825430pfh.3.1691160067292; Fri, 04 Aug 2023 07:41:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691160067; cv=none; d=google.com; s=arc-20160816; b=xmbKCyBJA6Z9CFfCxRduJsEXkmYD02/OoL1fa+JJsnreT8oarmxi9ziVd/dbKP5mup FzTrZeTH9V1tL6woxpNd3jTxR8/RQEyd1b4yf0kLl+PtsYpoi3TPMWZnN4A2ph95eBVk 0VXZtusqkRVu/zjT4hAYdCfiiWgl5DDhcbMz+j9uqk93DB1gl+Xjx7z5uP9HpQqeABOx W+3uyB3jWZxkMuOlZYj3E06v0YG0dQ71SK5N2sCuKLEyx7KOlwgcsRVAZQaPUMoTDJiq Ng1XwJgEov0D59iCmzkC7X2Qw2qDABjOhZqkYusWDRo2vQNg7DbLbEPRBCCHQ0kIEQbb Hgsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=LoLk+hOHQDH/7cn6RwtpMRmNp0rfp4NE+LThM4ovVo0=; fh=+KaZh+Yv3JF44OuFumKrJ3f3IpCpO5pgHwOyOFRWEb4=; b=ylEFlgfOJNTYU2EWrGxzTGdCoVD+Pds4eKjULhuExrolTpFBXkTBoMd7MkHG+xMH2F oasNM11aA1705cdLdN4njYsxrUicQqwJc18btElLZKrhGVt8bNbFzy9YFEP6hHqPeXMT Y11ArwrLnOLhffMexcWLKxQEizqlwwVO3chn6DJxn2XdCIquxF5pdXP4BrE5XRFV7bkz HJftvwGSrYxbhh1BSss7w9gkHKJOrrd+g7QVh1hf/prUzjmofSAek81dtytKegU3XQp1 btNfCPJvcF+Ow86CTjdm8qRzW/WWZo5QJWW45L3x9KkLnN/yq9JD71nWCxwXoeRPxbMy HuGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Iq73nhf2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v10-20020a63f20a000000b005649cee4231si1792597pgh.874.2023.08.04.07.40.00; Fri, 04 Aug 2023 07:41:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Iq73nhf2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229784AbjHDNu0 (ORCPT <rfc822;sukrut.bellary@gmail.com> + 99 others); Fri, 4 Aug 2023 09:50:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231424AbjHDNuW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 4 Aug 2023 09:50:22 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DFFB171D for <linux-kernel@vger.kernel.org>; Fri, 4 Aug 2023 06:50:20 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3fbea14706eso20185145e9.2 for <linux-kernel@vger.kernel.org>; Fri, 04 Aug 2023 06:50:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691157019; x=1691761819; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=LoLk+hOHQDH/7cn6RwtpMRmNp0rfp4NE+LThM4ovVo0=; b=Iq73nhf26djD0Az8ZfElTDbIqxiANOI/S79ud6Rz6kFZ+9WawtYNfzFUX3Y21uly+p ZwN+JLJP8y+9lcy8AHyT8OZIR5I2B62iMHXaA040bDOhYkEyert2J84xX7Laqp6Tsd/K biA/jkQ6JbhDXfIaOhlTWrx1LYaGwj9kU88iIOc9yBWeIucueW0rqhG+jXUWk4MR5X2w Uxe+f26YAATez92uwPNWtzMARfl1/bSYYhg5CsZ2V2RMvFZ/YiobO92qTy5etAXli/h7 PI/C4U8t9SHevcbCYS5H8ZNLEQlTqSRzZEpCClptA2yGjbIhuHFhJxCCcClFDEmSR/Eo xdCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691157019; x=1691761819; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LoLk+hOHQDH/7cn6RwtpMRmNp0rfp4NE+LThM4ovVo0=; b=jSBT2FmbabSlC0dYKWUezbQPOLwoO7jrOpOM5vf6EkS3jIybQcGf98TdhwEiX31YwL ISeCSefsyXMGxPAjxuSv+jRX9rJupuHy5NvB1SyqwTk9GLKyqfKfI+5MGCGRxvfxq/Jw gwmBRDeZQBTM0aLgUxu7SzkLlmU8J6q330sJceYRwU3WVwReiBn89k6IM7U1yBCkiq7z Ta95WfyNnFvxfja9bpD4C1Y3p+Ue1jLe+Vxe6/RoqLX3PWId5wBz3KQhHt+QhyAtvpBO zJOWff7EvRlMcALgPYhhBDoGtjPWyfC4KNVJ2tbIrJ4URg3Dm6dD3co8Y0Na/iBptn+U IJjQ== X-Gm-Message-State: AOJu0YwQa+EbPBh79dffji5ZlJb1WJfzIFpdSKx7cxySarbj8iIMascy Mh6XZMsqlhn947PzeXwPqkE7T+V9RRV0/ZTcpWw+jA== X-Received: by 2002:a7b:cc99:0:b0:3fb:dbd0:a7ea with SMTP id p25-20020a7bcc99000000b003fbdbd0a7eamr1539381wma.37.1691157019189; Fri, 04 Aug 2023 06:50:19 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id u25-20020a7bcb19000000b003fe1cac37d8sm6894793wmj.11.2023.08.04.06.50.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 06:50:18 -0700 (PDT) From: Neil Armstrong <neil.armstrong@linaro.org> Date: Fri, 04 Aug 2023 15:50:07 +0200 Subject: [PATCH 1/4] dt-bindings: soc: qcom: qcom,pmic-glink: add a gpio used to determine the Type-C port plug orientation MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230804-topic-sm8550-upstream-type-c-orientation-v1-1-36dd3edec7bf@linaro.org> References: <20230804-topic-sm8550-upstream-type-c-orientation-v1-0-36dd3edec7bf@linaro.org> In-Reply-To: <20230804-topic-sm8550-upstream-type-c-orientation-v1-0-36dd3edec7bf@linaro.org> To: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@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> Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Neil Armstrong <neil.armstrong@linaro.org> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1566; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=OqwjDDJ6wXxzZ/R9TLS3ZhkzX5nrKiThYc8EEj79dbY=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBkzQIXBfNNLcv9KzFJsuw/TYIGvMdCbOuI5stAXHtn +iuwmG2JAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZM0CFwAKCRB33NvayMhJ0SD4D/ wLoVGn84hF58XjNA6hMQ+niD52vUKxV3oWhqEbVSf5B9XhAJWlMsqoWkaHQkIOEj8IYyhjLTqq8bOt 8cMZ9p8l/tkGTB58R38iljZ7w/e+QsP8HXMzqz3QA8NQq9rdZBxqLBxpBarzyRGuZ2KChKo6zoBCHH TTUyI6N9dSaANs/sJAIAmEFgf3tcth15yHiifaRJa/TCUE92ClKTLBiq4wSsTIlNZR1Z9HZ+WLCeEq W+YmTGd0IbR37qQRLDzA8HmPinbn3igo61Msiy4wtrBckd1u/lUJF9IGX4T1r74DxPoNa1Ob3Nsvi8 srVxoiwRiIzClcDt3fVj+rt4zIOCpjZaipE62s8pFlz2DlNwUkznvJJaUobVJnNZMnYm1VdtpjBJsw Rgjkr4Gp9vbf2viS+3BJFNRSDoT+WAmaacJ44YnmRqJxogTt3wOHutBj5k+KCttwL4bZVT13D8d/ju k9asVHXTOPSn+QaB+IAbEgBZpz+Mil0+dbYdBEi4sjON3+KlXwtw1TQsnwt2IIyqmSVjdLRDXe8E1N TvI0B+oytZ5MJuf3kxEukNX/0Fr3jJonuKpEqGuqnFEOcTcOHoY89WkSsSD/H4P1ODn3BrkBkDr5Cb Eczr48YD/vkVtT25EW1Ov8RWWwmnOPpthwPJSB22C5QKmLi41qqiC8dD2MXw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773309858974651154 X-GMAIL-MSGID: 1773309858974651154 |
Series |
arm64: qcom: sm8550: retrieve USB-C port orientation from gpio
|
|
Commit Message
Neil Armstrong
Aug. 4, 2023, 1:50 p.m. UTC
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(+)
Comments
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. 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 >
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. 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 >>
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. 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 > > > >
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 >>>> >>
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. + 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: