From patchwork Fri Aug 4 13:50:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 710331 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 E32B2C00528 for ; Fri, 4 Aug 2023 13:50:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231443AbjHDNuX (ORCPT ); Fri, 4 Aug 2023 09:50:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231423AbjHDNuW (ORCPT ); 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 9D3C8D1 for ; Fri, 4 Aug 2023 06:50:20 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3fe4cdb72b9so1646915e9.0 for ; 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=MhLQ72mz1hqj7tbHCNQQFgJWeHeu77zXtgbFWP0LFaasWeBEH+gFj9q6ayQzMmIKPn lZPOyJDc/bh05gYF42Cc44Qsz74wW+SXB18E40XMMR+K7yaiRW1drYWYG9SLBf+AetCc bjTBSk6zv7/eDj1VZP0pCYfl0ozVJNqhnctmyypuQDDZNGdMYYCnTGCFbkfTsdjoRmAM zfIxzaGbBKEo4rAvT1zWXlMkkXitvXxcNLCJ13luH7fShj2r2N9CVabaRk1qaxSQ7WYW vijaOqoXCjcKwOT9GDJoNiS/hDghJwvsJY0smQRvz3mYGf5rINs5X2DmYX3u8ISAJbJt wEwg== X-Gm-Message-State: AOJu0YxTGqoGyfGIaVVGEQV4tH1UYnbExE9OSUevXq64py5kMIt4/ZJg +KnvHW2ZFUI2shm5sbJ/jhsOkLqjo8dhmREmg/6cQg== X-Google-Smtp-Source: AGHT+IHa3+bma9AUYcnhJNVyKIfX2dChvnPV6M/GXAV5okgMM/j1KmkdeHWmt1vH+sKaMpIN2Qd1jQ== 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 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 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 , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heikki Krogerus , Greg Kroah-Hartman Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Neil Armstrong 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 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 --- .../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. + 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: From patchwork Fri Aug 4 13:50:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 710964 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 076C4C04E69 for ; Fri, 4 Aug 2023 13:50:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231450AbjHDNuY (ORCPT ); Fri, 4 Aug 2023 09:50:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231440AbjHDNuX (ORCPT ); Fri, 4 Aug 2023 09:50:23 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE45111B for ; Fri, 4 Aug 2023 06:50:21 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3fe2bc2701bso19936235e9.2 for ; Fri, 04 Aug 2023 06:50:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691157020; x=1691761820; 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=fvPQtc3n+AQ43mIboHGUgEC6liC/yfr/8rGlBJbQd4M=; b=Hg+tVobDGieGUcB28lGqS7u/Kg3Nec6NTkRIl1Ry/jMOdf8E6uw5PkUJxKIrkSfB4Y ruf6OQk0fSxWy58aGsGLy4bKe9ZgL27XuaqTs1Lw0HM7nnqvP28+o5ORbry/NFq7Bp1x en7SEiP0k5pWEgst/l4IEPtL1ByPI8gZOCQZP64rJmv/lBRBZ3UQRZybg8tFivpvWhZA IvzQZ3VxNECumqpkVlxSLIRntXB5CWqtG1VBKy4RHT2flgzmDqKRY7TOnRWaGScFgRfv O0LG/t6PUuwKIU7WtkaNnYr1JnB/OMZljOV9hc9fg0AjnO4VxiwmculhzmYXWHSD08B4 9gfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691157020; x=1691761820; 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=fvPQtc3n+AQ43mIboHGUgEC6liC/yfr/8rGlBJbQd4M=; b=W9lksDNnZvQD5KybXjQ77I7pQSv94DhcHISrHf1lUQ1i7FzkEmSI0Gf49qTPE9YdgQ /xb+0r96A2u8z5rom385AzDz0fNxseQO9LXmWEIT/JyHFvFaxBLjB4J5Zjb8BIlfPkaT 4mTzJT8oY2VTHzcuCRPlQUaVAtRRS2s5AQlVn4+bID6q+mQQq8cBFjBtW6DKQOHS0pH1 FuRuTKjfFlk/TAwtI334VDcNxCQ+bRh9M6mMbCqWIxo9JZ4FjurS0v1OCvN4NcpZ317l uH/mG2X4l+zEdMFd20E6RoholeqB//0rSgWek/oLcfqf+QMWkDutiQ2HcY2qwMpZxf35 uk8Q== X-Gm-Message-State: AOJu0YyaGa2Qp9ZzBQYbQMD2A/rqR4XTGnPwGv9zFRC5fbNzJZnHtyyP Wlii0ZSan6c7RhnM4waoIxZxV0gItvBcgPZX7L3QYg== X-Google-Smtp-Source: AGHT+IFeH01Ul71Lfz7yHy0osMqSe97w2MvNWjvgtaNtKBWxfM55R1zGaAeI12b49Qk9Scr0K3+iNQ== X-Received: by 2002:a1c:7709:0:b0:3fe:1b9e:e790 with SMTP id t9-20020a1c7709000000b003fe1b9ee790mr1609742wmi.2.1691157020150; Fri, 04 Aug 2023 06:50:20 -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.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 06:50:19 -0700 (PDT) From: Neil Armstrong Date: Fri, 04 Aug 2023 15:50:08 +0200 Subject: [PATCH 2/4] usb: ucsi: glink: use the connector orientation GPIO to provide switch events MIME-Version: 1.0 Message-Id: <20230804-topic-sm8550-upstream-type-c-orientation-v1-2-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 , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heikki Krogerus , Greg Kroah-Hartman Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=3618; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=2Yx8kmPz9CwCyctqse+y5FCFBBh71PuYcaSNl/C5414=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBkzQIYPn2uv3f3KnvwEme1PsIabLipHvXWSFjfWe5D 0zTCEMyJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZM0CGAAKCRB33NvayMhJ0Rs0D/ 9Nf3DUub/be65RQP+RUcneISyhvLm49D5YBD2LAAYHwx7aJkO8B3QKE2D8zeWzWw6V6MQPFVwJeyr1 JwJMiQpX/1CaJtLDR1y5RQ4kPLNjn1E4f+33VD+BSciFR/qbJWD2LllMU9k7ZLE6DZ9IF7fPLb08sB Okb869TcY0LZBQdoCgG9YAdycRmQVwez1aZAaPRAOciaMjfunRfGi71aN6UeAi8SonfpvrruLnBz5r U/ZLZRVdrh60lRULOoEvY7ZhVLK8UYDWNRHlyj0Wrjm3s49bPF62GRdaDZjtf21C+YlVdoS7+1NHhS KtQVlfZpEJ3XSbLz10WL7bNLOdYUaSa4g9XZEGX8A4IGDYGh4mOEskjHKvm5IFM5vPstFXIDtDUz/o zK03gXcBrPayuugsjvoAimjZnCnY238GrM80rO8X8qYqVKz6QgIerBv2VgabGRGLjktNgAyINrJY+6 kJH5y4Lg5LYHHDz6BZvEog5RyE3OwuTvbHbU3j2Pb5t/v+c/mWaBlMgkisFWo+NNtq7iffhzM5So+p xvIMI2OIOs11+tl7YKprs0NxzFwzOFpfYUDr6sETCaNrZaHmnoe7AX7Ob5ZC43ZetaCs3bFVJDaOv6 plvBMBGhVBWTJomHEnF6qGJfNbFb22l9g8LgqnerA5xeXOypceV4AcunklcA== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On SM8550, the non-altmode orientation is not given anymore within altmode events, even with USB SVIDs events. On the other side, the Type-C connector orientation is correctly reported by a signal from the PMIC. Take this gpio signal when we detect some Type-C port activity to notify any Type-C switches tied to the Type-C port connectors. Acked-by: Heikki Krogerus Signed-off-by: Neil Armstrong --- drivers/usb/typec/ucsi/ucsi_glink.c | 54 ++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/drivers/usb/typec/ucsi/ucsi_glink.c b/drivers/usb/typec/ucsi/ucsi_glink.c index bb1854b3311d..db6e248f8208 100644 --- a/drivers/usb/typec/ucsi/ucsi_glink.c +++ b/drivers/usb/typec/ucsi/ucsi_glink.c @@ -8,9 +8,13 @@ #include #include #include +#include +#include #include #include "ucsi.h" +#define PMIC_GLINK_MAX_PORTS 2 + #define UCSI_BUF_SIZE 48 #define MSG_TYPE_REQ_RESP 1 @@ -52,6 +56,9 @@ struct ucsi_notify_ind_msg { struct pmic_glink_ucsi { struct device *dev; + struct gpio_desc *port_orientation[PMIC_GLINK_MAX_PORTS]; + struct typec_switch *port_switch[PMIC_GLINK_MAX_PORTS]; + struct pmic_glink_client *client; struct ucsi *ucsi; @@ -220,8 +227,20 @@ static void pmic_glink_ucsi_notify(struct work_struct *work) } con_num = UCSI_CCI_CONNECTOR(cci); - if (con_num) + if (con_num) { + if (con_num < PMIC_GLINK_MAX_PORTS && + ucsi->port_orientation[con_num - 1]) { + int orientation = gpiod_get_value(ucsi->port_orientation[con_num - 1]); + + if (orientation >= 0) { + typec_switch_set(ucsi->port_switch[con_num - 1], + orientation ? TYPEC_ORIENTATION_REVERSE + : TYPEC_ORIENTATION_NORMAL); + } + } + ucsi_connector_change(ucsi->ucsi, con_num); + } if (ucsi->sync_pending && cci & UCSI_CCI_BUSY) { ucsi->sync_val = -EBUSY; @@ -282,6 +301,7 @@ static int pmic_glink_ucsi_probe(struct auxiliary_device *adev, { struct pmic_glink_ucsi *ucsi; struct device *dev = &adev->dev; + struct fwnode_handle *fwnode; int ret; ucsi = devm_kzalloc(dev, sizeof(*ucsi), GFP_KERNEL); @@ -309,6 +329,38 @@ static int pmic_glink_ucsi_probe(struct auxiliary_device *adev, ucsi_set_drvdata(ucsi->ucsi, ucsi); + device_for_each_child_node(dev, fwnode) { + struct gpio_desc *desc; + u32 port; + + ret = fwnode_property_read_u32(fwnode, "reg", &port); + if (ret < 0) { + dev_err(dev, "missing reg property of %pOFn\n", fwnode); + return ret; + } + + if (port >= PMIC_GLINK_MAX_PORTS) { + dev_warn(dev, "invalid connector number, ignoring\n"); + continue; + } + + desc = devm_gpiod_get_index_optional(&adev->dev, "orientation", port, GPIOD_IN); + + /* If GPIO isn't found, continue */ + if (!desc) + continue; + + if (IS_ERR(desc)) + return dev_err_probe(dev, PTR_ERR(desc), + "unable to acquire orientation gpio\n"); + ucsi->port_orientation[port] = desc; + + ucsi->port_switch[port] = fwnode_typec_switch_get(fwnode); + if (IS_ERR(ucsi->port_switch[port])) + return dev_err_probe(dev, PTR_ERR(ucsi->port_switch[port]), + "failed to acquire orientation-switch\n"); + } + ucsi->client = devm_pmic_glink_register_client(dev, PMIC_GLINK_OWNER_USBC, pmic_glink_ucsi_callback, From patchwork Fri Aug 4 13:50:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 710330 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 AC17EC001DF for ; Fri, 4 Aug 2023 13:50:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231477AbjHDNuh (ORCPT ); Fri, 4 Aug 2023 09:50:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231440AbjHDNuZ (ORCPT ); Fri, 4 Aug 2023 09:50:25 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3F11171D for ; Fri, 4 Aug 2023 06:50:22 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3175d5ca8dbso1782027f8f.2 for ; Fri, 04 Aug 2023 06:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691157021; x=1691761821; 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=/Tu3tdlF/aAxTGoYq/qN0EAxQ8wdVfdldt4icc67yX0=; b=UyACFL8IjwAoSaTzEG9qPM43FDhJIY8bul/FU86VLecfYVtC2cXhJRHKRGLTL2NSo7 7DVVdbtbZjbQGRT08srQxQpTrC1ZeYg9hmyeby/VlEJpynqTu+195SJGnKpNZDLL4B5m zHbmIH2Geb5MafmhVfMLzmctdP60msPvsjbMlx4yVyLXJcSsgHHGCiUJ0IGpa3IGHZve C9q1U1kf/MNmoAtazd3MQ0BWFB8AJQlvq2Nxsaioxd4HHEEkMLgjCsE/+IWIg66DH1s8 momCp45X1AUfZuAFQEENJgUm/iahLgR19ixidA+Pdh0UJ9F8XephViAuhCkrbvEiclIV tp7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691157021; x=1691761821; 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=/Tu3tdlF/aAxTGoYq/qN0EAxQ8wdVfdldt4icc67yX0=; b=OUVeu3vlKZIp0iyr4MKUsSNzF3Jhi4yOWBMdL6Y0VP03UGxhPeN5KmBOj1s9vmHvoD DUezgLtYzj6rfBRPVMITRlIDx1ii4Va6fdYF5xXnsjeLMypD3pEYKKsAPkya3mlON1xV oxbxxMqObZ4Gt6PImlI0sRiXQa4vY+aNpxFyKY49EGxTxuQKuM2cXjYxE+co0UE8MHDs uYgratoJF+XbIt+iP8dXv89inm2fpPGHGwgnxvNUbqlKXuDbKcab6BrbC0FVJ/qhxJ9J xX4gqd6HFPce512W35mkbVmFwxgaYXi1+Vs2NCIRB8ma3nOg4OaIePJG02XziWFvUP0l ebUg== X-Gm-Message-State: AOJu0Yz1V32SIniB80cJ/8aHY+dm+afmaBM3hfx3EntyEZ1rBG68MlPN qtnBvbS18vpz4g+YRZjY3GK3x82Q2OZt3oZ984j/EA== X-Google-Smtp-Source: AGHT+IHF5R484MMjp3EGi3ZFAji+XidBlqg5GylB8vJOGFX00rXYq+BnoQupjIaHsRakpYPKN8SBtQ== X-Received: by 2002:a5d:4144:0:b0:315:a1f9:8667 with SMTP id c4-20020a5d4144000000b00315a1f98667mr1497099wrq.23.1691157021056; Fri, 04 Aug 2023 06:50:21 -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.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 06:50:20 -0700 (PDT) From: Neil Armstrong Date: Fri, 04 Aug 2023 15:50:09 +0200 Subject: [PATCH 3/4] arm64: dts: qcom: sm8550-mtp: add orientation gpio MIME-Version: 1.0 Message-Id: <20230804-topic-sm8550-upstream-type-c-orientation-v1-3-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 , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heikki Krogerus , Greg Kroah-Hartman Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=699; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=8sOCuRERwUcxQw8tCkw2c2ZONty+Zkv1ZtdLhzF/Vbs=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBkzQIYzDAKZU1oHG/gRLDaqzKk4eITl/Gy6z7Re7PZ MUmBQlKJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZM0CGAAKCRB33NvayMhJ0Y0xD/ wLpus4Fixy+gfvlLXIiWrZL70mpal3ErmjZ4h6vbinmuA5P01TT1SxvqengxyVtpC4ELcI1i/6UU9X Wgy2wGMDwWYrsKVyJqCzu79nktfdgPVdyhA2SAKkk8g/mCbZEjvoJBep7dICA8WOEUu1oSGpS7YtQT /6BABwCIUqneFnBRCPe+3vqKiuyifCPNQK5JDPEWiygFDrvRbgGPRg7HUG5jcrLpz/iP6BeXInl1Ij hK9PQQsXx46e0hXQSmPZwisIn5AFo+zK0BzjAK27HsF7BmOem5qtSsA0pKzwleOqcbVOphgktZAjST KAur1Qz+kPBClxpAcEoSXtIjeAvvaaZOQd8ZTnPq6mlKjng9Ng+Ln2HwxCB3DvQV1z4navicYQUXc+ ox2oipGv1bm+Z8syGwSQ9olHjCB7rgFxRxY/Yr+w2jrt1RsXDc17M85R885v3ZTiaiirSUtMM63JXH zUw057z/fcA7ck8hGAOpXPMot/2SJUQOBTJdS6cQ7ORGwTlROMDwRr0OkNV2BTaNPVZW3ePnoAbY+4 r99nZEbua1ogJosh618d2VfbuFV/lvdwZMZB3LSqBxXM7lUoGe/P+crPcFgviAO+vln75kJKwYsBEI wv+BFaaYps51NfusLLuY3VUpijVTqg3ajkZUhPYNjFrKtGnoXFGVEBygKVyw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Specify orientation GPIO in the PMIC GLINK node. Signed-off-by: Neil Armstrong --- arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts index 39a43db26ea1..4fef4eef6575 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts @@ -58,6 +58,7 @@ pmic-glink { compatible = "qcom,sm8550-pmic-glink", "qcom,pmic-glink"; #address-cells = <1>; #size-cells = <0>; + orientation-gpios = <&tlmm 11 GPIO_ACTIVE_HIGH>; connector@0 { compatible = "usb-c-connector"; From patchwork Fri Aug 4 13:50:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 710963 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 423FEC00528 for ; Fri, 4 Aug 2023 13:50:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231484AbjHDNui (ORCPT ); Fri, 4 Aug 2023 09:50:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231454AbjHDNuZ (ORCPT ); Fri, 4 Aug 2023 09:50:25 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 849071987 for ; Fri, 4 Aug 2023 06:50:23 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3fe4cdb72b9so1647445e9.0 for ; Fri, 04 Aug 2023 06:50:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691157022; x=1691761822; 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=ukcL+6odfb1FFYIkWIv0OQk72o2fTIvHxVA78LrZQtE=; b=vGda7p81GqHiR+qtqDS8bCRcL7vF/bVymUQAHZpG+53cfIrfPbH7ONrw8Bw5hZSb5J n6GDOaAlbnuX9/1Au4Wq1TpJUQs58Y38/MbtZyYgWvPNYN9t6LbnM9QJORPWwpyEc8yi UoessiuldhM1j2+6zn2k0ACoqIQlGJcxnY9LJc5nfZ66aVwEhafRyDcReofeLbihNMgO 4Z9xwi+zFuNltTx5lh7kZiPrbjpRR+WMiK8m/eKinMy1+6mYtkcxmxbkEUGF5hOTrA7f dK3hj8+EgyysU2AD3M8kFGr5msyCOWbtzunQAIdl5PsyE613OHxqtfoN5ArWTTNdj1yP U8SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691157022; x=1691761822; 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=ukcL+6odfb1FFYIkWIv0OQk72o2fTIvHxVA78LrZQtE=; b=Bm3CqiR6Kfv0NSS+vMPHjhctk68ifCHJzNAcdHy2gjmQThlE+dgjl5OppNhxxOFEGo WqfcGuPWG9QrrGt+xPDuUd3FLl5JIp+S4RHW/uOoS6fFtUrw0NWCO2eZLzfkXD9YhxKV HC02aPlHVkMo04EBpSiGy6c46VHHvMSN9mZwdKwYdwAGMv8xFHg4ErGSwqgmcNmk+sVQ Y6S1CZvPvgsNt/+rONT8CttOLHxceSMHhnCB5jITMsTI2VO9jhvDxyx3qvvggiPFJRfp NQkNrOL4lUcxNM5ID+vDg8t18ixAey2wXHBqJb6+jzU0JeTtVulFILOpj3fISIFL/vJh /Zzg== X-Gm-Message-State: AOJu0Ywmfcs+QMMZ3vQXNF0pPNLCp338IAzgTJZEidAYjqsreMWbGVo5 yfxltJxJD7uYB2ReRDF3GrtNy670lXpQ48BCAc2tHA== X-Google-Smtp-Source: AGHT+IHqV+Yo5HvNtyM7QPTWXzBAXAWYv24S6GAlI+HjEhfCLaYShG+3Rjjv5X3ZB/nwbzzEzY3Dwg== X-Received: by 2002:a05:600c:2255:b0:3fb:b008:1ff6 with SMTP id a21-20020a05600c225500b003fbb0081ff6mr1611819wmm.0.1691157022052; Fri, 04 Aug 2023 06:50:22 -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.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 06:50:21 -0700 (PDT) From: Neil Armstrong Date: Fri, 04 Aug 2023 15:50:10 +0200 Subject: [PATCH 4/4] arm64: dts: qcom: sm8550-qrd: add orientation gpio MIME-Version: 1.0 Message-Id: <20230804-topic-sm8550-upstream-type-c-orientation-v1-4-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 , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heikki Krogerus , Greg Kroah-Hartman Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=699; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=PgRVPE+sttPCsO3i6Si4QDJqPDiuAM0EzLTcJZd3VKY=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBkzQIYYmczdV+OIzmHi1D8WSPn1fn/O3VPLkAQcZtm FYFCwe2JAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZM0CGAAKCRB33NvayMhJ0R03EA CDre8ntJmi2BpNmhQ+svCFicfZVV/zzlmR3t1hUBND1kN6Ht3bmIZvq4LGTR/bq7JXLVP2ef9Pc3Rb ISqqu0DvqKs5Zxj/U9NcMRt1ZWh2YsKvhzx/FtgaU3ysRvkGL1wykhN9mVxCCEm/7nY327TLfWDY8y oym2IPMNoz/6RWAwbfm0UV1WH4UpViXGk9+NoDDiFI4zaHxXRqzFEy74i2wZSlBafP1kt7/bHC8BVD 7JfLW2XIC1XCmAhTR3dMvxcdh8s1LxOdpDRGqGAnv7ofNu1xYrFnWky60GYhqS1BsTPuM5jEt1y3Ui kjkDqbZzQTz/DD+Dcbph0XCc0nyBAf218unohsXmzkKA0sJauo6+d+z70MvO1pxYUC+Uonac8uxTjZ gnSSyzaCEE9uSfyDAh2++2wkQu/ozYpB1B8V6wYA6ehAHNLXR7xrYD/cHUwpWSGcAODvOguRlKSQwy /kMSeAtXPNwFo0iIVIPyv0bNB2gwCc2KWXA5guFDDhE8x7QyM/rYfkIJd1n/oWn+hUU1ZqklRLUoIe Ms56mvZ2l8q3V0Cdw1j/Hb5WtM4OtUpcblAfBuFigNCOHnnWaF1K2XBEGPG4fvg/WB6//NOF8PlTJC PCcOL1f2zxN4ASWP8gk8kA7B0ZjDPBm/yVIr0BMHrpG63HH3cI05Ak7MhSgQ== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Specify orientation GPIO to the PMIC GLINK node. Signed-off-by: Neil Armstrong --- arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts index 2c09ce8aeafd..950dfbf73410 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts @@ -75,6 +75,7 @@ pmic-glink { compatible = "qcom,sm8550-pmic-glink", "qcom,pmic-glink"; #address-cells = <1>; #size-cells = <0>; + orientation-gpios = <&tlmm 11 GPIO_ACTIVE_HIGH>; connector@0 { compatible = "usb-c-connector";