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

Vignesh R vigneshr at ti.com
Fri Jan 25 14:18:37 UTC 2019


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

v2:
Align DT bindings with latest proposed bindings as pointed out by Peter.
Merge drivers/soc/keystone into drivers/soc/ti

Background:

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/

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 (2):
  dma: ti: add driver to K3 UDMA
  soc: keystone: Merge into ti specific directory

 arch/arm/dts/k3-am65-wakeup.dtsi              |    2 +-
 arch/arm/dts/k3-am654-base-board-u-boot.dtsi  |   46 +
 arch/arm/mach-keystone/Kconfig                |    8 +
 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                      | 1737 +++++++++++++++++
 drivers/firmware/ti_sci.c                     |  760 +++++++-
 drivers/firmware/ti_sci.h                     |  642 ++++++
 drivers/soc/Kconfig                           |    5 +
 drivers/soc/Makefile                          |    2 +-
 drivers/soc/keystone/Makefile                 |    3 -
 drivers/soc/ti/Kconfig                        |   26 +
 drivers/soc/ti/Makefile                       |    4 +
 drivers/soc/ti/k3-navss-ringacc.c             | 1096 +++++++++++
 .../soc/{keystone => ti}/keystone_serdes.c    |    0
 include/configs/ti_armv7_keystone2.h          |    1 -
 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        |  300 +++
 scripts/config_whitelist.txt                  |    1 -
 27 files changed, 6121 insertions(+), 19 deletions(-)
 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
 delete mode 100644 drivers/soc/keystone/Makefile
 create mode 100644 drivers/soc/ti/Kconfig
 create mode 100644 drivers/soc/ti/Makefile
 create mode 100644 drivers/soc/ti/k3-navss-ringacc.c
 rename drivers/soc/{keystone => ti}/keystone_serdes.c (100%)
 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