phy: qcom-qmp: Fixes and updates for sm8150
Subsystems (2)
Vinod Koul
maintainerv3 cover phy: qcom-qmp: Fixes and updates for sm8150
For SM8150 we need additional SW reset so clear the no_pcs_sw_reset, and add SW reset register. Along with that remove duplicate powerdown write.
Changes in v3:
- Drop patch 1 "phy: qcom-qmp: Increase PHY ready timeout" as that is applied by Kishon
- Drop patch "phy: qcom-qmp: Add optional SW reset" as that is no longer required
- Add "phy: qcom-qmp: Add SW reset register"
Changes in v2:
- Drop patch 1 and pick the one Bjorn had already sent, makes timeout 10ms
- Fix optional reset write as pointed by Can
- Fix register define as pointed by Can
Vinod Koul (4):
phy: qcom-qmp: Use register defines
phy: qcom-qmp: remove duplicate powerdown write
phy: qcom-qmp: remove no_pcs_sw_reset for sm8150
phy: qcom-qmp: Add SW reset register
drivers/phy/qualcomm/phy-qcom-qmp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
Signature · 1 line
2.23.0
Vinod Koul
maintainerPATCH v3 1/4 phy: qcom-qmp: Use register defines
We already define register offsets so use them in register layout.
--- drivers/phy/qualcomm/phy-qcom-qmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/qualcomm/phy-qcom-qmp.c +2 -2
@@ -166,8 +166,8 @@ static const unsigned int sdm845_ufsphy_regs_layout[] = { };static const unsigned int sm8150_ufsphy_regs_layout[] = { - [QPHY_START_CTRL ] =0x00 , - [QPHY_PCS_READY_STATUS ] =0x180 , + [QPHY_START_CTRL ] =QPHY_V4_PHY_START , + [QPHY_PCS_READY_STATUS ] =QPHY_V4_PCS_READY_STATUS , };static const struct qmp_phy_init_tbl msm8996_pcie_serdes_tbl[] = {
Signature · 1 line
2.23.0
Re: [PATCH v3 1/4] phy: qcom-qmp: Use register defines
Quoted 12 lines · Vinod Koul
We already define register offsets so use them in register layout.
Signed-off-by Vinod Koul <[email protected]>--- drivers/phy/qualcomm/phy-qcom-qmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/phy/qualcomm/phy-qcom-qmp.c +0
-0
drivers/phy/qualcomm/phy-qcom-qmp.c static const unsigned int sdm845_ufsphy_regs_layout[] = { · line 173
Quoted 10 lines
drivers/phy/qualcomm/phy-qcom-qmp.c +2
-2@@ -166,8 +166,8 @@ static const unsigned int sdm845_ufsphy_regs_layout[] = { };static const unsigned int sm8150_ufsphy_regs_layout[] = { - [QPHY_START_CTRL ] =0x00 , - [QPHY_PCS_READY_STATUS ] =0x180 , + [QPHY_START_CTRL ] =QPHY_V4_PHY_START , + [QPHY_PCS_READY_STATUS ] =QPHY_V4_PCS_READY_STATUS , };static const struct qmp_phy_init_tbl msm8996_pcie_serdes_tbl[] = {
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH v3 1/4] phy: qcom-qmp: Use register defines
In reply to Vinod KoulQuoted 3 lines · Vinod Koul
We already define register offsets so use them in register layout.
Signed-off-by Vinod Koul <[email protected]>
Quoted 21 lines
--- drivers/phy/qualcomm/phy-qcom-qmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/phy/qualcomm/phy-qcom-qmp.c +2
-2@@ -166,8 +166,8 @@ static const unsigned int sdm845_ufsphy_regs_layout[] = { };static const unsigned int sm8150_ufsphy_regs_layout[] = { - [QPHY_START_CTRL ] =0x00 , - [QPHY_PCS_READY_STATUS ] =0x180 , + [QPHY_START_CTRL ] =QPHY_V4_PHY_START , + [QPHY_PCS_READY_STATUS ] =QPHY_V4_PCS_READY_STATUS , };static const struct
qmp_phy_init_tblmsm8996_pcie_serdes_tbl[] = {
Vinod Koul
maintainerPATCH v3 2/4 phy: qcom-qmp: remove duplicate powerdown write
In reply to Vinod KoulWe already write to QPHY_POWER_DOWN_CONTROL in qcom_qmp_phy_com_init() before invoking qcom_qmp_phy_configure() so remove the duplicate write.
--- drivers/phy/qualcomm/phy-qcom-qmp.c | 1 - 1 file changed, 1 deletion(-)
drivers/phy/qualcomm/phy-qcom-qmp.c +0 -1
@@ -885,7 +885,6 @@ static const struct qmp_phy_init_tbl msm8998_usb3_pcs_tbl[] = { };static const struct qmp_phy_init_tbl sm8150_ufsphy_serdes_tbl[] = { -QMP_PHY_INIT_CFG (QPHY_POWER_DOWN_CONTROL ,0x01 ),QMP_PHY_INIT_CFG (QSERDES_V4_COM_SYSCLK_EN_SEL ,0xd9 ),QMP_PHY_INIT_CFG (QSERDES_V4_COM_HSCLK_SEL ,0x11 ),QMP_PHY_INIT_CFG (QSERDES_V4_COM_HSCLK_HS_SWITCH_SEL ,0x00 ),
Signature · 1 line
2.23.0
Re: [PATCH v3 2/4] phy: qcom-qmp: remove duplicate powerdown write
Quoted 13 lines · Vinod Koul
We already write to
QPHY_POWER_DOWN_CONTROLinqcom_qmp_phy_com_init()before invokingqcom_qmp_phy_configure()so remove the duplicate write.Signed-off-by Vinod Koul <[email protected]>--- drivers/phy/qualcomm/phy-qcom-qmp.c | 1 - 1 file changed, 1 deletion(-)drivers/phy/qualcomm/phy-qcom-qmp.c +0
-0
drivers/phy/qualcomm/phy-qcom-qmp.c static const struct qmp_phy_init_tbl msm8998_usb3_pcs_tbl[] = { · line 890
Quoted 7 lines
drivers/phy/qualcomm/phy-qcom-qmp.c +0
-1@@ -885,7 +885,6 @@ static const struct qmp_phy_init_tbl msm8998_usb3_pcs_tbl[] = { };static const struct qmp_phy_init_tbl sm8150_ufsphy_serdes_tbl[] = { -QMP_PHY_INIT_CFG (QPHY_POWER_DOWN_CONTROL ,0x01 ),QMP_PHY_INIT_CFG (QSERDES_V4_COM_SYSCLK_EN_SEL ,0xd9 ),QMP_PHY_INIT_CFG (QSERDES_V4_COM_HSCLK_SEL ,0x11 ),QMP_PHY_INIT_CFG (QSERDES_V4_COM_HSCLK_HS_SWITCH_SEL ,0x00 ),
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH v3 2/4] phy: qcom-qmp: remove duplicate powerdown write
In reply to Vinod KoulQuoted 4 lines · Vinod Koul
We already write to
QPHY_POWER_DOWN_CONTROLinqcom_qmp_phy_com_init()before invokingqcom_qmp_phy_configure()so remove the duplicate write.Signed-off-by Vinod Koul <[email protected]>
Quoted 18 lines
--- drivers/phy/qualcomm/phy-qcom-qmp.c | 1 - 1 file changed, 1 deletion(-)drivers/phy/qualcomm/phy-qcom-qmp.c +0
-1@@ -885,7 +885,6 @@ static const struct qmp_phy_init_tbl msm8998_usb3_pcs_tbl[] = { };static const struct qmp_phy_init_tbl sm8150_ufsphy_serdes_tbl[] = { -QMP_PHY_INIT_CFG (QPHY_POWER_DOWN_CONTROL ,0x01 ),QMP_PHY_INIT_CFG (QSERDES_V4_COM_SYSCLK_EN_SEL ,0xd9 ),QMP_PHY_INIT_CFG (QSERDES_V4_COM_HSCLK_SEL ,0x11 ),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_HSCLK_HS_SWITCH_SEL, 0x00),
Vinod Koul
maintainerPATCH v3 3/4 phy: qcom-qmp: remove no_pcs_sw_reset for sm8150
In reply to Vinod KoulSM8150 QMPY phy for UFS and onwards the PHY_SW_RESET is present in PHY's PCS register so we should not mark no_pcs_sw_reset for sm8150 and onwards
--- drivers/phy/qualcomm/phy-qcom-qmp.c | 1 - 1 file changed, 1 deletion(-)
drivers/phy/qualcomm/phy-qcom-qmp.c +0 -1
@@ -1389,7 +1389,6 @@ static const struct qmp_phy_cfg sm8150_ufsphy_cfg = { .pwrdn_ctrl = SW_PWRDN, .is_dual_lane_phy = true, - .no_pcs_sw_reset = true, }; static void qcom_qmp_phy_configure(void __iomem *base,
Signature · 1 line
2.23.0
Re: [PATCH v3 3/4] phy: qcom-qmp: remove no_pcs_sw_reset for sm8150
Quoted 14 lines · Vinod Koul
SM8150 QMPY phy for UFS and onwards the
PHY_SW_RESETis present in PHY's PCS register so we should not markno_pcs_sw_resetfor sm8150 and onwardsSigned-off-by Vinod Koul <[email protected]>--- drivers/phy/qualcomm/phy-qcom-qmp.c | 1 - 1 file changed, 1 deletion(-)drivers/phy/qualcomm/phy-qcom-qmp.c +0
-0
drivers/phy/qualcomm/phy-qcom-qmp.c static const struct qmp_phy_cfg sm8150_ufsphy_cfg = { · line 1393
Quoted 6 lines
drivers/phy/qualcomm/phy-qcom-qmp.c +0
-1@@ -1389,7 +1389,6 @@ static const struct qmp_phy_cfg sm8150_ufsphy_cfg = { .pwrdn_ctrl = SW_PWRDN, .is_dual_lane_phy = true, - .no_pcs_sw_reset = true, };
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH v3 3/4] phy: qcom-qmp: remove no_pcs_sw_reset for sm8150
In reply to Vinod KoulQuoted 5 lines · Vinod Koul
SM8150 QMPY phy for UFS and onwards the
PHY_SW_RESETis present in PHY's PCS register so we should not markno_pcs_sw_resetfor sm8150 and onwardsSigned-off-by Vinod Koul <[email protected]>
Quoted 18 lines
--- drivers/phy/qualcomm/phy-qcom-qmp.c | 1 - 1 file changed, 1 deletion(-)drivers/phy/qualcomm/phy-qcom-qmp.c +0
-1@@ -1389,7 +1389,6 @@ static const struct qmp_phy_cfg sm8150_ufsphy_cfg = { .pwrdn_ctrl =SW_PWRDN , .is_dual_lane_phy = true, - .no_pcs_sw_reset = true, };static void qcom_qmp_phy_configure(void
__iomem*base,
Vinod Koul
maintainerPATCH v3 4/4 phy: qcom-qmp: Add SW reset register
In reply to Vinod KoulFor V4 QMP UFS Phy, we need to assert reset bits, configure the phy and then deassert it, so add the QPHY_SW_RESET register which does this.
--- drivers/phy/qualcomm/phy-qcom-qmp.c | 1 + 1 file changed, 1 insertion(+)
drivers/phy/qualcomm/phy-qcom-qmp.c +1 -0
@@ -168,6 +168,7 @@ static const unsigned int sdm845_ufsphy_regs_layout[] = {static const unsigned int sm8150_ufsphy_regs_layout[] = { [QPHY_START_CTRL ] =QPHY_V4_PHY_START , [QPHY_PCS_READY_STATUS ] =QPHY_V4_PCS_READY_STATUS , + [QPHY_SW_RESET ] =QPHY_V4_SW_RESET , };static const struct qmp_phy_init_tbl msm8996_pcie_serdes_tbl[] = {
Signature · 1 line
2.23.0
Re: [PATCH v3 4/4] phy: qcom-qmp: Add SW reset register
Quoted 13 lines · Vinod Koul
For V4 QMP UFS Phy, we need to assert reset bits, configure the phy and then deassert it, so add the
QPHY_SW_RESETregister which does this.Signed-off-by Vinod Koul <[email protected]>--- drivers/phy/qualcomm/phy-qcom-qmp.c | 1 + 1 file changed, 1 insertion(+)drivers/phy/qualcomm/phy-qcom-qmp.c +0
-0
drivers/phy/qualcomm/phy-qcom-qmp.c static const unsigned int sdm845_ufsphy_regs_layout[] = { · line 174
Quoted 7 lines
drivers/phy/qualcomm/phy-qcom-qmp.c +1
-0@@ -168,6 +168,7 @@ static const unsigned int sdm845_ufsphy_regs_layout[] = {static const unsigned int sm8150_ufsphy_regs_layout[] = { [QPHY_START_CTRL ] =QPHY_V4_PHY_START , [QPHY_PCS_READY_STATUS ] =QPHY_V4_PCS_READY_STATUS , + [QPHY_SW_RESET ] =QPHY_V4_SW_RESET , };static const struct qmp_phy_init_tbl msm8996_pcie_serdes_tbl[] = {
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH v3 4/4] phy: qcom-qmp: Add SW reset register
In reply to Vinod KoulQuoted 4 lines · Vinod Koul
For V4 QMP UFS Phy, we need to assert reset bits, configure the phy and then deassert it, so add the
QPHY_SW_RESETregister which does this.Signed-off-by Vinod Koul <[email protected]>
Quoted 18 lines
--- drivers/phy/qualcomm/phy-qcom-qmp.c | 1 + 1 file changed, 1 insertion(+)drivers/phy/qualcomm/phy-qcom-qmp.c +1
-0@@ -168,6 +168,7 @@ static const unsigned int sdm845_ufsphy_regs_layout[] = {static const unsigned int sm8150_ufsphy_regs_layout[] = { [QPHY_START_CTRL ] =QPHY_V4_PHY_START , [QPHY_PCS_READY_STATUS ] =QPHY_V4_PCS_READY_STATUS , + [QPHY_SW_RESET ] =QPHY_V4_SW_RESET , };static const struct
qmp_phy_init_tblmsm8996_pcie_serdes_tbl[] = {
Vinod Koul
maintainerHi Kishon,
Quoted 2 lines · Vinod Koul
For SM8150 we need additional SW reset so clear the
no_pcs_sw_reset, and add SW reset register. Along with that remove duplicate powerdown write.
Any update on this series?
Thanks
Quoted 24 lines
Changes in v3:
- Drop patch 1 "phy: qcom-qmp: Increase PHY ready timeout" as that is applied by Kishon
- Drop patch "phy: qcom-qmp: Add optional SW reset" as that is no longer required
- Add "phy: qcom-qmp: Add SW reset register"Changes in v2:
- Drop patch 1 and pick the one Bjorn had already sent, makes timeout 10ms
- Fix optional reset write as pointed by Can
- Fix register define as pointed by CanVinod Koul (4):
phy: qcom-qmp: Use register defines
phy: qcom-qmp: remove duplicate powerdown write
phy: qcom-qmp: removeno_pcs_sw_resetfor sm8150
phy: qcom-qmp: Add SW reset registerdrivers/phy/qualcomm/phy-qcom-qmp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)Signature · 1 line
2.23.0
Signature · 1 line
~Vinod