diff mbox series

arm64: dts: qcom: sm8550: Move some common usb node settings to SoC dtsi

Message ID 20240513084701.1658826-1-quic_tengfan@quicinc.com
State New
Headers show
Series arm64: dts: qcom: sm8550: Move some common usb node settings to SoC dtsi | expand

Commit Message

Tengfei Fan May 13, 2024, 8:47 a.m. UTC
All the board dts which base on SM8550 SoC dtsi refer to usb_1_dwc3_ss,
usb_dp_qmpphy_usb_ss_in, orientation-switch and usb-role-switch, so move
them to SoC dtsi from board dts.
OTG is default for dr_mode, so it can be dropped from board dts.

Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sm8550-hdk.dts           | 15 ---------------
 arch/arm64/boot/dts/qcom/sm8550-mtp.dts           | 15 ---------------
 arch/arm64/boot/dts/qcom/sm8550-qrd.dts           | 15 ---------------
 .../dts/qcom/sm8550-sony-xperia-yodo-pdx234.dts   | 14 --------------
 arch/arm64/boot/dts/qcom/sm8550.dtsi              |  4 ++++
 5 files changed, 4 insertions(+), 59 deletions(-)


base-commit: 6ba6c795dc73c22ce2c86006f17c4aa802db2a60

Comments

Krzysztof Kozlowski May 13, 2024, 8:56 a.m. UTC | #1
On 13/05/2024 10:47, Tengfei Fan wrote:
> All the board dts which base on SM8550 SoC dtsi refer to usb_1_dwc3_ss,
> usb_dp_qmpphy_usb_ss_in, orientation-switch and usb-role-switch, so move
> them to SoC dtsi from board dts.

That's not really a good argument. Argument is that it is a SoC property
(vs being a property of a board). Provide rationale for that. You are
moving things just because they look common, so to me it looks really
unjustified.

> OTG is default for dr_mode, so it can be dropped from board dts.

Separate patch, see submitting patches.

Best regards,
Krzysztof
Tengfei Fan May 14, 2024, 12:52 a.m. UTC | #2
On 5/13/2024 4:56 PM, Krzysztof Kozlowski wrote:
> On 13/05/2024 10:47, Tengfei Fan wrote:
>> All the board dts which base on SM8550 SoC dtsi refer to usb_1_dwc3_ss,
>> usb_dp_qmpphy_usb_ss_in, orientation-switch and usb-role-switch, so move
>> them to SoC dtsi from board dts.
> 
> That's not really a good argument. Argument is that it is a SoC property
> (vs being a property of a board). Provide rationale for that. You are
> moving things just because they look common, so to me it looks really
> unjustified.

In the next version of the patch series, I will modify the commit 
message to more accurately indicate why they need to be moved SoC dtsi.

> 
>> OTG is default for dr_mode, so it can be dropped from board dts.
> 
> Separate patch, see submitting patches.

In the next version of the patch series, I will separate this.

> 
> Best regards,
> Krzysztof
>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sm8550-hdk.dts b/arch/arm64/boot/dts/qcom/sm8550-hdk.dts
index 12d60a0ee095..e6bfd3ce2bed 100644
--- a/arch/arm64/boot/dts/qcom/sm8550-hdk.dts
+++ b/arch/arm64/boot/dts/qcom/sm8550-hdk.dts
@@ -1258,19 +1258,10 @@  &usb_1 {
 	status = "okay";
 };
 
-&usb_1_dwc3 {
-	dr_mode = "otg";
-	usb-role-switch;
-};
-
 &usb_1_dwc3_hs {
 	remote-endpoint = <&pmic_glink_hs_in>;
 };
 
-&usb_1_dwc3_ss {
-	remote-endpoint = <&usb_dp_qmpphy_usb_ss_in>;
-};
-
 &usb_1_hsphy {
 	vdd-supply = <&vreg_l1e_0p88>;
 	vdda12-supply = <&vreg_l3e_1p2>;
@@ -1284,8 +1275,6 @@  &usb_dp_qmpphy {
 	vdda-phy-supply = <&vreg_l3e_1p2>;
 	vdda-pll-supply = <&vreg_l3f_0p88>;
 
-	orientation-switch;
-
 	status = "okay";
 };
 
@@ -1297,10 +1286,6 @@  &usb_dp_qmpphy_out {
 	remote-endpoint = <&pmic_glink_ss_in>;
 };
 
-&usb_dp_qmpphy_usb_ss_in {
-	remote-endpoint = <&usb_1_dwc3_ss>;
-};
-
 &xo_board {
 	clock-frequency = <76800000>;
 };
diff --git a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts
index 3d4ad5aac70f..fbcdf66f16d6 100644
--- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts
+++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts
@@ -951,19 +951,10 @@  &usb_1 {
 	status = "okay";
 };
 
-&usb_1_dwc3 {
-	dr_mode = "otg";
-	usb-role-switch;
-};
-
 &usb_1_dwc3_hs {
 	remote-endpoint = <&pmic_glink_hs_in>;
 };
 
-&usb_1_dwc3_ss {
-	remote-endpoint = <&usb_dp_qmpphy_usb_ss_in>;
-};
-
 &usb_1_hsphy {
 	vdd-supply = <&vreg_l1e_0p88>;
 	vdda12-supply = <&vreg_l3e_1p2>;
@@ -977,8 +968,6 @@  &usb_dp_qmpphy {
 	vdda-phy-supply = <&vreg_l3e_1p2>;
 	vdda-pll-supply = <&vreg_l3f_0p91>;
 
-	orientation-switch;
-
 	status = "okay";
 };
 
@@ -990,10 +979,6 @@  &usb_dp_qmpphy_out {
 	remote-endpoint = <&pmic_glink_ss_in>;
 };
 
-&usb_dp_qmpphy_usb_ss_in {
-	remote-endpoint = <&usb_1_dwc3_ss>;
-};
-
 &xo_board {
 	clock-frequency = <76800000>;
 };
diff --git a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts
index 92f015017418..3ad616e46cb3 100644
--- a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts
+++ b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts
@@ -1135,19 +1135,10 @@  &usb_1 {
 	status = "okay";
 };
 
-&usb_1_dwc3 {
-	dr_mode = "otg";
-	usb-role-switch;
-};
-
 &usb_1_dwc3_hs {
 	remote-endpoint = <&pmic_glink_hs_in>;
 };
 
-&usb_1_dwc3_ss {
-	remote-endpoint = <&usb_dp_qmpphy_usb_ss_in>;
-};
-
 &usb_1_hsphy {
 	vdd-supply = <&vreg_l1e_0p88>;
 	vdda12-supply = <&vreg_l3e_1p2>;
@@ -1161,8 +1152,6 @@  &usb_dp_qmpphy {
 	vdda-phy-supply = <&vreg_l3e_1p2>;
 	vdda-pll-supply = <&vreg_l3f_0p88>;
 
-	orientation-switch;
-
 	status = "okay";
 };
 
@@ -1174,10 +1163,6 @@  &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>;
 };
diff --git a/arch/arm64/boot/dts/qcom/sm8550-sony-xperia-yodo-pdx234.dts b/arch/arm64/boot/dts/qcom/sm8550-sony-xperia-yodo-pdx234.dts
index 85e0d3d66e16..85d487ef80a0 100644
--- a/arch/arm64/boot/dts/qcom/sm8550-sony-xperia-yodo-pdx234.dts
+++ b/arch/arm64/boot/dts/qcom/sm8550-sony-xperia-yodo-pdx234.dts
@@ -737,19 +737,10 @@  &usb_1 {
 	status = "okay";
 };
 
-&usb_1_dwc3 {
-	dr_mode = "otg";
-	usb-role-switch;
-};
-
 &usb_1_dwc3_hs {
 	remote-endpoint = <&pmic_glink_hs_in>;
 };
 
-&usb_1_dwc3_ss {
-	remote-endpoint = <&usb_dp_qmpphy_usb_ss_in>;
-};
-
 &usb_1_hsphy {
 	vdd-supply = <&pm8550vs_2_l1>;
 	vdda12-supply = <&pm8550vs_2_l3>;
@@ -761,7 +752,6 @@  &usb_1_hsphy {
 &usb_dp_qmpphy {
 	vdda-phy-supply = <&pm8550vs_2_l3>;
 	vdda-pll-supply = <&pm8550ve_l3>;
-	orientation-switch;
 
 	status = "okay";
 };
@@ -770,10 +760,6 @@  &usb_dp_qmpphy_out {
 	remote-endpoint = <&pmic_glink_ss_in>;
 };
 
-&usb_dp_qmpphy_usb_ss_in {
-	remote-endpoint = <&usb_1_dwc3_ss>;
-};
-
 &xo_board {
 	clock-frequency = <76800000>;
 };
diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
index bc5aeb05ffc3..05f7d7341f72 100644
--- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
@@ -3168,6 +3168,7 @@  usb_dp_qmpphy: phy@88e8000 {
 
 			#clock-cells = <1>;
 			#phy-cells = <1>;
+			orientation-switch;
 
 			status = "disabled";
 
@@ -3186,6 +3187,7 @@  port@1 {
 					reg = <1>;
 
 					usb_dp_qmpphy_usb_ss_in: endpoint {
+						remote-endpoint = <&usb_1_dwc3_ss>;
 					};
 				};
 
@@ -3264,6 +3266,7 @@  usb_1_dwc3: usb@a600000 {
 				snps,has-lpm-erratum;
 				tx-fifo-resize;
 				dma-coherent;
+				usb-role-switch;
 
 				ports {
 					#address-cells = <1>;
@@ -3280,6 +3283,7 @@  port@1 {
 						reg = <1>;
 
 						usb_1_dwc3_ss: endpoint {
+							remote-endpoint = <&usb_dp_qmpphy_usb_ss_in>;
 						};
 					};
 				};