usb: typec: tcpci_mt6360: Update for BMC PHY setting
Subsystems (3)
PATCH 1/1 usb: typec: tcpci_mt6360: Update for BMC PHY setting
From: ChiYuan Huang <[email protected]>
Update MT6360 BMC PHY Tx/Rx setting for the compatibility.
---
Hi,
Recently, there's some USBPD MT6360 IOP issue from the user. From our RD's comment, BMC PHY Tx/Rx setting need to be updated for the compatibility issue.
--- drivers/usb/typec/tcpm/tcpci_mt6360.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
drivers/usb/typec/tcpm/tcpci_mt6360.c +26 -0
@@ -15,6 +15,9 @@#include "tcpci.h" +#define MT6360_REG_PHYCTRL1 0x80 +#define MT6360_REG_PHYCTRL3 0x82 +#define MT6360_REG_PHYCTRL7 0x86#define MT6360_REG_VCONNCTRL1 0x8C#define MT6360_REG_MODECTRL2 0x8F#define MT6360_REG_SWRESET 0xA0
@@ -22,6 +25,8 @@#define MT6360_REG_DRPCTRL1 0xA2#define MT6360_REG_DRPCTRL2 0xA3#define MT6360_REG_I2CTORST 0xBF +#define MT6360_REG_PHYCTRL11 0xCA +#define MT6360_REG_RXCTRL1 0xCE#define MT6360_REG_RXCTRL2 0xCF#define MT6360_REG_CTDCTRL2 0xEC
@@ -106,6 +111,27 @@ static int mt6360_tcpc_init(struct tcpci *tcpci, struct tcpci_data *tdata)if (ret)return ret; +/* BMC PHY */ + ret =mt6360_tcpc_write16 (regmap,MT6360_REG_PHYCTRL1 ,0x3A70 ); +if (ret) +return ret; + + ret =regmap_write (regmap,MT6360_REG_PHYCTRL3 ,0x82 ); +if (ret) +return ret; + + ret =regmap_write (regmap,MT6360_REG_PHYCTRL7 ,0x36 ); +if (ret) +return ret; + + ret =mt6360_tcpc_write16 (regmap,MT6360_REG_PHYCTRL11 ,0x3C60 ); +if (ret) +return ret; + + ret =regmap_write (regmap,MT6360_REG_RXCTRL1 ,0xE8 ); +if (ret) +return ret; +/* Set shipping mode off, AUTOIDLE on */ return regmap_write (regmap,MT6360_REG_MODECTRL2 ,0x7A ); }
Signature · 1 line
2.7.4
Quoted 11 lines · cy_huang
From: ChiYuan Huang <[email protected]>
Update MT6360 BMC PHY Tx/Rx setting for the compatibility.
Signed-off-by ChiYuan Huang <[email protected]>---
Hi,Recently, there's some USBPD MT6360 IOP issue from the user.
Quoted 1 line
From our RD's comment, BMC PHY Tx/Rx setting need to be updated for
the compatibility issue.
I think this needs to be a bit more detailed. What compatibility issue ? Compatibility with what ?
Thanks,
Guenter
Quoted 45 lines
--- drivers/usb/typec/tcpm/tcpci_mt6360.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)drivers/usb/typec/tcpm/tcpci_mt6360.c +19
-0@@ -15,6 +15,9 @@#include "tcpci.h" +#define MT6360_REG_PHYCTRL1 0x80 +#define MT6360_REG_PHYCTRL3 0x82 +#define MT6360_REG_PHYCTRL7 0x86#define MT6360_REG_VCONNCTRL1 0x8C#define MT6360_REG_MODECTRL2 0x8F#define MT6360_REG_SWRESET 0xA0@@ -22,6 +25,8 @@#define MT6360_REG_DRPCTRL1 0xA2#define MT6360_REG_DRPCTRL2 0xA3#define MT6360_REG_I2CTORST 0xBF +#define MT6360_REG_PHYCTRL11 0xCA +#define MT6360_REG_RXCTRL1 0xCE#define MT6360_REG_RXCTRL2 0xCF#define MT6360_REG_CTDCTRL2 0xEC@@ -106,6 +111,27 @@ static int mt6360_tcpc_init(struct tcpci *tcpci, struct tcpci_data *tdata)if (ret)return ret; +/* BMC PHY */ + ret =mt6360_tcpc_write16 (regmap,MT6360_REG_PHYCTRL1 ,0x3A70 ); +if (ret) +return ret; + + ret =regmap_write (regmap,MT6360_REG_PHYCTRL3 ,0x82 ); +if (ret) +return ret; + + ret =regmap_write (regmap,MT6360_REG_PHYCTRL7 ,0x36 ); +if (ret) +return ret; + + ret =mt6360_tcpc_write16 (regmap,MT6360_REG_PHYCTRL11 ,0x3C60 );
drivers/usb/typec/tcpm/tcpci_mt6360.c static int mt6360_tcpc_init(struct tcpci *tcpci, struct tcpci_data *tdata) · line 137
Quoted 10 lines
drivers/usb/typec/tcpm/tcpci_mt6360.c +7
-0+if (ret) +return ret; + + ret =regmap_write (regmap,MT6360_REG_RXCTRL1 ,0xE8 ); +if (ret) +return ret; +/* Set shipping mode off, AUTOIDLE on */ return regmap_write (regmap,MT6360_REG_MODECTRL2 ,0x7A ); }
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek