[RFC,1/7] dt-bindings: connector: usb-connector: add a gpio used to determine the Type-C port plug orientation
Message ID | 20230601-topic-sm8550-upstream-type-c-v1-1-d4d97b4d8bab@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp358059vqr; Thu, 1 Jun 2023 07:09:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ590lojq5BaZRm75AoXKb01QzbNXN0IDkXjNYRxf+Rfc5JLBtQ/QfPIe2nH+adH+kHBlvVt X-Received: by 2002:a05:6a21:998d:b0:10b:d70d:f96b with SMTP id ve13-20020a056a21998d00b0010bd70df96bmr8344254pzb.3.1685628570032; Thu, 01 Jun 2023 07:09:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685628570; cv=none; d=google.com; s=arc-20160816; b=VZW6VFaLfoj0jRopZknZg3QBH/WHzJQ1r38u4pg9kFD5l2uPwHAhRKIFVQj7S/UCfq PYk6cL1cmj2ksJ3quFqkyeLH/qoY5QtTSyr0ezJxPTJgTAYHjJQ52Yw6cVimKNewpX1O n2wqxh3Xkp1mkMpx/iGp5JUfEBZysb0WUMG36rPzDbAo4o0AxiVeh7P+lMk5T97Kq+UE MsMPh9xgEHjos1WMaf70iRW6AOu/laeGtGYho3NKOO4HemU/p6i3bD85DqZx7GQJL1hG bUNAaHKwJuCZ/KLD7is+3/LNeUHQmq5C3YYM6q/iWmyBTL6O3YlNcvHjKPWbYP+s9DaF 5MWw== 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=gDXbkTppdjxAQ8h3R3G3hKWJWRPcHZlz999QVqKCfpQ=; b=Hxa/CVj7caEFOv5hdCJUN64Odt1gZTSfOZHRuUIdmvUKi5p6Zfdah51ew10QO2581h oCaME+6EL0KSB1OMw3yKuswzSrnDvZEs0RJOq87rdNtbItxJdWvKcOgobH6i0JYyZkrM DIK9XS2hJCWId0/2S64kXVrV2WgvVRO6rrfS9oeaXC0PBAPFrgjDcKoppszQnVR7CDQG HRt7Wfwu8Ojx+AD8vyFgsSw5bsC2LCp7RsHTemf8koOLI+Qs2CCljxlx2XBe5T1pAlMN CpD+3BeH56Dlvn4SsI8wMWBQJ6Lvn0CF88ZWsydK98Kxt9tuaYZziGk6HWWl9PCLfJ/F Y3BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ESrafRqy; 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 x28-20020aa7957c000000b0064d425629dfsi873854pfq.51.2023.06.01.07.09.17; Thu, 01 Jun 2023 07:09:30 -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=ESrafRqy; 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 S233831AbjFAOHa (ORCPT <rfc822;limurcpp@gmail.com> + 99 others); Thu, 1 Jun 2023 10:07:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233685AbjFAOHX (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 1 Jun 2023 10:07:23 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8222C1AB for <linux-kernel@vger.kernel.org>; Thu, 1 Jun 2023 07:07:09 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3f6dbe3c230so9242125e9.3 for <linux-kernel@vger.kernel.org>; Thu, 01 Jun 2023 07:07:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685628428; x=1688220428; 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=gDXbkTppdjxAQ8h3R3G3hKWJWRPcHZlz999QVqKCfpQ=; b=ESrafRqymDIAEtGcBVrYIbqesxFh4y44UJCrFQZAgEeNDSs4PlFzn2dJGuwZJC4rGW KCRj5Yu9BCivOe5fo2ovHCgNyODWqfTas5VlmRgjhJjB5Kv677aOEBYneJiH1Yl5Omo8 LpVkd3sUBbPTidlQs4T+5KUoyH4L7jU9Mka90+M0Re3OPcX28NAsFfJo7T5X/Z5tml9n AhZNBRQAS1VceOC/xLHYUDcFwdhIqdyCZHX1CRsV5QN0GQXGSn4Hpo3vKJJy/kvkhm+i P9zskhTmigx1BMGsM2H/yaCeCRcpjzc2bwpE+jTpmdDuCDjmUUsuO/zJ4la7NLHQP0mI RmxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685628428; x=1688220428; 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=gDXbkTppdjxAQ8h3R3G3hKWJWRPcHZlz999QVqKCfpQ=; b=gzLmkFEvKkLn+irKpV8Ftqfg//oA4jOeP70MBRqPbDOQGNp756yXn++Emc2GV2OuWt 31f1bAJ4OopXon26VLOTWcPPDkSVP9D1vrC+3kKXBB3QsiBKK/bPwUHGiwyHnrpOz00I TgFDHUJKnXmlYXGkkbEk09aXb2TbYgmW4OXZE4MsG8J5C4K5eIS0jr7HxNh5ckRVipwP gg/5RfGIMaXSCwiW93TAYyxTP44LtwCkc7KufhjljY4hRbruY3LpsCC8YX9mRJn3KK8d 3l51kXLNK+XbE0J6ZxQENU7gTSC3tVVitZRlMuq1EbeFXHmBCIUd2J4uBOjJQxsC5v6F cMlA== X-Gm-Message-State: AC+VfDy2TrceZlxqCZ02ZLpe4Mc6VzrF2DhpsGkxa0ETywwzfSPOYpPy o4CxwIFWv2mEbXMydgEryFC/Uw== X-Received: by 2002:a7b:c00f:0:b0:3f4:1cd8:3e99 with SMTP id c15-20020a7bc00f000000b003f41cd83e99mr2041970wmb.28.1685628428080; Thu, 01 Jun 2023 07:07:08 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id k11-20020adfe3cb000000b003078a3f3a24sm10504166wrm.114.2023.06.01.07.07.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 07:07:07 -0700 (PDT) From: Neil Armstrong <neil.armstrong@linaro.org> Date: Thu, 01 Jun 2023 16:07:01 +0200 Subject: [PATCH RFC 1/7] dt-bindings: connector: usb-connector: 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: <20230601-topic-sm8550-upstream-type-c-v1-1-d4d97b4d8bab@linaro.org> References: <20230601-topic-sm8550-upstream-type-c-v1-0-d4d97b4d8bab@linaro.org> In-Reply-To: <20230601-topic-sm8550-upstream-type-c-v1-0-d4d97b4d8bab@linaro.org> To: Rob Herring <robh+dt@kernel.org>, 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> Cc: Rob Herring <robh@kernel.org>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, Neil Armstrong <neil.armstrong@linaro.org> X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1227; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=cvE1/snGhi9JqHiPX/H9x4U1AzFta3//P9TFUvBRJSE=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBkeKYHIwKO89Hmu4fpuG5/L+zks0oTkmwh5IzqUuC/ NghOYvyJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZHimBwAKCRB33NvayMhJ0fdjD/ 9cz5nH2w5E0PzN7Ncbka3ISElAsuejYJ8/1iadM9fKugu+gMIYBGfoyI9UwA58ybLNXBgFRDT/nv2n 9AUuyKQEAZ5uc8S7R5yqlWIdP1pJS67tu+mfywu0/nco1/PZUOM3eV3b9rIGAFR7NdkSN4+8os34r4 thFXMbAXw7G4h6l05K525TcH8KNsIowJ4C5LQ3PFDHmZ3XNp1IcUpQi8JpSXrIrMmYVr1ojRD+sGaI F31yOCS9uwIy4Tlyyrni3fzcyItDwMNLs1kAGXa1qBRaw3RRC2bm7vo30pPaeb3Pjan+KbvM+lhnRP qgf7NRdFppD5ClAnY5DjEbqDAygNI7Zq4K8Mi4gCEyKnW0mVppRVvNZycZiXPLAasLBb0S6kg5WHc2 0iWP0+IBjwclrlezAGiFyFZAEik/+enLw4q95xG1MrofWx0BjNxKTLVqtM4NjsAWKdLBodTg3Ai3dV Pb8IPemBJu46Ec7ME1AJxSU3U+XZ+Ld3EDenoOX7Ep8jmFm+DcS8tubVUND/2OGlxMgRpxs7qTNlpl /ilWcX9FJXm2Cn/IW5NcXvmwFDJvqrl77ozc4Fw6qRt8MbUFuDl3oOFUsXTvH1XdrsaZZOluIpedcq gxmD85I6MMsy8ztVfXrMYiKQjhYrJCs42WuqpdCU1F3e4f8U3yV8/oXM70Aw== 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_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767509663204095519?= X-GMAIL-MSGID: =?utf-8?q?1767509663204095519?= |
Series |
arm64: qcom: add Type-C Altmode support
|
|
Commit Message
Neil Armstrong
June 1, 2023, 2:07 p.m. UTC
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(+)
Comments
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
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: >
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: >>> >> >
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: