[U-Boot] [PATCH 0/6] AM65x: Add DMA support

Vignesh R vigneshr at ti.com
Tue Jan 22 15:03:53 UTC 2019


This series adds DMA support for TI's AM654 SoC.

The AM65x TRM (http://www.ti.com/lit/pdf/spruid7b) describes the Data Movement
Architecture which is implmented by the k3-udma driver.

This DMA architecture is a big departure from 'traditional' architecture where
we had either EDMA or sDMA as system DMA.

Packet DMAs were used as dedicated DMAs to service only networking (K2)
or USB (am335x) while other peripherals were serviced by EDMA.

In AM65x the UDMA (Unified DMA) is used for all data movment within the SoC,
tasked to service all peripherals (UART, McSPI, McASP, networking, etc).

The NAVSS/UDMA is built around CPPI5 (Communications Port Programming Interface)
and it supports Packet mode (similar to CPPI4.1 in K2 for networking) and
TR mode (similar to EDMA descriptor).
The data movement is done within a PSI-L fabric, all peripherals (including the
UDMA-P). peripherals are not addressed by their I/O register as with traditional
DMAs but with their PSI-L thread ID.

To be able to use the DMA the following generic steps need to be taken:
- configure a DMA channel (tchan for TX, rchan for RX)
 - channel mode: Packet or TR mode
 - for memcpy a tchan and rchan pair is used.
 - for packet mode RX we also need to configure a receive flow to configure the
   packet receiption
- the source and destination threads must be paired
- at minimum one pair of rings need to be configured:
 - tx: transfer ring and transfer completion ring
 - rx: free descriptor ring and receive ring

When the channel setup is completed we only interract with the rings:
- TX: push a descriptor to t_ring and wait for it to be pushed to the tc_ring by
  the UDMA-P
- RX: push a descriptor to the fd_ring and wait for UDMA-P to push it back to
  the r_ring.

Resources Management and configuration of channel and ring is handled by
sending TI-SCI msgs to remote core.

Patches are based on kernel patches here:
https://patchwork.kernel.org/cover/10612465/

*** BLURB HERE ***

Grygorii Strashko (5):
  firmware: ti_sci: Add support for NAVSS resource management
  soc: ti: k3: add navss ringacc driver
  soc: ti: k3: add CPPI5 description and helpers
  arm64: dts: ti: k3-am65: add mcu navss nodes
  configs: am65x_evm_a53: Enable DMA related configs

Vignesh R (1):
  dma: ti: add driver to K3 UDMA

 arch/arm/dts/k3-am654-base-board-u-boot.dtsi |   49 +
 configs/am65x_evm_a53_defconfig              |    4 +-
 drivers/Kconfig                              |    2 +
 drivers/dma/Kconfig                          |    2 +
 drivers/dma/Makefile                         |    2 +
 drivers/dma/ti/Kconfig                       |   14 +
 drivers/dma/ti/Makefile                      |    3 +
 drivers/dma/ti/k3-udma-hwdef.h               |  184 ++
 drivers/dma/ti/k3-udma.c                     | 1749 ++++++++++++++++++
 drivers/firmware/ti_sci.c                    |  424 +++++
 drivers/firmware/ti_sci.h                    |  600 ++++++
 drivers/soc/Kconfig                          |    5 +
 drivers/soc/Makefile                         |    1 +
 drivers/soc/ti/Kconfig                       |   20 +
 drivers/soc/ti/Makefile                      |    5 +
 drivers/soc/ti/k3-navss-ringacc.c            | 1109 +++++++++++
 include/dt-bindings/dma/k3-udma.h            |   31 +
 include/linux/soc/ti/cppi5.h                 |  995 ++++++++++
 include/linux/soc/ti/k3-navss-ringacc.h      |  246 +++
 include/linux/soc/ti/ti-udma.h               |   24 +
 include/linux/soc/ti/ti_sci_protocol.h       |  228 +++
 21 files changed, 5696 insertions(+), 1 deletion(-)
 create mode 100644 drivers/dma/ti/Kconfig
 create mode 100644 drivers/dma/ti/Makefile
 create mode 100644 drivers/dma/ti/k3-udma-hwdef.h
 create mode 100644 drivers/dma/ti/k3-udma.c
 create mode 100644 drivers/soc/Kconfig
 create mode 100644 drivers/soc/ti/Kconfig
 create mode 100644 drivers/soc/ti/Makefile
 create mode 100644 drivers/soc/ti/k3-navss-ringacc.c
 create mode 100644 include/dt-bindings/dma/k3-udma.h
 create mode 100644 include/linux/soc/ti/cppi5.h
 create mode 100644 include/linux/soc/ti/k3-navss-ringacc.h
 create mode 100644 include/linux/soc/ti/ti-udma.h

-- 
2.20.1



More information about the U-Boot mailing list