Skip to content

mfd: ocelot: add support for MDIO managed switch

Rasmus Villemoes linux-devicetree lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8mfd: ocelot: refactor bus-specific regmap initializationdrivers/mfd/ocelot-core.c drivers/mfd/ocelot-spi.c drivers/mfd/ocelot.h+7 -84 replies
2/8mfd: ocelot: move SPI specific macros to ocelot-spi.cdrivers/mfd/ocelot-spi.c drivers/mfd/ocelot.h+9 -91 reply
3/8mfd: ocelot: rework SPI (re-)initialization after chip resetdrivers/mfd/ocelot-core.c drivers/mfd/ocelot-spi.c drivers/mfd/ocelot.h+11 -84 replies
4/8mfd: ocelot: lift chip reset logic to ocelot-core.cdrivers/mfd/ocelot-core.c drivers/mfd/ocelot-spi.c+28 -331 reply
5/8mfd: ocelot: make ocelot_chip_init() staticdrivers/mfd/ocelot-core.c drivers/mfd/ocelot.h+1 -31 reply
6/8mfd: ocelot: correct Kconfig dependencydrivers/mfd/Kconfig+1 -11 reply
7/8mfd: ocelot: enable support for mdio managementdrivers/mfd/Kconfig drivers/mfd/Makefile drivers/mfd/ocelot-mdio.c+164 -20 replies
8/8dt-bindings: mfd: ocelot: mention MDIO management and add exampleDocumentation/devicetree/bindings/mfd/mscc,ocelot.yaml+119 -22 replies

Reviews trailers per patch

5 of 8 patches have a Reviewed-by or Acked-by.

PatchColin Foster
1/8R-b T-b
2/8R-b
3/8
4/8R-b
5/8R-b
6/8R-b
7/8
8/8

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

Read the v1 thread

Cover letter [PATCH 0/8] mfd: ocelot: add support for MDIO managed switch

The primary purpose of this series is to add support for vsc751x switches that are wired up to be managed via MDIO. The current MFD driver only has support for management over SPI.

While reworking the spi and core files to allow hooking up another underlying bus, I found what I think might be a bug in the SPI implementation, for the case where the SPI bus is set higher than 500kHz. But as I don't have such hardware, I don't know if the bug is real, nor am I able to test my changes.

If desired, I can drop those changes, at the expense of having to duplicate some logic around setting up the gcb_regmap and calling reset in the mdio backend, but since I spotted it anyway I thought I'd include it for the first iteration.

Also, if desired, I can put the mdio and spi backends behind separate config options, with the spi option defaulting to y to preserve behaviour of existing .configs setting CONFIG_MFD_OCELOT.

Rasmus Villemoes (8):
mfd: ocelot: refactor bus-specific regmap initialization
mfd: ocelot: move SPI specific macros to ocelot-spi.c
mfd: ocelot: rework SPI (re-)initialization after chip reset
mfd: ocelot: lift chip reset logic to ocelot-core.c
mfd: ocelot: make ocelot_chip_init() static
mfd: ocelot: correct Kconfig dependency
mfd: ocelot: enable support for mdio management
dt-bindings: mfd: ocelot: mention MDIO management and add example

 .../devicetree/bindings/mfd/mscc,ocelot.yaml  | 121 ++++++++++++-
 drivers/mfd/Kconfig                           |   5 +-
 drivers/mfd/Makefile                          |   2 +-
 drivers/mfd/ocelot-core.c                     |  44 ++++-
 drivers/mfd/ocelot-mdio.c                     | 161 ++++++++++++++++++
 drivers/mfd/ocelot-spi.c                      |  53 ++----
 drivers/mfd/ocelot.h                          |  18 +-
 7 files changed, 339 insertions(+), 65 deletions(-)
 create mode 100644 drivers/mfd/ocelot-mdio.c
Signature · 1 line
2.49.0