* [PATCH 0/5] Add USB Support on Qualcomm's SDX75 Platform
@ 2023-09-05 4:43 Rohit Agarwal
2023-09-05 4:43 ` [PATCH 1/5] dt-bindings: phy: qcom,snps-eusb2-phy: Add compatible for SDX75 Rohit Agarwal
` (4 more replies)
0 siblings, 5 replies; 19+ messages in thread
From: Rohit Agarwal @ 2023-09-05 4:43 UTC (permalink / raw)
To: agross, andersson, konrad.dybcio, vkoul, kishon, robh+dt,
krzysztof.kozlowski+dt, conor+dt, gregkh, abel.vesa, quic_wcheng
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb,
kernel, Rohit Agarwal
Hi,
This series adds support of USB3 PHY support for Qualcomm's SDX75 Platform.
Thanks,
Rohit.
Rohit Agarwal (5):
dt-bindings: phy: qcom,snps-eusb2-phy: Add compatible for SDX75
dt-bindings: phy: Add qcom,sdx75-qmp-usb3-uni schema file
dt-bindings: usb: dwc3: Add missing SDX65 compatible
dt-bindings: usb: dwc3: Add SDX75 compatible
phy: qcom-qmp-usb: Add Qualcomm SDX75 USB3 PHY support
.../bindings/phy/qcom,sdx75-qmp-usb3-uni-phy.yaml | 106 ++++++++++++++
.../bindings/phy/qcom,snps-eusb2-phy.yaml | 7 +-
.../devicetree/bindings/usb/qcom,dwc3.yaml | 4 +
drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 160 +++++++++++++++++++++
4 files changed, 276 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/phy/qcom,sdx75-qmp-usb3-uni-phy.yaml
--
2.7.4
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 1/5] dt-bindings: phy: qcom,snps-eusb2-phy: Add compatible for SDX75
2023-09-05 4:43 [PATCH 0/5] Add USB Support on Qualcomm's SDX75 Platform Rohit Agarwal
@ 2023-09-05 4:43 ` Rohit Agarwal
2023-09-05 6:47 ` Krzysztof Kozlowski
2023-09-05 4:43 ` [PATCH 2/5] dt-bindings: phy: Add qcom,sdx75-qmp-usb3-uni schema file Rohit Agarwal
` (3 subsequent siblings)
4 siblings, 1 reply; 19+ messages in thread
From: Rohit Agarwal @ 2023-09-05 4:43 UTC (permalink / raw)
To: agross, andersson, konrad.dybcio, vkoul, kishon, robh+dt,
krzysztof.kozlowski+dt, conor+dt, gregkh, abel.vesa, quic_wcheng
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb,
kernel, Rohit Agarwal
Add a dt-bindings compatible string for the SDX75 SoC that
uses Synopsis eUSB2 PHY.
Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
---
Documentation/devicetree/bindings/phy/qcom,snps-eusb2-phy.yaml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-phy.yaml
index c53bab1..c958286 100644
--- a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-phy.yaml
@@ -14,7 +14,12 @@ description:
properties:
compatible:
- const: qcom,sm8550-snps-eusb2-phy
+ oneOf:
+ - items:
+ - enum:
+ - qcom,sdx75-snps-eusb2-phy
+ - const: qcom,sm8550-snps-eusb2-phy
+ - const: qcom,sm8550-snps-eusb2-phy
reg:
maxItems: 1
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 2/5] dt-bindings: phy: Add qcom,sdx75-qmp-usb3-uni schema file
2023-09-05 4:43 [PATCH 0/5] Add USB Support on Qualcomm's SDX75 Platform Rohit Agarwal
2023-09-05 4:43 ` [PATCH 1/5] dt-bindings: phy: qcom,snps-eusb2-phy: Add compatible for SDX75 Rohit Agarwal
@ 2023-09-05 4:43 ` Rohit Agarwal
2023-09-05 6:49 ` Krzysztof Kozlowski
2023-09-05 17:48 ` Rob Herring
2023-09-05 4:43 ` [PATCH 3/5] dt-bindings: usb: dwc3: Add missing SDX65 compatible Rohit Agarwal
` (2 subsequent siblings)
4 siblings, 2 replies; 19+ messages in thread
From: Rohit Agarwal @ 2023-09-05 4:43 UTC (permalink / raw)
To: agross, andersson, konrad.dybcio, vkoul, kishon, robh+dt,
krzysztof.kozlowski+dt, conor+dt, gregkh, abel.vesa, quic_wcheng
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb,
kernel, Rohit Agarwal
Add a dt-binding schema for SDX75 SoC.
Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
---
.../bindings/phy/qcom,sdx75-qmp-usb3-uni-phy.yaml | 106 +++++++++++++++++++++
1 file changed, 106 insertions(+)
create mode 100644 Documentation/devicetree/bindings/phy/qcom,sdx75-qmp-usb3-uni-phy.yaml
diff --git a/Documentation/devicetree/bindings/phy/qcom,sdx75-qmp-usb3-uni-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sdx75-qmp-usb3-uni-phy.yaml
new file mode 100644
index 0000000..2ae0710
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/qcom,sdx75-qmp-usb3-uni-phy.yaml
@@ -0,0 +1,106 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/qcom,sdx75-qmp-usb3-uni-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm QMP PHY controller (USB, SDX75)
+
+maintainers:
+ - Vinod Koul <vkoul@kernel.org>
+
+description:
+ The QMP PHY controller supports physical layer functionality for a number of
+ controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
+
+properties:
+ compatible:
+ enum:
+ - qcom,sdx75-qmp-usb3-uni-phy
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 4
+
+ clock-names:
+ items:
+ - const: aux
+ - const: cfg_ahb
+ - const: ref
+ - const: pipe
+
+ power-domains:
+ maxItems: 1
+
+ resets:
+ maxItems: 2
+
+ reset-names:
+ items:
+ - const: phy
+ - const: common
+
+ vdda-phy-supply: true
+
+ vdda-pll-supply: true
+
+ "#clock-cells":
+ const: 0
+
+ clock-output-names:
+ maxItems: 1
+
+ "#phy-cells":
+ const: 0
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - power-domains
+ - resets
+ - reset-names
+ - vdda-phy-supply
+ - vdda-pll-supply
+ - "#clock-cells"
+ - clock-output-names
+ - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,gcc-sdx75.h>
+ #include <dt-bindings/clock/qcom,rpmh.h>
+
+ phy@ff6000 {
+ compatible = "qcom,sdx75-qmp-usb3-uni-phy";
+ reg = <0x0ff6000 0x2000>;
+
+ clocks = <&gcc GCC_USB3_PHY_AUX_CLK>,
+ <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
+ <&gcc GCC_USB2_CLKREF_EN>,
+ <&gcc GCC_USB3_PHY_PIPE_CLK>;
+ clock-names = "aux",
+ "cfg_ahb",
+ "ref",
+ "pipe";
+
+ power-domains = <&gcc GCC_USB3_PHY_GDSC>;
+
+ resets = <&gcc GCC_USB3PHY_PHY_BCR>,
+ <&gcc GCC_USB3_PHY_BCR>;
+ reset-names = "phy",
+ "common";
+
+ vdda-phy-supply = <&vreg_l4b_0p88>;
+ vdda-pll-supply = <&vreg_l1b_1p2>;
+
+ #clock-cells = <0>;
+ clock-output-names = "usb3_uni_phy_pipe_clk_src";
+
+ #phy-cells = <0>;
+ };
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 3/5] dt-bindings: usb: dwc3: Add missing SDX65 compatible
2023-09-05 4:43 [PATCH 0/5] Add USB Support on Qualcomm's SDX75 Platform Rohit Agarwal
2023-09-05 4:43 ` [PATCH 1/5] dt-bindings: phy: qcom,snps-eusb2-phy: Add compatible for SDX75 Rohit Agarwal
2023-09-05 4:43 ` [PATCH 2/5] dt-bindings: phy: Add qcom,sdx75-qmp-usb3-uni schema file Rohit Agarwal
@ 2023-09-05 4:43 ` Rohit Agarwal
2023-09-05 6:49 ` Krzysztof Kozlowski
2023-09-05 4:43 ` [PATCH 4/5] dt-bindings: usb: dwc3: Add SDX75 compatible Rohit Agarwal
2023-09-05 4:43 ` [PATCH 5/5] phy: qcom-qmp-usb: Add Qualcomm SDX75 USB3 PHY support Rohit Agarwal
4 siblings, 1 reply; 19+ messages in thread
From: Rohit Agarwal @ 2023-09-05 4:43 UTC (permalink / raw)
To: agross, andersson, konrad.dybcio, vkoul, kishon, robh+dt,
krzysztof.kozlowski+dt, conor+dt, gregkh, abel.vesa, quic_wcheng
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb,
kernel, Rohit Agarwal
Add missing SDX65 compatible for specifying the clocks used.
Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
---
Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
index 5c13229..fa51f50 100644
--- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
@@ -186,6 +186,7 @@ allOf:
- qcom,sdm670-dwc3
- qcom,sdm845-dwc3
- qcom,sdx55-dwc3
+ - qcom,sdx65-dwc3
- qcom,sm6350-dwc3
then:
properties:
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 4/5] dt-bindings: usb: dwc3: Add SDX75 compatible
2023-09-05 4:43 [PATCH 0/5] Add USB Support on Qualcomm's SDX75 Platform Rohit Agarwal
` (2 preceding siblings ...)
2023-09-05 4:43 ` [PATCH 3/5] dt-bindings: usb: dwc3: Add missing SDX65 compatible Rohit Agarwal
@ 2023-09-05 4:43 ` Rohit Agarwal
2023-09-05 6:54 ` Krzysztof Kozlowski
2023-09-05 4:43 ` [PATCH 5/5] phy: qcom-qmp-usb: Add Qualcomm SDX75 USB3 PHY support Rohit Agarwal
4 siblings, 1 reply; 19+ messages in thread
From: Rohit Agarwal @ 2023-09-05 4:43 UTC (permalink / raw)
To: agross, andersson, konrad.dybcio, vkoul, kishon, robh+dt,
krzysztof.kozlowski+dt, conor+dt, gregkh, abel.vesa, quic_wcheng
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb,
kernel, Rohit Agarwal
Document the SDX75 dwc3 compatible.
Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
---
Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
index fa51f50..30b2e20 100644
--- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
@@ -32,6 +32,7 @@ properties:
- qcom,sdm845-dwc3
- qcom,sdx55-dwc3
- qcom,sdx65-dwc3
+ - qcom,sdx75-dwc3
- qcom,sm4250-dwc3
- qcom,sm6115-dwc3
- qcom,sm6125-dwc3
@@ -187,6 +188,7 @@ allOf:
- qcom,sdm845-dwc3
- qcom,sdx55-dwc3
- qcom,sdx65-dwc3
+ - qcom,sdx75-dwc3
- qcom,sm6350-dwc3
then:
properties:
@@ -361,6 +363,7 @@ allOf:
- qcom,sdm845-dwc3
- qcom,sdx55-dwc3
- qcom,sdx65-dwc3
+ - qcom,sdx75-dwc3
- qcom,sm4250-dwc3
- qcom,sm6125-dwc3
- qcom,sm6350-dwc3
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 5/5] phy: qcom-qmp-usb: Add Qualcomm SDX75 USB3 PHY support
2023-09-05 4:43 [PATCH 0/5] Add USB Support on Qualcomm's SDX75 Platform Rohit Agarwal
` (3 preceding siblings ...)
2023-09-05 4:43 ` [PATCH 4/5] dt-bindings: usb: dwc3: Add SDX75 compatible Rohit Agarwal
@ 2023-09-05 4:43 ` Rohit Agarwal
2023-09-05 6:53 ` Krzysztof Kozlowski
2023-09-05 20:30 ` Dmitry Baryshkov
4 siblings, 2 replies; 19+ messages in thread
From: Rohit Agarwal @ 2023-09-05 4:43 UTC (permalink / raw)
To: agross, andersson, konrad.dybcio, vkoul, kishon, robh+dt,
krzysztof.kozlowski+dt, conor+dt, gregkh, abel.vesa, quic_wcheng
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb,
kernel, Rohit Agarwal
Add support for USB3 QMP PHY found in SDX75 platform.
Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
---
drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 160 ++++++++++++++++++++++++++++++++
1 file changed, 160 insertions(+)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
index a49711c..f95d117 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
@@ -24,6 +24,7 @@
#include "phy-qcom-qmp-pcs-misc-v3.h"
#include "phy-qcom-qmp-pcs-usb-v4.h"
#include "phy-qcom-qmp-pcs-usb-v5.h"
+#include "phy-qcom-qmp-pcs-usb-v6.h"
/* QPHY_SW_RESET bit */
#define SW_RESET BIT(0)
@@ -1066,6 +1067,134 @@ static const struct qmp_phy_init_tbl sdx65_usb3_uniphy_rx_tbl[] = {
QMP_PHY_INIT_CFG(QSERDES_V5_RX_SIGDET_ENABLES, 0x00),
};
+static const struct qmp_phy_init_tbl sdx75_usb3_uniphy_serdes_tbl[] = {
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_SSC_STEP_SIZE1_MODE1, 0x9e),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_SSC_STEP_SIZE2_MODE1, 0x06),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_CP_CTRL_MODE1, 0x02),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_PLL_RCTRL_MODE1, 0x16),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_PLL_CCTRL_MODE1, 0x36),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_CORECLK_DIV_MODE1, 0x04),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_LOCK_CMP1_MODE1, 0x2e),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_LOCK_CMP2_MODE1, 0x82),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_DEC_START_MODE1, 0x82),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_DIV_FRAC_START1_MODE1, 0xab),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_DIV_FRAC_START2_MODE1, 0xea),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_DIV_FRAC_START3_MODE1, 0x02),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_HSCLK_SEL_1, 0x01),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_VCO_TUNE1_MODE1, 0x25),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_VCO_TUNE2_MODE1, 0x02),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_BIN_VCOCAL_CMP_CODE1_MODE1, 0xb7),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_BIN_VCOCAL_CMP_CODE2_MODE1, 0x1e),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_BIN_VCOCAL_CMP_CODE1_MODE0, 0xb7),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_BIN_VCOCAL_CMP_CODE2_MODE0, 0x1e),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_SSC_STEP_SIZE1_MODE0, 0x9e),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_SSC_STEP_SIZE2_MODE0, 0x06),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_CP_CTRL_MODE0, 0x02),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_PLL_RCTRL_MODE0, 0x16),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_PLL_CCTRL_MODE0, 0x36),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_LOCK_CMP1_MODE0, 0x12),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_LOCK_CMP2_MODE0, 0x34),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_DEC_START_MODE0, 0x82),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_DIV_FRAC_START1_MODE0, 0xab),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_DIV_FRAC_START2_MODE0, 0xea),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_DIV_FRAC_START3_MODE0, 0x02),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_VCO_TUNE1_MODE0, 0x25),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_VCO_TUNE2_MODE0, 0x02),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_BG_TIMER, 0x0e),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_SSC_EN_CENTER, 0x01),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_SSC_PER1, 0x31),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_SSC_PER2, 0x01),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_SYSCLK_BUF_ENABLE, 0x0a),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_SYSCLK_EN_SEL, 0x1a),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_LOCK_CMP_CFG, 0x14),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_VCO_TUNE_MAP, 0x04),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_CORE_CLK_EN, 0x20),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_CMN_CONFIG_1, 0x16),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_AUTO_GAIN_ADJ_CTRL_1, 0xb6),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_AUTO_GAIN_ADJ_CTRL_2, 0x4b),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_AUTO_GAIN_ADJ_CTRL_3, 0x37),
+ QMP_PHY_INIT_CFG(QSERDES_V6_COM_ADDITIONAL_MISC, 0x0c),
+};
+
+static const struct qmp_phy_init_tbl sdx75_usb3_uniphy_tx_tbl[] = {
+ QMP_PHY_INIT_CFG(QSERDES_V6_TX_RES_CODE_LANE_TX, 0x00),
+ QMP_PHY_INIT_CFG(QSERDES_V6_TX_RES_CODE_LANE_RX, 0x00),
+ QMP_PHY_INIT_CFG(QSERDES_V6_TX_RES_CODE_LANE_OFFSET_TX, 0x1f),
+ QMP_PHY_INIT_CFG(QSERDES_V6_TX_RES_CODE_LANE_OFFSET_RX, 0x09),
+ QMP_PHY_INIT_CFG(QSERDES_V6_TX_LANE_MODE_1, 0xf5),
+ QMP_PHY_INIT_CFG(QSERDES_V6_TX_LANE_MODE_3, 0x3f),
+ QMP_PHY_INIT_CFG(QSERDES_V6_TX_LANE_MODE_4, 0x3f),
+ QMP_PHY_INIT_CFG(QSERDES_V6_TX_LANE_MODE_5, 0x5f),
+ QMP_PHY_INIT_CFG(QSERDES_V6_TX_RCV_DETECT_LVL_2, 0x12),
+ QMP_PHY_INIT_CFG(QSERDES_V6_TX_PI_QEC_CTRL, 0x21),
+};
+
+static const struct qmp_phy_init_tbl sdx75_usb3_uniphy_rx_tbl[] = {
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_FO_GAIN, 0x0a),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_SO_GAIN, 0x06),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_FASTLOCK_FO_GAIN, 0x2f),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_SO_SATURATION_AND_ENABLE, 0x7f),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_FASTLOCK_COUNT_LOW, 0xff),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_FASTLOCK_COUNT_HIGH, 0x0f),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_PI_CONTROLS, 0x99),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_SB2_THRESH1, 0x08),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_SB2_THRESH2, 0x08),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_SB2_GAIN1, 0x00),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_SB2_GAIN2, 0x0a),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_AUX_DATA_TCOARSE_TFINE, 0xa0),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_VGA_CAL_CNTRL1, 0x54),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_VGA_CAL_CNTRL2, 0x0f),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_GM_CAL, 0x13),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_EQU_ADAPTOR_CNTRL2, 0x0f),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_EQU_ADAPTOR_CNTRL3, 0x4a),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_EQU_ADAPTOR_CNTRL4, 0x0a),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_IDAC_TSETTLE_LOW, 0x07),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_IDAC_TSETTLE_HIGH, 0x00),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_EQ_OFFSET_ADAPTOR_CNTRL1, 0x47),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_SIGDET_CNTRL, 0x04),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_SIGDET_DEGLITCH_CNTRL, 0x0e),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_00_LOW, 0x3f),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_00_HIGH, 0xbf),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_00_HIGH2, 0xff),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_00_HIGH3, 0xdf),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_00_HIGH4, 0xed),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_01_LOW, 0xdc),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_01_HIGH, 0x5c),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_01_HIGH2, 0x9c),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_01_HIGH3, 0x1d),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_01_HIGH4, 0x09),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_DFE_EN_TIMER, 0x04),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_DFE_CTLE_POST_CAL_OFFSET, 0x38),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_DCC_CTRL1, 0x0c),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_VTH_CODE, 0x10),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_SIGDET_CAL_CTRL1, 0x14),
+ QMP_PHY_INIT_CFG(QSERDES_V6_RX_SIGDET_CAL_TRIM, 0x08),
+};
+
+static const struct qmp_phy_init_tbl sdx75_usb3_uniphy_pcs_tbl[] = {
+ QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_LOCK_DETECT_CONFIG1, 0xc4),
+ QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_LOCK_DETECT_CONFIG2, 0x89),
+ QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_LOCK_DETECT_CONFIG3, 0x20),
+ QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_LOCK_DETECT_CONFIG6, 0x13),
+ QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_REFGEN_REQ_CONFIG1, 0x21),
+ QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_RX_SIGDET_LVL, 0xaa),
+ QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_RCVR_DTCT_DLY_P1U2_L, 0xe7),
+ QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_RCVR_DTCT_DLY_P1U2_H, 0x03),
+ QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_CDR_RESET_TIME, 0x0a),
+ QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_ALIGN_DETECT_CONFIG1, 0x88),
+ QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_ALIGN_DETECT_CONFIG2, 0x13),
+ QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_PCS_TX_RX_CONFIG, 0x0c),
+ QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_EQ_CONFIG1, 0x4b),
+ QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_EQ_CONFIG5, 0x10),
+};
+
+static const struct qmp_phy_init_tbl sdx75_usb3_uniphy_pcs_usb_tbl[] = {
+ QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_USB3_LFPS_DET_HIGH_COUNT_VAL, 0xf8),
+ QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_USB3_RXEQTRAINING_DFE_TIME_S2, 0x07),
+ QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_USB3_RCVR_DTCT_DLY_U3_L, 0x40),
+ QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_USB3_RCVR_DTCT_DLY_U3_H, 0x00),
+};
+
static const struct qmp_phy_init_tbl sm8350_usb3_tx_tbl[] = {
QMP_PHY_INIT_CFG(QSERDES_V5_TX_RES_CODE_LANE_TX, 0x00),
QMP_PHY_INIT_CFG(QSERDES_V5_TX_RES_CODE_LANE_RX, 0x00),
@@ -1868,6 +1997,33 @@ static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = {
.has_pwrdn_delay = true,
};
+static const struct qmp_phy_cfg sdx75_usb3_uniphy_cfg = {
+ .lanes = 1,
+ .offsets = &qmp_usb_offsets_v5,
+
+ .serdes_tbl = sdx75_usb3_uniphy_serdes_tbl,
+ .serdes_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_serdes_tbl),
+ .tx_tbl = sdx75_usb3_uniphy_tx_tbl,
+ .tx_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_tx_tbl),
+ .rx_tbl = sdx75_usb3_uniphy_rx_tbl,
+ .rx_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_rx_tbl),
+ .pcs_tbl = sdx75_usb3_uniphy_pcs_tbl,
+ .pcs_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_pcs_tbl),
+ .pcs_usb_tbl = sdx75_usb3_uniphy_pcs_usb_tbl,
+ .pcs_usb_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_pcs_usb_tbl),
+ .clk_list = qmp_v4_sdx55_usbphy_clk_l,
+ .num_clks = ARRAY_SIZE(qmp_v4_sdx55_usbphy_clk_l),
+ .reset_list = msm8996_usb3phy_reset_l,
+ .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l),
+ .vreg_list = qmp_phy_vreg_l,
+ .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
+ .regs = qmp_v5_usb3phy_regs_layout,
+ .pcs_usb_offset = 0x1000,
+
+ .has_pwrdn_delay = true,
+
+};
+
static const struct qmp_phy_cfg sm8350_usb3phy_cfg = {
.lanes = 2,
@@ -1985,6 +2141,7 @@ static int qmp_usb_init(struct phy *phy)
void __iomem *dp_com = qmp->dp_com;
int ret;
+
ret = regulator_bulk_enable(cfg->num_vregs, qmp->vregs);
if (ret) {
dev_err(qmp->dev, "failed to enable regulators, err=%d\n", ret);
@@ -2619,6 +2776,9 @@ static const struct of_device_id qmp_usb_of_match_table[] = {
.compatible = "qcom,sdx65-qmp-usb3-uni-phy",
.data = &sdx65_usb3_uniphy_cfg,
}, {
+ .compatible = "qcom,sdx75-qmp-usb3-uni-phy",
+ .data = &sdx75_usb3_uniphy_cfg,
+ }, {
.compatible = "qcom,sm6115-qmp-usb3-phy",
.data = &qcm2290_usb3phy_cfg,
}, {
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH 1/5] dt-bindings: phy: qcom,snps-eusb2-phy: Add compatible for SDX75
2023-09-05 4:43 ` [PATCH 1/5] dt-bindings: phy: qcom,snps-eusb2-phy: Add compatible for SDX75 Rohit Agarwal
@ 2023-09-05 6:47 ` Krzysztof Kozlowski
0 siblings, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2023-09-05 6:47 UTC (permalink / raw)
To: Rohit Agarwal, agross, andersson, konrad.dybcio, vkoul, kishon,
robh+dt, krzysztof.kozlowski+dt, conor+dt, gregkh, abel.vesa,
quic_wcheng
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb,
kernel
On 05/09/2023 06:43, Rohit Agarwal wrote:
> Add a dt-bindings compatible string for the SDX75 SoC that
> uses Synopsis eUSB2 PHY.
>
> Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 2/5] dt-bindings: phy: Add qcom,sdx75-qmp-usb3-uni schema file
2023-09-05 4:43 ` [PATCH 2/5] dt-bindings: phy: Add qcom,sdx75-qmp-usb3-uni schema file Rohit Agarwal
@ 2023-09-05 6:49 ` Krzysztof Kozlowski
2023-09-05 7:08 ` Rohit Agarwal
2023-09-05 17:48 ` Rob Herring
1 sibling, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2023-09-05 6:49 UTC (permalink / raw)
To: Rohit Agarwal, agross, andersson, konrad.dybcio, vkoul, kishon,
robh+dt, krzysztof.kozlowski+dt, conor+dt, gregkh, abel.vesa,
quic_wcheng
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb,
kernel
On 05/09/2023 06:43, Rohit Agarwal wrote:
> Add a dt-binding schema for SDX75 SoC.
>
It's the same as qcom,ipq9574-qmp-usb3-phy.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 3/5] dt-bindings: usb: dwc3: Add missing SDX65 compatible
2023-09-05 4:43 ` [PATCH 3/5] dt-bindings: usb: dwc3: Add missing SDX65 compatible Rohit Agarwal
@ 2023-09-05 6:49 ` Krzysztof Kozlowski
2023-09-05 6:51 ` Krzysztof Kozlowski
0 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2023-09-05 6:49 UTC (permalink / raw)
To: Rohit Agarwal, agross, andersson, konrad.dybcio, vkoul, kishon,
robh+dt, krzysztof.kozlowski+dt, conor+dt, gregkh, abel.vesa,
quic_wcheng
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb,
kernel
On 05/09/2023 06:43, Rohit Agarwal wrote:
> Add missing SDX65 compatible for specifying the clocks used.
>
> Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
> ---
> Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> index 5c13229..fa51f50 100644
> --- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> +++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> @@ -186,6 +186,7 @@ allOf:
> - qcom,sdm670-dwc3
> - qcom,sdm845-dwc3
> - qcom,sdx55-dwc3
> + - qcom,sdx65-dwc3
That's not a complete change. Update the rest of the file.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 3/5] dt-bindings: usb: dwc3: Add missing SDX65 compatible
2023-09-05 6:49 ` Krzysztof Kozlowski
@ 2023-09-05 6:51 ` Krzysztof Kozlowski
2023-09-05 7:10 ` Rohit Agarwal
0 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2023-09-05 6:51 UTC (permalink / raw)
To: Rohit Agarwal, agross, andersson, konrad.dybcio, vkoul, kishon,
robh+dt, krzysztof.kozlowski+dt, conor+dt, gregkh, abel.vesa,
quic_wcheng
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb,
kernel
On 05/09/2023 08:49, Krzysztof Kozlowski wrote:
> On 05/09/2023 06:43, Rohit Agarwal wrote:
>> Add missing SDX65 compatible for specifying the clocks used.
>>
>> Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
>> ---
>> Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
>> index 5c13229..fa51f50 100644
>> --- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
>> +++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
>> @@ -186,6 +186,7 @@ allOf:
>> - qcom,sdm670-dwc3
>> - qcom,sdm845-dwc3
>> - qcom,sdx55-dwc3
>> + - qcom,sdx65-dwc3
>
> That's not a complete change. Update the rest of the file.
Hm, your subject is confusing. The SDX65 is not missing and you do not
add missing compatible.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 5/5] phy: qcom-qmp-usb: Add Qualcomm SDX75 USB3 PHY support
2023-09-05 4:43 ` [PATCH 5/5] phy: qcom-qmp-usb: Add Qualcomm SDX75 USB3 PHY support Rohit Agarwal
@ 2023-09-05 6:53 ` Krzysztof Kozlowski
2023-09-05 7:12 ` Rohit Agarwal
2023-09-05 20:30 ` Dmitry Baryshkov
1 sibling, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2023-09-05 6:53 UTC (permalink / raw)
To: Rohit Agarwal, agross, andersson, konrad.dybcio, vkoul, kishon,
robh+dt, krzysztof.kozlowski+dt, conor+dt, gregkh, abel.vesa,
quic_wcheng
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb,
kernel
On 05/09/2023 06:43, Rohit Agarwal wrote:
> Add support for USB3 QMP PHY found in SDX75 platform.
>
> Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
> ---
>
> +static const struct qmp_phy_cfg sdx75_usb3_uniphy_cfg = {
> + .lanes = 1,
> + .offsets = &qmp_usb_offsets_v5,
> +
> + .serdes_tbl = sdx75_usb3_uniphy_serdes_tbl,
> + .serdes_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_serdes_tbl),
> + .tx_tbl = sdx75_usb3_uniphy_tx_tbl,
> + .tx_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_tx_tbl),
> + .rx_tbl = sdx75_usb3_uniphy_rx_tbl,
> + .rx_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_rx_tbl),
> + .pcs_tbl = sdx75_usb3_uniphy_pcs_tbl,
> + .pcs_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_pcs_tbl),
> + .pcs_usb_tbl = sdx75_usb3_uniphy_pcs_usb_tbl,
> + .pcs_usb_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_pcs_usb_tbl),
> + .clk_list = qmp_v4_sdx55_usbphy_clk_l,
> + .num_clks = ARRAY_SIZE(qmp_v4_sdx55_usbphy_clk_l),
> + .reset_list = msm8996_usb3phy_reset_l,
> + .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l),
> + .vreg_list = qmp_phy_vreg_l,
> + .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> + .regs = qmp_v5_usb3phy_regs_layout,
> + .pcs_usb_offset = 0x1000,
> +
> + .has_pwrdn_delay = true,
> +
Stray blank line
> +};
> +
> static const struct qmp_phy_cfg sm8350_usb3phy_cfg = {
> .lanes = 2,
>
> @@ -1985,6 +2141,7 @@ static int qmp_usb_init(struct phy *phy)
> void __iomem *dp_com = qmp->dp_com;
> int ret;
>
> +
No need for this.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 4/5] dt-bindings: usb: dwc3: Add SDX75 compatible
2023-09-05 4:43 ` [PATCH 4/5] dt-bindings: usb: dwc3: Add SDX75 compatible Rohit Agarwal
@ 2023-09-05 6:54 ` Krzysztof Kozlowski
0 siblings, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2023-09-05 6:54 UTC (permalink / raw)
To: Rohit Agarwal, agross, andersson, konrad.dybcio, vkoul, kishon,
robh+dt, krzysztof.kozlowski+dt, conor+dt, gregkh, abel.vesa,
quic_wcheng
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb,
kernel
On 05/09/2023 06:43, Rohit Agarwal wrote:
> Document the SDX75 dwc3 compatible.
>
> Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 2/5] dt-bindings: phy: Add qcom,sdx75-qmp-usb3-uni schema file
2023-09-05 6:49 ` Krzysztof Kozlowski
@ 2023-09-05 7:08 ` Rohit Agarwal
2023-09-05 7:20 ` Krzysztof Kozlowski
0 siblings, 1 reply; 19+ messages in thread
From: Rohit Agarwal @ 2023-09-05 7:08 UTC (permalink / raw)
To: Krzysztof Kozlowski, agross, andersson, konrad.dybcio, vkoul,
kishon, robh+dt, krzysztof.kozlowski+dt, conor+dt, gregkh,
abel.vesa, quic_wcheng
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb,
kernel
On 9/5/2023 12:19 PM, Krzysztof Kozlowski wrote:
> On 05/09/2023 06:43, Rohit Agarwal wrote:
>> Add a dt-binding schema for SDX75 SoC.
>>
> It's the same as qcom,ipq9574-qmp-usb3-phy.
Seems like this change is not in the tree. Will rebase my change on top
of it and mention the dependency.
Thanks,
Rohit.
>
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 3/5] dt-bindings: usb: dwc3: Add missing SDX65 compatible
2023-09-05 6:51 ` Krzysztof Kozlowski
@ 2023-09-05 7:10 ` Rohit Agarwal
0 siblings, 0 replies; 19+ messages in thread
From: Rohit Agarwal @ 2023-09-05 7:10 UTC (permalink / raw)
To: Krzysztof Kozlowski, agross, andersson, konrad.dybcio, vkoul,
kishon, robh+dt, krzysztof.kozlowski+dt, conor+dt, gregkh,
abel.vesa, quic_wcheng
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb,
kernel
On 9/5/2023 12:21 PM, Krzysztof Kozlowski wrote:
> On 05/09/2023 08:49, Krzysztof Kozlowski wrote:
>> On 05/09/2023 06:43, Rohit Agarwal wrote:
>>> Add missing SDX65 compatible for specifying the clocks used.
>>>
>>> Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
>>> ---
>>> Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
>>> index 5c13229..fa51f50 100644
>>> --- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
>>> +++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
>>> @@ -186,6 +186,7 @@ allOf:
>>> - qcom,sdm670-dwc3
>>> - qcom,sdm845-dwc3
>>> - qcom,sdx55-dwc3
>>> + - qcom,sdx65-dwc3
>> That's not a complete change. Update the rest of the file.
> Hm, your subject is confusing. The SDX65 is not missing and you do not
> add missing compatible.
Sure will rephrase the subject for this.
Thanks,
Rohit.
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 5/5] phy: qcom-qmp-usb: Add Qualcomm SDX75 USB3 PHY support
2023-09-05 6:53 ` Krzysztof Kozlowski
@ 2023-09-05 7:12 ` Rohit Agarwal
0 siblings, 0 replies; 19+ messages in thread
From: Rohit Agarwal @ 2023-09-05 7:12 UTC (permalink / raw)
To: Krzysztof Kozlowski, agross, andersson, konrad.dybcio, vkoul,
kishon, robh+dt, krzysztof.kozlowski+dt, conor+dt, gregkh,
abel.vesa, quic_wcheng
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb,
kernel
On 9/5/2023 12:23 PM, Krzysztof Kozlowski wrote:
> On 05/09/2023 06:43, Rohit Agarwal wrote:
>> Add support for USB3 QMP PHY found in SDX75 platform.
>>
>> Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
>> ---
>
>
>>
>> +static const struct qmp_phy_cfg sdx75_usb3_uniphy_cfg = {
>> + .lanes = 1,
>> + .offsets = &qmp_usb_offsets_v5,
>> +
>> + .serdes_tbl = sdx75_usb3_uniphy_serdes_tbl,
>> + .serdes_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_serdes_tbl),
>> + .tx_tbl = sdx75_usb3_uniphy_tx_tbl,
>> + .tx_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_tx_tbl),
>> + .rx_tbl = sdx75_usb3_uniphy_rx_tbl,
>> + .rx_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_rx_tbl),
>> + .pcs_tbl = sdx75_usb3_uniphy_pcs_tbl,
>> + .pcs_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_pcs_tbl),
>> + .pcs_usb_tbl = sdx75_usb3_uniphy_pcs_usb_tbl,
>> + .pcs_usb_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_pcs_usb_tbl),
>> + .clk_list = qmp_v4_sdx55_usbphy_clk_l,
>> + .num_clks = ARRAY_SIZE(qmp_v4_sdx55_usbphy_clk_l),
>> + .reset_list = msm8996_usb3phy_reset_l,
>> + .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l),
>> + .vreg_list = qmp_phy_vreg_l,
>> + .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
>> + .regs = qmp_v5_usb3phy_regs_layout,
>> + .pcs_usb_offset = 0x1000,
>> +
>> + .has_pwrdn_delay = true,
>> +
> Stray blank line
>
>> +};
>> +
>> static const struct qmp_phy_cfg sm8350_usb3phy_cfg = {
>> .lanes = 2,
>>
>> @@ -1985,6 +2141,7 @@ static int qmp_usb_init(struct phy *phy)
>> void __iomem *dp_com = qmp->dp_com;
>> int ret;
>>
>> +
> No need for this.
This got added because I was trying to debug earlier. Sorry for this.
But this should get caught by checkpatch, shouldnt it? I did run
checkpatch script.
Thanks,
Rohit.
>
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 2/5] dt-bindings: phy: Add qcom,sdx75-qmp-usb3-uni schema file
2023-09-05 7:08 ` Rohit Agarwal
@ 2023-09-05 7:20 ` Krzysztof Kozlowski
2023-09-05 7:27 ` Rohit Agarwal
0 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2023-09-05 7:20 UTC (permalink / raw)
To: Rohit Agarwal, agross, andersson, konrad.dybcio, vkoul, kishon,
robh+dt, krzysztof.kozlowski+dt, conor+dt, gregkh, abel.vesa,
quic_wcheng
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb,
kernel
On 05/09/2023 09:08, Rohit Agarwal wrote:
>
> On 9/5/2023 12:19 PM, Krzysztof Kozlowski wrote:
>> On 05/09/2023 06:43, Rohit Agarwal wrote:
>>> Add a dt-binding schema for SDX75 SoC.
>>>
>> It's the same as qcom,ipq9574-qmp-usb3-phy.
> Seems like this change is not in the tree. Will rebase my change on top
> of it and mention the dependency.
??? We do not talk about maintainer tree nor next. This was merged in
mainline. You work on some old tree.
Sorry, rebase and recheck all your patches on latest next. This includes
running smatch, sparse and coccinelle. Do not develop on anything older
than maintainer tree or next.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 2/5] dt-bindings: phy: Add qcom,sdx75-qmp-usb3-uni schema file
2023-09-05 7:20 ` Krzysztof Kozlowski
@ 2023-09-05 7:27 ` Rohit Agarwal
0 siblings, 0 replies; 19+ messages in thread
From: Rohit Agarwal @ 2023-09-05 7:27 UTC (permalink / raw)
To: Krzysztof Kozlowski, agross, andersson, konrad.dybcio, vkoul,
kishon, robh+dt, krzysztof.kozlowski+dt, conor+dt, gregkh,
abel.vesa, quic_wcheng
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb,
kernel
On 9/5/2023 12:50 PM, Krzysztof Kozlowski wrote:
> On 05/09/2023 09:08, Rohit Agarwal wrote:
>> On 9/5/2023 12:19 PM, Krzysztof Kozlowski wrote:
>>> On 05/09/2023 06:43, Rohit Agarwal wrote:
>>>> Add a dt-binding schema for SDX75 SoC.
>>>>
>>> It's the same as qcom,ipq9574-qmp-usb3-phy.
>> Seems like this change is not in the tree. Will rebase my change on top
>> of it and mention the dependency.
> ??? We do not talk about maintainer tree nor next. This was merged in
> mainline. You work on some old tree.
>
> Sorry, rebase and recheck all your patches on latest next. This includes
> running smatch, sparse and coccinelle. Do not develop on anything older
> than maintainer tree or next.
Oh, Not Sure which file I was looking into. Now got it. This change is
present in qcom,sc8280xp-qmp-usb3-uni-phy.yaml.
Will update this to reuse the same bindings file and add the compatible
string here.
Thanks,
Rohit.
>
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 2/5] dt-bindings: phy: Add qcom,sdx75-qmp-usb3-uni schema file
2023-09-05 4:43 ` [PATCH 2/5] dt-bindings: phy: Add qcom,sdx75-qmp-usb3-uni schema file Rohit Agarwal
2023-09-05 6:49 ` Krzysztof Kozlowski
@ 2023-09-05 17:48 ` Rob Herring
1 sibling, 0 replies; 19+ messages in thread
From: Rob Herring @ 2023-09-05 17:48 UTC (permalink / raw)
To: Rohit Agarwal
Cc: linux-arm-msm, linux-kernel, robh+dt, quic_wcheng, linux-usb,
konrad.dybcio, devicetree, gregkh, linux-phy,
krzysztof.kozlowski+dt, andersson, kishon, kernel, conor+dt,
agross, abel.vesa, vkoul
On Tue, 05 Sep 2023 10:13:45 +0530, Rohit Agarwal wrote:
> Add a dt-binding schema for SDX75 SoC.
>
> Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
> ---
> .../bindings/phy/qcom,sdx75-qmp-usb3-uni-phy.yaml | 106 +++++++++++++++++++++
> 1 file changed, 106 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/phy/qcom,sdx75-qmp-usb3-uni-phy.yaml
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/phy/qcom,sdx75-qmp-usb3-uni-phy.example.dts:18:18: fatal error: dt-bindings/clock/qcom,gcc-sdx75.h: No such file or directory
18 | #include <dt-bindings/clock/qcom,gcc-sdx75.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/phy/qcom,sdx75-qmp-usb3-uni-phy.example.dtb] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1500: dt_binding_check] Error 2
make: *** [Makefile:234: __sub-make] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/1693889028-6485-3-git-send-email-quic_rohiagar@quicinc.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 5/5] phy: qcom-qmp-usb: Add Qualcomm SDX75 USB3 PHY support
2023-09-05 4:43 ` [PATCH 5/5] phy: qcom-qmp-usb: Add Qualcomm SDX75 USB3 PHY support Rohit Agarwal
2023-09-05 6:53 ` Krzysztof Kozlowski
@ 2023-09-05 20:30 ` Dmitry Baryshkov
1 sibling, 0 replies; 19+ messages in thread
From: Dmitry Baryshkov @ 2023-09-05 20:30 UTC (permalink / raw)
To: Rohit Agarwal, agross, andersson, konrad.dybcio, vkoul, kishon,
robh+dt, krzysztof.kozlowski+dt, conor+dt, gregkh, abel.vesa,
quic_wcheng
Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, linux-usb,
kernel
On 05/09/2023 07:43, Rohit Agarwal wrote:
> Add support for USB3 QMP PHY found in SDX75 platform.
>
> Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
> ---
> drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 160 ++++++++++++++++++++++++++++++++
> 1 file changed, 160 insertions(+)
>
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> index a49711c..f95d117 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> @@ -24,6 +24,7 @@
> #include "phy-qcom-qmp-pcs-misc-v3.h"
> #include "phy-qcom-qmp-pcs-usb-v4.h"
> #include "phy-qcom-qmp-pcs-usb-v5.h"
> +#include "phy-qcom-qmp-pcs-usb-v6.h"
>
> /* QPHY_SW_RESET bit */
> #define SW_RESET BIT(0)
> @@ -1066,6 +1067,134 @@ static const struct qmp_phy_init_tbl sdx65_usb3_uniphy_rx_tbl[] = {
> QMP_PHY_INIT_CFG(QSERDES_V5_RX_SIGDET_ENABLES, 0x00),
> };
>
> +static const struct qmp_phy_init_tbl sdx75_usb3_uniphy_serdes_tbl[] = {
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_SSC_STEP_SIZE1_MODE1, 0x9e),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_SSC_STEP_SIZE2_MODE1, 0x06),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_CP_CTRL_MODE1, 0x02),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_PLL_RCTRL_MODE1, 0x16),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_PLL_CCTRL_MODE1, 0x36),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_CORECLK_DIV_MODE1, 0x04),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_LOCK_CMP1_MODE1, 0x2e),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_LOCK_CMP2_MODE1, 0x82),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_DEC_START_MODE1, 0x82),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_DIV_FRAC_START1_MODE1, 0xab),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_DIV_FRAC_START2_MODE1, 0xea),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_DIV_FRAC_START3_MODE1, 0x02),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_HSCLK_SEL_1, 0x01),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_VCO_TUNE1_MODE1, 0x25),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_VCO_TUNE2_MODE1, 0x02),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_BIN_VCOCAL_CMP_CODE1_MODE1, 0xb7),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_BIN_VCOCAL_CMP_CODE2_MODE1, 0x1e),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_BIN_VCOCAL_CMP_CODE1_MODE0, 0xb7),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_BIN_VCOCAL_CMP_CODE2_MODE0, 0x1e),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_SSC_STEP_SIZE1_MODE0, 0x9e),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_SSC_STEP_SIZE2_MODE0, 0x06),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_CP_CTRL_MODE0, 0x02),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_PLL_RCTRL_MODE0, 0x16),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_PLL_CCTRL_MODE0, 0x36),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_LOCK_CMP1_MODE0, 0x12),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_LOCK_CMP2_MODE0, 0x34),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_DEC_START_MODE0, 0x82),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_DIV_FRAC_START1_MODE0, 0xab),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_DIV_FRAC_START2_MODE0, 0xea),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_DIV_FRAC_START3_MODE0, 0x02),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_VCO_TUNE1_MODE0, 0x25),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_VCO_TUNE2_MODE0, 0x02),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_BG_TIMER, 0x0e),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_SSC_EN_CENTER, 0x01),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_SSC_PER1, 0x31),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_SSC_PER2, 0x01),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_SYSCLK_BUF_ENABLE, 0x0a),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_SYSCLK_EN_SEL, 0x1a),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_LOCK_CMP_CFG, 0x14),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_VCO_TUNE_MAP, 0x04),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_CORE_CLK_EN, 0x20),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_CMN_CONFIG_1, 0x16),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_AUTO_GAIN_ADJ_CTRL_1, 0xb6),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_AUTO_GAIN_ADJ_CTRL_2, 0x4b),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_AUTO_GAIN_ADJ_CTRL_3, 0x37),
> + QMP_PHY_INIT_CFG(QSERDES_V6_COM_ADDITIONAL_MISC, 0x0c),
> +};
> +
> +static const struct qmp_phy_init_tbl sdx75_usb3_uniphy_tx_tbl[] = {
> + QMP_PHY_INIT_CFG(QSERDES_V6_TX_RES_CODE_LANE_TX, 0x00),
> + QMP_PHY_INIT_CFG(QSERDES_V6_TX_RES_CODE_LANE_RX, 0x00),
> + QMP_PHY_INIT_CFG(QSERDES_V6_TX_RES_CODE_LANE_OFFSET_TX, 0x1f),
> + QMP_PHY_INIT_CFG(QSERDES_V6_TX_RES_CODE_LANE_OFFSET_RX, 0x09),
> + QMP_PHY_INIT_CFG(QSERDES_V6_TX_LANE_MODE_1, 0xf5),
> + QMP_PHY_INIT_CFG(QSERDES_V6_TX_LANE_MODE_3, 0x3f),
> + QMP_PHY_INIT_CFG(QSERDES_V6_TX_LANE_MODE_4, 0x3f),
> + QMP_PHY_INIT_CFG(QSERDES_V6_TX_LANE_MODE_5, 0x5f),
> + QMP_PHY_INIT_CFG(QSERDES_V6_TX_RCV_DETECT_LVL_2, 0x12),
> + QMP_PHY_INIT_CFG(QSERDES_V6_TX_PI_QEC_CTRL, 0x21),
> +};
> +
> +static const struct qmp_phy_init_tbl sdx75_usb3_uniphy_rx_tbl[] = {
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_FO_GAIN, 0x0a),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_SO_GAIN, 0x06),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_FASTLOCK_FO_GAIN, 0x2f),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_SO_SATURATION_AND_ENABLE, 0x7f),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_FASTLOCK_COUNT_LOW, 0xff),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_FASTLOCK_COUNT_HIGH, 0x0f),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_PI_CONTROLS, 0x99),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_SB2_THRESH1, 0x08),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_SB2_THRESH2, 0x08),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_SB2_GAIN1, 0x00),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_UCDR_SB2_GAIN2, 0x0a),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_AUX_DATA_TCOARSE_TFINE, 0xa0),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_VGA_CAL_CNTRL1, 0x54),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_VGA_CAL_CNTRL2, 0x0f),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_GM_CAL, 0x13),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_EQU_ADAPTOR_CNTRL2, 0x0f),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_EQU_ADAPTOR_CNTRL3, 0x4a),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_EQU_ADAPTOR_CNTRL4, 0x0a),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_IDAC_TSETTLE_LOW, 0x07),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_IDAC_TSETTLE_HIGH, 0x00),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_EQ_OFFSET_ADAPTOR_CNTRL1, 0x47),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_SIGDET_CNTRL, 0x04),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_SIGDET_DEGLITCH_CNTRL, 0x0e),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_00_LOW, 0x3f),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_00_HIGH, 0xbf),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_00_HIGH2, 0xff),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_00_HIGH3, 0xdf),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_00_HIGH4, 0xed),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_01_LOW, 0xdc),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_01_HIGH, 0x5c),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_01_HIGH2, 0x9c),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_01_HIGH3, 0x1d),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_RX_MODE_01_HIGH4, 0x09),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_DFE_EN_TIMER, 0x04),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_DFE_CTLE_POST_CAL_OFFSET, 0x38),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_DCC_CTRL1, 0x0c),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_VTH_CODE, 0x10),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_SIGDET_CAL_CTRL1, 0x14),
> + QMP_PHY_INIT_CFG(QSERDES_V6_RX_SIGDET_CAL_TRIM, 0x08),
> +};
> +
> +static const struct qmp_phy_init_tbl sdx75_usb3_uniphy_pcs_tbl[] = {
> + QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_LOCK_DETECT_CONFIG1, 0xc4),
> + QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_LOCK_DETECT_CONFIG2, 0x89),
> + QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_LOCK_DETECT_CONFIG3, 0x20),
> + QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_LOCK_DETECT_CONFIG6, 0x13),
> + QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_REFGEN_REQ_CONFIG1, 0x21),
> + QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_RX_SIGDET_LVL, 0xaa),
> + QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_RCVR_DTCT_DLY_P1U2_L, 0xe7),
> + QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_RCVR_DTCT_DLY_P1U2_H, 0x03),
> + QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_CDR_RESET_TIME, 0x0a),
> + QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_ALIGN_DETECT_CONFIG1, 0x88),
> + QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_ALIGN_DETECT_CONFIG2, 0x13),
> + QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_PCS_TX_RX_CONFIG, 0x0c),
> + QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_EQ_CONFIG1, 0x4b),
> + QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_EQ_CONFIG5, 0x10),
I'm probably going to send a patch removing the _USB_ part to follow the
style of previous generations.
> +};
> +
> +static const struct qmp_phy_init_tbl sdx75_usb3_uniphy_pcs_usb_tbl[] = {
> + QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_USB3_LFPS_DET_HIGH_COUNT_VAL, 0xf8),
> + QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_USB3_RXEQTRAINING_DFE_TIME_S2, 0x07),
> + QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_USB3_RCVR_DTCT_DLY_U3_L, 0x40),
> + QMP_PHY_INIT_CFG(QPHY_USB_V6_PCS_USB3_RCVR_DTCT_DLY_U3_H, 0x00),
> +};
> +
> static const struct qmp_phy_init_tbl sm8350_usb3_tx_tbl[] = {
> QMP_PHY_INIT_CFG(QSERDES_V5_TX_RES_CODE_LANE_TX, 0x00),
> QMP_PHY_INIT_CFG(QSERDES_V5_TX_RES_CODE_LANE_RX, 0x00),
> @@ -1868,6 +1997,33 @@ static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = {
> .has_pwrdn_delay = true,
> };
>
> +static const struct qmp_phy_cfg sdx75_usb3_uniphy_cfg = {
> + .lanes = 1,
> + .offsets = &qmp_usb_offsets_v5,
v6?
> +
> + .serdes_tbl = sdx75_usb3_uniphy_serdes_tbl,
> + .serdes_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_serdes_tbl),
> + .tx_tbl = sdx75_usb3_uniphy_tx_tbl,
> + .tx_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_tx_tbl),
> + .rx_tbl = sdx75_usb3_uniphy_rx_tbl,
> + .rx_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_rx_tbl),
> + .pcs_tbl = sdx75_usb3_uniphy_pcs_tbl,
> + .pcs_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_pcs_tbl),
> + .pcs_usb_tbl = sdx75_usb3_uniphy_pcs_usb_tbl,
> + .pcs_usb_tbl_num = ARRAY_SIZE(sdx75_usb3_uniphy_pcs_usb_tbl),
> + .clk_list = qmp_v4_sdx55_usbphy_clk_l,
> + .num_clks = ARRAY_SIZE(qmp_v4_sdx55_usbphy_clk_l),
Please consider rebasing on top of
https://lore.kernel.org/linux-phy/20230824211952.1397699-1-dmitry.baryshkov@linaro.org/
> + .reset_list = msm8996_usb3phy_reset_l,
> + .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l),
> + .vreg_list = qmp_phy_vreg_l,
> + .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
> + .regs = qmp_v5_usb3phy_regs_layout,
This must be qmp_v6_usb3phy_regs_layout.
> + .pcs_usb_offset = 0x1000,
> +
> + .has_pwrdn_delay = true,
> +
> +};
> +
> static const struct qmp_phy_cfg sm8350_usb3phy_cfg = {
> .lanes = 2,
>
> @@ -1985,6 +2141,7 @@ static int qmp_usb_init(struct phy *phy)
> void __iomem *dp_com = qmp->dp_com;
> int ret;
>
> +
> ret = regulator_bulk_enable(cfg->num_vregs, qmp->vregs);
> if (ret) {
> dev_err(qmp->dev, "failed to enable regulators, err=%d\n", ret);
> @@ -2619,6 +2776,9 @@ static const struct of_device_id qmp_usb_of_match_table[] = {
> .compatible = "qcom,sdx65-qmp-usb3-uni-phy",
> .data = &sdx65_usb3_uniphy_cfg,
> }, {
> + .compatible = "qcom,sdx75-qmp-usb3-uni-phy",
> + .data = &sdx75_usb3_uniphy_cfg,
> + }, {
> .compatible = "qcom,sm6115-qmp-usb3-phy",
> .data = &qcm2290_usb3phy_cfg,
> }, {
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2023-09-05 20:30 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-05 4:43 [PATCH 0/5] Add USB Support on Qualcomm's SDX75 Platform Rohit Agarwal
2023-09-05 4:43 ` [PATCH 1/5] dt-bindings: phy: qcom,snps-eusb2-phy: Add compatible for SDX75 Rohit Agarwal
2023-09-05 6:47 ` Krzysztof Kozlowski
2023-09-05 4:43 ` [PATCH 2/5] dt-bindings: phy: Add qcom,sdx75-qmp-usb3-uni schema file Rohit Agarwal
2023-09-05 6:49 ` Krzysztof Kozlowski
2023-09-05 7:08 ` Rohit Agarwal
2023-09-05 7:20 ` Krzysztof Kozlowski
2023-09-05 7:27 ` Rohit Agarwal
2023-09-05 17:48 ` Rob Herring
2023-09-05 4:43 ` [PATCH 3/5] dt-bindings: usb: dwc3: Add missing SDX65 compatible Rohit Agarwal
2023-09-05 6:49 ` Krzysztof Kozlowski
2023-09-05 6:51 ` Krzysztof Kozlowski
2023-09-05 7:10 ` Rohit Agarwal
2023-09-05 4:43 ` [PATCH 4/5] dt-bindings: usb: dwc3: Add SDX75 compatible Rohit Agarwal
2023-09-05 6:54 ` Krzysztof Kozlowski
2023-09-05 4:43 ` [PATCH 5/5] phy: qcom-qmp-usb: Add Qualcomm SDX75 USB3 PHY support Rohit Agarwal
2023-09-05 6:53 ` Krzysztof Kozlowski
2023-09-05 7:12 ` Rohit Agarwal
2023-09-05 20:30 ` Dmitry Baryshkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).