mbox series

[RFC,00/14] Intel IPU6 and IPU6 input system drivers

Message ID 20230413100429.919622-1-bingbu.cao@intel.com (mailing list archive)
Headers show
Series Intel IPU6 and IPU6 input system drivers | expand

Message

Bingbu Cao April 13, 2023, 10:04 a.m. UTC
From: Bingbu Cao <bingbu.cao@intel.com>

This patch series adds a driver for Intel IPU6 input system.
IPU6 is the sixth generation of Imaging Processing Unit, it is a PCI
device which can be found in some Intel Client Platforms. User can use
IPU6 to capture images from MIPI camera sensors.

IPU6 has its own firmware which exposes ABIs to driver, and communicates
with CSE to do firmware authentication. IPU6 has its MMU hardware, so
the driver sets up a page table to allow IPU6 DMA to access the system
memory.

IPU6 input system driver uses MC and V4L2 sub-device APIs besides V4L2.
---
TODOs:
  - Add support for multiplexed streams
  - Add firmware CSI2 lanes configuration verification and documentation

---

Bingbu Cao (13):
  media: intel/ipu6: add Intel IPU6 PCI device driver
  media: intel/ipu6: add IPU virtual bus driver
  media: intel/ipu6: add IPU6 buttress interface driver
  media: intel/ipu6: CPD parsing for get firmware components
  media: intel/ipu6: add IPU6 DMA mapping API and MMU table
  media: intel/ipu6: add syscom interfaces between firmware and driver
  media: intel/ipu6: input system ABI between firmware and driver
  media: intel/ipu6: add IPU6 CSI2 receiver v4l2 sub-device
  media: intel/ipu6: add the CSI2 DPHY implementation
  media: intel/ipu6: add input system driver
  media: intel/ipu6: input system video capture nodes
  media: add Kconfig and Makefile for IPU6
  MAINTAINERS: add maintainers for Intel IPU6 input system driver

 MAINTAINERS                                   |   10 +
 drivers/media/pci/Kconfig                     |    1 +
 drivers/media/pci/intel/Makefile              |    3 +-
 drivers/media/pci/intel/ipu6/Kconfig          |   15 +
 drivers/media/pci/intel/ipu6/Makefile         |   23 +
 drivers/media/pci/intel/ipu6/ipu6-bus.c       |  263 ++++
 drivers/media/pci/intel/ipu6/ipu6-bus.h       |   69 +
 drivers/media/pci/intel/ipu6/ipu6-buttress.c  |  916 ++++++++++++
 drivers/media/pci/intel/ipu6/ipu6-buttress.h  |  109 ++
 drivers/media/pci/intel/ipu6/ipu6-cpd.c       |  359 +++++
 drivers/media/pci/intel/ipu6/ipu6-cpd.h       |  107 ++
 drivers/media/pci/intel/ipu6/ipu6-dma.c       |  497 ++++++
 drivers/media/pci/intel/ipu6/ipu6-dma.h       |   19 +
 drivers/media/pci/intel/ipu6/ipu6-fw-com.c    |  417 ++++++
 drivers/media/pci/intel/ipu6/ipu6-fw-com.h    |   47 +
 drivers/media/pci/intel/ipu6/ipu6-fw-isys.c   |  566 +++++++
 drivers/media/pci/intel/ipu6/ipu6-fw-isys.h   |  574 +++++++
 drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c |  575 +++++++
 drivers/media/pci/intel/ipu6/ipu6-isys-csi2.h |   75 +
 .../media/pci/intel/ipu6/ipu6-isys-dwc-phy.c  |  549 +++++++
 .../media/pci/intel/ipu6/ipu6-isys-jsl-phy.c  |  245 +++
 .../media/pci/intel/ipu6/ipu6-isys-mcd-phy.c  |  735 +++++++++
 drivers/media/pci/intel/ipu6/ipu6-isys-phy.h  |   24 +
 .../media/pci/intel/ipu6/ipu6-isys-queue.c    |  869 +++++++++++
 .../media/pci/intel/ipu6/ipu6-isys-queue.h    |   97 ++
 .../media/pci/intel/ipu6/ipu6-isys-subdev.c   |  309 ++++
 .../media/pci/intel/ipu6/ipu6-isys-subdev.h   |   70 +
 .../media/pci/intel/ipu6/ipu6-isys-video.c    | 1132 ++++++++++++++
 .../media/pci/intel/ipu6/ipu6-isys-video.h    |  120 ++
 drivers/media/pci/intel/ipu6/ipu6-isys.c      | 1326 +++++++++++++++++
 drivers/media/pci/intel/ipu6/ipu6-isys.h      |  190 +++
 drivers/media/pci/intel/ipu6/ipu6-mmu.c       |  833 +++++++++++
 drivers/media/pci/intel/ipu6/ipu6-mmu.h       |   65 +
 .../intel/ipu6/ipu6-platform-buttress-regs.h  |  231 +++
 .../intel/ipu6/ipu6-platform-isys-csi2-reg.h  |  187 +++
 .../media/pci/intel/ipu6/ipu6-platform-regs.h |  177 +++
 drivers/media/pci/intel/ipu6/ipu6-platform.h  |   31 +
 drivers/media/pci/intel/ipu6/ipu6.c           |  969 ++++++++++++
 drivers/media/pci/intel/ipu6/ipu6.h           |  344 +++++
 39 files changed, 13147 insertions(+), 1 deletion(-)
 create mode 100644 drivers/media/pci/intel/ipu6/Kconfig
 create mode 100644 drivers/media/pci/intel/ipu6/Makefile
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-bus.c
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-bus.h
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-buttress.c
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-buttress.h
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-cpd.c
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-cpd.h
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-dma.c
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-dma.h
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-fw-com.c
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-fw-com.h
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-fw-isys.c
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-fw-isys.h
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-csi2.h
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-dwc-phy.c
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-jsl-phy.c
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-mcd-phy.c
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-phy.h
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-queue.c
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-queue.h
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-subdev.h
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-video.c
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-video.h
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys.c
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys.h
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-mmu.c
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-mmu.h
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-platform-buttress-regs.h
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-platform-isys-csi2-reg.h
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-platform-regs.h
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6-platform.h
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6.c
 create mode 100644 drivers/media/pci/intel/ipu6/ipu6.h

Comments

Laurent Pinchart April 20, 2023, 3:50 p.m. UTC | #1
Hi Bingbu,

Thank you for the patches.

On Thu, Apr 13, 2023 at 06:04:15PM +0800, bingbu.cao@intel.com wrote:
> From: Bingbu Cao <bingbu.cao@intel.com>
> 
> This patch series adds a driver for Intel IPU6 input system.
> IPU6 is the sixth generation of Imaging Processing Unit, it is a PCI
> device which can be found in some Intel Client Platforms. User can use
> IPU6 to capture images from MIPI camera sensors.
> 
> IPU6 has its own firmware which exposes ABIs to driver, and communicates
> with CSE to do firmware authentication. IPU6 has its MMU hardware, so
> the driver sets up a page table to allow IPU6 DMA to access the system
> memory.
> 
> IPU6 input system driver uses MC and V4L2 sub-device APIs besides V4L2.

I had a look through the series, and it's a bit difficult to understand
how the different pieces interact with each other. Would it be possible
to provide some high-level documentation for the driver design, as well
as a high-level view of the hardware (and firmware) components ? It
would help the review process. Documentation/driver-api/media/drivers/
would be a good location for that.

> ---
> TODOs:
>   - Add support for multiplexed streams
>   - Add firmware CSI2 lanes configuration verification and documentation
> 
> ---
> 
> Bingbu Cao (13):
>   media: intel/ipu6: add Intel IPU6 PCI device driver
>   media: intel/ipu6: add IPU virtual bus driver
>   media: intel/ipu6: add IPU6 buttress interface driver
>   media: intel/ipu6: CPD parsing for get firmware components
>   media: intel/ipu6: add IPU6 DMA mapping API and MMU table
>   media: intel/ipu6: add syscom interfaces between firmware and driver
>   media: intel/ipu6: input system ABI between firmware and driver
>   media: intel/ipu6: add IPU6 CSI2 receiver v4l2 sub-device
>   media: intel/ipu6: add the CSI2 DPHY implementation
>   media: intel/ipu6: add input system driver
>   media: intel/ipu6: input system video capture nodes
>   media: add Kconfig and Makefile for IPU6
>   MAINTAINERS: add maintainers for Intel IPU6 input system driver
> 
>  MAINTAINERS                                   |   10 +
>  drivers/media/pci/Kconfig                     |    1 +
>  drivers/media/pci/intel/Makefile              |    3 +-
>  drivers/media/pci/intel/ipu6/Kconfig          |   15 +
>  drivers/media/pci/intel/ipu6/Makefile         |   23 +
>  drivers/media/pci/intel/ipu6/ipu6-bus.c       |  263 ++++
>  drivers/media/pci/intel/ipu6/ipu6-bus.h       |   69 +
>  drivers/media/pci/intel/ipu6/ipu6-buttress.c  |  916 ++++++++++++
>  drivers/media/pci/intel/ipu6/ipu6-buttress.h  |  109 ++
>  drivers/media/pci/intel/ipu6/ipu6-cpd.c       |  359 +++++
>  drivers/media/pci/intel/ipu6/ipu6-cpd.h       |  107 ++
>  drivers/media/pci/intel/ipu6/ipu6-dma.c       |  497 ++++++
>  drivers/media/pci/intel/ipu6/ipu6-dma.h       |   19 +
>  drivers/media/pci/intel/ipu6/ipu6-fw-com.c    |  417 ++++++
>  drivers/media/pci/intel/ipu6/ipu6-fw-com.h    |   47 +
>  drivers/media/pci/intel/ipu6/ipu6-fw-isys.c   |  566 +++++++
>  drivers/media/pci/intel/ipu6/ipu6-fw-isys.h   |  574 +++++++
>  drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c |  575 +++++++
>  drivers/media/pci/intel/ipu6/ipu6-isys-csi2.h |   75 +
>  .../media/pci/intel/ipu6/ipu6-isys-dwc-phy.c  |  549 +++++++
>  .../media/pci/intel/ipu6/ipu6-isys-jsl-phy.c  |  245 +++
>  .../media/pci/intel/ipu6/ipu6-isys-mcd-phy.c  |  735 +++++++++
>  drivers/media/pci/intel/ipu6/ipu6-isys-phy.h  |   24 +
>  .../media/pci/intel/ipu6/ipu6-isys-queue.c    |  869 +++++++++++
>  .../media/pci/intel/ipu6/ipu6-isys-queue.h    |   97 ++
>  .../media/pci/intel/ipu6/ipu6-isys-subdev.c   |  309 ++++
>  .../media/pci/intel/ipu6/ipu6-isys-subdev.h   |   70 +
>  .../media/pci/intel/ipu6/ipu6-isys-video.c    | 1132 ++++++++++++++
>  .../media/pci/intel/ipu6/ipu6-isys-video.h    |  120 ++
>  drivers/media/pci/intel/ipu6/ipu6-isys.c      | 1326 +++++++++++++++++
>  drivers/media/pci/intel/ipu6/ipu6-isys.h      |  190 +++
>  drivers/media/pci/intel/ipu6/ipu6-mmu.c       |  833 +++++++++++
>  drivers/media/pci/intel/ipu6/ipu6-mmu.h       |   65 +
>  .../intel/ipu6/ipu6-platform-buttress-regs.h  |  231 +++
>  .../intel/ipu6/ipu6-platform-isys-csi2-reg.h  |  187 +++
>  .../media/pci/intel/ipu6/ipu6-platform-regs.h |  177 +++
>  drivers/media/pci/intel/ipu6/ipu6-platform.h  |   31 +
>  drivers/media/pci/intel/ipu6/ipu6.c           |  969 ++++++++++++
>  drivers/media/pci/intel/ipu6/ipu6.h           |  344 +++++
>  39 files changed, 13147 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/media/pci/intel/ipu6/Kconfig
>  create mode 100644 drivers/media/pci/intel/ipu6/Makefile
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-bus.c
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-bus.h
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-buttress.c
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-buttress.h
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-cpd.c
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-cpd.h
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-dma.c
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-dma.h
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-fw-com.c
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-fw-com.h
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-fw-isys.c
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-fw-isys.h
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-csi2.h
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-dwc-phy.c
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-jsl-phy.c
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-mcd-phy.c
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-phy.h
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-queue.c
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-queue.h
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-subdev.h
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-video.c
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys-video.h
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys.c
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-isys.h
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-mmu.c
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-mmu.h
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-platform-buttress-regs.h
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-platform-isys-csi2-reg.h
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-platform-regs.h
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6-platform.h
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6.c
>  create mode 100644 drivers/media/pci/intel/ipu6/ipu6.h
Andreas Helbech Kleist July 6, 2023, 8:57 a.m. UTC | #2
I tried to build the ipu6 patch series on top of v6.4. I need the
following change to be able to build it,

Otherwise I get compilation errors on v4l2_subdev_get_try_format.

diff --git a/drivers/media/pci/intel/ipu6/Kconfig b/drivers/media/pci/intel/ipu6/Kconfig
index c88ef2f40f6d..b7475fdc709f 100644
--- a/drivers/media/pci/intel/ipu6/Kconfig
+++ b/drivers/media/pci/intel/ipu6/Kconfig
@@ -6,6 +6,7 @@ config VIDEO_INTEL_IPU6
 	depends on X86_64
 	select IOMMU_IOVA
 	select VIDEOBUF2_DMA_CONTIG
+	select VIDEO_V4L2_SUBDEV_API
 	select V4L2_FWNODE
 	help
 	  This is the 6th Gen Intel Image Processing Unit, found in Intel SoCs