From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 38E23440A2F; Sat, 26 Sep 2026 12:40:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790426434; cv=none; b=EqdQGHq24SVU2nB8DE1O23GnH5FLyBtyS9tFbAfOAJg6hnpgTSmESficAuZ8FElLPxdt2nvAM73QkTJCX06fv5ycPzLa4wTuXXZiqdWV6I4isBx1Yw6QhpVQ5lP0w1ESqTzkx42I6zK6nm6/Ys+OWtxBvzVNTtGI8loMe9QpiCU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790426434; c=relaxed/simple; bh=0nD/Q/yX8fnh78tBYlMsAu62vHdt7jMPZ12GjmO2VCA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ipP7GSVKDrWDrKfJyGCHFJ1UqyKCwUHmPitwfDD8eLzvStp0Fomqz0/x8fxPqiLeayXUMmXm7YM5ZTHVIGqtmTK629XORq6y3jpKGAG8cAUmud5nS0slQCE6f0hp/YArLBM4aknbhTi6qO1d4NhghUcVNazorgYZJ1j8TN9WKug= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lRGFV9CS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lRGFV9CS" Received: by smtp.kernel.org (Postfix) with ESMTPS id 08036C2BCB8; Sat, 26 Sep 2026 12:40:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790426434; bh=0nD/Q/yX8fnh78tBYlMsAu62vHdt7jMPZ12GjmO2VCA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=lRGFV9CSwn45ZWJpsvXgRGraFDKFoH8mojUP+IDRTrEqC+R0Siygo4nqAkKQrB6Eg Fb9QVy3wtxtVwUj59exR1chOe984tr2s0pR0RPpzEKns0QSwW42OhTmq02b5b+MPaF cN2N75MXW5Oir2CE035rO3JbZYgv6RzFpyJEaQ2B5JEtYcUzJE/QT7XWCE6exhj0Ch JO0Epef0Oebd19qrnDL+hvMMkOPobnpmjOlbkk/tTCV8cpTwi84ICV+aQvU+CJFiGd 1nGy1bH47RLnVho0t5Q+vzGOPCVDgKWIojMohRhP0LyL0jr527xrpVKF6Cauj+gpwG iLb6eCp5GbD6g== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E99C2C98338; Sat, 26 Sep 2026 12:40:33 +0000 (UTC) From: David Heidelberg via B4 Relay Date: Sat, 26 Sep 2026 14:40:29 +0200 Subject: [PATCH RFC 10/12] arm64: dts: qcom: sdm845-google-common: Enable USB Type-C port controller Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260926-typec-v1-10-31adc19f32c6@ixit.cz> References: <20260926-typec-v1-0-31adc19f32c6@ixit.cz> In-Reply-To: <20260926-typec-v1-0-31adc19f32c6@ixit.cz> To: Alexey Minnekhanov , Bryan O'Donoghue , Heikki Krogerus , Greg Kroah-Hartman , Liam Girdwood , Mark Brown , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Konrad Dybcio , Dmitry Baryshkov , Lee Jones , Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, phone-devel@vger.kernel.org, mfd@lists.linux.dev, David Heidelberg X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4327; i=david@ixit.cz; h=from:subject:message-id; bh=r5IQw5ef3NgqdpkqzvYRqDdpmBPKAHmtONrEfZAVnQU=; b=owEBbQKS/ZANAwAIAWACP8TTSSByAcsmYgBqt70+aIeCNkK1YRBq0hkMzBSfTWJFNLHe+EZpq iLkAL06sCWJAjMEAAEIAB0WIQTXegnP7twrvVOnBHRgAj/E00kgcgUCare9PgAKCRBgAj/E00kg crwKEACh2VG72WBEQaWlm3ElTE/xURhQ7dFGJfr9JYN8dzdcagAcTPi6+ZdQ6RdLT6pIT8r6f2Y th1vxhNgAt0s66X4HUgPV2vI8/3gYoLLklygGI+yxZXgkvIgfkgYh7PSZ3M7jewWpOnafvEx9dz UIoKcHJxfP06RykWB5BT0DJxmVULNpW4RRNBs/S9oOzDVYcLz9j2dy1qyya+Nqspw+Q6VAfKnyE iytMEIZIMOLj0Gncl6twyZsxuRKTvDu8SfS4udsCuIy+scSO7taWVPShxTTWFHFbK1d0puhBUbK rUSpYEvBtnFmjCU4+qv0gxhlDQdGJzhg8WN3XV8O1Hev9vdDb9OEJl4yLcoMjMGuR228b25DEIV 8XZgxypymklkRWcv/Df3n8c7GIdsJnguRkfj9m84EA62tTx0iaSvD9z6o4266mC3Bsrg0+QDCJN 23S6R8cAFj2jTrGmS5OhZ/4yVxv9JofnwKEv3rUfZwU1Z0JgX4vf2V1uCkfFF0yCruvprtWp/40 sdnOpcH65fi2QeZFhJbby4FGa1FS/FaOmDjTeg4x1xBIZNW2XhGFFINviYVaG2eXy9mYXU7l3G9 6Qyxa9Y8ZH1IHhp2pSow3x4GRdogSRuqS3L34IufbQN+xgpmgq1lKh4BqozYEtsFzVUelsC67wQ YfC2Q5zXt1UtcFw== X-Developer-Key: i=david@ixit.cz; a=openpgp; fpr=D77A09CFEEDC2BBD53A7047460023FC4D3492072 X-Endpoint-Received: by B4 Relay for david@ixit.cz/default with auth_id=355 X-Original-From: David Heidelberg Reply-To: david@ixit.cz From: David Heidelberg Enable the PMI8998 Type-C port controller with a USB-C connector description for the Google Pixel 3 (blueline) and Pixel 3 XL (crosshatch), which share the same USB-C hardware via this common dtsi. The connector is configured as: - Sink-only power role with a 5V/3A sink PDO - Operating sink power 7.6W (matching downstream configuration) - Dual-role data with USB role switching The VBUS output of the charger is not supported yet, so the port can't act as a power source. Describe it as sink-only until VBUS support lands, USB host mode is still reachable through a PD data role swap. Higher voltage PDOs are left out until the charger driver programs the allowed USBIN adapter voltage. DisplayPort Alt Mode is not advertised as Google disabled DP output in the Pixel 3 hardware design (downstream explicitly sets sde_dp to disabled and excludes it from the MDSS connector list). Wire the USB-C connector port graph: - port@0: DWC3 HS endpoint for USB role switching - port@1: QMP combo PHY for USB SS orientation switching Switch the DWC3 controller from peripheral-only to OTG mode with usb-role-switch to allow the TCPM framework to control USB host/device role based on CC pin detection. Assisted-by: LLM Signed-off-by: David Heidelberg --- arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi | 59 +++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi index 9e952f9862f24..99f40a13b5d7f 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi @@ -2,16 +2,17 @@ /dts-v1/; #include #include #include #include #include +#include #include "sdm845.dtsi" #include "pm8998.dtsi" #include "pmi8998.dtsi" /delete-node/ &mpss_region; /delete-node/ &venus_mem; /delete-node/ &cdsp_mem; @@ -449,16 +450,63 @@ &pm8998_resin { }; &pmi8998_charger { monitored-battery = <&battery>; status = "okay"; }; +&pmi8998_typec { + status = "okay"; + + vdd-pdphy-supply = <&vreg_l24a_3p075>; + + connector { + compatible = "usb-c-connector"; + + /* + * Sink only for now, as the PMI8998 charger doesn't provide + * the VBUS output yet. Switch to the dual power role with + * source PDOs, try-power-role and vbus-supply once it is + * supported. + * + * Higher voltage sink PDOs will be added once the charger + * driver programs the allowed USBIN adapter voltage. + */ + power-role = "sink"; + data-role = "dual"; + self-powered; + + sink-pdos = ; + op-sink-microwatt = <7600000>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + pmi8998_hs_in: endpoint { + remote-endpoint = <&usb_1_dwc3_hs>; + }; + }; + + port@1 { + reg = <1>; + pmi8998_typec_mux_in: endpoint { + remote-endpoint = <&usb_1_qmpphy_out>; + }; + }; + }; + }; +}; + &qupv3_id_0 { status = "okay"; }; &qupv3_id_1 { status = "okay"; }; @@ -549,17 +597,22 @@ &ufs_mem_phy { status = "okay"; }; &usb_1 { status = "okay"; }; &usb_1_dwc3 { - dr_mode = "peripheral"; + dr_mode = "otg"; + usb-role-switch; +}; + +&usb_1_dwc3_hs { + remote-endpoint = <&pmi8998_hs_in>; }; &usb_1_hsphy { vdd-supply = <&vreg_l1a_0p875>; vdda-pll-supply = <&vreg_l12a_1p8>; vdda-phy-dpdm-supply = <&vreg_l24a_3p075>; qcom,imp-res-offset-value = <8>; @@ -572,16 +625,20 @@ &usb_1_hsphy { &usb_1_qmpphy { vdda-phy-supply = <&vreg_l1a_0p875>; vdda-pll-supply = <&vreg_l26a_1p2>; status = "okay"; }; +&usb_1_qmpphy_out { + remote-endpoint = <&pmi8998_typec_mux_in>; +}; + &venus { firmware-name = "qcom/sdm845/Google/blueline/venus.mbn"; status = "okay"; }; &wifi { vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>; -- 2.55.0