Skip to content

Commit

Permalink
Merge tag 'media/v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab:

 - v4l core: subdev frame interval now supports which field

 - v4l kapi: moves and renames the init_cfg pad op to init_state as an
   internal op.

 - new sensor drivers: gc0308, gc2145, Avnet Alvium, ov64a40, tw9900

 - new camera driver: STM32 DCMIPP

 - s5p-mfc has gained MFC v12 support

 - new ISP driver added to staging: Starfive

 - new stateful encoder/decoded: Wave5 codec It is found on the J721S2
   SoC, JH7100 SoC, ssd202d SoC. Etc.

 - fwnode gained support for MIPI "DisCo for Imaging"
   (https://www.mipi.org/specifications/mipi-disco-imaging)

 - as usual, lots of cleanups, fixups and driver improvements.

* tag 'media/v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (309 commits)
  media: i2c: thp7312: select CONFIG_FW_LOADER
  media: i2c: mt9m114: use fsleep() in place of udelay()
  media: videobuf2: core: Rename min_buffers_needed field in vb2_queue
  media: i2c: thp7312: Store frame interval in subdev state
  media: docs: uAPI: Fix documentation of 'which' field for routing ioctls
  media: docs: uAPI: Expand error documentation for invalid 'which' value
  media: docs: uAPI: Clarify error documentation for invalid 'which' value
  media: v4l2-subdev: Store frame interval in subdev state
  media: v4l2-subdev: Add which field to struct v4l2_subdev_frame_interval
  media: v4l2-subdev: Turn .[gs]_frame_interval into pad operations
  media: v4l: subdev: Move out subdev state lock macros outside CONFIG_MEDIA_CONTROLLER
  media: s5p-mfc: DPB Count Independent of VIDIOC_REQBUF
  media: s5p-mfc: Load firmware for each run in MFCv12.
  media: s5p-mfc: Set context for valid case before calling try_run
  media: s5p-mfc: Add support for DMABUF for encoder
  media: s5p-mfc: Add support for UHD encoding.
  media: s5p-mfc: Add support for rate controls in MFCv12
  media: s5p-mfc: Add YV12 and I420 multiplanar format support
  media: s5p-mfc: Add initial support for MFCv12
  media: s5p-mfc: Rename IS_MFCV10 macro
  ...
  • Loading branch information
torvalds committed Jan 12, 2024
2 parents a3cc31e + 60a031b commit 61da593
Show file tree
Hide file tree
Showing 478 changed files with 38,136 additions and 5,193 deletions.
72 changes: 72 additions & 0 deletions Documentation/admin-guide/media/starfive_camss.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
.. SPDX-License-Identifier: GPL-2.0
.. include:: <isonum.txt>

================================
Starfive Camera Subsystem driver
================================

Introduction
------------

This file documents the driver for the Starfive Camera Subsystem found on
Starfive JH7110 SoC. The driver is located under drivers/staging/media/starfive/
camss.

The driver implements V4L2, Media controller and v4l2_subdev interfaces. Camera
sensor using V4L2 subdev interface in the kernel is supported.

The driver has been successfully used on the Gstreamer 1.18.5 with v4l2src
plugin.


Starfive Camera Subsystem hardware
----------------------------------

The Starfive Camera Subsystem hardware consists of::

|\ +---------------+ +-----------+
+----------+ | \ | | | |
| | | | | | | |
| MIPI |----->| |----->| ISP |----->| |
| | | | | | | |
+----------+ | | | | | Memory |
|MUX| +---------------+ | Interface |
+----------+ | | | |
| | | |---------------------------->| |
| Parallel |----->| | | |
| | | | | |
+----------+ | / | |
|/ +-----------+

- MIPI: The MIPI interface, receiving data from a MIPI CSI-2 camera sensor.

- Parallel: The parallel interface, receiving data from a parallel sensor.

- ISP: The ISP, processing raw Bayer data from an image sensor and producing
YUV frames.


Topology
--------

The media controller pipeline graph is as follows:

.. _starfive_camss_graph:

.. kernel-figure:: starfive_camss_graph.dot
:alt: starfive_camss_graph.dot
:align: center

The driver has 2 video devices:

- capture_raw: The capture device, capturing image data directly from a sensor.
- capture_yuv: The capture device, capturing YUV frame data processed by the
ISP module

The driver has 3 subdevices:

- stf_isp: is responsible for all the isp operations, outputs YUV frames.
- cdns_csi2rx: a CSI-2 bridge supporting up to 4 CSI lanes in input, and 4
different pixel streams in output.
- imx219: an image sensor, image data is sent through MIPI CSI-2.
12 changes: 12 additions & 0 deletions Documentation/admin-guide/media/starfive_camss_graph.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
digraph board {
rankdir=TB
n00000001 [label="{{<port0> 0} | stf_isp\n/dev/v4l-subdev0 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green]
n00000001:port1 -> n00000008 [style=dashed]
n00000004 [label="capture_raw\n/dev/video0", shape=box, style=filled, fillcolor=yellow]
n00000008 [label="capture_yuv\n/dev/video1", shape=box, style=filled, fillcolor=yellow]
n0000000e [label="{{<port0> 0} | cdns_csi2rx.19800000.csi-bridge\n | {<port1> 1 | <port2> 2 | <port3> 3 | <port4> 4}}", shape=Mrecord, style=filled, fillcolor=green]
n0000000e:port1 -> n00000001:port0 [style=dashed]
n0000000e:port1 -> n00000004 [style=dashed]
n00000018 [label="{{} | imx219 6-0010\n/dev/v4l-subdev1 | {<port0> 0}}", shape=Mrecord, style=filled, fillcolor=green]
n00000018:port0 -> n0000000e:port0 [style=bold]
}
1 change: 1 addition & 0 deletions Documentation/admin-guide/media/v4l-drivers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Video4Linux (V4L) driver-specific documentation
si470x
si4713
si476x
starfive_camss
vimc
visl
vivid
2 changes: 2 additions & 0 deletions Documentation/admin-guide/media/visl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ The following codecs are supported:
- VP9
- H.264
- HEVC
- AV1

visl trace events
-----------------
Expand All @@ -79,6 +80,7 @@ The trace events are defined on a per-codec basis, e.g.:
.. code-block:: bash
$ ls /sys/kernel/tracing/events/ | grep visl
visl_av1_controls
visl_fwht_controls
visl_h264_controls
visl_hevc_controls
Expand Down
61 changes: 61 additions & 0 deletions Documentation/devicetree/bindings/media/cnm,wave521c.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/cnm,wave521c.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Chips&Media Wave 5 Series multi-standard codec IP

maintainers:
- Nas Chung <[email protected]>
- Jackson Lee <[email protected]>

description:
The Chips&Media WAVE codec IP is a multi format video encoder/decoder

properties:
compatible:
items:
- enum:
- ti,k3-j721s2-wave521c
- const: cnm,wave521c

reg:
maxItems: 1

clocks:
items:
- description: VCODEC clock

interrupts:
maxItems: 1

power-domains:
maxItems: 1

resets:
maxItems: 1

sram:
$ref: /schemas/types.yaml#/definitions/phandle
description:
The VPU uses the SRAM to store some of the reference data instead of
storing it on DMA memory. It is mainly used for the purpose of reducing
bandwidth.

required:
- compatible
- reg
- clocks

additionalProperties: false

examples:
- |
vpu: video-codec@12345678 {
compatible = "ti,k3-j721s2-wave521c", "cnm,wave521c";
reg = <0x12345678 0x1000>;
clocks = <&clks 42>;
interrupts = <42>;
sram = <&sram>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/alliedvision,alvium-csi2.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Allied Vision Alvium Camera

maintainers:
- Tommaso Merciai <[email protected]>
- Martin Hecht <[email protected]>

allOf:
- $ref: /schemas/media/video-interface-devices.yaml#

properties:
compatible:
const: alliedvision,alvium-csi2

reg:
maxItems: 1

vcc-ext-in-supply:
description: |
The regulator that supplies power to the VCC_EXT_IN pins.
port:
description: Digital Output Port
$ref: /schemas/graph.yaml#/$defs/port-base
additionalProperties: false

properties:
endpoint:
$ref: /schemas/media/video-interfaces.yaml#
unevaluatedProperties: false

properties:
link-frequencies: true

data-lanes:
minItems: 1
items:
- const: 1
- const: 2
- const: 3
- const: 4

required:
- data-lanes
- link-frequencies

required:
- compatible
- reg
- vcc-ext-in-supply
- port

additionalProperties: false

examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
alvium: camera@3c {
compatible = "alliedvision,alvium-csi2";
reg = <0x3c>;
vcc-ext-in-supply = <&reg_vcc_ext_in>;
port {
alvium_out: endpoint {
remote-endpoint = <&mipi_csi_0_in>;
data-lanes = <1 2 3 4>;
link-frequencies = /bits/ 64 <681250000>;
};
};
};
};
...
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ description:

properties:
compatible:
const: asahi-kasei,ak7375
enum:
- asahi-kasei,ak7345
- asahi-kasei,ak7375

reg:
maxItems: 1
Expand Down
108 changes: 108 additions & 0 deletions Documentation/devicetree/bindings/media/i2c/galaxycore,gc0308.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/galaxycore,gc0308.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Galaxycore GC0308 and GC0309 Image Sensors

maintainers:
- Sebastian Reichel <[email protected]>

description: |
The GalaxyCore GC0308 (1/6.5") and GC0309 (1/9") are 640x480 VGA sensors
programmable through an I2C interface and connected via parallel bus.
They include an ISP capable of auto exposure and auto white balance.
allOf:
- $ref: ../video-interface-devices.yaml#

properties:
compatible:
oneOf:
- const: galaxycore,gc0308
- items:
- const: galaxycore,gc0309
- const: galaxycore,gc0308

reg:
const: 0x21

clocks:
description: Reference to the xclk clock.
maxItems: 1

reset-gpios:
description: GPIO descriptor for the reset pin.
maxItems: 1

powerdown-gpios:
description: GPIO descriptor for the powerdown pin.
maxItems: 1

vdd28-supply:
description: 2.8V supply

port:
$ref: /schemas/graph.yaml#/$defs/port-base
description: |
Video output port.
properties:
endpoint:
$ref: /schemas/media/video-interfaces.yaml#
unevaluatedProperties: false

properties:
bus-width: true
data-shift: true
hsync-active: true
vsync-active: true
data-active: true
pclk-sample: true

required:
- bus-width

additionalProperties: false

required:
- compatible
- reg
- clocks
- powerdown-gpios
- port

additionalProperties: false

examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
camera-sensor@21 {
compatible = "galaxycore,gc0308";
reg = <0x21>;
clocks = <&camera_clk>;
powerdown-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
vdd28-supply = <&vdd28>;
port {
gc0308_ep: endpoint {
remote-endpoint = <&parallel_from_gc0308>;
bus-width = <8>;
data-shift = <2>; /* lines 9:2 are used */
hsync-active = <1>; /* active high */
vsync-active = <1>; /* active high */
data-active = <1>; /* active high */
pclk-sample = <1>; /* sample on rising edge */
};
};
};
};
...
Loading

0 comments on commit 61da593

Please sign in to comment.