From patchwork Tue Dec 19 12:22:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13498208 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 967101865B for ; Tue, 19 Dec 2023 12:22:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="s9orCOAS" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1d3c394c1f4so10496315ad.2 for ; Tue, 19 Dec 2023 04:22:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702988548; x=1703593348; 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=SylnFOf7Bavuihep6FrRUZ3K4tT0YwbWb0OaRxJ1UcE=; b=s9orCOASLXm93OUJlizPTExVvpj40HrbetKh4MmS6h+bkDTakm0cgf0PiPvM5+NRiC yBdKyVtTrMWccu5yKFrmezuqLXS6Lojnya118+lkxLkYLUMpRgi6XP1A3Q3tlkwRuz7c DUvRya0AqDPbs2EIB+thQSyGEWKuEEkp/JzSSCnSeX885mkSsfpl0blE0Tth8zfHUlkD YuL1Xx1C87+T8+A945lE+illugYKwQ3QIRkdrDHDzVU6JmotBESOVJj8UI7syxh3FiHk F6rA9fmIHFIVQE/K1gNqNJC/CnX4iboqFF6U0I8aPdEN2IsoNMP3zGiTeXJT7/TobCSz Z6hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702988548; x=1703593348; 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=EAvCSqI6tG3IpBqPr5t72hbNs1H6VSEg1TX42cxnQIFOWwTKH5XZg2LJqReL2o1f2m 2I2XP9vPxG1nAExyHQQ79nKzQH4gOwPepGbOaWXSRuwXotNg9FmItBubBUCMEWArOT8O uSAusrU+GYzYirK12jiyVTpOPCwxsNIAzyFHX/PH/3cu8m4LqefdAKd1GyiMI2LLWJqc HUOpqxZ942IHQxRb4INiv+zf5zILqxK6c84mWd/OpUQeZKJoa56pE7+0pjbuWo8Rv4CY yq/3U7sN1ZwZnMWtkefe51nOpNgKoBDml32U/oo0HCqrHPSolX+gTgtPyKwJ/t3P/Lfd KZAw== X-Gm-Message-State: AOJu0YwGsBXQ2UNR9htTToVzR6CMFH2Z84r5yALlzCkvTN8jGCudO/UM G7YR94Gsh21Yi72D0sBopUW+ukQ3nFqJJegc0i9cXceX X-Google-Smtp-Source: AGHT+IF3YwY+ezYIdFCUb8c2AR6pdEHQ+CZY+DLZB69/phDLq+R0/wdtzbThnFW9MA2NAguY9o48zA== X-Received: by 2002:a17:902:a9c4:b0:1cf:e19e:2505 with SMTP id b4-20020a170902a9c400b001cfe19e2505mr9205246plr.61.1702988547911; Tue, 19 Dec 2023 04:22:27 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id s17-20020a170902b19100b001d366f8cfd7sm7719419plr.182.2023.12.19.04.22.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 04:22:27 -0800 (PST) From: Neil Armstrong Date: Tue, 19 Dec 2023 13:22:12 +0100 Subject: [PATCH v2 1/2] arm64: dts: qcom: sm8650-qrd: add USB-C Altmode Support Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231219-topic-sm8650-upstream-altmode-v2-1-a608528864a3@linaro.org> References: <20231219-topic-sm8650-upstream-altmode-v2-0-a608528864a3@linaro.org> In-Reply-To: <20231219-topic-sm8650-upstream-altmode-v2-0-a608528864a3@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/ZANAwAKAXfc29rIyEnRAcsmYgBlgYr3veMctBzDuwIai9WiZBgq+U+B78nC55Gpp4g+ VYUmCP2JAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZYGK9wAKCRB33NvayMhJ0SKcD/ 40M3AmHf99BCo6DCxYGx4Rixo0deveAa2KnzYFmx3VIbc+tEx3TkZ03TCzqeJEgDFMWMZLny5f0KOF ULPaOk1Y0iRmokc4kNvVxkLMG3DUXASvi+nuz/pFRwioZ6R6em51K5XCuIqbOJgB7y6t0m5/jAHAe/ J45Uhs0G/1yIJTuykBega8JD/WqOKGLkLksS0VHgcWeN7vwm+bKzBbc8dhgzE4QIv3dY8s0y644GIJ YiM9yIRD4XnlHNpLY4E6YPqO9fhOjHIHazr9WRu7hHnIUo7LYaT8MMdIn0mDle3jzo9McBDAl4Rwwm xd3r5OOsVp1UCZojMqee+9VBNBU82cr4t/gNcnO4ZQ/zfDBDqJGQa55Kh8a20dgmZbgs6sVz5QRKHv C3WviYJp0UmRN/CrfADru9TAqcT/6oi+EqNEkcR//p6imu5cmFJ9lfAcVg2cIgg+DvKCMQflZ6Oc9R bP0KJiru1RuTM0pwIEiGq8SjB1LE/3A892S++8t65IWp8sl+tD1O8DDo9Szr+8XAtGecBfwkHl0OHq N+eWLnSvEioZyV93SB806ZSaGNzf7KbYKMolFcUR4pPcmjnqoQGu/E1jOzpm1XimOHOWc51ClOuywT 6QBkq3s3cDqsOW04CCDM4n6B1PO/TD3DLCPemyQ2s3cj0Ssz7wlYAfbO493A== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE 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>; }; From patchwork Tue Dec 19 12:22:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13498209 Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A81F18645 for ; Tue, 19 Dec 2023 12:22:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Ybon5DKf" Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-5c690c3d113so3406250a12.1 for ; Tue, 19 Dec 2023 04:22:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702988554; x=1703593354; 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=AKdUP1nh0OG3QlZNgtTdzYD4n/GWKZ63AtyvI5eXs98=; b=Ybon5DKf2tjOE2+YEHXxVsb/KCFo5FqLbkxH7KrbX6IVMEyK7OCYwHL+20MOvrNXsK WtTWELuwE3M5PofykpPJ4e728fJKiUXSD5kglfwg8+nfXfUTMC5fY9NNpefOm+zxIrd7 FZZw3Qq3MkAHlYzTxVj6aAx6XcIta/qMNG9jDLqB5nyIZskq2Oe5nyJ2tlbfLoXS/sqK 2GmVStpWTSZpD7DNRE1qn0Peo/6TnKlZqboR0y/+FSNuH7qTKrV6BdmZnNdrJx95pTLD nD6bnCpIztNaBT7WnnN5m4yL5KYxBpxllMQV9+ynXKLiPsBpXoUTy5Y3/qlgIMXbRibO iz2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702988554; x=1703593354; 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=AKdUP1nh0OG3QlZNgtTdzYD4n/GWKZ63AtyvI5eXs98=; b=oNLFEtvLN61ZGwciGWpWxvrijEXlcuZug+haVr4awyEyhHru0xfis8xB2a82KIbIrq 82CwR9qPlMU12mAcc6BseCiGSCJ441knZxvD5DQ+bqDWwp6/Sz/w7jlRab+as0xKi+Lk NAT54dbm4NzjLltWLQSwgKlQEfiZ3yBSyJpDPqV1lQF8IuHMStW8rX9STiK5+v48kLa+ Rv/6wH5Q3yCPmjhtrCcrYDUeyyKxW1Fws1i7gFXUKY0DtHSvMy7100BlktAzt7JWTMwa rZBwmOuK7wV5G5HWvi6lkBVRm23mwASReZ3hC1duBvhwPqpl5V1hYggsISOPydpDQtRT tiJA== X-Gm-Message-State: AOJu0Yy/gVd4hR909+EMcfG9JYMd/UXSODYdiXhBw2j0yt/GR2aYIg+A iO5aQdQWGbmNP8TFyVOcNXPxWIWKpwUDWqKbMtfg1WEx X-Google-Smtp-Source: AGHT+IEnCSZ44/W5EooaigV0HsYtJpRFaKJolYB0qjNfaINpNNu4HwniOpI7lT1JCMpXlsTqDyH50g== X-Received: by 2002:a17:902:7ed0:b0:1d1:cc09:50ac with SMTP id p16-20020a1709027ed000b001d1cc0950acmr14787076plb.108.1702988553726; Tue, 19 Dec 2023 04:22:33 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id s17-20020a170902b19100b001d366f8cfd7sm7719419plr.182.2023.12.19.04.22.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 04:22:33 -0800 (PST) From: Neil Armstrong Date: Tue, 19 Dec 2023 13:22:13 +0100 Subject: [PATCH v2 2/2] arm64: defconfig: enable WCD939x USBSS driver as module Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231219-topic-sm8650-upstream-altmode-v2-2-a608528864a3@linaro.org> References: <20231219-topic-sm8650-upstream-altmode-v2-0-a608528864a3@linaro.org> In-Reply-To: <20231219-topic-sm8650-upstream-altmode-v2-0-a608528864a3@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=684; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=VmNuAmZkD7FpY6bewTnP4V/44GbGai75MKliuJO6u5w=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlgYr4stUEQaxvnGqsruhjfr6H9gIUuIelp4I0zMKm /uEj1TWJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZYGK+AAKCRB33NvayMhJ0QBKD/ 0UFG3za7aimsGehqx4bBq1wGwRLjf1eEV/ia2P6okPETNQGT1At3up5yADsL4FW/b0aC6mAdQCPUSD 2LwdgfpR6EhedKUDJuYOI6gDJ/vASz1Ry+vsbNWTpYyp8z01aWXxrw9Knp0xz7Rv2O+OksX4kO00cq uHtBuqQ5M16K7GSh8xkiSpgz8HOHAoLwQlQNB6bes9USdyo94jjrkNpAJ8TyvXoNXORkbhaA2+vmE7 mEdQOQ+6RgHHLLFA4ukO8/pSeuH5mY6LAS9bRhxFUKb4A5E8Y73SqdKWw95+i6ZqYuulRhyfDsZjaE fhGF71TiNEGSszcPhghb+wswuMd933QF27x3UPqsCPC8ZVqi7C9dDDWCz2i0kmkAWR7X4B/UE+0JEc g7uL+w0XP6m+KqIJrOkVISONAgwhRdxQtSNsdWlenSihebgaf+ymVBJUuLSQLB2/gDzYsx9xkj+624 3tIgokT4ar/9T4gadRrsBc/7EiB1AK4F1Fs/nn1Zt0myBwTWCccVZtGSi2nYJYrxo/FJGg2sNzrRYH isXRm+EtUFcOIsgvwmkwd0ALDYwyvWdu6S+8r9W1s50dwEiHf4EeNtEps8fmjb7eJc/NSJKOPxwToM V7QgeTAtgSAXxFRc67PJ3c5K3dNtwKX9b8DeTOASl/OPKJwli1KXeXhtCB4Q== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Enable the Qualcomm WCD939x USBSS Type-C mux as module as is now used on the SM8650 QRD platform. Signed-off-by: Neil Armstrong --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 0e67a4849b91..c9ba75f1b248 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -1067,6 +1067,7 @@ CONFIG_TYPEC_QCOM_PMIC=m CONFIG_TYPEC_UCSI=m CONFIG_TYPEC_MUX_FSA4480=m CONFIG_TYPEC_MUX_NB7VPQ904M=m +CONFIG_TYPEC_MUX_WCD939X_USBSS=m CONFIG_UCSI_CCG=m CONFIG_TYPEC_MUX_GPIO_SBU=m CONFIG_TYPEC_DP_ALTMODE=m