Skip to content

AM65x: Add DMA support

Vignesh R u-boot 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest7 patches 0 repliesNew
  2. v37 patches 0 repliesSuperseded
  3. v27 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v16 patches0 repliesSuperseded

Changes in v4 from the cover letter

Convert debug prints to pr_debug()s
Collect R-bs

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7firmware: ti_sci: Add support for NAVSS resource managementarch/arm/dts/k3-am65-wakeup.dtsi drivers/firmware/ti_sci.c drivers/firmware/ti_sci.h +1 more+1692 -121 reply
2/7soc: ti: k3: add navss ringacc driverdrivers/Kconfig drivers/soc/Kconfig drivers/soc/Makefile +4 more+1326 -01 reply
3/7soc: ti: k3: add CPPI5 description and helpersinclude/linux/soc/ti/cppi5.h+995 -01 reply
4/7dma: ti: add driver to K3 UDMAdrivers/dma/Kconfig drivers/dma/Makefile drivers/dma/ti/Kconfig +5 more+1990 -02 replies
5/7soc: keystone: Merge into ti specific directoryarch/arm/mach-keystone/Kconfig drivers/soc/Makefile drivers/soc/keystone/Makefile +5 more+16 -111 reply
6/7arm64: dts: ti: k3-am65: add mcu navss nodesarch/arm/dts/k3-am654-base-board-u-boot.dtsi+47 -01 reply
7/7configs: am65x_evm_a53: Enable DMA related configsconfigs/am65x_evm_a53_defconfig+3 -11 reply

Reviews trailers per patch

5 of 7 patches have a Reviewed-by or Acked-by.

PatchTom Rini
1/7R-b
2/7
3/7R-b
4/7
5/7R-b
6/7R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [U-Boot] [PATCH v4 0/7] AM65x: Add DMA support

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

v4:
Convert debug prints to pr_debug()s
Collect R-bs

v3:
Minor comment/whitespace cleanups as pointed out by Tom Rini

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  |   47 +
 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                      | 1730 +++++++++++++++++
 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             | 1057 ++++++++++
 .../soc/{keystone => ti}/keystone_serdes.c    |    0
 include/configs/ti_armv7_keystone2.h          |    3 -
 include/dt-bindings/dma/k3-udma.h             |   31 +
 include/linux/soc/ti/cppi5.h                  |  995 ++++++++++
 include/linux/soc/ti/k3-navss-ringacc.h       |  236 +++
 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, 6066 insertions(+), 21 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
Signature · 1 line
2.20.1