From patchwork Tue Jan 23 13:21:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13527382 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D4075C47258 for ; Tue, 23 Jan 2024 13:22:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eS6MYRzjAOwzOSDjICNKawk2CXjKPxEGmjn3dhQ0h+s=; b=remrKna+IV4J8D SfhEO3sHXkSAEvp3nGeXybod82Z6VGPXHm6OvRb1mF+80RxwkafqgAcBaytFBO5dO/+lmU0jYIVuJ VdxPkjfUPrQ1ByilyfkKar0oxjz04JMJjHY7F4ksN0zr5HiKE6yJ09u6w0wZe30S72eWd3aFau6Rw xYbRLEldT/HCrXswWlYVG1q34FvV9lB55PuuXZTkykBqqSc4D8MXIrkQKpEmwp4iIJ3/UWHC4XeVt BwzaVUgJpK2VtmKH23xuhv8c3L2ZYav6uDstZtCPfr9oO6DGPDcEm6KMvkf7gegsxb4nbYPK6sZ+f RwlRJ4OIM9AAlQgenepQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSGif-00GaB7-1U; Tue, 23 Jan 2024 13:21:37 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSGiV-00Ga65-0D for linux-arm-kernel@lists.infradead.org; Tue, 23 Jan 2024 13:21:28 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40ebf373130so5176785e9.3 for ; Tue, 23 Jan 2024 05:21:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706016080; x=1706620880; darn=lists.infradead.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=SylnFOf7Bavuihep6FrRUZ3K4tT0YwbWb0OaRxJ1UcE=; b=oh2h3hqppj2L37AUyOVsLm2cQu8/J72vUJ+x3cMYuFzVUPSXNME4XDiipOy0z4tZK+ K47DgrBghsLab0XUrk0/p+CjyS1g5NqmKi/cIjSXhes/e3O+jaQ5g2WVRYm1yQVXVjXF Zqlc93PHc3EGezR/sZGndxwNf+LkEE0y1yAGnJJ4z7Hgf+AQbzBK/wL7Sno54M9F2O3N u/62IoFPDvMCqvr46YcsqZmLFnmLyCV4rzjk3kx4/wWzA2Rhdp8Md+colOWOvbhoyoAF i55X+LCI9GBGdnz61c+KanPUG2O3OKkV5XF60hAcVo/T/BZS7s9jevnugdP1Bz0pOcQq TNHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706016080; x=1706620880; 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=SylnFOf7Bavuihep6FrRUZ3K4tT0YwbWb0OaRxJ1UcE=; b=D43GJ2qCt7uaNBpPQ7JXu9GcUEe+NxDj8RIWQoWA0PCq7YOvIRgpaBXqoe6uLUbcKG TFGvgdrFysNEFeY/BW/ow9Nr7iZH0tlQVZARFt1a9qS6U0F0VdXfnKbEt61HeAP69iHK bh2QoZ0NGoqmQBGe/iR2x5DndE6g+a0C/DDzaccyBSmjXOwWYL4HiI4Fx2Q2RE4DD4Wj t9Ec6kXCgUaJ7YwQ7oNrZ+X1RTCMGv0P6pAMxFJ90nckebTdXlaAY+IPQwLzeX7AV3nd 0Qy7Z+8Ob3jOJOFvm0dcviLvAGse19UP/cMCpVFeEpuMw6X5+8xhqkxf6DtUlVERjjOR DqBw== X-Gm-Message-State: AOJu0Yzzpi5G//2UhIbeSccsPKogjmQMHbHC50+ZVNpmTyKbl9EAzvau CIzUuT9LIbltEk7kC9MSOUKE8qC3c/PV22NlZ72sXSK3p5nLYcSiNyzdC/AIX8E= X-Google-Smtp-Source: AGHT+IFo+FHbZA94pFbra0P66oNc9pTeAk0/7cduszutwH9FEdIN2hfu3d3866ZGDxSWf2NRxvOBtw== X-Received: by 2002:a1c:790d:0:b0:40e:6639:6708 with SMTP id l13-20020a1c790d000000b0040e66396708mr515536wme.49.1706016080068; Tue, 23 Jan 2024 05:21:20 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id hn33-20020a05600ca3a100b0040e621feca9sm39982445wmb.17.2024.01.23.05.21.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 05:21:19 -0800 (PST) From: Neil Armstrong Date: Tue, 23 Jan 2024 14:21:15 +0100 Subject: [PATCH v3 1/2] arm64: dts: qcom: sm8650-qrd: add USB-C Altmode Support MIME-Version: 1.0 Message-Id: <20240123-topic-sm8650-upstream-altmode-v3-1-300a5ac80e1e@linaro.org> References: <20240123-topic-sm8650-upstream-altmode-v3-0-300a5ac80e1e@linaro.org> In-Reply-To: <20240123-topic-sm8650-upstream-altmode-v3-0-300a5ac80e1e@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=3408; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=x9/qfzNBO7hwOHU0S23SWtGDd1O9B7NOV8hG078Fkrc=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlr71NiXn1d6ebmM3WrdSpaXkY08hClcgwBI0hJeau 9TbVf5qJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZa+9TQAKCRB33NvayMhJ0YMKEA DJtL30dRcAMqf30uxcmYeq/14W48RdF3/vJtIol053B/HovDHoxHVzKu/w1Mucp2PGM+0o36ceheU8 dkpl2+cYdvSwwPKT6O2cupUUa3+trurBjJHsMYdkrer9ndE+ynrxQsXyFARZ6yaWSXVTX7FaZ5FH7y UeJavnP+mj+B0KDRdjvVbyCQXnEfzAU4LAsZj5Zr5HZfSnClKgLqQMTOkFTw6FKvafZt4YRWzIocTd qekYqWLNtK/D1fMEMvZ4KzJRiNIEHuHBs8Am5y2UrgQKcrw+LznsTRC+KEv41todxlqudu60XTgxU5 WKm2bQqaUfxX6ECKrFknffSW2ZIHj7l3qVya/q+SsopxJ0/yFxwE8mxsdPn7Nh2YEo0uY6xCLJyAgT 1gytEU+a0QfueUisUSZCTqZwdmfc6G8tkJEXtRhp2qf/2TOQKM3wSrjS3t1difKWduesZmd2mBxLto jUtfsCgR8bZY/YIm5uLJjvra0TIIfVEKzcrxUHivgnDtq8wO53dA+P3eD4UhOMwHGcbqO3bRGIkIMZ dmcI/b3gEdCQTb3AzoEO3ib1gSPRdISBpxlS4Jj6PBwh1mKxrS9Bam+st+c+awgkrSau9qnOTgTJC7 jCQtiv1gZqSaf0VkByQRT9AsuVZXhM0y+/mejATWvED+B4QPOdaa+apdHFHg== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240123_052127_106936_4EAE3272 X-CRM114-Status: GOOD ( 12.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add the necessary nodes to support the USB-C Altmode path by adding the following - WCD939x USBSS Mux I2C device - nb7vpq904m Redriver I2C device - Port/Endpoint graph links bettween PMIC-Glink, Mux, Redriver and USB PHY nodes. WCD939x USBSS port 2 Path to Codec will be added later when Audio support is added. Signed-off-by: Neil Armstrong --- arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 104 +++++++++++++++++++++++++++++++- 1 file changed, 102 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts index 592a67a47c78..a6f55191e107 100644 --- a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts @@ -77,9 +77,17 @@ port@1 { reg = <1>; pmic_glink_ss_in: endpoint { - remote-endpoint = <&usb_1_dwc3_ss>; + remote-endpoint = <&redriver_ss_out>; }; }; + + port@2 { + reg = <2>; + + pmic_glink_sbu: endpoint { + remote-endpoint = <&wcd_usbss_sbu_mux>; + }; + }; }; }; }; @@ -446,6 +454,70 @@ &gpi_dma1 { status = "okay"; }; +&i2c3 { + status = "okay"; + + wcd_usbss: typec-mux@e { + compatible = "qcom,wcd9395-usbss", "qcom,wcd9390-usbss"; + reg = <0xe>; + + vdd-supply = <&vreg_l15b_1p8>; + reset-gpios = <&tlmm 152 GPIO_ACTIVE_HIGH>; + + mode-switch; + orientation-switch; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + wcd_usbss_sbu_mux: endpoint { + remote-endpoint = <&pmic_glink_sbu>; + }; + }; + }; + }; +}; + +&i2c6 { + status = "okay"; + + typec-mux@1c { + compatible = "onnn,nb7vpq904m"; + reg = <0x1c>; + + vcc-supply = <&vreg_l15b_1p8>; + + retimer-switch; + orientation-switch; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + redriver_ss_out: endpoint { + remote-endpoint = <&pmic_glink_ss_in>; + }; + }; + + port@1 { + reg = <1>; + + redriver_ss_in: endpoint { + data-lanes = <3 2 1 0>; + remote-endpoint = <&usb_dp_qmpphy_out>; + }; + }; + }; + }; +}; + &ipa { qcom,gsi-loader = "self"; memory-region = <&ipa_fw_mem>; @@ -495,6 +567,15 @@ &mdss_dsi0_phy { status = "okay"; }; +&mdss_dp0 { + status = "okay"; +}; + +&mdss_dp0_out { + data-lanes = <0 1>; + remote-endpoint = <&usb_dp_qmpphy_dp_in>; +}; + &mdss_mdp { status = "okay"; }; @@ -600,6 +681,11 @@ &pmk8550_rtc { status = "okay"; }; +&qup_i2c3_data_clk { + /* Use internal I2C pull-up */ + bias-pull-up = <2200>; +}; + &qupv3_id_0 { status = "okay"; }; @@ -787,7 +873,7 @@ &usb_1_dwc3_hs { }; &usb_1_dwc3_ss { - remote-endpoint = <&pmic_glink_ss_in>; + remote-endpoint = <&usb_dp_qmpphy_usb_ss_in>; }; &usb_1_hsphy { @@ -803,9 +889,23 @@ &usb_dp_qmpphy { vdda-phy-supply = <&vreg_l3i_1p2>; vdda-pll-supply = <&vreg_l3g_0p91>; + orientation-switch; + status = "okay"; }; +&usb_dp_qmpphy_dp_in { + remote-endpoint = <&mdss_dp0_out>; +}; + +&usb_dp_qmpphy_out { + remote-endpoint = <&redriver_ss_in>; +}; + +&usb_dp_qmpphy_usb_ss_in { + remote-endpoint = <&usb_1_dwc3_ss>; +}; + &xo_board { clock-frequency = <76800000>; };