imx.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/9] I3C Slave Mode support
@ 2023-09-05 21:38 Frank Li
  2023-09-05 21:38 ` [RFC PATCH 1/9] i3c: add actual in i3c_priv_xfer Frank Li
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Frank Li @ 2023-09-05 21:38 UTC (permalink / raw)
  To: miquel.raynal
  Cc: Frank.Li, alexandre.belloni, conor.culhane, imx, linux-i3c,
	linux-kernel

This RFC patch introduces support for I3C slave mode, which is referenced
with a PCIe Endpoint system. It also establishes a configuration framework
(configfs) for the I3C slave controller driver and the I3C slave function
driver

Typic usage as

The user can configure the i3c-slave-tty device using configfs entry. In
order to change the vendorid, the following commands can be used

        # echo 0x011b > functions/tty/func1/vendor_id
        # echo 0x1000 > functions/tty/func1/part_id
        # echo 0x6 > functions/tty/t/bcr

Binding i3c-slave-tty Device to slave Controller
------------------------------------------------

In order for the slave function device to be useful, it has to be bound to
a I3C slave controller driver. Use the configfs to bind the function
device to one of the controller driver present in the system::

        # ln -s functions/pci_epf_test/func1 controllers/44330000.i3c-slave/

Host side:
        cat /dev/ttyI3C0
Slave side:
        echo abc >/dev/ttyI3C0

These patches have not full implemented, especially at tty driver side.

But it does not impact to review i3c slave part, especially data transfer
and configfs.

Frank Li (9):
  i3c: add actual in i3c_priv_xfer
  i3c: svc: rename read_len as actual_len
  i3c: master: svc return actual transfer data len
  dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-slave-v1
  i3c: add slave mode support
  i3c: slave: add svc slave controller support
  i3c: slave: func: add tty driver
  tty: serial: add tty over I3C master side driver
  Documentation: i3c: Add I3C slave mode controller and function

 .../bindings/i3c/silvaco,i3c-master.yaml      |   7 +-
 Documentation/driver-api/i3c/index.rst        |   1 +
 .../driver-api/i3c/slave/i3c-slave-cfs.rst    | 109 ++++
 .../driver-api/i3c/slave/i3c-slave.rst        | 189 ++++++
 .../driver-api/i3c/slave/i3c-tty-function.rst | 103 +++
 .../driver-api/i3c/slave/i3c-tty-howto.rst    | 109 ++++
 Documentation/driver-api/i3c/slave/index.rst  |  13 +
 drivers/i3c/Kconfig                           |  30 +
 drivers/i3c/Makefile                          |   4 +
 drivers/i3c/func/Kconfig                      |   9 +
 drivers/i3c/func/Makefile                     |   3 +
 drivers/i3c/func/tty.c                        | 345 ++++++++++
 drivers/i3c/i3c-cfs.c                         | 361 +++++++++++
 drivers/i3c/master/svc-i3c-master.c           |  52 +-
 drivers/i3c/slave.c                           | 441 +++++++++++++
 drivers/i3c/slave/Kconfig                     |   9 +
 drivers/i3c/slave/Makefile                    |   4 +
 drivers/i3c/slave/svc-i3c-slave.c             | 600 ++++++++++++++++++
 drivers/tty/serial/Kconfig                    |   6 +
 drivers/tty/serial/Makefile                   |   1 +
 drivers/tty/serial/ttyi3c.c                   | 276 ++++++++
 include/linux/i3c/device.h                    |   1 +
 include/linux/i3c/slave.h                     | 458 +++++++++++++
 23 files changed, 3109 insertions(+), 22 deletions(-)
 create mode 100644 Documentation/driver-api/i3c/slave/i3c-slave-cfs.rst
 create mode 100644 Documentation/driver-api/i3c/slave/i3c-slave.rst
 create mode 100644 Documentation/driver-api/i3c/slave/i3c-tty-function.rst
 create mode 100644 Documentation/driver-api/i3c/slave/i3c-tty-howto.rst
 create mode 100644 Documentation/driver-api/i3c/slave/index.rst
 create mode 100644 drivers/i3c/func/Kconfig
 create mode 100644 drivers/i3c/func/Makefile
 create mode 100644 drivers/i3c/func/tty.c
 create mode 100644 drivers/i3c/i3c-cfs.c
 create mode 100644 drivers/i3c/slave.c
 create mode 100644 drivers/i3c/slave/Kconfig
 create mode 100644 drivers/i3c/slave/Makefile
 create mode 100644 drivers/i3c/slave/svc-i3c-slave.c
 create mode 100644 drivers/tty/serial/ttyi3c.c
 create mode 100644 include/linux/i3c/slave.h

-- 
2.34.1


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

end of thread, other threads:[~2023-09-13 15:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-05 21:38 [RFC PATCH 0/9] I3C Slave Mode support Frank Li
2023-09-05 21:38 ` [RFC PATCH 1/9] i3c: add actual in i3c_priv_xfer Frank Li
2023-09-05 21:38 ` [RFC PATCH 2/9] i3c: svc: rename read_len as actual_len Frank Li
2023-09-05 21:38 ` [RFC PATCH 3/9] i3c: master: svc return actual transfer data len Frank Li
2023-09-05 21:38 ` [RFC PATCH 4/9] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-slave-v1 Frank Li
2023-09-06  8:01   ` Krzysztof Kozlowski
2023-09-07 14:28     ` Frank Li
2023-09-13 15:49       ` Krzysztof Kozlowski
2023-09-05 21:38 ` [RFC PATCH 5/9] i3c: add slave mode support Frank Li
2023-09-11 11:14   ` Joshua Yeong
2023-09-11 22:17     ` Frank Li
2023-09-05 21:38 ` [RFC PATCH 6/9] i3c: slave: add svc slave controller support Frank Li
2023-09-05 21:38 ` [RFC PATCH 7/9] i3c: slave: func: add tty driver Frank Li
2023-09-05 21:38 ` [RFC PATCH 8/9] tty: serial: add tty over I3C master side driver Frank Li
2023-09-06  8:02   ` Krzysztof Kozlowski
2023-09-05 21:38 ` [RFC PATCH 9/9] Documentation: i3c: Add I3C slave mode controller and function Frank Li

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).