mfd: ocelot: add support for MDIO managed switch
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest8 patches 17 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | mfd: ocelot: refactor bus-specific regmap initializationdrivers/ drivers/ drivers/ | +7 | 4 replies | |
| 2/8 | mfd: ocelot: move SPI specific macros to ocelot-spi.cdrivers/ drivers/ | +9 | 1 reply | |
| 3/8 | mfd: ocelot: rework SPI (re-)initialization after chip resetdrivers/ drivers/ drivers/ | +11 | 4 replies | |
| 4/8 | mfd: ocelot: lift chip reset logic to ocelot-core.cdrivers/ drivers/ | +28 | 1 reply | |
| 5/8 | mfd: ocelot: make ocelot_chip_init() staticdrivers/ drivers/ | +1 | 1 reply | |
| 6/8 | mfd: ocelot: correct Kconfig dependencydrivers/ | +1 | 1 reply | |
| 7/8 | mfd: ocelot: enable support for mdio managementdrivers/ drivers/ drivers/ | +164 | 0 replies | |
| 8/8 | dt-bindings: mfd: ocelot: mention MDIO management and add exampleDocumentation/ | +119 | 2 replies |
Reviews trailers per patch
5 of 8 patches have a Reviewed-by or Acked-by.
| Patch | Colin Foster |
|---|---|
| 1/8 | R-b T-b |
| 2/8 | R-b |
| 3/8 | |
| 4/8 | R-b |
| 5/8 | R-b |
| 6/8 | R-b |
| 7/8 | |
| 8/8 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
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