Skip to content

Commit d60c471

Browse files
MarijnS95vinodkoul
authored andcommitted
phy: Revert "phy: qualcomm: usb28nm: Add MDM9607 init sequence"
This reverts commit 557a288. This commit introduced an init sequence from downstream DT [1] in the driver. As mentioned by the comment above the HSPHY_INIT_CFG macro for this sequence: /* * The macro is used to define an initialization sequence. Each tuple * is meant to program 'value' into phy register at 'offset' with 'delay' * in us followed. */ Instead of corresponding to offsets into the phy register, the sequence read by the downstream driver [2] is passed into ulpi_write [3] which crafts the address-value pair into a new value and writes it into the same register at USB_ULPI_VIEWPORT [4]. In other words, this init sequence is programmed into the hardware in a totally different way than downstream and is unlikely to achieve the desired result, if the hsphy is working at all. An alternative method needs to be found to write these init values at the desired location. Fortunately mdm9607 did not land upstream yet [5] and should have its compatible revised to use the generic one, instead of a compatible that writes wrong data to the wrong registers. [1]: https://android.googlesource.com/kernel/msm/+/android-7.1.0_r0.2/arch/arm/boot/dts/qcom/mdm9607.dtsi#585 [2]: https://android.googlesource.com/kernel/msm/+/android-7.1.0_r0.2/drivers/usb/phy/phy-msm-usb.c#4183 [3]: https://android.googlesource.com/kernel/msm/+/android-7.1.0_r0.2/drivers/usb/phy/phy-msm-usb.c#468 [4]: https://android.googlesource.com/kernel/msm/+/android-7.1.0_r0.2/drivers/usb/phy/phy-msm-usb.c#418 [5]: https://lore.kernel.org/linux-arm-msm/[email protected]/ Reported-by: Michael Srba <[email protected]> Signed-off-by: Marijn Suijten <[email protected]> Reviewed-by: Stephan Gerhold <[email protected]> Reviewed-by: Bryan O'Donoghue <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 5daba91 commit d60c471

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

Documentation/devicetree/bindings/phy/qcom,usb-hs-28nm.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ properties:
1616
compatible:
1717
enum:
1818
- qcom,usb-hs-28nm-femtophy
19-
- qcom,usb-hs-28nm-mdm9607
2019

2120
reg:
2221
maxItems: 1

drivers/phy/qualcomm/phy-qcom-usb-hs-28nm.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -401,26 +401,13 @@ static const struct hsphy_init_seq init_seq_femtophy[] = {
401401
HSPHY_INIT_CFG(0x90, 0x60, 0),
402402
};
403403

404-
static const struct hsphy_init_seq init_seq_mdm9607[] = {
405-
HSPHY_INIT_CFG(0x80, 0x44, 0),
406-
HSPHY_INIT_CFG(0x81, 0x38, 0),
407-
HSPHY_INIT_CFG(0x82, 0x24, 0),
408-
HSPHY_INIT_CFG(0x83, 0x13, 0),
409-
};
410-
411404
static const struct hsphy_data hsphy_data_femtophy = {
412405
.init_seq = init_seq_femtophy,
413406
.init_seq_num = ARRAY_SIZE(init_seq_femtophy),
414407
};
415408

416-
static const struct hsphy_data hsphy_data_mdm9607 = {
417-
.init_seq = init_seq_mdm9607,
418-
.init_seq_num = ARRAY_SIZE(init_seq_mdm9607),
419-
};
420-
421409
static const struct of_device_id qcom_snps_hsphy_match[] = {
422410
{ .compatible = "qcom,usb-hs-28nm-femtophy", .data = &hsphy_data_femtophy, },
423-
{ .compatible = "qcom,usb-hs-28nm-mdm9607", .data = &hsphy_data_mdm9607, },
424411
{ },
425412
};
426413
MODULE_DEVICE_TABLE(of, qcom_snps_hsphy_match);

0 commit comments

Comments
 (0)