Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: qcom: qmp-combo: fix sm8650 voltage swing table

The QMP USB3/DP PHY found in the SM8650 SoC requires a slightly
different Voltage Swing table for HBR/RBR link speeds.

Add a new hbr/rbr voltage switch table named "v6" used in a new
sm8650 qmp_phy_cfg struct replacing the sm8550 fallback used for
the sm8650 compatible.

Fixes: 80c1afe8c5fe ("phy: qcom: qmp-combo: add QMP USB3/DP PHY tables for SM8650")
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240226-topic-sm8650-upstream-combo-phy-swing-update-v1-1-08707ebca92a@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Neil Armstrong and committed by
Vinod Koul
f320268f ef2bd6c9

+53 -1
+53 -1
drivers/phy/qualcomm/phy-qcom-qmp-combo.c
··· 1377 1377 { 0x3f, 0xff, 0xff, 0xff } 1378 1378 }; 1379 1379 1380 + static const u8 qmp_dp_v6_voltage_swing_hbr_rbr[4][4] = { 1381 + { 0x27, 0x2f, 0x36, 0x3f }, 1382 + { 0x31, 0x3e, 0x3f, 0xff }, 1383 + { 0x36, 0x3f, 0xff, 0xff }, 1384 + { 0x3f, 0xff, 0xff, 0xff } 1385 + }; 1386 + 1380 1387 static const u8 qmp_dp_v6_pre_emphasis_hbr_rbr[4][4] = { 1381 1388 { 0x20, 0x2d, 0x34, 0x3a }, 1382 1389 { 0x20, 0x2e, 0x35, 0xff }, ··· 1987 1980 .serdes_tbl_hbr3_num = ARRAY_SIZE(qmp_v6_dp_serdes_tbl_hbr3), 1988 1981 1989 1982 .swing_hbr_rbr = &qmp_dp_v5_voltage_swing_hbr_rbr, 1983 + .pre_emphasis_hbr_rbr = &qmp_dp_v6_pre_emphasis_hbr_rbr, 1984 + .swing_hbr3_hbr2 = &qmp_dp_v5_voltage_swing_hbr3_hbr2, 1985 + .pre_emphasis_hbr3_hbr2 = &qmp_dp_v5_pre_emphasis_hbr3_hbr2, 1986 + 1987 + .dp_aux_init = qmp_v4_dp_aux_init, 1988 + .configure_dp_tx = qmp_v4_configure_dp_tx, 1989 + .configure_dp_phy = qmp_v4_configure_dp_phy, 1990 + .calibrate_dp_phy = qmp_v4_calibrate_dp_phy, 1991 + 1992 + .regs = qmp_v6_usb3phy_regs_layout, 1993 + .reset_list = msm8996_usb3phy_reset_l, 1994 + .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), 1995 + .vreg_list = qmp_phy_vreg_l, 1996 + .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), 1997 + }; 1998 + 1999 + static const struct qmp_phy_cfg sm8650_usb3dpphy_cfg = { 2000 + .offsets = &qmp_combo_offsets_v3, 2001 + 2002 + .serdes_tbl = sm8550_usb3_serdes_tbl, 2003 + .serdes_tbl_num = ARRAY_SIZE(sm8550_usb3_serdes_tbl), 2004 + .tx_tbl = sm8550_usb3_tx_tbl, 2005 + .tx_tbl_num = ARRAY_SIZE(sm8550_usb3_tx_tbl), 2006 + .rx_tbl = sm8550_usb3_rx_tbl, 2007 + .rx_tbl_num = ARRAY_SIZE(sm8550_usb3_rx_tbl), 2008 + .pcs_tbl = sm8550_usb3_pcs_tbl, 2009 + .pcs_tbl_num = ARRAY_SIZE(sm8550_usb3_pcs_tbl), 2010 + .pcs_usb_tbl = sm8550_usb3_pcs_usb_tbl, 2011 + .pcs_usb_tbl_num = ARRAY_SIZE(sm8550_usb3_pcs_usb_tbl), 2012 + 2013 + .dp_serdes_tbl = qmp_v6_dp_serdes_tbl, 2014 + .dp_serdes_tbl_num = ARRAY_SIZE(qmp_v6_dp_serdes_tbl), 2015 + .dp_tx_tbl = qmp_v6_dp_tx_tbl, 2016 + .dp_tx_tbl_num = ARRAY_SIZE(qmp_v6_dp_tx_tbl), 2017 + 2018 + .serdes_tbl_rbr = qmp_v6_dp_serdes_tbl_rbr, 2019 + .serdes_tbl_rbr_num = ARRAY_SIZE(qmp_v6_dp_serdes_tbl_rbr), 2020 + .serdes_tbl_hbr = qmp_v6_dp_serdes_tbl_hbr, 2021 + .serdes_tbl_hbr_num = ARRAY_SIZE(qmp_v6_dp_serdes_tbl_hbr), 2022 + .serdes_tbl_hbr2 = qmp_v6_dp_serdes_tbl_hbr2, 2023 + .serdes_tbl_hbr2_num = ARRAY_SIZE(qmp_v6_dp_serdes_tbl_hbr2), 2024 + .serdes_tbl_hbr3 = qmp_v6_dp_serdes_tbl_hbr3, 2025 + .serdes_tbl_hbr3_num = ARRAY_SIZE(qmp_v6_dp_serdes_tbl_hbr3), 2026 + 2027 + .swing_hbr_rbr = &qmp_dp_v6_voltage_swing_hbr_rbr, 1990 2028 .pre_emphasis_hbr_rbr = &qmp_dp_v6_pre_emphasis_hbr_rbr, 1991 2029 .swing_hbr3_hbr2 = &qmp_dp_v5_voltage_swing_hbr3_hbr2, 1992 2030 .pre_emphasis_hbr3_hbr2 = &qmp_dp_v5_pre_emphasis_hbr3_hbr2, ··· 3675 3623 }, 3676 3624 { 3677 3625 .compatible = "qcom,sm8650-qmp-usb3-dp-phy", 3678 - .data = &sm8550_usb3dpphy_cfg, 3626 + .data = &sm8650_usb3dpphy_cfg, 3679 3627 }, 3680 3628 { 3681 3629 .compatible = "qcom,x1e80100-qmp-usb3-dp-phy",