public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v2 00/12] greybus: introduce CPC as transport layer
@ 2025-11-14 15:07 Damien Riégel
  2025-11-14 15:07 ` [RFC PATCH v2 01/12] greybus: cpc: add minimal CPC Host Device infrastructure Damien Riégel
                   ` (12 more replies)
  0 siblings, 13 replies; 21+ messages in thread
From: Damien Riégel @ 2025-11-14 15:07 UTC (permalink / raw)
  To: greybus-dev, Johan Hovold, Alex Elder, Greg Kroah-Hartman,
	linux-kernel
  Cc: Silicon Labs Kernel Team, Damien Riégel

Hi,

This patchset brings support for Silicon Labs' CPC (Co-Processor
Communication) protocol as transport layer for Greybus. This is
introduced as a module that sits between Greybus and CPC Host Device
Driver implementations, like SDIO or SPI, which are not part of this
RFC. If there's no push back with this RFC, the final patchset ready for
upstream will include the SDIO driver.

The goal of this module is to implement some of the features of Unipro
that Greybus relies upon, like reliable transmission. CPC takes care of
detecting transmission errors and retransmit frames if necessary. That
feature is not part of the RFC to keep it concise, but it's planned for
a future patchset. There's also a flow-control feature, to prevent from
sending messages to cports that don't have anymore room.

In order to implement these features, a 4-byte header is prepended to
Greybus messages, making the whole header 12 bytes (Greybus header
itself being 8 bytes).

This RFC starts by implementing a shim layer that sits between physical
bus drivers (like SDIO and SPI) and Greybus, and progressively add more
elements to it to make it useful in its own right.

    +----------------------------------------------------+
    |                      Greybus                       |
    +----------------------------------------------------+
			     /|\
			      |
			     \|/
    +----------------------------------------------------+
    |                        CPC                         |
    +----------------------------------------------------+
	  /|\                /|\                /|\
	   |                  |                  |
	  \|/                \|/                \|/
      +----------+       +---------+       +-----------+
      |   SDIO   |       |   SPI   |       |   Others  |
      +----------+       +---------+       +-----------+


Changes in v2:
 - v1 included a new protocol for Bluetooth HCI, this has been dropped
   to focus on CPC itself
 - likewise, there was an SPI driver, it has been dropped of this RFC
   for the same reason
 - v1 introduced CPC in a big commit, this time it's been split in
   smaller commits to make review manageable

Damien Riégel (12):
  greybus: cpc: add minimal CPC Host Device infrastructure
  greybus: cpc: introduce CPC cport structure
  greybus: cpc: use socket buffers instead of gb_message in TX path
  greybus: cpc: pack cport ID in Greybus header
  greybus: cpc: switch RX path to socket buffers
  greybus: cpc: introduce CPC header structure
  greybus: cpc: account for CPC header size in RX and TX path
  greybus: cpc: add and validate sequence numbers
  greybus: cpc: acknowledge all incoming messages
  greybus: cpc: use holding queue instead of sending out immediately
  greybus: cpc: honour remote's RX window
  greybus: cpc: let host device drivers dequeue TX frames

 MAINTAINERS                    |   6 +
 drivers/greybus/Kconfig        |   2 +
 drivers/greybus/Makefile       |   2 +
 drivers/greybus/cpc/Kconfig    |  10 ++
 drivers/greybus/cpc/Makefile   |   6 +
 drivers/greybus/cpc/cpc.h      |  76 +++++++++
 drivers/greybus/cpc/cport.c    | 107 ++++++++++++
 drivers/greybus/cpc/header.c   | 146 +++++++++++++++++
 drivers/greybus/cpc/header.h   |  54 +++++++
 drivers/greybus/cpc/host.c     | 287 +++++++++++++++++++++++++++++++++
 drivers/greybus/cpc/host.h     |  58 +++++++
 drivers/greybus/cpc/protocol.c | 169 +++++++++++++++++++
 12 files changed, 923 insertions(+)
 create mode 100644 drivers/greybus/cpc/Kconfig
 create mode 100644 drivers/greybus/cpc/Makefile
 create mode 100644 drivers/greybus/cpc/cpc.h
 create mode 100644 drivers/greybus/cpc/cport.c
 create mode 100644 drivers/greybus/cpc/header.c
 create mode 100644 drivers/greybus/cpc/header.h
 create mode 100644 drivers/greybus/cpc/host.c
 create mode 100644 drivers/greybus/cpc/host.h
 create mode 100644 drivers/greybus/cpc/protocol.c

-- 
2.49.0


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

end of thread, other threads:[~2025-12-01 15:40 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-14 15:07 [RFC PATCH v2 00/12] greybus: introduce CPC as transport layer Damien Riégel
2025-11-14 15:07 ` [RFC PATCH v2 01/12] greybus: cpc: add minimal CPC Host Device infrastructure Damien Riégel
2025-11-14 16:44   ` Yacin Belmihoub-Martel
2025-11-14 16:51   ` Yacin Belmihoub-Martel
2025-11-14 16:55   ` Yacin Belmihoub-Martel
2025-11-14 15:07 ` [RFC PATCH v2 02/12] greybus: cpc: introduce CPC cport structure Damien Riégel
2025-11-14 15:07 ` [RFC PATCH v2 03/12] greybus: cpc: use socket buffers instead of gb_message in TX path Damien Riégel
2025-11-14 15:07 ` [RFC PATCH v2 04/12] greybus: cpc: pack cport ID in Greybus header Damien Riégel
2025-11-14 15:07 ` [RFC PATCH v2 05/12] greybus: cpc: switch RX path to socket buffers Damien Riégel
2025-11-14 15:07 ` [RFC PATCH v2 06/12] greybus: cpc: introduce CPC header structure Damien Riégel
2025-11-14 15:07 ` [RFC PATCH v2 07/12] greybus: cpc: account for CPC header size in RX and TX path Damien Riégel
2025-11-14 15:07 ` [RFC PATCH v2 08/12] greybus: cpc: add and validate sequence numbers Damien Riégel
2025-11-14 15:07 ` [RFC PATCH v2 09/12] greybus: cpc: acknowledge all incoming messages Damien Riégel
2025-11-14 15:07 ` [RFC PATCH v2 10/12] greybus: cpc: use holding queue instead of sending out immediately Damien Riégel
2025-11-14 19:53   ` Yacin Belmihoub-Martel
2025-11-14 15:07 ` [RFC PATCH v2 11/12] greybus: cpc: honour remote's RX window Damien Riégel
2025-11-14 20:28   ` Yacin Belmihoub-Martel
2025-11-14 15:07 ` [RFC PATCH v2 12/12] greybus: cpc: let host device drivers dequeue TX frames Damien Riégel
2025-11-25 15:26 ` [RFC PATCH v2 00/12] greybus: introduce CPC as transport layer Damien Riégel
2025-11-26 12:33   ` Greg Kroah-Hartman
2025-12-01 15:39     ` Damien Riégel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox