From patchwork Thu Jun 1 14:07:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 687905 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 493E9C7EE23 for ; Thu, 1 Jun 2023 14:07:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233780AbjFAOH0 (ORCPT ); Thu, 1 Jun 2023 10:07:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233687AbjFAOHX (ORCPT ); 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 A830E1B3 for ; Thu, 1 Jun 2023 07:07:09 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3f6d01d390bso9269515e9.2 for ; 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=ENwNE8FQB4POIKs1dKgV0ozvwrgL2i9mRR66ifJRWg9MHMFJrsSbJ3Mi2lkw38/Owv ooHIdjzCiWPUXsLL8Wx5U3PEiW4FZhzKP1BSoPGlWltVBuzALNwmj2eW5WvxPzrwPDXm rk5nFs1tgHVi+x05JIvokrswe8uD0bc5xD0O3lK/fKoiIAiAfp34GxWmnLucx4VaL90d QE0OftkjEtXTW0xfJGbW8xH664LylBbBx9XSkPu6an7BDz1P37UHsrAlkM5sny5Yh96w GPe3VpNJBs8lMKitFAMR8EaLmIc2oIFk1/vDWuTDFwEsYHoe383zON8VQEm3IKL/y/L1 p95Q== X-Gm-Message-State: AC+VfDw1m07gePXfNt+ty5cSLbUjjPcsu2Q4ZxrhBg6W4oxxxs/yslBH NHO0SWOSiFmrUsJbmWcfds0zoA== X-Google-Smtp-Source: ACHHUZ58I0XJymFL/i3IMgjigb//ajC4y2R0ISDG78hWNownQvH+1B1dy8mQKsegL9OlHc/B0X4pfQ== 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 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 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 , 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 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 Precedence: bulk List-ID: X-Mailing-List: devicetree@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. Signed-off-by: Neil Armstrong Acked-by: Krzysztof Kozlowski --- 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: