Merge tag 'media/v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/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
  ...
This commit is contained in:
Linus Torvalds
2024-01-12 14:29:48 -08:00
478 changed files with 38148 additions and 5205 deletions

View File

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

View File

@@ -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]
}

View File

@@ -28,6 +28,7 @@ Video4Linux (V4L) driver-specific documentation
si470x
si4713
si476x
starfive_camss
vimc
visl
vivid

View File

@@ -71,6 +71,7 @@ The following codecs are supported:
- VP9
- H.264
- HEVC
- AV1
visl trace events
-----------------
@@ -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

View File

@@ -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 <nas.chung@chipsnmedia.com>
- Jackson Lee <jackson.lee@chipsnmedia.com>
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>;
};

View File

@@ -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 <tomm.merciai@gmail.com>
- Martin Hecht <martin.hecht@avnet.eu>
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>;
};
};
};
};
...

View File

@@ -15,7 +15,9 @@ description:
properties:
compatible:
const: asahi-kasei,ak7375
enum:
- asahi-kasei,ak7345
- asahi-kasei,ak7375
reg:
maxItems: 1

View File

@@ -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 <sre@kernel.org>
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 */
};
};
};
};
...

View File

@@ -0,0 +1,113 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/galaxycore,gc2145.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Galaxy Core 1/5'' UXGA CMOS Image Sensor
maintainers:
- Alain Volmat <alain.volmat@foss.st.com>
description:
The Galaxy Core GC2145 is a 2 Megapixel CMOS image sensor, for mobile
phone camera applications and digital camera products. GC2145 incorporates a
1616V x 1232H active pixel array, on-chip 10-bit ADC, and image signal
processor allowing AE/AWB/interpolation/de-noise/color-conversion and
gamma correction. Bayer RGB, RGB565 and YCbCr 4:2:2 can be provided by the
sensor. It is programmable through an I2C interface. Image data is sent
either through a parallel interface or through MIPI CSI-2.
allOf:
- $ref: ../video-interface-devices.yaml#
properties:
compatible:
const: galaxycore,gc2145
reg:
const: 0x3c
clocks:
maxItems: 1
powerdown-gpios:
maxItems: 1
reset-gpios:
maxItems: 1
iovdd-supply:
description: Power Supply for I/O circuits (1.7 - 3V).
avdd-supply:
description: Power for analog circuit/sensor array (2.7 - 3V).
dvdd-supply:
description: Power for digital core (1.7 - 1.9V).
orientation: true
rotation: true
port:
$ref: /schemas/graph.yaml#/$defs/port-base
properties:
endpoint:
$ref: /schemas/media/video-interfaces.yaml#
unevaluatedProperties: false
properties:
link-frequencies: true
required:
- link-frequencies
required:
- endpoint
additionalProperties: false
required:
- compatible
- reg
- clocks
- powerdown-gpios
- reset-gpios
- iovdd-supply
- avdd-supply
- dvdd-supply
- port
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
camera@3c {
compatible = "galaxycore,gc2145";
reg = <0x3c>;
clocks = <&clk_ext_camera>;
iovdd-supply = <&scmi_v3v3_sw>;
avdd-supply = <&scmi_v3v3_sw>;
dvdd-supply = <&scmi_v3v3_sw>;
powerdown-gpios = <&mcp23017 3 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
reset-gpios = <&mcp23017 4 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
port {
endpoint {
remote-endpoint = <&mipid02_0>;
data-lanes = <1 2>;
link-frequencies = /bits/ 64 <120000000 192000000 240000000>;
};
};
};
};
...

View File

@@ -67,19 +67,17 @@ properties:
properties:
data-lanes:
description: |-
The driver only supports four-lane operation.
items:
- const: 1
- const: 2
- const: 3
- const: 4
link-frequencies:
description: Frequencies listed are driver, not h/w limitations.
maxItems: 2
items:
enum: [ 360000000, 180000000 ]
oneOf:
- items:
- const: 1
- items:
- const: 1
- const: 2
- items:
- const: 1
- const: 2
- const: 3
- const: 4
required:
- link-frequencies

View File

@@ -0,0 +1,103 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/ovti,ov64a40.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: OmniVision OV64A40 Image Sensor
maintainers:
- Jacopo Mondi <jacopo.mondi@ideasonboard.com>
allOf:
- $ref: /schemas/media/video-interface-devices.yaml#
properties:
compatible:
const: ovti,ov64a40
reg:
maxItems: 1
clocks:
maxItems: 1
avdd-supply:
description: Analog voltage supply, 2.8 volts
dvdd-supply:
description: Digital core voltage supply, 1.1 volts
dovdd-supply:
description: Digital I/O voltage supply, 1.8 volts
powerdown-gpios:
maxItems: 1
reset-gpios:
maxItems: 1
port:
$ref: /schemas/graph.yaml#/$defs/port-base
additionalProperties: false
properties:
endpoint:
$ref: /schemas/media/video-interfaces.yaml#
additionalProperties: false
properties:
bus-type:
enum:
- 1 # MIPI CSI-2 C-PHY
- 4 # MIPI CSI-2 D-PHY
data-lanes: true
link-frequencies: true
clock-noncontinuous: true
remote-endpoint: true
required:
- bus-type
- data-lanes
- link-frequencies
required:
- compatible
- reg
- clocks
- port
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
camera@36 {
compatible = "ovti,ov64a40";
reg = <0x36>;
clocks = <&camera_clk>;
dovdd-supply = <&vgen4_reg>;
avdd-supply = <&vgen3_reg>;
dvdd-supply = <&vgen2_reg>;
powerdown-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
rotation = <180>;
orientation = <2>;
port {
endpoint {
remote-endpoint = <&mipi_csi2_in>;
bus-type = <4>;
data-lanes = <1 2 3 4>;
link-frequencies = /bits/ 64 <456000000>;
};
};
};
};
...

View File

@@ -32,6 +32,15 @@ properties:
description: Clock frequency from 6 to 27 MHz, 37.125MHz, 74.25MHz
maxItems: 1
avdd-supply:
description: Analog power supply (2.9V)
ovdd-supply:
description: Interface power supply (1.8V)
dvdd-supply:
description: Digital power supply (1.2V)
reset-gpios:
description: Reference to the GPIO connected to the XCLR pin, if any.
maxItems: 1
@@ -79,6 +88,10 @@ examples:
assigned-clock-parents = <&imx335_clk_parent>;
assigned-clock-rates = <24000000>;
avdd-supply = <&camera_vdda_2v9>;
ovdd-supply = <&camera_vddo_1v8>;
dvdd-supply = <&camera_vddd_1v2>;
port {
imx335: endpoint {
remote-endpoint = <&cam>;

View File

@@ -0,0 +1,137 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/techwell,tw9900.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Techwell TW9900 NTSC/PAL video decoder
maintainers:
- Mehdi Djait <mehdi.djait@bootlin.com>
description:
The tw9900 is a multi-standard video decoder, supporting NTSC, PAL standards
with auto-detection features.
properties:
compatible:
const: techwell,tw9900
reg:
maxItems: 1
vdd-supply:
description: VDD power supply
reset-gpios:
description: GPIO descriptor for the RESET input pin
maxItems: 1
powerdown-gpios:
description: GPIO descriptor for the POWERDOWN input pin
maxItems: 1
ports:
$ref: /schemas/graph.yaml#/properties/ports
properties:
port@0:
$ref: /schemas/graph.yaml#/$defs/port-base
description: Analog input port
properties:
endpoint@0:
$ref: /schemas/graph.yaml#/properties/endpoint
description: CVBS over MUX0
endpoint@1:
$ref: /schemas/graph.yaml#/properties/endpoint
description: CVBS over MUX1
endpoint@2:
$ref: /schemas/graph.yaml#/properties/endpoint
description: Chroma over CIN0 and Y over MUX0
endpoint@3:
$ref: /schemas/graph.yaml#/properties/endpoint
description: Chroma over CIN0 and Y over MUX1
oneOf:
- required:
- endpoint@0
- required:
- endpoint@1
- required:
- endpoint@2
- required:
- endpoint@3
port@1:
$ref: /schemas/graph.yaml#/properties/port
description: Video port for the decoder output.
required:
- port@0
- port@1
required:
- compatible
- ports
- reg
- vdd-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/display/sdtv-standards.h>
#include <dt-bindings/gpio/gpio.h>
composite_connector {
compatible = "composite-video-connector";
label = "tv";
sdtv-standards = <(SDTV_STD_PAL | SDTV_STD_NTSC)>;
port {
composite_to_tw9900: endpoint {
remote-endpoint = <&tw9900_to_composite>;
};
};
};
i2c {
#address-cells = <1>;
#size-cells = <0>;
video-decoder@44 {
compatible = "techwell,tw9900";
reg = <0x44>;
vdd-supply = <&tw9900_supply>;
reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
tw9900_to_composite: endpoint@0 {
reg = <0>;
remote-endpoint = <&composite_to_tw9900>;
};
};
port@1 {
reg = <1>;
endpoint {
remote-endpoint = <&cif_in>;
};
};
};
};
};

View File

@@ -0,0 +1,224 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (c) 2023 Ideas on Board
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/thine,thp7312.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: THine THP7312
maintainers:
- Paul Elder <paul.elder@@ideasonboard.com>
description:
The THP7312 is a standalone ISP controlled over i2c, and is capable of
various image processing and correction functions, including 3A control. It
can be connected to CMOS image sensors from various vendors, supporting both
MIPI CSI-2 and parallel interfaces. It can also output on either MIPI CSI-2
or parallel. The hardware is capable of transmitting and receiving MIPI
interlaved data strams with data types or multiple virtual channel
identifiers.
allOf:
- $ref: /schemas/media/video-interface-devices.yaml#
properties:
compatible:
const: thine,thp7312
reg:
maxItems: 1
clocks:
maxItems: 1
description: CLKI clock input
thine,boot-mode:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 1
default: 1
description:
Boot mode of the THP7312, reflecting the value of the BOOT[0] pin strap.
0 is for the SPI/2-wire slave boot, 1 is for the SPI master boot (from
external flash ROM).
reset-gpios:
maxItems: 1
description:
Reference to the GPIO connected to the RESET_N pin, if any.
Must be released (set high) after all supplies are applied.
vddcore-supply:
description:
1.2V supply for core, PLL, MIPI rx and MIPI tx.
vhtermrx-supply:
description:
Supply for input (RX). 1.8V for MIPI, or 1.8/2.8/3.3V for parallel.
vddtx-supply:
description:
Supply for output (TX). 1.8V for MIPI, or 1.8/2.8/3.3V for parallel.
vddhost-supply:
description:
Supply for host interface. 1.8V, 2.8V, or 3.3V.
vddcmos-supply:
description:
Supply for sensor interface. 1.8V, 2.8V, or 3.3V.
vddgpio-0-supply:
description:
Supply for GPIO_0. 1.8V, 2.8V, or 3.3V.
vddgpio-1-supply:
description:
Supply for GPIO_1. 1.8V, 2.8V, or 3.3V.
orientation: true
rotation: true
port:
$ref: /schemas/graph.yaml#/$defs/port-base
additionalProperties: false
properties:
endpoint:
$ref: /schemas/media/video-interfaces.yaml#
unevaluatedProperties: false
properties:
bus-type:
const: 4 # CSI-2 D-PHY
data-lanes:
description:
This property is for lane reordering between the THP7312 and the
SoC. The sensor supports either two-lane, or four-lane operation.
If this property is omitted four-lane operation is assumed. For
two-lane operation the property must be set to <1 2>.
minItems: 2
maxItems: 4
items:
maximum: 4
sensors:
type: object
description: List of connected sensors
properties:
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^sensor@[01]$":
type: object
description:
Sensors connected to the first and second input, with one node per
sensor.
properties:
thine,model:
$ref: /schemas/types.yaml#/definitions/string
description:
Model of the connected sensors. Must be a valid compatible string.
reg:
description: THP7312 input port number
items:
- maximum: 1
data-lanes:
$ref: /schemas/media/video-interfaces.yaml#/properties/data-lanes
items:
maxItems: 4
description:
This property is for lane reordering between the THP7312 and the imaging
sensor that it is connected to.
required:
- reg
- data-lanes
additionalProperties: false
required:
- "#address-cells"
- "#size-cells"
additionalProperties: false
required:
- compatible
- reg
- reset-gpios
- clocks
- vddcore-supply
- vhtermrx-supply
- vddtx-supply
- vddhost-supply
- vddcmos-supply
- vddgpio-0-supply
- vddgpio-1-supply
- sensors
- port
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/media/video-interfaces.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
camera@61 {
compatible = "thine,thp7312";
reg = <0x61>;
pinctrl-names = "default";
pinctrl-0 = <&cam1_pins_default>;
reset-gpios = <&pio 119 GPIO_ACTIVE_LOW>;
clocks = <&camera61_clk>;
vddcore-supply = <&vsys_v4p2>;
vhtermrx-supply = <&vsys_v4p2>;
vddtx-supply = <&vsys_v4p2>;
vddhost-supply = <&vsys_v4p2>;
vddcmos-supply = <&vsys_v4p2>;
vddgpio-0-supply = <&vsys_v4p2>;
vddgpio-1-supply = <&vsys_v4p2>;
orientation = <0>;
rotation = <0>;
sensors {
#address-cells = <1>;
#size-cells = <0>;
sensor@0 {
thine,model = "sony,imx258";
reg = <0>;
data-lanes = <4 1 3 2>;
};
};
port {
thp7312_2_endpoint: endpoint {
remote-endpoint = <&mipi_thp7312_2>;
bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
data-lanes = <4 2 1 3>;
};
};
};
};
...

View File

@@ -90,15 +90,16 @@ properties:
description: connection point for input on the parallel interface
properties:
bus-type:
enum: [5, 6]
endpoint:
$ref: video-interfaces.yaml#
unevaluatedProperties: false
required:
- bus-type
properties:
bus-type:
enum: [5, 6]
required:
- bus-type
anyOf:
- required:

View File

@@ -24,6 +24,7 @@ properties:
- samsung,mfc-v7 # Exynos5420
- samsung,mfc-v8 # Exynos5800
- samsung,mfc-v10 # Exynos7880
- tesla,fsd-mfc # Tesla FSD
- items:
- enum:
- samsung,exynos3250-mfc # Exynos3250
@@ -165,6 +166,23 @@ allOf:
minItems: 1
maxItems: 2
- if:
properties:
compatible:
contains:
enum:
- tesla,fsd-mfc
then:
properties:
clocks:
maxItems: 1
clock-names:
items:
- const: mfc
iommus:
maxItems: 2
iommus-names: false
examples:
- |
#include <dt-bindings/clock/exynos4.h>

View File

@@ -0,0 +1,89 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/st,stm32-dcmipp.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: STMicroelectronics STM32 DCMIPP Digital Camera Memory Interface Pixel Processor
maintainers:
- Hugues Fruchet <hugues.fruchet@foss.st.com>
- Alain Volmat <alain.volmat@foss.st.com>
properties:
compatible:
const: st,stm32mp13-dcmipp
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
resets:
maxItems: 1
port:
$ref: /schemas/graph.yaml#/$defs/port-base
unevaluatedProperties: false
description:
DCMIPP supports a single port node with parallel bus.
properties:
endpoint:
$ref: video-interfaces.yaml#
unevaluatedProperties: false
properties:
bus-type:
enum: [5, 6]
default: 5
bus-width:
enum: [8, 10, 12, 14]
default: 8
pclk-sample: true
hsync-active: true
vsync-active: true
required:
- pclk-sample
required:
- compatible
- reg
- interrupts
- clocks
- resets
- port
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/stm32mp13-clks.h>
#include <dt-bindings/reset/stm32mp13-resets.h>
dcmipp@5a000000 {
compatible = "st,stm32mp13-dcmipp";
reg = <0x5a000000 0x400>;
interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
resets = <&rcc DCMIPP_R>;
clocks = <&rcc DCMIPP_K>;
port {
endpoint {
remote-endpoint = <&mipid02_2>;
bus-width = <8>;
hsync-active = <0>;
vsync-active = <0>;
pclk-sample = <0>;
};
};
};
...

View File

@@ -0,0 +1,180 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/starfive,jh7110-camss.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Starfive SoC CAMSS ISP
maintainers:
- Jack Zhu <jack.zhu@starfivetech.com>
- Changhuang Liang <changhuang.liang@starfivetech.com>
description:
The Starfive CAMSS ISP is a Camera interface for Starfive JH7110 SoC. It
consists of a VIN controller (Video In Controller, a top-level control unit)
and an ISP.
properties:
compatible:
const: starfive,jh7110-camss
reg:
maxItems: 2
reg-names:
items:
- const: syscon
- const: isp
clocks:
maxItems: 7
clock-names:
items:
- const: apb_func
- const: wrapper_clk_c
- const: dvp_inv
- const: axiwr
- const: mipi_rx0_pxl
- const: ispcore_2x
- const: isp_axi
resets:
maxItems: 6
reset-names:
items:
- const: wrapper_p
- const: wrapper_c
- const: axird
- const: axiwr
- const: isp_top_n
- const: isp_top_axi
power-domains:
items:
- description: JH7110 ISP Power Domain Switch Controller.
interrupts:
maxItems: 4
ports:
$ref: /schemas/graph.yaml#/properties/ports
properties:
port@0:
$ref: /schemas/graph.yaml#/$defs/port-base
unevaluatedProperties: false
description: Input port for receiving DVP data.
properties:
endpoint:
$ref: video-interfaces.yaml#
unevaluatedProperties: false
properties:
bus-type:
enum: [5, 6]
bus-width:
enum: [8, 10, 12]
data-shift:
enum: [0, 2]
default: 0
hsync-active:
enum: [0, 1]
default: 1
vsync-active:
enum: [0, 1]
default: 1
required:
- bus-type
- bus-width
port@1:
$ref: /schemas/graph.yaml#/properties/port
description: Input port for receiving CSI data.
required:
- port@0
- port@1
required:
- compatible
- reg
- reg-names
- clocks
- clock-names
- resets
- reset-names
- power-domains
- interrupts
- ports
additionalProperties: false
examples:
- |
isp@19840000 {
compatible = "starfive,jh7110-camss";
reg = <0x19840000 0x10000>,
<0x19870000 0x30000>;
reg-names = "syscon", "isp";
clocks = <&ispcrg 0>,
<&ispcrg 13>,
<&ispcrg 2>,
<&ispcrg 12>,
<&ispcrg 1>,
<&syscrg 51>,
<&syscrg 52>;
clock-names = "apb_func",
"wrapper_clk_c",
"dvp_inv",
"axiwr",
"mipi_rx0_pxl",
"ispcore_2x",
"isp_axi";
resets = <&ispcrg 0>,
<&ispcrg 1>,
<&ispcrg 10>,
<&ispcrg 11>,
<&syscrg 41>,
<&syscrg 42>;
reset-names = "wrapper_p",
"wrapper_c",
"axird",
"axiwr",
"isp_top_n",
"isp_top_axi";
power-domains = <&pwrc 5>;
interrupts = <92>, <87>, <88>, <90>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
vin_from_sc2235: endpoint {
remote-endpoint = <&sc2235_to_vin>;
bus-type = <5>;
bus-width = <8>;
data-shift = <2>;
hsync-active = <1>;
vsync-active = <0>;
pclk-sample = <1>;
};
};
port@1 {
reg = <1>;
vin_from_csi2rx: endpoint {
remote-endpoint = <&csi2rx_to_vin>;
};
};
};
};

View File

@@ -79,6 +79,8 @@ patternProperties:
description: ALFA Network Inc.
"^allegro,.*":
description: Allegro DVT
"^alliedvision,.*":
description: Allied Vision Technologies GmbH
"^allo,.*":
description: Allo.com
"^allwinner,.*":
@@ -508,6 +510,8 @@ patternProperties:
description: Fujitsu Ltd.
"^fxtec,.*":
description: FX Technology Ltd.
"^galaxycore,.*":
description: GalaxyCore Inc.
"^gardena,.*":
description: GARDENA GmbH
"^gateway,.*":
@@ -1391,6 +1395,8 @@ patternProperties:
description: Technologic Systems
"^techstar,.*":
description: Shenzhen Techstar Electronics Co., Ltd.
"^techwell,.*":
description: Techwell, Inc.
"^teejet,.*":
description: TeeJet
"^teltonika,.*":

View File

@@ -9,8 +9,8 @@ This document covers the in-kernel APIs only. For the best practices on
userspace API implementation in camera sensor drivers, please see
:ref:`media_using_camera_sensor_drivers`.
CSI-2 and parallel (BT.601 and BT.656) busses
---------------------------------------------
CSI-2, parallel and BT.656 buses
--------------------------------
Please see :ref:`transmitter-receiver`.
@@ -60,7 +60,8 @@ management over the pipeline.
Camera sensor drivers are responsible for controlling the power state of the
device they otherwise control as well. They shall use runtime PM to manage
power states. Runtime PM shall be enabled at probe time and disabled at remove
time. Drivers should enable runtime PM autosuspend.
time. Drivers should enable runtime PM autosuspend. Also see
:ref:`async sub-device registration <media-registering-async-subdevs>`.
The runtime PM handlers shall handle clocks, regulators, GPIOs, and other
system resources required to power the sensor up and down. For drivers that

Some files were not shown because too many files have changed in this diff Show More