Skip to contentSkip to conversation

Add QMP V3 USB3 PHY support for SC7180

PATCH In review Sandeep Maheswaram 3 participants 5 messages Oct 30, 2019 – Nov 7, 2019

Subsystems (3)
lore
Share & tools
lore
#3 lore raw

PATCH 2/2 dt-bindings: phy-qcom-qmp: Add SC7180 QMP phy support

In reply to Sandeep Maheswaram

Add QMP phy entries for SC7180 in device tree bindings.

---
 Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt +9 -2
index eac9ad3..369f5b7 100644
@@ -15,17 +15,20 @@ Required properties:
 	       "qcom,sdm845-qmp-usb3-phy" for USB3 QMP V3 phy on sdm845,
 	       "qcom,sdm845-qmp-usb3-uni-phy" for USB3 QMP V3 UNI phy on sdm845,
 	       "qcom,sdm845-qmp-ufs-phy" for UFS QMP phy on sdm845,
-	       "qcom,sm8150-qmp-ufs-phy" for UFS QMP phy on sm8150.
+	       "qcom,sm8150-qmp-ufs-phy" for UFS QMP phy on sm8150,
+	       "qcom,sc7180-qmp-usb3-phy" for USB3 QMP V3 phy on sc7180.
 
 - reg:
   - index 0: address and length of register set for PHY's common
              serdes block.
   - index 1: address and length of the DP_COM control block (for
-             "qcom,sdm845-qmp-usb3-phy" only).
+             "qcom,sdm845-qmp-usb3-phy" and "qcom,sc7180-qmp-usb3-phy" only).
 
 - reg-names:
   - For "qcom,sdm845-qmp-usb3-phy":
     - Should be: "reg-base", "dp_com"
+  - For "qcom,sc7180-qmp-usb3-phy":
+    - Should be: "reg-base", "dp_com"
   - For all others:
     - The reg-names property shouldn't be defined.
 
@@ -60,6 +63,8 @@ Required properties:
 			"ref", "ref_aux".
 		For "qcom,sm8150-qmp-ufs-phy" must contain:
 			"ref", "ref_aux".
+		For "qcom,sc7180-qmp-usb3-phy" must contain:
+			"aux", "cfg_ahb", "ref", "com_aux".
 
  - resets: a list of phandles and reset controller specifier pairs,
 	   one for each entry in reset-names.
@@ -88,6 +93,8 @@ Required properties:
 			"ufsphy".
 		For "qcom,sm8150-qmp-ufs-phy": must contain:
 			"ufsphy".
+		For "qcom,sc7180-qmp-usb3-phy" must contain:
+			"phy", "common".
 
  - vdda-phy-supply: Phandle to a regulator supply to PHY core block.
  - vdda-pll-supply: Phandle to 1.8V regulator supply to PHY refclk pll block.
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
#0 lore raw

cover Add QMP V3 USB3 PHY support for SC7180

Add QMP V3 USB3 PHY entries for SC7180 in phy driver and device tree bindings

Sandeep Maheswaram (2):
phy: qcom-qmp: Add QMP V3 USB3 PHY support for SC7180
dt-bindings: phy-qcom-qmp: Add SC7180 QMP phy support

 Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt | 11 +++++++++--
 drivers/phy/qualcomm/phy-qcom-qmp.c                    |  5 ++++-
 2 files changed, 13 insertions(+), 3 deletions(-)
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
#1 lore raw

PATCH 1/2 phy: qcom-qmp: Add QMP V3 USB3 PHY support for SC7180

Adding QMP v3 USB3 phy support for SC7180.

---
 drivers/phy/qualcomm/phy-qcom-qmp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/phy/qualcomm/phy-qcom-qmp.c +4 -1
index 091e203..52275c5 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Copyright (c) 2017, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
  */
 
 #include <linux/clk.h>
@@ -2118,6 +2118,9 @@ static const struct of_device_id qcom_qmp_phy_of_match_table[] = {
 	}, {
 		.compatible = "qcom,sm8150-qmp-ufs-phy",
 		.data = &sm8150_ufsphy_cfg,
+	}, {
+		.compatible = "qcom,sc7180-qmp-usb3-phy",
+		.data = &qmp_v3_usb3phy_cfg,
 	},
 	{ },
 };
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
#4 lore raw

Re: [PATCH 2/2] dt-bindings: phy-qcom-qmp: Add SC7180 QMP phy support

In reply to Sandeep Maheswaram

Quoting Sandeep Maheswaram (2019-10-29 23:55:44)

Quoted 7 lines

Add QMP phy entries for SC7180 in device tree bindings.

---
 Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Can you convert this binding to YAML? Would make it easier to see what is applicable to certain compatibles.

Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt Required properties: · line 18

Quoted 10 lines
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt +1 -1
index eac9ad3..369f5b7 100644
@@ -15,17 +15,20 @@ Required properties:
               "qcom,sdm845-qmp-usb3-phy" for USB3 QMP V3 phy on sdm845,
               "qcom,sdm845-qmp-usb3-uni-phy" for USB3 QMP V3 UNI phy on sdm845,
               "qcom,sdm845-qmp-ufs-phy" for UFS QMP phy on sdm845,
-              "qcom,sm8150-qmp-ufs-phy" for UFS QMP phy on sm8150.
+              "qcom,sm8150-qmp-ufs-phy" for UFS QMP phy on sm8150,

Should remove the comma at the end of these lines so they don't have to change.

Quoted 6 lines
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt +1 -0
+              "qcom,sc7180-qmp-usb3-phy" for USB3 QMP V3 phy on sc7180.
 
 - reg:
   - index 0: address and length of register set for PHY's common
              serdes block.
   - index 1: address and length of the DP_COM control block (for

Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt Required properties: · line 33

Quoted 10 lines
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt +3 -1
-             "qcom,sdm845-qmp-usb3-phy" only).
+             "qcom,sdm845-qmp-usb3-phy" and "qcom,sc7180-qmp-usb3-phy" only).
 
 - reg-names:
   - For "qcom,sdm845-qmp-usb3-phy":
     - Should be: "reg-base", "dp_com"
+  - For "qcom,sc7180-qmp-usb3-phy":
+    - Should be: "reg-base", "dp_com"
   - For all others:
     - The reg-names property shouldn't be defined.

Why is this so complicated? Would be better to just know that index 1 is dp_com and index 0 is "normal" register base.

Quoted 11 lines
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt +2 -0
@@ -60,6 +63,8 @@ Required properties:
                        "ref", "ref_aux".
                For "qcom,sm8150-qmp-ufs-phy" must contain:
                        "ref", "ref_aux".
+               For "qcom,sc7180-qmp-usb3-phy" must contain:
+                       "aux", "cfg_ahb", "ref", "com_aux".
 
  - resets: a list of phandles and reset controller specifier pairs,
           one for each entry in reset-names.

Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt Required properties: · line 97

Quoted 5 lines
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt +2 -0
@@ -88,6 +93,8 @@ Required properties:
                        "ufsphy".
                For "qcom,sm8150-qmp-ufs-phy": must contain:
                        "ufsphy".
+               For "qcom,sc7180-qmp-usb3-phy" must contain:
+                       "phy", "common".

Please sort these lists based on compatible string.

Quoted 3 lines
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt +0 -0
  - vdda-phy-supply: Phandle to a regulator supply to PHY core block.
  - vdda-pll-supply: Phandle to 1.8V regulator supply to PHY refclk pll block.
#2 lore raw

Re: [PATCH 1/2] phy: qcom-qmp: Add QMP V3 USB3 PHY support for SC7180

In reply to Sandeep Maheswaram
Quoted 20 lines · Sandeep Maheswaram

Adding QMP v3 USB3 phy support for SC7180.

---
 drivers/phy/qualcomm/phy-qcom-qmp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/phy/qualcomm/phy-qcom-qmp.c +1 -1
index 091e203..52275c5 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Copyright (c) 2017, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
  */
 
 #include <linux/clk.h>

drivers/phy/qualcomm/phy-qcom-qmp.c static const struct of_device_id qcom_qmp_phy_of_match_table[] = { · line 2123

Quoted 6 lines
drivers/phy/qualcomm/phy-qcom-qmp.c +3 -0
@@ -2118,6 +2118,9 @@ static const struct of_device_id qcom_qmp_phy_of_match_table[] = {
 	}, {
 		.compatible = "qcom,sm8150-qmp-ufs-phy",
 		.data = &sm8150_ufsphy_cfg,
+	}, {
+		.compatible = "qcom,sc7180-qmp-usb3-phy",
+		.data = &qmp_v3_usb3phy_cfg,

SC7180 has single QMP PHY with each lane dedicated for USB and DP. USB driver should perform only PHY reset, not the global reset.

Quoted 3 lines
drivers/phy/qualcomm/phy-qcom-qmp.c +0 -0
 	},
 	{ },
 };
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project