devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/9] misc: Support TI FPC202 dual-port controller
@ 2024-12-30 13:22 Romain Gantois
  2024-12-30 13:22 ` [PATCH v4 1/9] dt-bindings: misc: Describe TI FPC202 dual port controller Romain Gantois
                   ` (8 more replies)
  0 siblings, 9 replies; 20+ messages in thread
From: Romain Gantois @ 2024-12-30 13:22 UTC (permalink / raw)
  To: Wolfram Sang, Tomi Valkeinen, Luca Ceresoli, Andi Shyti,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Derek Kiernan,
	Dragan Cvetic, Arnd Bergmann, Greg Kroah-Hartman,
	Mauro Carvalho Chehab, Linus Walleij, Bartosz Golaszewski
  Cc: Thomas Petazzoni, Kory Maincent, linux-i2c, linux-kernel,
	devicetree, linux-media, linux-gpio, Romain Gantois

Hello everyone,

This is version four of my series which adds support for the TI FPC202
dual-port controller. This is an unusual kind of device which is used as a
low-speed signal aggregator for various types of SFP-like hardware ports.

The FPC202 exposes an I2C, or SPI (not supported in this series) control
interface, which can be used to access two downstream I2C busses, along
with a set of low-speed GPIO signals for each port. It also has I2C address
translation (ATR) features, which allow multiple I2C devices with the same
address (e.g. SFP EEPROMs at address 0x50) to be accessed from the upstream
control interface on different addresses.

I've chosen to add this driver to the misc subsystem, as it doesn't
strictly belong in either the i2c or gpio sybsystem, and as far as I know
it is the first device of its kind to be added to the kernel.

Along with the FPC202 driver itself, this series also adds support for
dynamic address translation to the i2c-atr module. This allows I2C address
translators to update their translation table on-the-fly when they receive
transactions to unmapped clients. This feature is needed by the FPC202
driver to access up to three logical I2C devices per-port, given that the
FPC202 address translation table only has two address slots.

Best Regards,

Romain

Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
---
Changes in v4:
- Fixed unbalanced refcounting in FPC202 port probing path
- Fixed KASAN bug by setting alias_pool "shared" flag properly
- Dropped requirement for both FPC202 ports to be described in the DT
- Enabled dynamic translation by default, dropped support for non dynamic translation
- Used aliased_addrs list instead of insufficient bitmap in ub960 driver
- Added i2c_atr_destroy_c2a() function matching i2c_atr_create_c2a()
- Fixed list corruption bug in dynamic address translation
- Indented Kconfig entry with tabs instead of spaces
- Link to v3: https://lore.kernel.org/r/20241125-fpc202-v3-0-34e86bcb5b56@bootlin.com

Changes in v3:
- Described the "reg" property of downstream ports in the FPC202 bindings
- Link to v2: https://lore.kernel.org/r/20241118-fpc202-v2-0-744e4f192a2d@bootlin.com

Changes in v2:
- Renamed port nodes to match i2c adapter bindings.
- Declared atr ops struct as static const.
- Free downstream ports during FPC202 removal.
- Link to v1: https://lore.kernel.org/r/20241108-fpc202-v1-0-fe42c698bc92@bootlin.com

---
Romain Gantois (9):
      dt-bindings: misc: Describe TI FPC202 dual port controller
      media: i2c: ds90ub960: Replace aliased clients list with address list
      media: i2c: ds90ub960: Protect alias_use_mask with a mutex
      i2c: use client addresses directly in ATR interface
      i2c: move ATR alias pool to a separate struct
      i2c: rename field 'alias_list' of struct i2c_atr_chan to 'alias_pairs'
      i2c: support per-channel ATR alias pools
      i2c: Support dynamic address translation
      misc: add FPC202 dual port controller driver

 .../devicetree/bindings/misc/ti,fpc202.yaml        |  94 ++++
 MAINTAINERS                                        |   7 +
 drivers/i2c/i2c-atr.c                              | 483 ++++++++++++++-------
 drivers/media/i2c/ds90ub913.c                      |   9 +-
 drivers/media/i2c/ds90ub953.c                      |   9 +-
 drivers/media/i2c/ds90ub960.c                      |  61 ++-
 drivers/misc/Kconfig                               |  11 +
 drivers/misc/Makefile                              |   1 +
 drivers/misc/ti_fpc202.c                           | 441 +++++++++++++++++++
 include/linux/i2c-atr.h                            |  54 ++-
 10 files changed, 976 insertions(+), 194 deletions(-)
---
base-commit: 40384c840ea1944d7c5a392e8975ed088ecf0b37
change-id: 20241017-fpc202-6f0b739c2078

Best regards,
-- 
Romain Gantois <romain.gantois@bootlin.com>


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2025-01-08 14:35 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-30 13:22 [PATCH v4 0/9] misc: Support TI FPC202 dual-port controller Romain Gantois
2024-12-30 13:22 ` [PATCH v4 1/9] dt-bindings: misc: Describe TI FPC202 dual port controller Romain Gantois
2025-01-06 20:10   ` Conor Dooley
2024-12-30 13:22 ` [PATCH v4 2/9] media: i2c: ds90ub960: Replace aliased clients list with address list Romain Gantois
2025-01-06  9:34   ` Tomi Valkeinen
2025-01-08 13:27     ` Romain Gantois
2025-01-08 13:32       ` Tomi Valkeinen
2025-01-08 13:50         ` Romain Gantois
2024-12-30 13:22 ` [PATCH v4 3/9] media: i2c: ds90ub960: Protect alias_use_mask with a mutex Romain Gantois
2025-01-06  9:38   ` Tomi Valkeinen
2024-12-30 13:22 ` [PATCH v4 4/9] i2c: use client addresses directly in ATR interface Romain Gantois
2025-01-06  9:51   ` Tomi Valkeinen
2025-01-08 13:31     ` Romain Gantois
2025-01-08 13:38       ` Tomi Valkeinen
2025-01-08 14:35         ` Romain Gantois
2024-12-30 13:22 ` [PATCH v4 5/9] i2c: move ATR alias pool to a separate struct Romain Gantois
2024-12-30 13:22 ` [PATCH v4 6/9] i2c: rename field 'alias_list' of struct i2c_atr_chan to 'alias_pairs' Romain Gantois
2024-12-30 13:22 ` [PATCH v4 7/9] i2c: support per-channel ATR alias pools Romain Gantois
2024-12-30 13:22 ` [PATCH v4 8/9] i2c: Support dynamic address translation Romain Gantois
2024-12-30 13:22 ` [PATCH v4 9/9] misc: add FPC202 dual port controller driver Romain Gantois

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).