From patchwork Mon Oct 2 10:20:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13405801 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F44AEADE for ; Mon, 2 Oct 2023 10:20:37 +0000 (UTC) Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75972E3 for ; Mon, 2 Oct 2023 03:20:33 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-50307acd445so24860120e87.0 for ; Mon, 02 Oct 2023 03:20:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696242032; x=1696846832; darn=vger.kernel.org; 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=ICWvHuFsaFLK5szrah3dwwdrzpV6FfDaZOz40gAcqqk=; b=WGFbRrcyqw9reHfV5SCfD92CLMNthhPXKKJhjP6YFL1jx++/cQ0j4OjypXW8Hb4Zxn QpNuroBc5tasNahgSCaLuFK6lMNcpSuBeELgdpyT2h9xrxcTM3UwRZJGWt1BEnVAKbqF RBKqFK/wooUEjHOs0gJlHeRV2TEsE+heWsshb1g64j+U02j7DdIGLbs/rKbFM4qCoEzT hqi1AbvHy7lZwcublbi960ZTMqqpFkyFoIRqKiNeVJwr7zFO6UboaYx8YiGIwerz1LgF gsELyGJ4e/xYtnLnbLbZjODfyPWLWUJnn/Je7SXYaj+Gu2ML5uNtoF8QbQod0a7lvaOJ hF1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696242032; x=1696846832; 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=ICWvHuFsaFLK5szrah3dwwdrzpV6FfDaZOz40gAcqqk=; b=rEsEpSrOfP38KDE2jy9YZ2TDWvKENhaAvVGAq/9Yxr+ExfjdDyR+YGiGU2Q+YTSm6a RPGn4bH9clBuuRReOsH24XOuIG6Ni1rkwljOJQ8DyWAFPca100PAmDmHIeUDSVlo8RbQ TAyytXEtIVihU2BQC+ieuAvlDrIAuC9lv9QVSua+8PZzsqnWm9eLqCAUk8pQuwu0fcMx GzF72vE5xBgd55E8UkFbdIL9uMKDP4YYXF7+PtJlxZPLCaD1OGcg2TNb4wJDD4K8A5dM NtTQICOxhuHWlKguw+Eku3OnyZuPHJe6+dXThHYK3vjaTn8+JOdHQTO+yvGWOwv07g3H 3KFQ== X-Gm-Message-State: AOJu0YwK4tW3RI+1rmQX1OxCj6rxaIH39zASZ9TjgGJj7V7HQRwjChn2 RUVMB8G26BItlkqetWwqygaMrA== X-Google-Smtp-Source: AGHT+IHH9AffhbFDJfNzTdURfoi9bsKLkCyvLukcnhRxhhPNC/iBQ2DUCRD0oBggM3uwEdeYac88SQ== X-Received: by 2002:a05:6512:4019:b0:503:2683:ec7b with SMTP id br25-20020a056512401900b005032683ec7bmr11113056lfb.33.1696242031604; Mon, 02 Oct 2023 03:20:31 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id g18-20020a5d5552000000b003196b1bb528sm27822901wrw.64.2023.10.02.03.20.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 03:20:31 -0700 (PDT) From: Neil Armstrong Date: Mon, 02 Oct 2023 12:20:21 +0200 Subject: [PATCH v2 1/4] dt-bindings: soc: qcom: qcom,pmic-glink: add a gpio used to determine the Type-C port plug orientation Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231002-topic-sm8550-upstream-type-c-orientation-v2-1-125410d3ff95@linaro.org> References: <20231002-topic-sm8550-upstream-type-c-orientation-v2-0-125410d3ff95@linaro.org> In-Reply-To: <20231002-topic-sm8550-upstream-type-c-orientation-v2-0-125410d3ff95@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=1747; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=L7UnCblZqCaCfW4IrZ58Z/ALtSFo6Rtxp79suaPVa+c=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlGplrkqZV/Tmlq7jEKIw/ICGOw1HdwAoPaffkBJCT u+mNY6CJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZRqZawAKCRB33NvayMhJ0SSWEA CQqVMykzVIbnYm3WSgupWHnT+di0HYfk1Y7rw0Y8BgStNrBNTndgtHxdON1IPN3lVC/cPM+J6Xl1t8 pCKP0o8HZidzHv6RD9PF2v1DZpf6AmwKRRcFxqNMxi7nVBkAJTNaGzPIV7w+d8fArKsDdaEQ7fwyN0 5XBDDRnqyqUUS0andHcKg00hxF6ulleTOAHz79jsTby/kD4vg6213txvMzDeKQOqWlpcnjvt3JS43/ dkG7EMr2atvs+YbRr5+0y4AIOzgUa7j+6Zi7MO7ORd58ujpSDQbAxMzuKcWc/9jieSSrX06VjfJfD/ Bj3c7kYvl65k1tmTrk8D1Sw57TguhfveGuxfTvlpS4DhI3EVBW2DwRB7Cs1rXfqsU6m2Kbjz0NH1zh gb0eY23NQnVi/vbDU1sPJ6IyzqRAU05vq6EjUbXejb4pmXune3uVNOHvl5dWVEJDovq97CdyOg5S9e jqc2UgeEacN8s5lXJmk1cbwtSqFnLOpwCoU+4oHI7vwphYo4itQqogsKVCF0jpsm0/LgVDoqx5bltX qMFcxOewcic3wDRqC6HWbL7iW3iwYfUxsgGI7c4yE+hlKNeoGobh4Fzd7J7G3wlnEUzxDPEzTg/OnT XJPsc8QtY7PbxvWh9NuLQLIbPwH7BSeMsVJcZ7rD4UdYbbcOA1cAZmNtnNaA== 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net On SM8450 and SM8550 based platforms, the Type-C plug orientation is given on a GPIO line for each connector which are set by the PMIC(s). 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 | 19 +++++++++++++++++++ 1 file changed, 19 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..422921cf1f82 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml @@ -35,6 +35,12 @@ properties: '#size-cells': const: 0 + orientation-gpios: + description: Array of input gpios for the Type-C connector orientation indication. + The GPIO indication is used to detect the orientation of the Type-C connector. + The array should contain a gpio entry for each PMIC Glink connector, in reg order. + It is defined that GPIO active level means "CC2" or Reversed/Flipped orientation. + patternProperties: '^connector@\d$': $ref: /schemas/connector/usb-connector.yaml# @@ -44,6 +50,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 Mon Oct 2 10:20:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13405803 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF6B7F9DE for ; Mon, 2 Oct 2023 10:20:37 +0000 (UTC) Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 338989B for ; Mon, 2 Oct 2023 03:20:34 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3248ac76acbso3588790f8f.1 for ; Mon, 02 Oct 2023 03:20:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696242032; x=1696846832; darn=vger.kernel.org; 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=i8cVf5/Sgrtwqj9B4+mwRdMn3KaA7Da8yK4N8w9jP9oLYeS2vz2Z/TDn+zezi6kTT3 r2osTCRZ0J9Q1w3IznBpxq8gTQ5A27n9ZjaYTeAsJaORuEHI7BScaeKr3kzBEC5Ln4x0 boke+BNufRNNCiSNLamzgob2eajTSOHQT/yEJMWXwNnhkvaBuxSyG7Xj34gv44e2+AsZ kYTqHcibwUGdszNdcu5UG4SOXU8UMfWo+XSATW9ifXiIXDSk29roT8QmWtSTfaMBqVNS OhGzb/YCycwr2oBKnSzDQTwbiEMLB99b8kZZNetHJ8Tx2xbUi6BEbdspHzslDFhs3VYs 8iPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696242032; x=1696846832; 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=LtfbhhIbyIvY+8o8fITZrEsvAp+a6dvQJbOWX8ZxmhWipGlrh6BSw4Y3OkYHVlJmQA 9sXYxs5ZJ9mUHHWb0YnkKJoWJEdU6EhZO29YySJqIJACu5CYFIry9uwiQ1SY3gTgsOaV Vu7NC1/X6k0tKQs8EJDuHaFaELZGYdH/ez9QVhTgueUEZrFe2AaMH78CPAy4qXXN45pK 58pw2VbcDuhpkmxnTI7bEBzuNBGRzLYKfTvB/9deOd8sMxHDWTn9g6u7uSK9shQT8njt /c/WtKLpRdyTU8sbeQDzgwEhEIDcHEq67UTSUt1Z4nBbxIuY/6yAU5zhtlHEHp+gie4B jNIw== X-Gm-Message-State: AOJu0YwXomd30+fuGEdv7eLpLkDuQSFLpew2YFgIokAAfcHzRl+sWvdP 5lvFkL8Pp62q6K4oFNBadhF35w== X-Google-Smtp-Source: AGHT+IECdLWreIbmHwEsopXALpa+60ZA82MQQlaUknSlKDWOENDphq45rofB8R530GJjKBCe1dToJw== X-Received: by 2002:a5d:5944:0:b0:313:e971:53af with SMTP id e4-20020a5d5944000000b00313e97153afmr9057173wri.32.1696242032607; Mon, 02 Oct 2023 03:20:32 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id g18-20020a5d5552000000b003196b1bb528sm27822901wrw.64.2023.10.02.03.20.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 03:20:32 -0700 (PDT) From: Neil Armstrong Date: Mon, 02 Oct 2023 12:20:22 +0200 Subject: [PATCH v2 2/4] usb: ucsi: glink: use the connector orientation GPIO to provide switch events Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231002-topic-sm8550-upstream-type-c-orientation-v2-2-125410d3ff95@linaro.org> References: <20231002-topic-sm8550-upstream-type-c-orientation-v2-0-125410d3ff95@linaro.org> In-Reply-To: <20231002-topic-sm8550-upstream-type-c-orientation-v2-0-125410d3ff95@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/ZANAwAKAXfc29rIyEnRAcsmYgBlGplsF7+Dg78ioO42z+RuUb9rBfP5QAdO7swu1U+v EZHsKOaJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZRqZbAAKCRB33NvayMhJ0aDdD/ sHvCQ54Ei75dbWMtkUnD2MA9Hd4JvdfmCEBHJGZoMKSPHM6IcIxOLSXVgZViCk7+XT4p1oxnRHg6Gx YlGdsQ9TkgbvxXJ9BHlIh0++1GgO7wwHT07Fm7nxly3kKCgcEM+wszHLBPlp/8xCyNGHRYjN1d59MI p6mzWy9ssA2/bBq9ZF8JA8RyKQPAzOjQ0RiGBWOnUdPg5Aqr1vDbm0XwR5hEdeO+6driVpx761Lykv JZtwsNZNCqWgpWvrRRBhjaN6P4n4ei0higGOeva7YIl6UFomKOZiGgUk5Mi5Q3jacS/t4dia5H/sf0 25bhM/QFfHbqCu/T0xmE2xOBF+vTvPBFN8uX98FMPk+fUQHSEy24ajC3XLf1ZbUauuF9ob3o3uRuvv 6Pu8M5OyZ2IwoDqLrUuRPMFYEgX/ly6Aqmx+x717asxvIssUa+NmsI9WpyxGMyAMeF/VxkTb/wpdfV bYoD9OZpRfJ9Eae9pUdGzNd6E6vlyaAf2Nh5XLBWgKplvy9/K/xLhZ6Val2kh8KsWZgKtuiyAOipvB rFFAU0ab9UrXBuunBnH/3ZezOavkzblQ6eKkBNqJiTEPMGrR81gSKsKwtef9Mqi2jkLB0vjPFy7XkC b84pfO+COAb8Vr1cXoVOaeXuq2SzVrhQlA6K0arHujksBAD0TtYC2EkFK+tA== 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 Acked-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- 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 Mon Oct 2 10:20:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13405802 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFCFEF9EE for ; Mon, 2 Oct 2023 10:20:37 +0000 (UTC) Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FE86101 for ; Mon, 2 Oct 2023 03:20:35 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3214cdb4b27so15285159f8f.1 for ; Mon, 02 Oct 2023 03:20:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696242033; x=1696846833; darn=vger.kernel.org; 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=LuTDO2UtRAcpC24/4lfh4kk2F6UtSieH79vQHBHYa/Q=; b=K1R7rsJ4sB4Xf1Nu76NeBMcvqTjmiVBX3E7Me21ez064c4WzMUboM+nhL8U0ud3gnc QcRnuD54wbDvMZExPsjYx9a5y7h0CWcMoFiv2Yq4VCaPYZSMle9tu5NxWF/gBx8hjTk6 StzfVzi8jlJB5I2RYknOlAM/LBRTRmig3s9hTroSzEfI14xGB73epzP5EOYyJ73zaFFH Pbszt2Zs5qjCIIdw1ogWKJLIKe8wzJwsS/Vc/8x9RB3KrUf4TlWA1hrXPdMDg21hPQzX NF4d+GqrvsFh1Dph2Dff2XsaBZZnhTu9tXw4LBjO+tlVTcHo2msx8aApFfII3UUUempM rVlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696242033; x=1696846833; 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=LuTDO2UtRAcpC24/4lfh4kk2F6UtSieH79vQHBHYa/Q=; b=qvCIzUegpZqANFnJ992uBQES3mTDjmbD7a4ifaLxIv77HCXRxWaF0UHs+5e+iNuaID CFgjD5nsdd6ZPEmCFGssEsT52BV3YJI9ifI+UJPnWu7iH7phQ27qjp/ZGOi6ReoB9Udq GFt5guqrlxa0/CQMf0xUthDJAlR0JoLOGMEK9cV/20gz5/K+AhlfsYACIHnvK/KsH5bQ SzFu2kPG9ZABAi9QLMKlYFVwexkZICkA4fUOcB2haOQgSK+LSAGerWLTMIPMUg+M/8o9 jv9jAES24xN6awrllNjwK2ontTCDyIYKh9iuGYBM2mhGcexvrLDSSyGJzkljlp4pRw8y GR6Q== X-Gm-Message-State: AOJu0YykzgN9gCJHSlh/opWb3EWJoYf6l3ocjRmaaMewBXaifXzSce1G 2HwRNxm33ggdjVEpXd9kG4ptyA== X-Google-Smtp-Source: AGHT+IHvdZzboqTNcWMUXKapPwP+mmyT1kY5+yZyTt0GY/CXbUeVkH0AQW/PZQmmx/dEX2/n2pQf4g== X-Received: by 2002:a5d:460a:0:b0:319:775f:d553 with SMTP id t10-20020a5d460a000000b00319775fd553mr10708012wrq.9.1696242033571; Mon, 02 Oct 2023 03:20:33 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id g18-20020a5d5552000000b003196b1bb528sm27822901wrw.64.2023.10.02.03.20.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 03:20:33 -0700 (PDT) From: Neil Armstrong Date: Mon, 02 Oct 2023 12:20:23 +0200 Subject: [PATCH v2 3/4] arm64: dts: qcom: sm8550-mtp: add orientation gpio Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231002-topic-sm8550-upstream-type-c-orientation-v2-3-125410d3ff95@linaro.org> References: <20231002-topic-sm8550-upstream-type-c-orientation-v2-0-125410d3ff95@linaro.org> In-Reply-To: <20231002-topic-sm8550-upstream-type-c-orientation-v2-0-125410d3ff95@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=BjxzEAOolZvc3hk0QYwVsWUnWZ+uxvbK+ElgxTWpJAY=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlGpls2htFZ7e2V383rkmhJZZlvLxnYXYfAq2ds4CP lm1rmLyJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZRqZbAAKCRB33NvayMhJ0a2iEA DFmamBgsZs6dLATDCTDk9lgHv6pdSl7E3CE0CToy+y/WEnoOTW7WCDbthsE1r9a9vJFGJhypAPdqGE 9Yg3FZ/4zt5vc69TecXbbCn55fqblAzioJsSb5+HGs7aBivyzb0VShPyWBQzyrboYA4xY49HSwgcJA B861/bBvTxY81/dDyeJF5r0nLXASJqWJVFea5qtAiue/fVot5FPsPDZ42BtlQ5h36goNBveNacBKp5 sG6goFi84uiR8rHkzLx3mEp3UHchCLF7uAAK8SmZjDcsYvMYAKygJz+MTn9K7FsAyYgZzNY4QfiLCe TmjbZcJdDEI7V2Fu6LF8XhYleG79Hdlxlv4w2MHJxwO9tsZKnN64NI7C9AJX7rk2Do4t+64y64FGfP o8sJZLa0CLwChW0m2KcgoenecPbA3ORLdeX9eu6wgV5FpYgGiUnVdZED6FmmxoR+XOOF7QdAeNocLy hf+NEi6+UJTtHOh2C+l1tjXeTzAumdhnk1kykbTDhIwPH7e5O11a+s3/3LcmudgkvW6ntnC4Qk8mNm 5STIxEwMKpbS/oVSnqyruehDnRFohydGtmfwFnCvP04FIBhA2o4VnG90qmPXPTPbN8HtobGhRqC1zU sjgCGzyqOyZCws/0oFQQzqQwx+O4ccEojKA+E82RVOU4JVQNL4Ma4VfuMcYw== 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 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Specify orientation GPIO in the PMIC GLINK node. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio --- 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 5b3488736fbe..9a70875028b7 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts @@ -59,6 +59,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 Mon Oct 2 10:20:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13405804 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FB83D306 for ; Mon, 2 Oct 2023 10:20:38 +0000 (UTC) Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 348C7D9 for ; Mon, 2 Oct 2023 03:20:36 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-32615eaa312so2626650f8f.2 for ; Mon, 02 Oct 2023 03:20:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696242034; x=1696846834; darn=vger.kernel.org; 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=toN6r+xeaq1Ts94kNkRkELT8eGStIF+kV6xrpdbRXVs=; b=jrdTl3yqhkFh+jKcRlNdVrtN8ry1R6r+XjyybPQidxc608FhgES2AILMR2CV/kDa61 R1XqQUihJL1RMbZFjLCv9pgbW7y+2yWViRTpFjCam9sSa6l2NZw41qfIUiLnLF1NRu71 FSD3u4OA8sLOEErW16K3R1nDFXFZ8f4fgfROONXPVOlW+ScGLuXrHzgmqQhkbIRjgHH9 MrcjYaKH2ywGGvBMXvzoBTD6OILFpTqCIUj8itB589T9Ksq2F0JIQz+Uwe366fOz/mmj i/IeW/rePShVuwRAOKRZoAMFuVP8Gxsy+/YgahbKLiCre6s+XvUWclpVRbUehmiirEOl f6dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696242034; x=1696846834; 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=toN6r+xeaq1Ts94kNkRkELT8eGStIF+kV6xrpdbRXVs=; b=RkP7A8bpll3Hj6oqcoGkaWbt2/zn9mQx1ZgfgQC5598xEaNUd1DVvXEpZM5CczhJow 8TFjC61dlLuTDcMPBBDqcf+28JNq0WpuOxVClnF/lvO2mSViikyK3iPfR+UuuPoHiV1g zBrQdNQEEO9yo/nCFjqgYB4TkvfoC+FyaZ1NSh0tCR0kJpX3GftPuSh34Dk9Ud8CviXZ os1Pr/zFndkmWZozOSf0qsaeFPC8ljZMXte35tRRfzv+4mODXmkoFLC0Hwv/CT2UZdyq Lmq0aPZTiPxaRaTHAAELJNqKlKYRHXbl+Em7Bsxmb3sLwRCEuQLBZbtRnWBma82xoFot Opjw== X-Gm-Message-State: AOJu0YycVO9wKnO2ZcrAJyxA1ddd6zHR4oVZfK8muzzh5w/EUUoAWnmf JjakJzdfmv0uCIn5w0CALp+igg== X-Google-Smtp-Source: AGHT+IEa/HpWgFyxZ1gMQsf3eytauR+vrzRmuOkkxvteaxITGvbpX7awG4sLKbqd8siwexJ9yWU5jA== X-Received: by 2002:adf:cc8c:0:b0:323:117b:9780 with SMTP id p12-20020adfcc8c000000b00323117b9780mr9241476wrj.66.1696242034490; Mon, 02 Oct 2023 03:20:34 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id g18-20020a5d5552000000b003196b1bb528sm27822901wrw.64.2023.10.02.03.20.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 03:20:34 -0700 (PDT) From: Neil Armstrong Date: Mon, 02 Oct 2023 12:20:24 +0200 Subject: [PATCH v2 4/4] arm64: dts: qcom: sm8550-qrd: add orientation gpio Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231002-topic-sm8550-upstream-type-c-orientation-v2-4-125410d3ff95@linaro.org> References: <20231002-topic-sm8550-upstream-type-c-orientation-v2-0-125410d3ff95@linaro.org> In-Reply-To: <20231002-topic-sm8550-upstream-type-c-orientation-v2-0-125410d3ff95@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=a52yWfSl6rve1rSnFAPH6wMN+d5/XtEIEhMbM7TvYMs=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlGpltnVpQ54f/GOdNOhf0I2L8Ry9vPmPhESsLSJ6G flGoj46JAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZRqZbQAKCRB33NvayMhJ0cKpD/ 4orn5zrk4N2XcuZGtLwgUAbQjX4vQ67T/777fuyck0dEQqK8000S7A54oZ7rDaAILASdrW7fOB2MGV kkfZlnyfBRUxb6tc6HlFkPL+4P6ECcc1JnHw7bTuKxx3vBvLZZPaJdZRULJc027rfRfYAOs8jIT1CD 1hgsCekgQ1yuThhKs5yL8K7IF8UNoxEPiBpryVEsRiA2DpdW+MjD5Dcq5Bd634mQF1zHLXZ3PTVdfT 6pLaigxHQxXPq6jfcUjRcrQCJ0FOP1FGX1YJKgvrOGYpa6K9IYLeHnF48jMW+B7jR6LiNI5S1vyy81 A8eqJ7nQS/H3quqfqZjFrUzcSNPPVak4P1gLGqN8cIOxwtt8h2beQ29Fjss/FiaexxRy3HwCLX566e u9Hkn00241kvGBxDD2I/+FhpWLRFcxJ5dQ3mX8wkhpkKqrrKhrG67C533PM38AmEoIAsjIQjag8Tcg qcXpaaSaeenUHEcbbw+aFpOX24igjP387JTy1YOXMOuwatsf/CsKL28T8N5OsW9W+ZWZy8EjFuQ/+y rNu1WbBT/Xxb6X+qmRkMji/E3ybEQXtj4+mrDVoPRGqD4IntObr+7+cl6R0dMVnA7eIwO2jUdgpjnv /OlbV2T2MS0gnkOkipXL0RNSrHrQIi3j30gGOgHAKBD5BkXvTBvj0yQLaKXg== 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 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Specify orientation GPIO to the PMIC GLINK node. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio --- 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 320662024e89..eef811def39b 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts @@ -77,6 +77,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";