From patchwork Wed Jun 7 08:05:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13270137 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09819C7EE23 for ; Wed, 7 Jun 2023 08:05:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238677AbjFGIFM (ORCPT ); Wed, 7 Jun 2023 04:05:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235583AbjFGIFK (ORCPT ); Wed, 7 Jun 2023 04:05:10 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3895196 for ; Wed, 7 Jun 2023 01:05:08 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3f7e7fc9fe6so22827835e9.3 for ; Wed, 07 Jun 2023 01:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686125107; x=1688717107; 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=hFkrWIS5bTgKzqSbTWsL+LQ4FdpiC/6RkXvEbzD8M9A=; b=txoDvQrQk60WWDZ/So4hJmmttkncWh8gwvo1vGDyHsRSKl3ozjyKMt0dMTjvBjbzP3 eSm/NWp2vjM0ZfgIsHDJDPVEJx9y7AgcEqgEWvxNq6xwXK/Bo/95ZQo2NSwOuUXdko35 He377+OiJ5GvHzcQdY2qcrH//WQhso8psiO3D8daOnvgvEEdwtEFhrGgssBPnGwJTBGw MzwFb4bfa7xaWKF4QadjVCgAfH9GJ67GemaKnbGWoM3wT8R3pRjoIikTuuUPy/baC5/B tcXdy9qRshjdQgpBgUgjC5iLVbkhIBZinrGYaOqfU2u9/zCPwWdb1ndwn1lDWE6Q6O25 Hxvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686125107; x=1688717107; 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=hFkrWIS5bTgKzqSbTWsL+LQ4FdpiC/6RkXvEbzD8M9A=; b=Z0AvhIh6EJVWDcjxCQm5EQM4NZtQI3BU0gc3yjyPUYLoFoyJl83ixlyEvmtv3lEHVk M4ROzZsHljCZGEnyZrB1I5UjA5/EihKFqV28dX6CEdh7KLAaFE4cC3b5bCh66ZNGfnsp p8xoF1AQAzv9GTfe4PIMSiQ0+/sHW/2iKrX35XUV8I8sdu6Whu7bkhEabzG72hQrS6B1 GFV2NWLDs8Gr4qRXC02TtP0jSUBhEuaaY+/ILOomeawm7FB7KqKKa5e3tYSTZEb8tGbb WmMsXbz2D158bgdfJH6z+bH1sERA/7e9Bb7aQONXlgYxMqzMZqWfJRclY3SGnJ6+l9Bu xKiA== X-Gm-Message-State: AC+VfDznw6zCoRIg0cS3NGYveOT3lta2ZphVMWuW0UAwaJBFDVfzgWPB /MaZDqaHy8r/7DAea41Nei4lVA== X-Google-Smtp-Source: ACHHUZ4h9m4HjuaqWHyKHfeFAE3GH8rc/9UYyxOTzQ2nukqHYFkxFrlgNQNTkat0NmP/4LQ56n+N2A== X-Received: by 2002:a05:600c:28d2:b0:3f7:e5a0:c5f1 with SMTP id h18-20020a05600c28d200b003f7e5a0c5f1mr3670504wmd.32.1686125107129; Wed, 07 Jun 2023 01:05:07 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id h8-20020adfe988000000b0030ae5a0516csm14706269wrm.17.2023.06.07.01.05.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 01:05:06 -0700 (PDT) From: Neil Armstrong Date: Wed, 07 Jun 2023 10:05:00 +0200 Subject: [PATCH v2 1/8] dt-bindings: connector: usb-connector: add a gpio used to determine the Type-C port plug orientation MIME-Version: 1.0 Message-Id: <20230601-topic-sm8550-upstream-type-c-v2-1-3bbdf37575c3@linaro.org> References: <20230601-topic-sm8550-upstream-type-c-v2-0-3bbdf37575c3@linaro.org> In-Reply-To: <20230601-topic-sm8550-upstream-type-c-v2-0-3bbdf37575c3@linaro.org> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Gross , Bjorn Andersson , Konrad Dybcio , Heikki Krogerus , Greg Kroah-Hartman Cc: Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, Neil Armstrong , Krzysztof Kozlowski X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1291; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=2BYsv45cOvI4rMBwObrYr2vtUKgDMNXxdkhZSI9+W3I=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBkgDotXhpav615rwfa8P5vA62KMEvrgA4SntRbTQQR iSGByJaJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZIA6LQAKCRB33NvayMhJ0cHND/ 9ugqVUtFHO8q/px+feNwoCjGiM/oRYzf8WzDcaDFR+opIFGh03+ikQE+S9yt8r+w9HGfUn66ES9BHN Qj5IzR8K3c0JpdzXgFTy/jtnJybqzTb0cCPaloVG0ZXYo+gHFUESHei+udoM71T9YGSrAe4jl3S4eh /HM6XPsRfSD3Q52N/pT6mbXONr3rduAQbksXdg1AlqJ+jY0zAhuymFKoXfONYOnNLlBdn6PinNcTWf TnOi2ISLemQjNAvNJTKYAm7snfPuhwhwPDbyqvCj35P1eW011rLVuLe2kutJPyKm/YtyZZZ5dZ4hAo 13svtHsa/RC/t5YypFs/A4ZueWixMA6gJYm+SbnvnSiQ+xNfzZa1KFEqVh/U+1ZCdpBkVKSfQfoyvG Z7kknJyEnunTH+Jv/16+HrLmnhsGCiBmfazbwwO34kY4IqfzyGpgI2PvzjeyPrMoCEImUrF6w/X6/E H4M5vC1fTt4rBM7guBH+X9RvFLIsMPpjmcglnoo4RA3vGYaeVkoV9lxXxncyzxsg4to9B07bKD1Jku uydt43m9e6ul+OyGcLhGqOvfb1cucsHR6z340/eHfnsasdZ4n8dmiTYI+2cki0iLMzUGugeBaxTU53 qcep4FvmjW0e+AGz9wNFWsGKkh9aLsNI5xIs9YhuvN4EumLDgLGDIJ3QmhFA== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org 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 Signed-off-by: Neil Armstrong --- 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: