Skip to content

Add support for J784S4 CPSW9G

Siddharth Vadapalli linux-arm-kernel lkml netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 1 replyApplied 3/3
  2. v23 patches 9 repliesSuperseded
  3. v12 patches 16 repliesSuperseded

Changes in v3 from the cover letter

1. In am65_cpsw_nuss_mac_config(), set the CPSW_SL_CTL_EXT_EN bit in the MAC control register if the mode is SGMII. Else, clear that bit.
2. In am65_cpsw_nuss_mac_link_down(), instead of resetting the entire MAC control register, only clear those bits that can possibly be set in the am65_cpsw_nuss_mac_link_up() function. Resetting the entire MAC control register will result in loss of the configuration performed by the am65_cpsw_nuss_mac_config() function.
3. In am65_cpsw_nuss_mac_link_down(), since the MAC control register will not be reset, the CPSW_SL_CTL_CMD_IDLE bit which was previously cleared as a part of the reset, needs to be cleared in the am65_cpsw_nuss_mac_link_up() function. This is the correct approach, since the MAC should remain IDLE until the link is detected.
4. In am65_cpsw_nuss_mac_config(), set the CPSW_SL_CTL_XGIG and the CPSW_SL_CTL_XGMII_EN bits in the MAC control register if the mode is USXGMII. Else, clear those bits.

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3net: ethernet: ti: am65-cpsw: Move mode specific config to mac_config()drivers/net/ethernet/ti/am65-cpsw-nuss.c+18 -40 repliesApplied
2/3net: ethernet: ti: am65-cpsw: Enable QSGMII for J784S4 CPSW9Gdrivers/net/ethernet/ti/am65-cpsw-nuss.c+8 -01 replyApplied
3/3net: ethernet: ti: am65-cpsw: Enable USXGMII mode for J784S4 CPSW9Gdrivers/net/ethernet/ti/am65-cpsw-nuss.c+12 -20 repliesApplied

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchRoger Quadros
1/3
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH net-next v3 0/3] Add support for J784S4 CPSW9G

Hello,

This series adds a new compatible to am65-cpsw driver for the CPSW9G instance of the CPSW Ethernet Switch on TI's J784S4 SoC which has 8 external ports and 1 internal host port.

The CPSW9G instance supports QSGMII and USXGMII modes for which driver support is added.

Additionally, the interface mode specific configurations are moved to the am65_cpsw_nuss_mac_config() callback. Also, a TODO comment is added for verifying whether in-band mode is necessary for 10 Mbps RGMII mode.

NOTE:
I have verified that the mac_config() operations are preserved across link up and link down events for SGMII and USXGMII mode with the new implementation in this series, as suggested by:
Russell King <[email protected]>

For patches 1 and 3 of this series, I believe that the following tag:

should be added. However, I did not add it since I did not yet get the permission to do so. I will be happy if the tags are added, since the new implementation is almost entirely based on Russell's suggestion, with minor changes made by me.

Changes from v2:
1. In am65_cpsw_nuss_mac_config(), set the CPSW_SL_CTL_EXT_EN bit in the MAC control register if the mode is SGMII. Else, clear that bit.
2. In am65_cpsw_nuss_mac_link_down(), instead of resetting the entire MAC control register, only clear those bits that can possibly be set in the am65_cpsw_nuss_mac_link_up() function. Resetting the entire MAC control register will result in loss of the configuration performed by the am65_cpsw_nuss_mac_config() function.
3. In am65_cpsw_nuss_mac_link_down(), since the MAC control register will not be reset, the CPSW_SL_CTL_CMD_IDLE bit which was previously cleared as a part of the reset, needs to be cleared in the am65_cpsw_nuss_mac_link_up() function. This is the correct approach, since the MAC should remain IDLE until the link is detected.
4. In am65_cpsw_nuss_mac_config(), set the CPSW_SL_CTL_XGIG and the CPSW_SL_CTL_XGMII_EN bits in the MAC control register if the mode is USXGMII. Else, clear those bits.

Changes from v1:
1. Add a patch to move interface mode specific configuration from the mac_link_up() callback to the mac_config() callback of the am65-cpsw driver. Also, add a TODO comment for 10 Mbps RGMII in-band mode.
2. Add MAC_5000FD to the list of mac_capabilities member unconditionally, since the CPSW MAC supports it.
3. Add USXGMII mode specific configuration in the mac_config() callback along with the SGMII mode specific configuration, instead of the mac_link_up() callback which was incorrectly done in the v1 series.

v2:
https://lore.kernel.org/r/[email protected]/
v1:
https://lore.kernel.org/r/[email protected]/

Regards,
Siddharth.

Siddharth Vadapalli (3):
net: ethernet: ti: am65-cpsw: Move mode specific config to
mac_config()
net: ethernet: ti: am65-cpsw: Enable QSGMII for J784S4 CPSW9G
net: ethernet: ti: am65-cpsw: Enable USXGMII mode for J784S4 CPSW9G

 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 42 +++++++++++++++++++++---
 1 file changed, 37 insertions(+), 5 deletions(-)
Signature · 7 lines
2.25.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel