Skip to content

Commit 5c2e4d9

Browse files
FROMLIST: arm64: dts: qcom: shikra: Add gpio-hog for VBUS boost 5V enable
Add a gpio-hog for GPIO 79 (BOOST_5V) on the Shikra CQM/CQS/IQS EVK boards. This line enables the level translator that is otherwise left disabled by default, which is required in the industrial configuration. Also fix the Shikra USB3-DP combo PHY (qcom,shikra-qmp-usb3-dp-phy) which had no matching driver entry, causing the DWC3 USB controller to fail probing with a deferred-probe cascade (typec, USB, and several sync_state() consumers). Add the missing of_device_id entry and a Shikra-specific PHY config that also deasserts the third GCC reset line present on Shikra's PHY node but absent from the shared QCS615 config, which was leaving part of the PHY held in reset and causing PHY init to time out (-ETIMEDOUT). CRs-Fixed: 4652998 CRs-Fixed: 4635219 Signed-off-by: Akash Kumar <akash.kumar@oss.qualcomm.com> Signed-off-by: Akash Kumar <akakum@qti.qualcomm.com>
1 parent 82298e1 commit 5c2e4d9

5 files changed

Lines changed: 69 additions & 0 deletions

File tree

Documentation/devicetree/bindings/phy/qcom,qcs615-qmp-usb3dp-phy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ properties:
1818
compatible:
1919
enum:
2020
- qcom,qcs615-qmp-usb3-dp-phy
21+
- qcom,shikra-qmp-usb3-dp-phy
2122

2223
reg:
2324
maxItems: 1

arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,13 @@
684684
line-name = "emac0-phy-en";
685685
};
686686

687+
vbus_boost_5v: vbus-boost-5v {
688+
gpio-hog;
689+
gpios = <79 GPIO_ACTIVE_HIGH>;
690+
output-high;
691+
line-name = "vbus-boost-5v";
692+
};
693+
687694
i2s2_default: i2s2-default-active-state {
688695
pins = "gpio100", "gpio101", "gpio102", "gpio103";
689696
function = "i2s2";

arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,13 @@
607607
line-name = "emac0-phy-en";
608608
};
609609

610+
vbus_boost_5v: vbus-boost-5v {
611+
gpio-hog;
612+
gpios = <79 GPIO_ACTIVE_HIGH>;
613+
output-high;
614+
line-name = "vbus-boost-5v";
615+
};
616+
610617
i2s2_default: i2s2-default-active-state {
611618
pins = "gpio100", "gpio101", "gpio102", "gpio103";
612619
function = "i2s2";

arch/arm64/boot/dts/qcom/shikra-iqs-evk.dts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,13 @@
784784
line-name = "emac1-phy-en";
785785
};
786786

787+
vbus_boost_5v: vbus-boost-5v {
788+
gpio-hog;
789+
gpios = <79 GPIO_ACTIVE_HIGH>;
790+
output-high;
791+
line-name = "vbus-boost-5v";
792+
};
793+
787794
ext_mclk2_active: ext-mclk2-state {
788795
pins = "gpio110";
789796
function = "ext_mclk";

drivers/phy/qualcomm/phy-qcom-qmp-usbc.c

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,10 @@ static const char * const usb3dpphy_reset_l[] = {
516516
"phy_phy", "dp_phy",
517517
};
518518

519+
static const char * const usb3dpphy_reset_shikra_l[] = {
520+
"phy_phy", "dp_phy", "phy",
521+
};
522+
519523
static const struct regulator_bulk_data qmp_phy_msm8998_vreg_l[] = {
520524
{ .supply = "vdda-phy", .init_load_uA = 68600 },
521525
{ .supply = "vdda-pll", .init_load_uA = 14200 },
@@ -686,6 +690,46 @@ static const struct qmp_phy_cfg qcs615_usb3dp_phy_cfg = {
686690
.num_vregs = ARRAY_SIZE(qmp_phy_qcs615_vreg_l),
687691
};
688692

693+
static const struct qmp_phy_cfg shikra_usb3dp_phy_cfg = {
694+
.offsets = &qmp_usbc_usb3dp_offsets_qcs615,
695+
696+
.serdes_tbl = qcm2290_usb3_serdes_tbl,
697+
.serdes_tbl_num = ARRAY_SIZE(qcm2290_usb3_serdes_tbl),
698+
.tx_tbl = qcm2290_usb3_tx_tbl,
699+
.tx_tbl_num = ARRAY_SIZE(qcm2290_usb3_tx_tbl),
700+
.rx_tbl = qcm2290_usb3_rx_tbl,
701+
.rx_tbl_num = ARRAY_SIZE(qcm2290_usb3_rx_tbl),
702+
.pcs_tbl = qcm2290_usb3_pcs_tbl,
703+
.pcs_tbl_num = ARRAY_SIZE(qcm2290_usb3_pcs_tbl),
704+
705+
.regs = qmp_v3_usb3phy_regs_layout_qcm2290,
706+
707+
.dp_serdes_tbl = qmp_v2_dp_serdes_tbl,
708+
.dp_serdes_tbl_num = ARRAY_SIZE(qmp_v2_dp_serdes_tbl),
709+
.dp_tx_tbl = qmp_v2_dp_tx_tbl,
710+
.dp_tx_tbl_num = ARRAY_SIZE(qmp_v2_dp_tx_tbl),
711+
712+
.serdes_tbl_rbr = qmp_v2_dp_serdes_tbl_rbr,
713+
.serdes_tbl_rbr_num = ARRAY_SIZE(qmp_v2_dp_serdes_tbl_rbr),
714+
.serdes_tbl_hbr = qmp_v2_dp_serdes_tbl_hbr,
715+
.serdes_tbl_hbr_num = ARRAY_SIZE(qmp_v2_dp_serdes_tbl_hbr),
716+
.serdes_tbl_hbr2 = qmp_v2_dp_serdes_tbl_hbr2,
717+
.serdes_tbl_hbr2_num = ARRAY_SIZE(qmp_v2_dp_serdes_tbl_hbr2),
718+
719+
.swing_tbl = &qmp_v2_dp_voltage_swing_hbr2_rbr,
720+
.pre_emphasis_tbl = &qmp_v2_dp_pre_emphasis_hbr2_rbr,
721+
722+
.dp_aux_init = qmp_v2_dp_aux_init,
723+
.configure_dp_tx = qmp_v2_configure_dp_tx,
724+
.configure_dp_phy = qmp_v2_configure_dp_phy,
725+
.calibrate_dp_phy = qmp_v2_calibrate_dp_phy,
726+
727+
.reset_list = usb3dpphy_reset_shikra_l,
728+
.num_resets = ARRAY_SIZE(usb3dpphy_reset_shikra_l),
729+
.vreg_list = qmp_phy_qcs615_vreg_l,
730+
.num_vregs = ARRAY_SIZE(qmp_phy_qcs615_vreg_l),
731+
};
732+
689733
static void qmp_usbc_set_phy_mode(struct qmp_usbc *qmp, bool is_dp)
690734
{
691735
if (qmp->tcsr_map && qmp->dp_phy_mode_reg)
@@ -2020,6 +2064,9 @@ static const struct of_device_id qmp_usbc_of_match_table[] = {
20202064
}, {
20212065
.compatible = "qcom,sdm660-qmp-usb3-phy",
20222066
.data = &sdm660_usb3phy_cfg,
2067+
}, {
2068+
.compatible = "qcom,shikra-qmp-usb3-dp-phy",
2069+
.data = &shikra_usb3dp_phy_cfg,
20232070
}, {
20242071
.compatible = "qcom,shikra-qmp-usb3-phy",
20252072
.data = &qcs615_usb3phy_cfg,

0 commit comments

Comments
 (0)