[V4,0/2] phy: ti: j721e-wiz: Add support to manage type-C swap on Lane2 and lane3

Message ID 20230113150615.19375-1-sinthu.raja@ti.com
Headers
Series phy: ti: j721e-wiz: Add support to manage type-C swap on Lane2 and lane3 |

Message

Sinthu Raja Jan. 13, 2023, 3:06 p.m. UTC
  From: Sinthu Raja <sinthu.raja@ti.com>

Hi All,
This series of patch add support to enable lanes 2 and 3 swap by
configuring the LN23 bit of the SerDes WIZ control register. Also,
it's possible that the Type-C plug orientation on the DIR line will
be implemented through hardware design. In that situation, there
won't be an external GPIO line available, but the driver still needs
to address this since the DT won't use the typec-dir-gpios property.
Update code to handle if typec-dir-gpios property is not specified in DT.

Changes in V4:
=============
- Fixe checkpatch CHECK errors.
 * Remove unnecessary paranthesis.
 * Avoid logical continuations in multiple lines.

Changes in V3:
=============
Address review comments:
- Update comment to mention the LN23 SWAP along with the LN10

Changes in V2:
=============
Address review comments:
- Update commit description as per review comments.
- Restore code to check only debounce delay only if typec-dir-gpios property is specified in DT.
- Rename enum variable name from wiz_lane_typec_swap_mode to wiz_typec_master_lane.
- Rename lane_phy_reg variable as master_lane_num.
- Update inline comments.

V1: https://lore.kernel.org/lkml/20221213124854.3779-2-sinthu.raja@ti.com/T/
V2: https://lore.kernel.org/lkml/20230106071714.30562-1-sinthu.raja@ti.com/
V3: https://lore.kernel.org/lkml/20230111111356.17392-1-sinthu.raja@ti.com/ 

Sinthu Raja (2):
  phy: ti: j721e-wiz: Manage TypeC lane swap if typec-dir-gpios not
    specified
  phy: ti: j721e-wiz: Add support to enable LN23 Type-C swap

 drivers/phy/ti/phy-j721e-wiz.c | 66 ++++++++++++++++++++++++++++------
 1 file changed, 56 insertions(+), 10 deletions(-)
  

Comments

Vinod Koul Jan. 18, 2023, 5:15 p.m. UTC | #1
On 13-01-23, 20:36, Sinthu Raja wrote:
> From: Sinthu Raja <sinthu.raja@ti.com>
> 
> Hi All,
> This series of patch add support to enable lanes 2 and 3 swap by
> configuring the LN23 bit of the SerDes WIZ control register. Also,
> it's possible that the Type-C plug orientation on the DIR line will
> be implemented through hardware design. In that situation, there
> won't be an external GPIO line available, but the driver still needs
> to address this since the DT won't use the typec-dir-gpios property.
> Update code to handle if typec-dir-gpios property is not specified in DT.

Applied, thanks