linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/14] Add support for TI PRU ICSS
@ 2019-02-04 14:22 Roger Quadros
  2019-02-04 14:22 ` [PATCH v2 01/14] dt-bindings: remoteproc: Add TI PRUSS bindings Roger Quadros
                   ` (13 more replies)
  0 siblings, 14 replies; 61+ messages in thread
From: Roger Quadros @ 2019-02-04 14:22 UTC (permalink / raw)
  To: tony, ohad, bjorn.andersson
  Cc: s-anna, david, nsekhar, t-kristo, nsaulnier, jreeder,
	m-karicheri2, woods.technical, linux-omap, linux-remoteproc,
	linux-kernel, devicetree, rogerq

Hi,

The Programmable Real-Time Unit and Industrial Communication Subsystem
(PRU-ICSS) is present on various TI SoCs such as AM335x, AM437x, AM57x,
Keystone 66AK2G, etc. A PRUSS consists of dual 32-bit RISC cores (Programmable
Real-Time Units, or PRUs), with instruction and data memories.

The programmable nature of the PRUs provide flexibility to implement
custom peripheral interfaces, fast real-time responses, or
specialized data handling. The common peripheral modules include
the following,
  - Enhanced GPIO with async capture and serial support
  - an Ethernet MII_RT module with two MII ports
  - an MDIO port to control external Ethernet PHYs
  - an Industrial Ethernet Peripheral (IEP) to manage/generate Industrial
    Ethernet functions
  - an Enhanced Capture Module (eCAP)
  - a 16550-compatible UART to support PROFIBUS
  - Interrupt controller with 64 input events and 10 Host interrupts.

A typical usage scenario would be to load the application firmware into
one or more of the PRU cores, initialize one or more of the peripherals
and perform I/O through shared RAM (or MSMC RAM) from either a Kernel driver
or directly from userspace.

With this series we should be able to use the kernel RPMSG driver along with
firmware and user-space examples in the pru-software-support-package [1].

We will also be able to get Dual Ethernet functionality using a kernel driver
which will be posted later.

This series contains
1) soc: pruss: This is the parent driver for the entire ICSS. Its main
purpose is to populate the different modules and manage memories.
(i.e. DRAM0, DRAM1 and SharedRAM) It will also kernel APIs to
manage the common CFG module.

2) irqchip: pruss-intc: This driver supports the INTC module on the ICSS.

3) remoteproc: pru: This provides a remoteproc interface for the PRU cores.
With this we can load firmware, start/stop PRU from kernel or userspace.
It adds support for virtio RPMSG. It also provides some kernel APIs
(e.g. pru_rproc_set_ctable()) that are PRU specific and required for
in-kernel applications (e.g. ethernet)

4) rpmsg: pru: An RPMsg driver that exposes interfaces to user space, to
allow applications to communicate with the PRU processors.

Platform data and device tree files for AM33xx and other SoCs
will be sent as a separate series.

Testing:
All kernel patches along with AM335x (beaglebone) and AM57xx (IDK) platform
support are at [3]

To test the code with example firmware you can try the LAB5 tutorial
http://processors.wiki.ti.com/index.php/PRU_Training:_Hands-on_Labs#LAB_5:_RPMsg_Communication_between_ARM_and_PRU
with the pru-software-support package at [2] and the sample rpmsg-client driver.
NOTE: you no longer need to build and run PRU_Halt example as shown in the tutorial.

[1] https://git.ti.com/pru-software-support-package
	NOTE: The repo needs update to the INTC resource data structures
	The updates that are required are listed in the below repo with one example fixed.
[2] https://github.com/rogerq/pru-software-support-package/commits/upstream/pruss

[3] https://github.com/rogerq/linux/commits/for-v5.1/pruss-2.0

Changelog:
v2:
- use IS_ERR() instead of IS_ERR_OR_NULL().
- sqashed related patches to reduce patch count.
- fixed build error at patch 11 "soc: ti: pruss: add pruss_get()/put() API".
- incorporated rproc_da_to_va patches from David Lechner.
- got rid of enum pruss_pru_id.
- got rid of pre & post loaders in device specific resource handler.
- get/set gpmux operation is now private to pru_rproc.c
- changed pruss_cfg_gpimode() to pru_rproc_set_gpimode(struct rproc *rproc, enum pruss_gpi_mode mode).
- moved pruss_intc.c to driver/irqchip/irq-pruss-intc.c. INTC APIs moved to include/irqchip/irq-pruss-intc.h.
  Decoupled struct pruss from INTC code. Any device who's interrupt-parent is pruss-intc can call the INTC APIs.
- removed device_name from pruss_private_data. use dt property for .has_no_sharedram.
- moved DRAM0, DRAM1 and SHARED_RAM memories into PRUSS node.

cheers,
-roger

Andrew F. Davis (2):
  dt-binding: irqchip: Add pruss-intc-irq driver for PRUSS interrupts
  irqchip: pruss: Add a PRUSS irqchip driver for PRUSS interrupts

David Lechner (2):
  remoteproc: add map parameter to da_to_va
  remoteproc: add page lookup for TI PRU to ELF loader

Jason Reeder (1):
  rpmsg: pru: add a PRU RPMsg driver

Roger Quadros (1):
  remoteproc/pru: Add pru_rproc_set_ctable() and pru_rproc_set_gpimode()

Suman Anna (8):
  dt-bindings: remoteproc: Add TI PRUSS bindings
  soc: ti: pruss: Add a platform driver for PRUSS in TI SoCs
  remoteproc: Add a rproc_set_firmware() API
  remoteproc: Add support to handle device specific resource types
  dt-binding: remoteproc: Add binding doc for PRU Cores in the PRU-ICSS
  remoteproc/pru: Add PRU remoteproc driver
  remoteproc/pru: Add support for virtio rpmsg stack
  rpmsg: virtio_rpmsg_bus: move back rpmsg_hdr into a public header

 .../interrupt-controller/ti,pruss-intc-irq.txt     |   51 +
 .../bindings/remoteproc/ti,pru-rproc.txt           |   56 +
 .../devicetree/bindings/soc/ti/ti,pruss.txt        |  212 ++++
 drivers/irqchip/Makefile                           |    1 +
 drivers/irqchip/irq-pruss-intc.c                   |  630 +++++++++++
 drivers/remoteproc/Kconfig                         |   16 +
 drivers/remoteproc/Makefile                        |    1 +
 drivers/remoteproc/imx_rproc.c                     |    2 +-
 drivers/remoteproc/keystone_remoteproc.c           |    3 +-
 drivers/remoteproc/pru_rproc.c                     | 1141 ++++++++++++++++++++
 drivers/remoteproc/pru_rproc.h                     |   54 +
 drivers/remoteproc/qcom_q6v5_mss.c                 |    2 +-
 drivers/remoteproc/qcom_wcnss.c                    |    2 +-
 drivers/remoteproc/remoteproc_core.c               |  108 +-
 drivers/remoteproc/remoteproc_debugfs.c            |    3 +
 drivers/remoteproc/remoteproc_elf_loader.c         |  117 +-
 drivers/remoteproc/remoteproc_internal.h           |    2 +-
 drivers/remoteproc/remoteproc_sysfs.c              |   33 +-
 drivers/remoteproc/st_slim_rproc.c                 |    2 +-
 drivers/remoteproc/wkup_m3_rproc.c                 |    3 +-
 drivers/rpmsg/Kconfig                              |   14 +
 drivers/rpmsg/Makefile                             |    1 +
 drivers/rpmsg/rpmsg_pru.c                          |  360 ++++++
 drivers/rpmsg/virtio_rpmsg_bus.c                   |   21 +-
 drivers/soc/ti/Kconfig                             |   12 +
 drivers/soc/ti/Makefile                            |    1 +
 drivers/soc/ti/pruss.c                             |  347 ++++++
 include/linux/irqchip/irq-pruss-intc.h             |   94 ++
 include/linux/pruss.h                              |  211 ++++
 include/linux/remoteproc.h                         |   20 +-
 include/linux/remoteproc/pru_rproc.h               |   57 +
 include/linux/rpmsg/virtio_rpmsg.h                 |   26 +
 include/uapi/linux/elf-em.h                        |    1 +
 33 files changed, 3533 insertions(+), 71 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/ti,pruss-intc-irq.txt
 create mode 100644 Documentation/devicetree/bindings/remoteproc/ti,pru-rproc.txt
 create mode 100644 Documentation/devicetree/bindings/soc/ti/ti,pruss.txt
 create mode 100644 drivers/irqchip/irq-pruss-intc.c
 create mode 100644 drivers/remoteproc/pru_rproc.c
 create mode 100644 drivers/remoteproc/pru_rproc.h
 create mode 100644 drivers/rpmsg/rpmsg_pru.c
 create mode 100644 drivers/soc/ti/pruss.c
 create mode 100644 include/linux/irqchip/irq-pruss-intc.h
 create mode 100644 include/linux/pruss.h
 create mode 100644 include/linux/remoteproc/pru_rproc.h
 create mode 100644 include/linux/rpmsg/virtio_rpmsg.h

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


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

end of thread, other threads:[~2019-02-20  9:51 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-04 14:22 [PATCH v2 00/14] Add support for TI PRU ICSS Roger Quadros
2019-02-04 14:22 ` [PATCH v2 01/14] dt-bindings: remoteproc: Add TI PRUSS bindings Roger Quadros
2019-02-04 16:33   ` Tony Lindgren
2019-02-05  9:39     ` Roger Quadros
2019-02-05 15:08       ` Murali Karicheri
2019-02-05 15:41         ` Roger Quadros
2019-02-05 16:15           ` Murali Karicheri
2019-02-05 16:19             ` Tony Lindgren
2019-02-06 15:04               ` Roger Quadros
2019-02-14  2:47                 ` Suman Anna
2019-02-05 16:41       ` Tony Lindgren
2019-02-14  3:01         ` Suman Anna
2019-02-08 13:51   ` Linus Walleij
2019-02-14  3:12     ` Suman Anna
2019-02-14  8:37       ` Linus Walleij
2019-02-14 10:55         ` Roger Quadros
     [not found]           ` <86ef8asfap.wl-marc.zyngier@arm.com>
2019-02-14 15:44             ` Roger Quadros
2019-02-14 15:48               ` Roger Quadros
2019-02-15  0:59                 ` Suman Anna
2019-02-20  9:51                   ` Linus Walleij
2019-02-14 15:51               ` Marc Zyngier
2019-02-14 16:50                 ` Roger Quadros
2019-02-14  2:52   ` Suman Anna
2019-02-14 11:08     ` Roger Quadros
2019-02-14 15:56       ` Tony Lindgren
2019-02-15  1:22         ` Suman Anna
2019-02-15  1:08       ` Suman Anna
2019-02-15 13:43       ` Matthijs van Duin
2019-02-04 14:22 ` [PATCH v2 02/14] soc: ti: pruss: Add a platform driver for PRUSS in TI SoCs Roger Quadros
2019-02-04 14:52   ` Andrew F. Davis
2019-02-04 15:32     ` Roger Quadros
2019-02-04 16:35     ` Tony Lindgren
2019-02-04 14:22 ` [PATCH v2 03/14] dt-binding: irqchip: Add pruss-intc-irq driver for PRUSS interrupts Roger Quadros
2019-02-04 16:36   ` Tony Lindgren
2019-02-14  2:40   ` Suman Anna
2019-02-18 19:32   ` Rob Herring
2019-02-04 14:22 ` [PATCH v2 04/14] irqchip: pruss: Add a PRUSS irqchip " Roger Quadros
2019-02-04 15:11   ` Andrew F. Davis
2019-02-04 15:33     ` Roger Quadros
2019-02-05  8:51       ` Roger Quadros
2019-02-14  2:15         ` Suman Anna
2019-02-04 18:15   ` Tony Lindgren
2019-02-05 10:35     ` Roger Quadros
2019-02-05 11:04       ` Marc Zyngier
2019-02-14  2:16         ` Suman Anna
2019-02-04 14:22 ` [PATCH v2 05/14] remoteproc: add map parameter to da_to_va Roger Quadros
2019-02-04 14:22 ` [PATCH v2 06/14] remoteproc: add page lookup for TI PRU to ELF loader Roger Quadros
2019-02-04 15:19   ` Andrew F. Davis
2019-02-14  2:22     ` Suman Anna
2019-02-04 14:22 ` [PATCH v2 07/14] remoteproc: Add a rproc_set_firmware() API Roger Quadros
2019-02-04 14:22 ` [PATCH v2 08/14] remoteproc: Add support to handle device specific resource types Roger Quadros
2019-02-04 14:22 ` [PATCH v2 09/14] dt-binding: remoteproc: Add binding doc for PRU Cores in the PRU-ICSS Roger Quadros
2019-02-18 19:36   ` Rob Herring
2019-02-04 14:22 ` [PATCH v2 10/14] remoteproc/pru: Add PRU remoteproc driver Roger Quadros
2019-02-14  2:35   ` Suman Anna
2019-02-14  3:44     ` Suman Anna
2019-02-04 14:22 ` [PATCH v2 11/14] remoteproc/pru: Add pru_rproc_set_ctable() and pru_rproc_set_gpimode() Roger Quadros
2019-02-04 14:22 ` [PATCH v2 12/14] remoteproc/pru: Add support for virtio rpmsg stack Roger Quadros
2019-02-04 14:22 ` [PATCH v2 13/14] rpmsg: virtio_rpmsg_bus: move back rpmsg_hdr into a public header Roger Quadros
2019-02-04 14:22 ` [PATCH v2 14/14] rpmsg: pru: add a PRU RPMsg driver Roger Quadros
2019-02-04 15:26   ` Andrew F. Davis

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