[PATCH RFC 09/12] arm64: dts: qcom: sdm670-google-common: Enable USB Type-C port controller
From: David Heidelberg via B4 Relay
Date: Sat Sep 26 2026 - 08:42:05 EST
From: David Heidelberg <david@xxxxxxx>
Enable the PM660 Type-C port controller with a USB-C connector
description for the Google Pixel 3a (sargo) and Pixel 3a XL (bonito),
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
- 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.
The Pixel 3a USB-C port is USB 2.0 only, so only the HS endpoint is
wired to the DWC3 controller.
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 <david@xxxxxxx>
---
arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi | 51 +++++++++++++++++++++-
1 file changed, 49 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi b/arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi
index b4854801a5f5e..afecbef2e5bc2 100644
--- a/arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi
@@ -6,16 +6,17 @@
* Copyright (c) 2022, Richard Acayan. All rights reserved.
*/
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/power/qcom-rpmpd.h>
+#include <dt-bindings/usb/pd.h>
#include "sdm670.dtsi"
#include "pm660.dtsi"
#include "pm660l.dtsi"
/delete-node/ &mpss_region;
/delete-node/ &venus_mem;
/delete-node/ &wlan_msa_mem;
/delete-node/ &cdsp_mem;
@@ -580,16 +581,56 @@ cam_vio_pin: cam-vio-state {
power-source = <0>;
};
};
&pm660_rradc {
status = "okay";
};
+&pm660_typec {
+ vdd-pdphy-supply = <&vreg_l7b_3p125>;
+
+ status = "okay";
+
+ connector {
+ compatible = "usb-c-connector";
+
+ /*
+ * Sink only for now, as the PM660 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 = <PDO_FIXED(5000, 3000,
+ PDO_FIXED_USB_COMM |
+ PDO_FIXED_DATA_SWAP)>;
+ op-sink-microwatt = <15000000>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ pm660_hs_in: endpoint {
+ remote-endpoint = <&usb_1_dwc3_hs>;
+ };
+ };
+ };
+ };
+};
+
&pm660l_flash {
status = "okay";
led-0 {
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
led-sources = <1>, <2>;
led-max-microamp = <500000>;
@@ -702,16 +743,22 @@ &usb_1_hsphy {
};
&usb_1 {
qcom,select-utmi-as-pipe-clk;
status = "okay";
};
&usb_1_dwc3 {
- /* Only peripheral works for now */
- dr_mode = "peripheral";
+ dr_mode = "otg";
+ usb-role-switch;
/* Do not assume that sdm670.dtsi will never support USB 3.0 */
phys = <&usb_1_hsphy>;
phy-names = "usb2-phy";
maximum-speed = "high-speed";
+
+ port {
+ usb_1_dwc3_hs: endpoint {
+ remote-endpoint = <&pm660_hs_in>;
+ };
+ };
};
--
2.55.0