Message ID | 20230601-topic-sm8550-upstream-type-c-v1-0-d4d97b4d8bab@linaro.org |
---|---|
Headers | show
Return-Path: <devicetree-owner@vger.kernel.org> 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 DEB09C7EE23 for <linux-devicetree@archiver.kernel.org>; Thu, 1 Jun 2023 14:07:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233747AbjFAOHZ (ORCPT <rfc822;linux-devicetree@archiver.kernel.org>); Thu, 1 Jun 2023 10:07:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233679AbjFAOHW (ORCPT <rfc822;devicetree@vger.kernel.org>); Thu, 1 Jun 2023 10:07:22 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C560019F for <devicetree@vger.kernel.org>; Thu, 1 Jun 2023 07:07:08 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3f611ccd06eso8915275e9.0 for <devicetree@vger.kernel.org>; Thu, 01 Jun 2023 07:07:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685628427; x=1688220427; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=Ty9X1/lZ4kxiMPfO6SIBOmi6pFSnYht8KTXY1jDqhMk=; b=IbNZ/h4TiuSpaJndwjHm+qNz1wA3az6rVJttp6dEU8IO0aQLMDFSmP2dN+eFBQ1HDx fg8PWloJbb4r6byJRuANvyrhQubW/pLkfkOkCHgVmH3FOfwoCeQvZTRUZ4tlUzqnjJ3r I0AE5kjMz+BJza9C/PrlYKrII6tjp6UaL4wee+dLKk6lVsHOWMCf2RHqOSTNjFH8ucQw tDMpPAE+jCm5zOLHcd0CxyC+LqwMOGMppFkvfTn+zxO03Ibn0du/IFShugVW6IWq+T0d f95EXlwQ3BXEC6Hc+zxMEsPXu63bbB1+bZa9jevQinZL9Mcc7zJnqu0I2AiaZjOECp2a rOHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685628427; x=1688220427; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ty9X1/lZ4kxiMPfO6SIBOmi6pFSnYht8KTXY1jDqhMk=; b=F1es3+xGS6LBdZxFcheAtmSh7hjIGG8z/sEJAm6TMY7bAXoY0PpMoOs7AqM73unulU meIV6n6nwp1P1MJ+mWf9YmXZ9JTV+sgTQKJjHcPpKlEl+1H0hIbR1mzpw4gffQ1Hk6Gk iRSifS9diBGxB1liM3+PLF9z4XxgRaQRX1ETZ9pCxnogTWletmtxuX0/Vv9H+9fKz58W aPNr6b8EoablmIsCG1mgJSYD+Nq9pViCvjMD5uKV2HCc0N49DH9bHf41rBTrkKeB6vjD B0ZgIK//1LHlkVLS3CEBfWPuWiEANJDV4JyEAGH/b1ry9/tmat43CQ1/XX5ZTX5uQ9uY pI7A== X-Gm-Message-State: AC+VfDxeAOSUgKRtY+404XLiEgdmwO+KPSKq9vVUQAm2JpGulbyrR4Kx pebA3SeZdBADNy0AtilYlVRFvg== X-Google-Smtp-Source: ACHHUZ4b47dm+Xm9jwckIXF0KkauMPIOnltIj9V54u33oWFbZgBNyMbisrPoI/BqdP8HsjWMXIyqlQ== X-Received: by 2002:adf:f307:0:b0:30a:f606:2459 with SMTP id i7-20020adff307000000b0030af6062459mr2025299wro.25.1685628427113; Thu, 01 Jun 2023 07:07:07 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 07:07:06 -0700 (PDT) From: Neil Armstrong <neil.armstrong@linaro.org> Subject: [PATCH RFC 0/7] arm64: qcom: add Type-C Altmode support Date: Thu, 01 Jun 2023 16:07:00 +0200 Message-Id: <20230601-topic-sm8550-upstream-type-c-v1-0-d4d97b4d8bab@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAASmeGQC/x2NQQ6CMBAAv0L27CYtUkWvJj7AK/HQllU2gdJ0C 9EQ/m7jceYws4FQYhK4VhskWll4DgX0oQI/2PAm5L4w1Ko+qpPSmOfIHmVqjVG4RMmJ7IT5Gwk 9Umtc01/OujEKSsJZIXTJBj+USFjGsciY6MWf/7ODx/0Gz33/AZZ6Ex6IAAAA 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=1978; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=pWKd11RIdBHbnx87p7fyQJTNZj+yiLAVlSvzPs6zzkc=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBkeKYGc/gegYT+2ro5I97D4w0ztrwLZSHJjqxi0rlv 37qRo3yJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZHimBgAKCRB33NvayMhJ0TJnD/ 9qkKwIXFLTkm0pNFWnXYmzKRsVqM5YaC3GmSaZPYZ4VGOcM6zN8YF/2BpMVElgf2lO4uiGstOrxH6i c+66+MonE+Sd7IWBzYbaaX3354h33i4EAAZrydr5ewDcwwB9PymInhyn4SbHpRWUR5jiy77lWtXMG6 AOj+l+wHeBNTNhoJ003676YRhmQCYrngDBTVWK0GanTitz85TyVGRTL3lSvCtytZacQiJpvnNKlpUN EnguSmODmXNcAU2SOMwuMlJGIRiEJqJOLBgI/qQxfd2JOaalkyUdsZSXOvDfMKYe2NLazgl7jLsBOg z9rBGG0GZqjsjR+G5ALOVNw6ioD3l/B7r8J2skGX7PZjMN2BS9D0iuCV7ojgTG34xtxaPzvjg500XL s5NBqBkH5QzXcHZNcNN/djhcYG+5iH0czlXrottXBV1ppTHMkCuCWxxxmHNWgRxcWbAiNZSkhwHW69 OsO6Bi4Us4jW7Bj2ktBNgO10mp/B7PnYVPdxpFFdpmcTs1UYI628AYLSajxOeHXy5le0dazI+SkXk4 R8i58VIdbilTMhLhLnik2Q7Ua96CuSta92AbuMw2CRqcT4eaWBxLE2bZoKxg1vkIakrRCvJZNvz8Gt LnXPbPMR8DM9E08FjoKdBoOEhkBp9JW2t7x3urh7DLIVP8mjfDhhwBeOCsNQ== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: <devicetree.vger.kernel.org> X-Mailing-List: devicetree@vger.kernel.org |
Series |
arm64: qcom: add Type-C Altmode support
|
expand
|
This adds the missing bits to support the USB-C Altmode support on SM8550. These are the following changes since the previous SM8450 SoC: - No more GLINK altmode events for USB only changes, only DP - Type-C orientation is available on a PMIC signal connected to a GPIO line - When altmode is disconnected, an 0xff mode event is sent. In order to handle those changes, a new orientation-gpios property is added to the usb-c connector bindings. The 0xff altomode is translated as a SAFE type-c mux mode. And in order to handle such info, we tie this to the UCSI connector events to propagate the orientation to Type-C switches. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> --- Neil Armstrong (7): dt-bindings: connector: usb-connector: add a gpio used to determine the Type-C port plug orientation soc: qcom: pmic_glink_altmode: handle safe mode when disconnect usb: ucsi: glink: use the connector orientation GPIO to provide switch events qcom: pmic_glink: enable altmode for SM8550 arm64: dts: qcom: sm8550: add ports subnodes in usb/dp qmpphy node arm64: dts: qcom: sm8550-mtp: add pmic glink port/endpoints arm64: dts: qcom: sm8550-qrd: add pmic glink port/endpoints .../bindings/connector/usb-connector.yaml | 5 ++ arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 67 ++++++++++++++- arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 99 +++++++++++++++++++++- arch/arm64/boot/dts/qcom/sm8550.dtsi | 26 ++++++ drivers/soc/qcom/pmic_glink.c | 6 +- drivers/soc/qcom/pmic_glink_altmode.c | 18 +++- drivers/usb/typec/ucsi/ucsi_glink.c | 52 +++++++++++- 7 files changed, 262 insertions(+), 11 deletions(-) --- base-commit: f339b18115200db76b42475e44e3bc926e3ecab0 change-id: 20230601-topic-sm8550-upstream-type-c-e85b4d971450 Best regards,