Skip to content

net: dsa: motorcomm: add support yt922x driver

Kyle Switch lkml netdev 15 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v17 Latest5 patches 5 repliesIn review
  2. v165 patches 1 replySuperseded
  3. v155 patches 1 replySuperseded
Earlier versions · 12
VersionPostedPatchesRepliesStatus
v145 patches6 repliesSuperseded
v135 patches3 repliesSuperseded
v125 patches0 repliesSuperseded
v117 patches0 repliesSuperseded
v107 patches1 replySuperseded
v97 patches1 replySuperseded
v86 patches3 repliesSuperseded
v76 patches2 repliesSuperseded
v66 patches8 repliesSuperseded
v32 patches3 repliesSuperseded
v2 RFC1 patch4 repliesSuperseded
v11 patch5 repliesSuperseded

Changes in v17 from the cover letter

1) Rebase.

Patches in v17 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5net: dsa: motorcomm: initialize dsa_switch based on chipiddrivers/net/dsa/motorcomm/chip.c drivers/net/dsa/motorcomm/chip.h+84 -81 reply
2/5net: dsa: motorcomm: use max_ports in series for port bounds checkingdrivers/net/dsa/motorcomm/mdio_bus.c+5 -30 replies
3/5net: dsa: motorcomm: use fixed-width GENMASK_U*() helpersdrivers/net/dsa/motorcomm/chip.c drivers/net/dsa/motorcomm/mdio_bus.c+2 -22 replies
4/5net: dsa: tag_yt922x: add support for Motorcomm YT922x tagsMAINTAINERS include/net/dsa.h net/dsa/Kconfig +2 more+133 -00 replies
5/5net: dsa: motorcomm: Add support for Motorcomm YT922xdrivers/net/dsa/motorcomm/Kconfig drivers/net/dsa/motorcomm/Makefile drivers/net/dsa/motorcomm/chip.c +5 more+916 -92 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchAndrew Lunn
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

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

Read the v17 thread

Cover letter [PATCH net-next v17 0/5] net: dsa: motorcomm: add support yt922x driver

This patchset mainly adds support for the yt922x series to the dsa driver. Currently, only the yt9224 in the yt922x series is supported, and the corresponding tag handling for yt922x is added.

At the same time, it optimizes the max ports boundary check in the existing code, and initializes the dsa switch based on the chipid.

changes in v17:
1) Rebase.

changes in v16:
1) Add missing break in switch case to prevent fall-through in yt922x_port_config()

changes in v15:
1) Revert the use of GENMASK_U16() to replace GENMASK(), so as to facilitate adaptation to scenarios with more ports in the future.
2) Group functions with the same functionality together in mdio_bus.c.
3) Remove meaningless code comments.
4) Renaming parameters in yt922x_pcs_get_state().
5) Add neg_mode and advertising handle.

changes in v14:
1) Replace the goto-based skip_extmode_check path with an early conditional in yt921x_chip_detect().

changes in v13:
1) Fix a compilation error in patch1 only.
The change is limited to the yt92xx_register_switch function:
- Replace yt921x_priv with dsa_to_yt921x_priv
- Replace to_device with yt921x_priv_to_device

changes in v12:
1) Rebase the code.
2) Delete origin patch4 and patch5 about MIB init and remove operation.
3) Optimize error message logging.
4) Add documents about yt922x tag.

changes in v11:
1) Initialize ctrl variable inside yt922x_port_up().
2) Update maitainer for new file.

changes in v10:
1) Rebase the code.

changes in v9:
patch 1: 1) Add a dev_err() when chipid mismatch.
patch 3: 1) Using GENMASK_U* to replace GENMASK

changes in v8:
patch 1: 1) Add a lock operation to acquire the chip ID during the probe()
stage.
2) Remove meaningless changes.
patch 3: Modify the changelog description.
patch 6: 1) Remove sds_init() in this patch.
2) Code refactoring, including yt922x_sds_phyaddr_get() and yt921x_needs_extmode_check()
3) In yt921x_intif_ext_write() and yt921x_intif_ext_read(), add a boundary check for phyaddr. The reason is that the phyaddr of the top ext register is 9, so max_ports should be used for the check to include it.
4) In the yt922x driver, added initialization of yt921x_port for exporting priv.

changes in v7:
patch 1: Fix the series_lookup() redundancy issue.

         Fix the dsa->priv initialization and the code style issue.

patch 6: Move psc definition to yt921x_port
Fix psc_get_state() and an_restart().
Use the existing yt921x driver interface for the duplicated logic for chip_reset().
Move the yt922x_cpu_port_set() to chip_setup_dsa() to align with yt921x function.

Kyle Switch (5):
net: dsa: motorcomm: initialize dsa_switch based on chipid
net: dsa: motorcomm: use max_ports in series for port bounds checking
net: dsa: motorcomm: use fixed-width GENMASK_U*() helpers
net: dsa: tag_yt922x: add support for Motorcomm YT922x tags
net: dsa: motorcomm: Add support for Motorcomm YT922x

 MAINTAINERS                          |   2 +
 drivers/net/dsa/motorcomm/Kconfig    |   7 +-
 drivers/net/dsa/motorcomm/Makefile   |   1 +
 drivers/net/dsa/motorcomm/chip.c     | 575 ++++++++++++++++++++++++++-
 drivers/net/dsa/motorcomm/chip.h     | 101 +++++
 drivers/net/dsa/motorcomm/mdio_bus.c |  48 ++-
 drivers/net/dsa/motorcomm/mdio_bus.h |   4 +
 drivers/net/dsa/motorcomm/pcs-922x.c | 282 +++++++++++++
 drivers/net/dsa/motorcomm/pcs.h      |   1 +
 include/net/dsa.h                    |   2 +
 net/dsa/Kconfig                      |   6 +
 net/dsa/Makefile                     |   1 +
 net/dsa/tag_yt922x.c                 | 122 ++++++
 13 files changed, 1135 insertions(+), 17 deletions(-)
 create mode 100644 drivers/net/dsa/motorcomm/pcs-922x.c
 create mode 100644 net/dsa/tag_yt922x.c
Signature · 1 line
2.25.1