Devicetree
 help / color / mirror / Atom feed
From: Shawn Guo <shengchao.guo@oss.qualcomm.com>
To: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Abel Vesa <abelvesa@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	brgl@kernel.org, linux-arm-msm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Abel Vesa <abel.vesa@oss.qualcomm.com>
Subject: Re: [PATCH v2 4/4] arm64: dts: qcom: nord-ride-embedded: Enable USB ports
Date: Wed, 23 Sep 2026 20:05:18 +0800	[thread overview]
Message-ID: <arPAftqIgHPYE9Qn@QCOM-aGQu4IUr3Y> (raw)
In-Reply-To: <20260922-nord-usb-dwc-dts-v2-4-ba2b39f1a843@oss.qualcomm.com>

On Tue, Sep 22, 2026 at 05:01:10PM +0200, Bartosz Golaszewski wrote:
> From: Shawn Guo <shengchao.guo@oss.qualcomm.com>
> 
> Wire up the board specific pieces for USB ports. Enable i2c9 and add the
> three NXP PTN3222 eUSB2 repeaters (one per USB port) with their 1.8 V
> supply and reset GPIOs on the PMIC GPIO expanders.
> 
> Add the onsemi FUSB15201 dual port Type-C controller at 0x50, with
> its interrupt and pinctrl state on pmau0102_i gpio8. Both controller
> ports are wired on this board, so describe two usb-c-connector
> children and cross-link their HS and SS endpoints to the dwc3 HS
> endpoint and the QMP combo PHY SS output of USB_0 and USB_1. Both
> controllers therefore run in OTG mode with usb-role-switch.
> 
> USB_2 has no Type-C connector, so it is configured as a fixed host
> port. Its VBUS is supplied by a fixed regulator gated by
> pmau0102_h gpio3, kept always-on since nothing switches it at
> runtime.
> 
> Assisted-by: LLM
> Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
> Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com>
> Co-developed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
> ---
>  arch/arm64/boot/dts/qcom/nord-ride-embedded.dts | 309 ++++++++++++++++++++++++
>  1 file changed, 309 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/nord-ride-embedded.dts b/arch/arm64/boot/dts/qcom/nord-ride-embedded.dts
> index 09ee525764ef9a65aa17648097038687e61a5122..ee1525b37b381120d80a76d7b8e20ab2edeca6c3 100644
> --- a/arch/arm64/boot/dts/qcom/nord-ride-embedded.dts
> +++ b/arch/arm64/boot/dts/qcom/nord-ride-embedded.dts
> @@ -6,6 +6,7 @@
>  /dts-v1/;
>  
>  #include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/interrupt-controller/irq.h>
>  #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>  
>  #include "nord-embedded.dtsi"
> @@ -53,6 +54,124 @@ bi_tcxo_ao_div2: bi-tcxo-ao-div2-clk {
>  			clock-div = <2>;
>  		};
>  	};
> +
> +	vreg_per_3p3: regulator-per-3p3 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vreg_per_3p3";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +	};
> +
> +	usb2_vbus: regulator-usb2-vbus {
> +		compatible = "regulator-fixed";
> +		regulator-name = "usb2_vbus";
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +		gpio = <&pmau0102_h_gpios 3 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +		regulator-always-on;
> +	};
> +
> +	usb2-connector {
> +		compatible = "usb-a-connector";
> +		label = "USB-2-Type-A";
> +		power-role = "source";
> +
> +		vbus-supply = <&usb2_vbus>;
> +
> +		port {
> +			usb2_con_hs: endpoint {
> +				remote-endpoint = <&usb_2_dwc3_hs>;
> +			};
> +		};
> +	};
> +
> +	vreg_wcn_3p3: regulator-wcn-3p3 {

Nah, it (and the following WCN regulators) doesn't belong to this patch.

Shawn

> +		compatible = "regulator-fixed";
> +		regulator-name = "vreg_wcn_3p3";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		gpio = <&pmau0102_e_gpios 8 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +	};
> +
> +	vreg_wcn_core_vl_0p95: regulator-wcn-core-vl-0p95 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vreg_wcn_core_vl_0p95";
> +		regulator-min-microvolt = <950000>;
> +		regulator-max-microvolt = <950000>;
> +		gpio = <&pmau0102_e_gpios 6 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +	};
> +
> +	vreg_wcn_core_vm_1p35: regulator-wcn-core-vm-1p35 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vreg_wcn_core_vm_1p35";
> +		regulator-min-microvolt = <1350000>;
> +		regulator-max-microvolt = <1350000>;
> +		gpio = <&pmau0102_e_gpios 6 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +	};
> +
> +	vreg_wcn_core_vh_1p95: regulator-wcn-core-vh-1p95 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vreg_wcn_core_vh_1p95";
> +		regulator-min-microvolt = <1950000>;
> +		regulator-max-microvolt = <1950000>;
> +		gpio = <&pmau0102_e_gpios 6 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +	};
> +
> +	wcn7850-pmu {
> +		compatible = "qcom,wcn7850-pmu";
> +
> +		wlan-enable-gpios = <&pmau0102_e_gpios 10 GPIO_ACTIVE_HIGH>;
> +
> +		vdd-supply = <&vreg_wcn_3p3>;
> +		vddio-supply = <&vreg_s3a_1p8>;
> +		vddaon-supply = <&vreg_wcn_core_vl_0p95>;
> +		vdddig-supply = <&vreg_wcn_core_vl_0p95>;
> +		vddrfa1p2-supply = <&vreg_wcn_core_vm_1p35>;
> +		vddrfa1p8-supply = <&vreg_wcn_core_vh_1p95>;
> +
> +		regulators {
> +			vreg_pmu_rfa_cmn: ldo0 {
> +				regulator-name = "vreg_pmu_rfa_cmn";
> +			};
> +
> +			vreg_pmu_aon_0p59: ldo1 {
> +				regulator-name = "vreg_pmu_aon_0p59";
> +			};
> +
> +			vreg_pmu_wlcx_0p8: ldo2 {
> +				regulator-name = "vreg_pmu_wlcx_0p8";
> +			};
> +
> +			vreg_pmu_wlmx_0p85: ldo3 {
> +				regulator-name = "vreg_pmu_wlmx_0p85";
> +			};
> +
> +			vreg_pmu_rfa_0p8: ldo5 {
> +				regulator-name = "vreg_pmu_rfa_0p8";
> +			};
> +
> +			vreg_pmu_rfa_1p2: ldo6 {
> +				regulator-name = "vreg_pmu_rfa_1p2";
> +			};
> +
> +			vreg_pmu_rfa_1p8: ldo7 {
> +				regulator-name = "vreg_pmu_rfa_1p8";
> +			};
> +
> +			vreg_pmu_pcie_0p9: ldo8 {
> +				regulator-name = "vreg_pmu_pcie_0p9";
> +			};
> +
> +			vreg_pmu_pcie_1p8: ldo9 {
> +				regulator-name = "vreg_pmu_pcie_1p8";
> +			};
> +		};
> +	};
>  };
>  
>  &apps_rsc {
> @@ -366,6 +485,121 @@ vreg_l3l_1p8: ldo3 {
>  	};
>  };
>  
> +&i2c9 {
> +	clock-frequency = <400000>;
> +
> +	status = "okay";
> +
> +	usb0_repeater: redriver@43 {
> +		compatible = "nxp,ptn3222";
> +		reg = <0x43>;
> +		#phy-cells = <0>;
> +		vdd1v8-supply = <&vreg_l3l_1p8>;
> +		vdd3v3-supply = <&vreg_per_3p3>;
> +		reset-gpios = <&pmau0102_i_gpios 9 GPIO_ACTIVE_LOW>;
> +	};
> +
> +	usb2_repeater: redriver@47 {
> +		compatible = "nxp,ptn3222";
> +		reg = <0x47>;
> +		#phy-cells = <0>;
> +		vdd1v8-supply = <&vreg_l3l_1p8>;
> +		vdd3v3-supply = <&vreg_per_3p3>;
> +		reset-gpios = <&pmau0102_l_gpios 3 GPIO_ACTIVE_LOW>;
> +	};
> +
> +	usb1_repeater: redriver@4f {
> +		compatible = "nxp,ptn3222";
> +		reg = <0x4f>;
> +		#phy-cells = <0>;
> +		vdd1v8-supply = <&vreg_l3l_1p8>;
> +		vdd3v3-supply = <&vreg_per_3p3>;
> +		reset-gpios = <&pmau0102_i_gpios 10 GPIO_ACTIVE_LOW>;
> +	};
> +
> +	typec@50 {
> +		compatible = "onnn,fusb15201";
> +		reg = <0x50>;
> +		interrupts-extended = <&pmau0102_i_gpios 8 IRQ_TYPE_LEVEL_LOW>;
> +
> +		pinctrl-0 = <&usb_pd_int_default>;
> +		pinctrl-names = "default";
> +
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		connector@0 {
> +			compatible = "usb-c-connector";
> +			reg = <0>;
> +			label = "USB-C0";
> +			power-role = "dual";
> +			data-role = "dual";
> +			try-power-role = "sink";
> +
> +			ports {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				port@0 {
> +					reg = <0>;
> +
> +					usb_0_con_hs: endpoint {
> +						remote-endpoint = <&usb_0_dwc3_hs>;
> +					};
> +				};
> +
> +				port@1 {
> +					reg = <1>;
> +
> +					usb_0_con_ss: endpoint {
> +						remote-endpoint = <&usb_0_qmpphy_usb_ss_out>;
> +					};
> +				};
> +			};
> +		};
> +
> +		connector@1 {
> +			compatible = "usb-c-connector";
> +			reg = <1>;
> +			label = "USB-C1";
> +			power-role = "dual";
> +			data-role = "dual";
> +			try-power-role = "sink";
> +
> +			ports {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				port@0 {
> +					reg = <0>;
> +
> +					usb_1_con_hs: endpoint {
> +						remote-endpoint = <&usb_1_dwc3_hs>;
> +					};
> +				};
> +
> +				port@1 {
> +					reg = <1>;
> +
> +					usb_1_con_ss: endpoint {
> +						remote-endpoint = <&usb_1_qmpphy_usb_ss_out>;
> +					};
> +				};
> +			};
> +		};
> +	};
> +};
> +
> +&pmau0102_i_gpios {
> +	usb_pd_int_default: usb-pd-int-state {
> +		pins = "gpio8";
> +		function = "normal";
> +		input-enable;
> +		bias-pull-up;
> +		power-source = <0>;
> +	};
> +};
> +
>  &qupv3_0 {
>  	firmware-name = "qcom/nord/qupv3fw.elf";
>  
> @@ -440,3 +674,78 @@ &ufs_mem_phy {
>  
>  	status = "okay";
>  };
> +
> +&usb_0 {
> +	status = "okay";
> +};
> +
> +&usb_0_dwc3_hs {
> +	remote-endpoint = <&usb_0_con_hs>;
> +};
> +
> +&usb_0_hsphy {
> +	vdd-supply = <&vreg_l1h_0p9>;
> +	vdda12-supply = <&vreg_l2h_1p2>;
> +
> +	phys = <&usb0_repeater>;
> +
> +	status = "okay";
> +};
> +
> +&usb_0_qmpphy {
> +	vdda-phy-supply = <&vreg_l2k_0p9>;
> +	vdda-pll-supply = <&vreg_l2h_1p2>;
> +
> +	status = "okay";
> +};
> +
> +&usb_0_qmpphy_usb_ss_out {
> +	remote-endpoint = <&usb_0_con_ss>;
> +};
> +
> +&usb_1 {
> +	status = "okay";
> +};
> +
> +&usb_1_dwc3_hs {
> +	remote-endpoint = <&usb_1_con_hs>;
> +};
> +
> +&usb_1_hsphy {
> +	vdd-supply = <&vreg_l1h_0p9>;
> +	vdda12-supply = <&vreg_l2h_1p2>;
> +
> +	phys = <&usb1_repeater>;
> +
> +	status = "okay";
> +};
> +
> +&usb_1_qmpphy {
> +	vdda-phy-supply = <&vreg_l2k_0p9>;
> +	vdda-pll-supply = <&vreg_l2h_1p2>;
> +
> +	status = "okay";
> +};
> +
> +&usb_1_qmpphy_usb_ss_out {
> +	remote-endpoint = <&usb_1_con_ss>;
> +};
> +
> +&usb_2 {
> +	dr_mode = "host";
> +
> +	status = "okay";
> +};
> +
> +&usb_2_dwc3_hs {
> +	remote-endpoint = <&usb2_con_hs>;
> +};
> +
> +&usb_2_hsphy {
> +	vdd-supply = <&vreg_l1h_0p9>;
> +	vdda12-supply = <&vreg_l2h_1p2>;
> +
> +	phys = <&usb2_repeater>;
> +
> +	status = "okay";
> +};
> 
> -- 
> 2.47.3
> 

      reply	other threads:[~2026-09-23 12:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 15:01 [PATCH v2 0/4] arm64: dts: qcom: nord: Add USB support Bartosz Golaszewski
2026-09-22 15:01 ` [PATCH v2 1/4] arm64: dts: qcom: nord: Add the USB controller nodes Bartosz Golaszewski
2026-09-25 12:55   ` Konrad Dybcio
2026-09-22 15:01 ` [PATCH v2 2/4] arm64: dts: qcom: nord-embedded: Add USB resources and PHYs Bartosz Golaszewski
2026-09-22 15:49   ` Konrad Dybcio
2026-10-08  2:18   ` Shawn Guo
2026-10-08  9:35     ` Bartosz Golaszewski
2026-09-22 15:01 ` [PATCH v2 3/4] arm64: dts: qcom: nord-rrd: Enable USB ports Bartosz Golaszewski
2026-09-25 12:56   ` Konrad Dybcio
2026-10-08  9:53   ` Dmitry Baryshkov
2026-09-22 15:01 ` [PATCH v2 4/4] arm64: dts: qcom: nord-ride-embedded: " Bartosz Golaszewski
2026-09-23 12:05   ` Shawn Guo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=arPAftqIgHPYE9Qn@QCOM-aGQu4IUr3Y \
    --to=shengchao.guo@oss.qualcomm.com \
    --cc=abel.vesa@oss.qualcomm.com \
    --cc=abelvesa@kernel.org \
    --cc=andersson@kernel.org \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=brgl@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox