mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 01:32:21 +02:00
[GIT PULL for v7.2] media updates
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE+QmuaPwR3wnBdVwACF8+vY7k4RUFAmo0VwMACgkQCF8+vY7k
4RXLxxAAhXl0y+3e9g4gx/FQAGGV6d3zohNomiw7u8DEPtgo3oE0n4FA2Xrd2bsK
0cWskUMqz06fMYjwi0kloLi0MNW1ufERBL2Ehr73hS+8Iza/NCPcr34B6V6wiAOV
i1vnB0qw7Juh1vr0lcplPKvcFzLBj0XWIphGkB0kRdhypfhEl36lRCf5OdmWPe63
h7Co05/zceDaBPBzATEh9pKqH8jPJvmvEDkDLCLBIiQgBAClqCcX7xZuV/MiAJWE
B8yuRoyakH/dpKfvUVaMCwtFLag3fmvkQwfSOVaF4NHmr7tW+nTRI4D7QLVDI6if
cTIEEWdQsckVh2PKVuhaRod6o02pZdk+PWoSejdq8iTqPukR9vAp4iCjVW2Hc5dG
fCirdVXla1zqbn/IZTo4T7oLHcYiFaqbrU8Xom4qZFqgeJp64H7AdifVWyqB92ru
7DMgeVAhFQJIIvLrmqhpC1wvJ6nVhnkYHeHeL8UX0NRi7korb1jY5Shj5IfekuCW
2xOtSEG+p7ni6BMFKc5qso/ZObnToymriWrjXykcowZrMjKoxYzXfsngMmsRZBN3
QPRAM23FZvaNfF/poxnHNlRazi86+HgsrU2Q2koYR4FqUJ1iLYD6OvXX2WiirI3K
j09P1BybvX7/NxyOldL60a7pICGJr7j9J6jx2DQZmVaqPMsTxew=
=Br7k
-----END PGP SIGNATURE-----
Merge tag 'media/v7.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
- v4l2:
- core: fix subdev sensor ownership
- subdev: Allow accessing routes with STREAMS client capability
- ctrls: Add validation for HEVC active reference counts and
background detection control
- common: Add YUV24 format info and has_alpha helper
- vb2: Change vb2_read() and vb2_write() return types to ssize_t
- i2c: cvs: Add driver of Intel Computer Vision Sensing Controller(CVS)
- atmel-isc: remove deprecated driver
- cec: Add CEC Latency Indication Protocol (LIP) support
- imon: Add iMON VFD HID OEM v1.2 key mappings
- AVMatrix: new HWS capture driver
- isp4: new AMD capture driver
- qcom:
- iris: Add hierarchical coding, B-frame, and Long-Term Reference
support for encoder
- camss: Add SM6350 platform support
- venus: Add SM6115 platform support
- chips-media: wave5: Add support for Packed YUV422, CBP profile, and
background detection
- csi2rx: Add multistream support and 32 dma chans
- Several cleanups and fixes
* tag 'media/v7.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (394 commits)
media: v4l2-fwnode: Fix subdev owner overwritten in v4l2_async_register_subdev_sensor()
media: qcom: iris: vdec: allow GEN2 decoding into 10bit format
media: qcom: iris: vdec: update find_format to handle 8bit and 10bit formats
media: qcom: iris: vdec: update size and stride calculations for 10bit formats
media: qcom: iris: gen2: add support for 10bit decoding
media: qcom: iris: add QC10C & P010 buffer size calculations
media: qcom: iris: add helpers for 8bit and 10bit formats
media: qcom: iris: Fix FPS calculation and VPP FW overhead
media: qcom: camss: vfe-340: Support for PIX client
media: qcom: camss: vfe-340: Proper client handling
media: qcom: camss: csid-340: Enable PIX interface routing
media: qcom: camss: csid-340: Add port-to-interface mapping
media: qcom: camss: csid-340: Switch to generic CSID_CFG/CTRL registers
media: iris: Initialize HFI ops after firmware load in core init
media: iris: drop struct iris_fmt
media: iris: Add platform data for X1P42100
media: iris: Add hardware power on/off ops for X1P42100
media: iris: optimize COMV buffer allocation for VPU3x and VPU4x
media: iris: add FPS calculation and VPP FW overhead in frequency formula
media: qcom: iris: Simplify COMV size calculation
...
This commit is contained in:
commit
8c13415c8a
63
Documentation/admin-guide/media/amdisp4-1.rst
Normal file
63
Documentation/admin-guide/media/amdisp4-1.rst
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
.. include:: <isonum.txt>
|
||||
|
||||
====================================
|
||||
AMD Image Signal Processor (amdisp4)
|
||||
====================================
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
This file documents the driver for the AMD ISP4 that is part of
|
||||
AMD Ryzen AI Max 300 Series.
|
||||
|
||||
The driver is located under drivers/media/platform/amd/isp4 and uses
|
||||
the Media-Controller API.
|
||||
|
||||
The driver exposes one video capture device to userspace and provide
|
||||
web camera like interface. Internally the video device is connected
|
||||
to the isp4 sub-device responsible for communication with the CCPU FW.
|
||||
|
||||
Topology
|
||||
========
|
||||
|
||||
.. _amdisp4_topology_graph:
|
||||
|
||||
.. kernel-figure:: amdisp4.dot
|
||||
:alt: Diagram of the media pipeline topology
|
||||
:align: center
|
||||
|
||||
|
||||
|
||||
The driver has 1 sub-device: Representing isp4 image signal processor.
|
||||
The driver has 1 video device: Capture device for retrieving images.
|
||||
|
||||
- ISP4 Image Signal Processing Subdevice Node
|
||||
|
||||
---------------------------------------------
|
||||
|
||||
The isp4 is represented as a single V4L2 subdev, the sub-device does not
|
||||
provide interface to the user space. The sub-device is connected to one video node
|
||||
(isp4_capture) with immutable active link. The sub-device represents ISP with
|
||||
connected sensor similar to smart cameras (sensors with integrated ISP).
|
||||
sub-device has only one link to the video device for capturing the frames.
|
||||
The sub-device communicates with CCPU FW for streaming configuration and
|
||||
buffer management.
|
||||
|
||||
|
||||
- isp4_capture - Frames Capture Video Node
|
||||
|
||||
------------------------------------------
|
||||
|
||||
Isp4_capture is a capture device to capture frames to memory.
|
||||
The entity is connected to isp4 sub-device. The video device
|
||||
provides web camera like interface to userspace. It supports
|
||||
mmap and dma buf types of memory.
|
||||
|
||||
Capturing Video Frames Example
|
||||
==============================
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
v4l2-ctl "-d" "/dev/video0" "--set-fmt-video=width=1920,height=1080,pixelformat=NV12" "--stream-mmap" "--stream-count=10"
|
||||
6
Documentation/admin-guide/media/amdisp4.dot
Normal file
6
Documentation/admin-guide/media/amdisp4.dot
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
digraph board {
|
||||
rankdir=TB
|
||||
n00000001 [label="{{} | amd isp4\n | {<port0> 0}}", shape=Mrecord, style=filled, fillcolor=green]
|
||||
n00000001:port0 -> n00000003 [style=bold]
|
||||
n00000003 [label="Preview\n/dev/video0", shape=box, style=filled, fillcolor=yellow]
|
||||
}
|
||||
29
Documentation/admin-guide/media/rkcif-rk3588-vicap.dot
Normal file
29
Documentation/admin-guide/media/rkcif-rk3588-vicap.dot
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
digraph board {
|
||||
rankdir=TB
|
||||
n00000007 [label="{{<port0> 0} | rkcif-mipi2\n/dev/v4l-subdev0 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green]
|
||||
n00000007:port1 -> n0000000a
|
||||
n00000007:port1 -> n00000010 [style=dashed]
|
||||
n00000007:port1 -> n00000016 [style=dashed]
|
||||
n00000007:port1 -> n0000001c [style=dashed]
|
||||
n0000000a [label="rkcif-mipi2-id0\n/dev/video0", shape=box, style=filled, fillcolor=yellow]
|
||||
n00000010 [label="rkcif-mipi2-id1\n/dev/video1", shape=box, style=filled, fillcolor=yellow]
|
||||
n00000016 [label="rkcif-mipi2-id2\n/dev/video2", shape=box, style=filled, fillcolor=yellow]
|
||||
n0000001c [label="rkcif-mipi2-id3\n/dev/video3", shape=box, style=filled, fillcolor=yellow]
|
||||
n00000025 [label="{{<port0> 0} | rkcif-mipi4\n/dev/v4l-subdev1 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green]
|
||||
n00000025:port1 -> n00000028
|
||||
n00000025:port1 -> n0000002e [style=dashed]
|
||||
n00000025:port1 -> n00000034 [style=dashed]
|
||||
n00000025:port1 -> n0000003a [style=dashed]
|
||||
n00000028 [label="rkcif-mipi4-id0\n/dev/video4", shape=box, style=filled, fillcolor=yellow]
|
||||
n0000002e [label="rkcif-mipi4-id1\n/dev/video5", shape=box, style=filled, fillcolor=yellow]
|
||||
n00000034 [label="rkcif-mipi4-id2\n/dev/video6", shape=box, style=filled, fillcolor=yellow]
|
||||
n0000003a [label="rkcif-mipi4-id3\n/dev/video7", shape=box, style=filled, fillcolor=yellow]
|
||||
n00000043 [label="{{<port0> 0} | dw-mipi-csi2rx fdd30000.csi\n/dev/v4l-subdev2 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green]
|
||||
n00000043:port1 -> n00000007:port0
|
||||
n00000048 [label="{{<port0> 0} | dw-mipi-csi2rx fdd50000.csi\n/dev/v4l-subdev3 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green]
|
||||
n00000048:port1 -> n00000025:port0
|
||||
n0000004d [label="{{} | imx415 3-001a\n/dev/v4l-subdev4 | {<port0> 0}}", shape=Mrecord, style=filled, fillcolor=green]
|
||||
n0000004d:port0 -> n00000043:port0
|
||||
n00000051 [label="{{} | imx415 4-001a\n/dev/v4l-subdev5 | {<port0> 0}}", shape=Mrecord, style=filled, fillcolor=green]
|
||||
n00000051:port0 -> n00000048:port0
|
||||
}
|
||||
|
|
@ -77,3 +77,35 @@ and the following video devices:
|
|||
.. kernel-figure:: rkcif-rk3568-vicap.dot
|
||||
:alt: Topology of the RK3568 Video Capture (VICAP) unit
|
||||
:align: center
|
||||
|
||||
Rockchip RK3588 Video Capture (VICAP)
|
||||
-------------------------------------
|
||||
|
||||
The RK3588 Video Capture (VICAP) unit features a digital video port and six
|
||||
MIPI CSI-2 capture interfaces that can receive video data independently.
|
||||
The DVP accepts parallel video data, BT.656 and BT.1120.
|
||||
Since the BT.1120 protocol may feature more than one stream, the RK3588 VICAP
|
||||
DVP features four DMA engines that can capture different streams.
|
||||
Similarly, the RK3588 VICAP MIPI CSI-2 receivers feature four DMA engines each
|
||||
to handle different Virtual Channels (VCs).
|
||||
|
||||
The rkcif driver represents this hardware variant by exposing the following
|
||||
V4L2 subdevices:
|
||||
|
||||
* dw-mipi-csi2rx fdd30000.csi: MIPI CSI-2 receiver connected to MIPI DPHY0
|
||||
* dw-mipi-csi2rx fdd50000.csi: MIPI CSI-2 receiver connected to MIPI DPHY1
|
||||
* rkcif-mipi2: INTERFACE/CROP block for the MIPI CSI-2 receiver connected to
|
||||
MIPI DPHY0
|
||||
* rkcif-mipi4: INTERFACE/CROP block for the MIPI CSI-2 receiver connected to
|
||||
MIPI DPHY1
|
||||
|
||||
and the following video devices:
|
||||
|
||||
* rkcif-mipi2-id{0,1,2,3}: The DMA engines connected to the rkcif-mipi2
|
||||
INTERFACE/CROP block.
|
||||
* rkcif-mipi4-id{0,1,2,3}: The DMA engines connected to the rkcif-mipi4
|
||||
INTERFACE/CROP block.
|
||||
|
||||
.. kernel-figure:: rkcif-rk3588-vicap.dot
|
||||
:alt: Topology of the RK3588 Video Capture (VICAP) unit
|
||||
:align: center
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ Video4Linux (V4L) driver-specific documentation
|
|||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
amdisp4-1
|
||||
bttv
|
||||
c3-isp
|
||||
cafe_ccic
|
||||
|
|
|
|||
|
|
@ -63,6 +63,16 @@ properties:
|
|||
CMA pool to use for buffers allocation instead of the default
|
||||
CMA pool.
|
||||
|
||||
# FIXME: This should be made required eventually once every SoC will
|
||||
# have the MBUS declared.
|
||||
interconnects:
|
||||
maxItems: 1
|
||||
|
||||
# FIXME: This should be made required eventually once every SoC will
|
||||
# have the MBUS declared.
|
||||
interconnect-names:
|
||||
const: dma-mem
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/media/qcom,msm8939-venus.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm MSM8939 Venus video encode and decode accelerators
|
||||
|
||||
maintainers:
|
||||
- André Apitzsch <git@apitzsch.eu>
|
||||
- Erikas Bitovtas <xerikasxx@gmail.com>
|
||||
|
||||
description:
|
||||
The Venus IP is a video encode and decode accelerator present
|
||||
on Qualcomm platforms
|
||||
|
||||
allOf:
|
||||
- $ref: qcom,venus-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,msm8939-venus
|
||||
|
||||
power-domains:
|
||||
maxItems: 3
|
||||
|
||||
power-domain-names:
|
||||
items:
|
||||
- const: venus
|
||||
- const: vcodec0
|
||||
- const: vcodec1
|
||||
|
||||
clocks:
|
||||
maxItems: 5
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: core
|
||||
- const: iface
|
||||
- const: bus
|
||||
- const: vcodec0_core
|
||||
- const: vcodec1_core
|
||||
|
||||
iommus:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- iommus
|
||||
- power-domain-names
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/clock/qcom,gcc-msm8939.h>
|
||||
|
||||
video-codec@1d00000 {
|
||||
compatible = "qcom,msm8939-venus";
|
||||
reg = <0x01d00000 0xff000>;
|
||||
interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&gcc GCC_VENUS0_VCODEC0_CLK>,
|
||||
<&gcc GCC_VENUS0_AHB_CLK>,
|
||||
<&gcc GCC_VENUS0_AXI_CLK>,
|
||||
<&gcc GCC_VENUS0_CORE0_VCODEC0_CLK>,
|
||||
<&gcc GCC_VENUS0_CORE1_VCODEC0_CLK>;
|
||||
clock-names = "core",
|
||||
"iface",
|
||||
"bus",
|
||||
"vcodec0_core",
|
||||
"vcodec1_core";
|
||||
power-domains = <&gcc VENUS_GDSC>,
|
||||
<&gcc VENUS_CORE0_GDSC>,
|
||||
<&gcc VENUS_CORE1_GDSC>;
|
||||
power-domain-names = "venus", "vcodec0", "vcodec1";
|
||||
iommus = <&apps_iommu 5>;
|
||||
memory-region = <&venus_mem>;
|
||||
};
|
||||
|
|
@ -18,7 +18,11 @@ allOf:
|
|||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,qcm2290-venus
|
||||
oneOf:
|
||||
- items:
|
||||
- const: qcom,sm6115-venus
|
||||
- const: qcom,qcm2290-venus
|
||||
- const: qcom,qcm2290-venus
|
||||
|
||||
power-domains:
|
||||
maxItems: 3
|
||||
|
|
|
|||
|
|
@ -91,6 +91,21 @@ properties:
|
|||
deprecated: true
|
||||
additionalProperties: false
|
||||
|
||||
video-firmware:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
description: |
|
||||
Firmware subnode is needed when the platform does not
|
||||
have TrustZone.
|
||||
|
||||
properties:
|
||||
iommus:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- iommus
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- power-domain-names
|
||||
|
|
|
|||
|
|
@ -43,8 +43,7 @@ properties:
|
|||
- const: vcodec_bus
|
||||
|
||||
iommus:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
maxItems: 1
|
||||
|
||||
interconnects:
|
||||
maxItems: 2
|
||||
|
|
@ -120,12 +119,7 @@ examples:
|
|||
<&mmss_noc MASTER_VIDEO_P0 0 &mc_virt SLAVE_EBI1 0>;
|
||||
interconnect-names = "cpu-cfg", "video-mem";
|
||||
|
||||
iommus = <&apps_smmu 0x2180 0x20>,
|
||||
<&apps_smmu 0x2184 0x20>;
|
||||
iommus = <&apps_smmu 0x2180 0x20>;
|
||||
|
||||
memory-region = <&video_mem>;
|
||||
|
||||
video-firmware {
|
||||
iommus = <&apps_smmu 0x21a2 0x0>;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
471
Documentation/devicetree/bindings/media/qcom,sm6350-camss.yaml
Normal file
471
Documentation/devicetree/bindings/media/qcom,sm6350-camss.yaml
Normal file
|
|
@ -0,0 +1,471 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/media/qcom,sm6350-camss.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm SM6350 Camera Subsystem (CAMSS)
|
||||
|
||||
maintainers:
|
||||
- Luca Weiss <luca.weiss@fairphone.com>
|
||||
|
||||
description:
|
||||
The CAMSS IP is a CSI decoder and ISP present on Qualcomm platforms.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,sm6350-camss
|
||||
|
||||
reg:
|
||||
maxItems: 24
|
||||
|
||||
reg-names:
|
||||
items:
|
||||
- const: csid0
|
||||
- const: csid1
|
||||
- const: csid2
|
||||
- const: csid_lite
|
||||
- const: csiphy0
|
||||
- const: csiphy1
|
||||
- const: csiphy2
|
||||
- const: csiphy3
|
||||
- const: vfe0
|
||||
- const: vfe1
|
||||
- const: vfe2
|
||||
- const: vfe_lite
|
||||
- const: a5_csr
|
||||
- const: a5_qgic
|
||||
- const: a5_sierra
|
||||
- const: bps
|
||||
- const: camnoc
|
||||
- const: core_top_csr_tcsr
|
||||
- const: cpas_cdm
|
||||
- const: cpas_top
|
||||
- const: ipe
|
||||
- const: jpeg_dma
|
||||
- const: jpeg_enc
|
||||
- const: lrme
|
||||
|
||||
clocks:
|
||||
maxItems: 39
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: cam_axi
|
||||
- const: soc_ahb
|
||||
- const: camnoc_axi
|
||||
- const: core_ahb
|
||||
- const: cpas_ahb
|
||||
- const: csiphy0
|
||||
- const: csiphy0_timer
|
||||
- const: csiphy1
|
||||
- const: csiphy1_timer
|
||||
- const: csiphy2
|
||||
- const: csiphy2_timer
|
||||
- const: csiphy3
|
||||
- const: csiphy3_timer
|
||||
- const: vfe0_axi
|
||||
- const: vfe0
|
||||
- const: vfe0_cphy_rx
|
||||
- const: vfe0_csid
|
||||
- const: vfe1_axi
|
||||
- const: vfe1
|
||||
- const: vfe1_cphy_rx
|
||||
- const: vfe1_csid
|
||||
- const: vfe2_axi
|
||||
- const: vfe2
|
||||
- const: vfe2_cphy_rx
|
||||
- const: vfe2_csid
|
||||
- const: vfe_lite
|
||||
- const: vfe_lite_cphy_rx
|
||||
- const: vfe_lite_csid
|
||||
- const: bps
|
||||
- const: bps_ahb
|
||||
- const: bps_areg
|
||||
- const: bps_axi
|
||||
- const: icp
|
||||
- const: ipe0
|
||||
- const: ipe0_ahb
|
||||
- const: ipe0_areg
|
||||
- const: ipe0_axi
|
||||
- const: jpeg
|
||||
- const: lrme
|
||||
|
||||
interrupts:
|
||||
maxItems: 18
|
||||
|
||||
interrupt-names:
|
||||
items:
|
||||
- const: csid0
|
||||
- const: csid1
|
||||
- const: csid2
|
||||
- const: csid_lite
|
||||
- const: csiphy0
|
||||
- const: csiphy1
|
||||
- const: csiphy2
|
||||
- const: csiphy3
|
||||
- const: vfe0
|
||||
- const: vfe1
|
||||
- const: vfe2
|
||||
- const: vfe_lite
|
||||
- const: a5
|
||||
- const: cpas
|
||||
- const: cpas_cdm
|
||||
- const: jpeg_dma
|
||||
- const: jpeg_enc
|
||||
- const: lrme
|
||||
|
||||
interconnects:
|
||||
maxItems: 4
|
||||
|
||||
interconnect-names:
|
||||
items:
|
||||
- const: ahb
|
||||
- const: hf_mnoc
|
||||
- const: sf_mnoc
|
||||
- const: sf_icp_mnoc
|
||||
|
||||
iommus:
|
||||
maxItems: 14
|
||||
|
||||
power-domains:
|
||||
maxItems: 6
|
||||
|
||||
power-domain-names:
|
||||
items:
|
||||
- const: ife0
|
||||
- const: ife1
|
||||
- const: ife2
|
||||
- const: top
|
||||
- const: bps
|
||||
- const: ipe
|
||||
|
||||
vdd-csiphy0-0p9-supply:
|
||||
description:
|
||||
Phandle to a 0.9V regulator supply to CSIPHY0.
|
||||
|
||||
vdd-csiphy0-1p25-supply:
|
||||
description:
|
||||
Phandle to a 1.25V regulator supply to CSIPHY0.
|
||||
|
||||
vdd-csiphy1-0p9-supply:
|
||||
description:
|
||||
Phandle to a 0.9V regulator supply to CSIPHY1.
|
||||
|
||||
vdd-csiphy1-1p25-supply:
|
||||
description:
|
||||
Phandle to a 1.25V regulator supply to CSIPHY1.
|
||||
|
||||
vdd-csiphy2-0p9-supply:
|
||||
description:
|
||||
Phandle to a 0.9V regulator supply to CSIPHY2.
|
||||
|
||||
vdd-csiphy2-1p25-supply:
|
||||
description:
|
||||
Phandle to a 1.25V regulator supply to CSIPHY2.
|
||||
|
||||
vdd-csiphy3-0p9-supply:
|
||||
description:
|
||||
Phandle to a 0.9V regulator supply to CSIPHY3.
|
||||
|
||||
vdd-csiphy3-1p25-supply:
|
||||
description:
|
||||
Phandle to a 1.25V regulator supply to CSIPHY3.
|
||||
|
||||
ports:
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
description:
|
||||
CSI input ports.
|
||||
|
||||
patternProperties:
|
||||
"^port@[0-3]$":
|
||||
$ref: /schemas/graph.yaml#/$defs/port-base
|
||||
unevaluatedProperties: false
|
||||
|
||||
description:
|
||||
Input port for receiving CSI data from a CSIPHY.
|
||||
|
||||
properties:
|
||||
endpoint:
|
||||
$ref: video-interfaces.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
properties:
|
||||
data-lanes:
|
||||
minItems: 1
|
||||
maxItems: 4
|
||||
|
||||
bus-type:
|
||||
enum:
|
||||
- 1 # MEDIA_BUS_TYPE_CSI2_CPHY
|
||||
- 4 # MEDIA_BUS_TYPE_CSI2_DPHY
|
||||
|
||||
required:
|
||||
- data-lanes
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- reg-names
|
||||
- clocks
|
||||
- clock-names
|
||||
- interrupts
|
||||
- interrupt-names
|
||||
- interconnects
|
||||
- interconnect-names
|
||||
- iommus
|
||||
- power-domains
|
||||
- power-domain-names
|
||||
- ports
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,gcc-sm6350.h>
|
||||
#include <dt-bindings/clock/qcom,sm6350-camcc.h>
|
||||
#include <dt-bindings/interconnect/qcom,icc.h>
|
||||
#include <dt-bindings/interconnect/qcom,sm6350.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/media/video-interfaces.h>
|
||||
#include <dt-bindings/power/qcom-rpmpd.h>
|
||||
|
||||
soc {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
isp@acb3000 {
|
||||
compatible = "qcom,sm6350-camss";
|
||||
|
||||
reg = <0x0 0x0acb3000 0x0 0x1000>,
|
||||
<0x0 0x0acba000 0x0 0x1000>,
|
||||
<0x0 0x0acc1000 0x0 0x1000>,
|
||||
<0x0 0x0acc8000 0x0 0x1000>,
|
||||
<0x0 0x0ac65000 0x0 0x1000>,
|
||||
<0x0 0x0ac66000 0x0 0x1000>,
|
||||
<0x0 0x0ac67000 0x0 0x1000>,
|
||||
<0x0 0x0ac68000 0x0 0x1000>,
|
||||
<0x0 0x0acaf000 0x0 0x4000>,
|
||||
<0x0 0x0acb6000 0x0 0x4000>,
|
||||
<0x0 0x0acbd000 0x0 0x4000>,
|
||||
<0x0 0x0acc4000 0x0 0x4000>,
|
||||
<0x0 0x0ac18000 0x0 0x3000>,
|
||||
<0x0 0x0ac00000 0x0 0x6000>,
|
||||
<0x0 0x0ac10000 0x0 0x8000>,
|
||||
<0x0 0x0ac6f000 0x0 0x8000>,
|
||||
<0x0 0x0ac42000 0x0 0x4600>,
|
||||
<0x0 0x01fc0000 0x0 0x40000>,
|
||||
<0x0 0x0ac48000 0x0 0x1000>,
|
||||
<0x0 0x0ac40000 0x0 0x1000>,
|
||||
<0x0 0x0ac87000 0x0 0xa000>,
|
||||
<0x0 0x0ac52000 0x0 0x4000>,
|
||||
<0x0 0x0ac4e000 0x0 0x4000>,
|
||||
<0x0 0x0ac6b000 0x0 0xa00>;
|
||||
reg-names = "csid0",
|
||||
"csid1",
|
||||
"csid2",
|
||||
"csid_lite",
|
||||
"csiphy0",
|
||||
"csiphy1",
|
||||
"csiphy2",
|
||||
"csiphy3",
|
||||
"vfe0",
|
||||
"vfe1",
|
||||
"vfe2",
|
||||
"vfe_lite",
|
||||
"a5_csr",
|
||||
"a5_qgic",
|
||||
"a5_sierra",
|
||||
"bps",
|
||||
"camnoc",
|
||||
"core_top_csr_tcsr",
|
||||
"cpas_cdm",
|
||||
"cpas_top",
|
||||
"ipe",
|
||||
"jpeg_dma",
|
||||
"jpeg_enc",
|
||||
"lrme";
|
||||
|
||||
clocks = <&gcc GCC_CAMERA_AXI_CLK>,
|
||||
<&camcc CAMCC_SOC_AHB_CLK>,
|
||||
<&camcc CAMCC_CAMNOC_AXI_CLK>,
|
||||
<&camcc CAMCC_CORE_AHB_CLK>,
|
||||
<&camcc CAMCC_CPAS_AHB_CLK>,
|
||||
<&camcc CAMCC_CSIPHY0_CLK>,
|
||||
<&camcc CAMCC_CSI0PHYTIMER_CLK>,
|
||||
<&camcc CAMCC_CSIPHY1_CLK>,
|
||||
<&camcc CAMCC_CSI1PHYTIMER_CLK>,
|
||||
<&camcc CAMCC_CSIPHY2_CLK>,
|
||||
<&camcc CAMCC_CSI2PHYTIMER_CLK>,
|
||||
<&camcc CAMCC_CSIPHY3_CLK>,
|
||||
<&camcc CAMCC_CSI3PHYTIMER_CLK>,
|
||||
<&camcc CAMCC_IFE_0_AXI_CLK>,
|
||||
<&camcc CAMCC_IFE_0_CLK>,
|
||||
<&camcc CAMCC_IFE_0_CPHY_RX_CLK>,
|
||||
<&camcc CAMCC_IFE_0_CSID_CLK>,
|
||||
<&camcc CAMCC_IFE_1_AXI_CLK>,
|
||||
<&camcc CAMCC_IFE_1_CLK>,
|
||||
<&camcc CAMCC_IFE_1_CPHY_RX_CLK>,
|
||||
<&camcc CAMCC_IFE_1_CSID_CLK>,
|
||||
<&camcc CAMCC_IFE_2_AXI_CLK>,
|
||||
<&camcc CAMCC_IFE_2_CLK>,
|
||||
<&camcc CAMCC_IFE_2_CPHY_RX_CLK>,
|
||||
<&camcc CAMCC_IFE_2_CSID_CLK>,
|
||||
<&camcc CAMCC_IFE_LITE_CLK>,
|
||||
<&camcc CAMCC_IFE_LITE_CPHY_RX_CLK>,
|
||||
<&camcc CAMCC_IFE_LITE_CSID_CLK>,
|
||||
<&camcc CAMCC_BPS_CLK>,
|
||||
<&camcc CAMCC_BPS_AHB_CLK>,
|
||||
<&camcc CAMCC_BPS_AREG_CLK>,
|
||||
<&camcc CAMCC_BPS_AXI_CLK>,
|
||||
<&camcc CAMCC_ICP_CLK>,
|
||||
<&camcc CAMCC_IPE_0_CLK>,
|
||||
<&camcc CAMCC_IPE_0_AHB_CLK>,
|
||||
<&camcc CAMCC_IPE_0_AREG_CLK>,
|
||||
<&camcc CAMCC_IPE_0_AXI_CLK>,
|
||||
<&camcc CAMCC_JPEG_CLK>,
|
||||
<&camcc CAMCC_LRME_CLK>;
|
||||
clock-names = "cam_axi",
|
||||
"soc_ahb",
|
||||
"camnoc_axi",
|
||||
"core_ahb",
|
||||
"cpas_ahb",
|
||||
"csiphy0",
|
||||
"csiphy0_timer",
|
||||
"csiphy1",
|
||||
"csiphy1_timer",
|
||||
"csiphy2",
|
||||
"csiphy2_timer",
|
||||
"csiphy3",
|
||||
"csiphy3_timer",
|
||||
"vfe0_axi",
|
||||
"vfe0",
|
||||
"vfe0_cphy_rx",
|
||||
"vfe0_csid",
|
||||
"vfe1_axi",
|
||||
"vfe1",
|
||||
"vfe1_cphy_rx",
|
||||
"vfe1_csid",
|
||||
"vfe2_axi",
|
||||
"vfe2",
|
||||
"vfe2_cphy_rx",
|
||||
"vfe2_csid",
|
||||
"vfe_lite",
|
||||
"vfe_lite_cphy_rx",
|
||||
"vfe_lite_csid",
|
||||
"bps",
|
||||
"bps_ahb",
|
||||
"bps_areg",
|
||||
"bps_axi",
|
||||
"icp",
|
||||
"ipe0",
|
||||
"ipe0_ahb",
|
||||
"ipe0_areg",
|
||||
"ipe0_axi",
|
||||
"jpeg",
|
||||
"lrme";
|
||||
|
||||
interrupts = <GIC_SPI 464 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 466 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 717 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 473 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 477 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 478 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 479 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 461 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 465 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 467 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 718 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 472 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 463 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 459 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 469 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 475 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 474 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 476 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupt-names = "csid0",
|
||||
"csid1",
|
||||
"csid2",
|
||||
"csid_lite",
|
||||
"csiphy0",
|
||||
"csiphy1",
|
||||
"csiphy2",
|
||||
"csiphy3",
|
||||
"vfe0",
|
||||
"vfe1",
|
||||
"vfe2",
|
||||
"vfe_lite",
|
||||
"a5",
|
||||
"cpas",
|
||||
"cpas_cdm",
|
||||
"jpeg_dma",
|
||||
"jpeg_enc",
|
||||
"lrme";
|
||||
|
||||
interconnects = <&gem_noc MASTER_AMPSS_M0 QCOM_ICC_TAG_ACTIVE_ONLY
|
||||
&config_noc SLAVE_CAMERA_CFG QCOM_ICC_TAG_ACTIVE_ONLY>,
|
||||
<&mmss_noc MASTER_CAMNOC_HF QCOM_ICC_TAG_ALWAYS
|
||||
&clk_virt SLAVE_EBI_CH0 QCOM_ICC_TAG_ALWAYS>,
|
||||
<&mmss_noc MASTER_CAMNOC_SF QCOM_ICC_TAG_ALWAYS
|
||||
&clk_virt SLAVE_EBI_CH0 QCOM_ICC_TAG_ALWAYS>,
|
||||
<&mmss_noc MASTER_CAMNOC_ICP QCOM_ICC_TAG_ALWAYS
|
||||
&clk_virt SLAVE_EBI_CH0 QCOM_ICC_TAG_ALWAYS>;
|
||||
interconnect-names = "ahb",
|
||||
"hf_mnoc",
|
||||
"sf_mnoc",
|
||||
"sf_icp_mnoc";
|
||||
|
||||
iommus = <&apps_smmu 0x820 0xc0>,
|
||||
<&apps_smmu 0x840 0x0>,
|
||||
<&apps_smmu 0x860 0xc0>,
|
||||
<&apps_smmu 0x880 0x0>,
|
||||
<&apps_smmu 0xc40 0x20>,
|
||||
<&apps_smmu 0xc60 0x20>,
|
||||
<&apps_smmu 0xc80 0x0>,
|
||||
<&apps_smmu 0xca2 0x0>,
|
||||
<&apps_smmu 0xcc0 0x20>,
|
||||
<&apps_smmu 0xce0 0x20>,
|
||||
<&apps_smmu 0xd00 0x20>,
|
||||
<&apps_smmu 0xd20 0x20>,
|
||||
<&apps_smmu 0xd40 0x20>,
|
||||
<&apps_smmu 0xd60 0x20>;
|
||||
|
||||
power-domains = <&camcc IFE_0_GDSC>,
|
||||
<&camcc IFE_1_GDSC>,
|
||||
<&camcc IFE_2_GDSC>,
|
||||
<&camcc TITAN_TOP_GDSC>,
|
||||
<&camcc BPS_GDSC>,
|
||||
<&camcc IPE_0_GDSC>;
|
||||
power-domain-names = "ife0",
|
||||
"ife1",
|
||||
"ife2",
|
||||
"top",
|
||||
"bps",
|
||||
"ipe";
|
||||
|
||||
vdd-csiphy0-0p9-supply = <&vreg_l18a>;
|
||||
vdd-csiphy0-1p25-supply = <&vreg_l22a>;
|
||||
vdd-csiphy1-0p9-supply = <&vreg_l18a>;
|
||||
vdd-csiphy1-1p25-supply = <&vreg_l22a>;
|
||||
vdd-csiphy2-0p9-supply = <&vreg_l18a>;
|
||||
vdd-csiphy2-1p25-supply = <&vreg_l22a>;
|
||||
vdd-csiphy3-0p9-supply = <&vreg_l18a>;
|
||||
vdd-csiphy3-1p25-supply = <&vreg_l22a>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
|
||||
csiphy0_ep: endpoint {
|
||||
data-lanes = <0 1 2 3>;
|
||||
bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
|
||||
remote-endpoint = <&sensor_ep>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -10,19 +10,25 @@ maintainers:
|
|||
- Stanimir Varbanov <stanimir.varbanov@linaro.org>
|
||||
|
||||
description: |
|
||||
The Venus IP is a video encode and decode accelerator present
|
||||
on Qualcomm platforms
|
||||
The Iris v2.xx IP is a video encode and decode accelerator present on
|
||||
Qualcomm platforms
|
||||
|
||||
allOf:
|
||||
- $ref: qcom,venus-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,sm8250-venus
|
||||
oneOf:
|
||||
- const: qcom,sm8250-venus
|
||||
- items:
|
||||
- enum:
|
||||
- qcom,sc8280xp-iris
|
||||
- qcom,sm8350-iris
|
||||
- const: qcom,sm8250-venus
|
||||
|
||||
power-domains:
|
||||
minItems: 2
|
||||
maxItems: 3
|
||||
maxItems: 4
|
||||
|
||||
power-domain-names:
|
||||
minItems: 2
|
||||
|
|
@ -30,6 +36,7 @@ properties:
|
|||
- const: venus
|
||||
- const: vcodec0
|
||||
- const: mx
|
||||
- const: mmcx
|
||||
|
||||
clocks:
|
||||
maxItems: 3
|
||||
|
|
@ -114,8 +121,12 @@ examples:
|
|||
interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
|
||||
power-domains = <&videocc MVS0C_GDSC>,
|
||||
<&videocc MVS0_GDSC>,
|
||||
<&rpmhpd RPMHPD_MX>;
|
||||
power-domain-names = "venus", "vcodec0", "mx";
|
||||
<&rpmhpd RPMHPD_MX>,
|
||||
<&rpmhpd RPMHPD_MMCX>;
|
||||
power-domain-names = "venus",
|
||||
"vcodec0",
|
||||
"mx",
|
||||
"mmcx";
|
||||
|
||||
clocks = <&gcc GCC_VIDEO_AXI0_CLK>,
|
||||
<&videocc VIDEO_CC_MVS0C_CLK>,
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ properties:
|
|||
- qcom,qcs8300-iris
|
||||
- qcom,sm8550-iris
|
||||
- qcom,sm8650-iris
|
||||
- qcom,x1p42100-iris
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
|
@ -41,13 +42,16 @@ properties:
|
|||
- const: mmcx
|
||||
|
||||
clocks:
|
||||
maxItems: 3
|
||||
minItems: 3
|
||||
maxItems: 4
|
||||
|
||||
clock-names:
|
||||
minItems: 3
|
||||
items:
|
||||
- const: iface
|
||||
- const: core
|
||||
- const: vcodec0_core
|
||||
- const: vcodec0_bse
|
||||
|
||||
firmware-name:
|
||||
maxItems: 1
|
||||
|
|
@ -115,6 +119,23 @@ allOf:
|
|||
maxItems: 1
|
||||
reset-names:
|
||||
maxItems: 1
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,x1p42100-iris
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
minItems: 4
|
||||
clock-names:
|
||||
minItems: 4
|
||||
else:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 3
|
||||
clock-names:
|
||||
maxItems: 3
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
|
|
|
|||
|
|
@ -47,21 +47,6 @@ properties:
|
|||
minItems: 1
|
||||
maxItems: 4
|
||||
|
||||
video-firmware:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
description: |
|
||||
Firmware subnode is needed when the platform does not
|
||||
have TrustZone.
|
||||
|
||||
properties:
|
||||
iommus:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- iommus
|
||||
|
||||
required:
|
||||
- reg
|
||||
- clocks
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ properties:
|
|||
- renesas,r9a07g043u-fcpvd # RZ/G2UL
|
||||
- renesas,r9a07g044-fcpvd # RZ/G2{L,LC}
|
||||
- renesas,r9a07g054-fcpvd # RZ/V2L
|
||||
- renesas,r9a08g046-fcpvd # RZ/G3L
|
||||
- renesas,r9a09g047-fcpvd # RZ/G3E
|
||||
- renesas,r9a09g056-fcpvd # RZ/V2N
|
||||
- renesas,r9a09g057-fcpvd # RZ/V2H(P)
|
||||
- const: renesas,fcpv # Generic FCP for VSP fallback
|
||||
|
|
@ -77,6 +79,8 @@ allOf:
|
|||
- renesas,r9a07g043u-fcpvd
|
||||
- renesas,r9a07g044-fcpvd
|
||||
- renesas,r9a07g054-fcpvd
|
||||
- renesas,r9a08g046-fcpvd
|
||||
- renesas,r9a09g047-fcpvd
|
||||
- renesas,r9a09g056-fcpvd
|
||||
- renesas,r9a09g057-fcpvd
|
||||
then:
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ properties:
|
|||
- enum:
|
||||
- renesas,r9a07g043u-vsp2 # RZ/G2UL
|
||||
- renesas,r9a07g054-vsp2 # RZ/V2L
|
||||
- renesas,r9a08g046-vsp2 # RZ/G3L
|
||||
- renesas,r9a09g047-vsp2 # RZ/G3E
|
||||
- renesas,r9a09g056-vsp2 # RZ/V2N
|
||||
- renesas,r9a09g057-vsp2 # RZ/V2H(P)
|
||||
- const: renesas,r9a07g044-vsp2 # RZ/G2L fallback
|
||||
|
|
|
|||
|
|
@ -16,9 +16,15 @@ description:
|
|||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- fsl,imx93-mipi-csi2
|
||||
- rockchip,rk3568-mipi-csi2
|
||||
oneOf:
|
||||
- enum:
|
||||
- fsl,imx93-mipi-csi2
|
||||
- fsl,imx95-mipi-csi2
|
||||
- rockchip,rk3568-mipi-csi2
|
||||
- items:
|
||||
- enum:
|
||||
- rockchip,rk3588-mipi-csi2
|
||||
- const: rockchip,rk3568-mipi-csi2
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
|
@ -135,6 +141,21 @@ allOf:
|
|||
clock-names:
|
||||
minItems: 2
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: fsl,imx95-mipi-csi2
|
||||
then:
|
||||
properties:
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
interrupt-names: false
|
||||
clocks:
|
||||
maxItems: 1
|
||||
clock-names:
|
||||
maxItems: 1
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/rk3568-cru.h>
|
||||
|
|
|
|||
|
|
@ -15,9 +15,15 @@ description:
|
|||
the data from camera sensors, video decoders, or other companion ICs and
|
||||
transfers it into system main memory by AXI bus.
|
||||
|
||||
The Rockchip RK3588 Video Capture (VICAP) is similar to its RK3568
|
||||
counterpart, but features six MIPI CSI-2 ports and additional connections
|
||||
to the image signal processor (ISP) blocks.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: rockchip,rk3568-vicap
|
||||
enum:
|
||||
- rockchip,rk3568-vicap
|
||||
- rockchip,rk3588-vicap
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
|
@ -26,11 +32,8 @@ properties:
|
|||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: ACLK
|
||||
- description: HCLK
|
||||
- description: DCLK
|
||||
- description: ICLK
|
||||
minItems: 4
|
||||
maxItems: 5
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
|
|
@ -38,25 +41,19 @@ properties:
|
|||
- const: hclk
|
||||
- const: dclk
|
||||
- const: iclk
|
||||
- const: iclk1
|
||||
minItems: 4
|
||||
|
||||
iommus:
|
||||
maxItems: 1
|
||||
|
||||
resets:
|
||||
items:
|
||||
- description: ARST
|
||||
- description: HRST
|
||||
- description: DRST
|
||||
- description: PRST
|
||||
- description: IRST
|
||||
minItems: 5
|
||||
maxItems: 9
|
||||
|
||||
reset-names:
|
||||
items:
|
||||
- const: arst
|
||||
- const: hrst
|
||||
- const: drst
|
||||
- const: prst
|
||||
- const: irst
|
||||
minItems: 5
|
||||
maxItems: 9
|
||||
|
||||
rockchip,grf:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
|
|
@ -67,8 +64,15 @@ properties:
|
|||
|
||||
ports:
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
additionalProperties: false
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
$ref: /schemas/graph.yaml#/$defs/port-base
|
||||
unevaluatedProperties: false
|
||||
|
|
@ -100,13 +104,75 @@ properties:
|
|||
|
||||
port@1:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Port connected to the MIPI CSI-2 receiver output.
|
||||
description: Port connected to the MIPI CSI-2 receiver 0 output.
|
||||
|
||||
properties:
|
||||
endpoint:
|
||||
$ref: video-interfaces.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
port@2:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Port connected to the MIPI CSI-2 receiver 1 output.
|
||||
|
||||
properties:
|
||||
endpoint:
|
||||
$ref: video-interfaces.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
port@3:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Port connected to the MIPI CSI-2 receiver 2 output.
|
||||
|
||||
properties:
|
||||
endpoint:
|
||||
$ref: video-interfaces.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
port@4:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Port connected to the MIPI CSI-2 receiver 3 output.
|
||||
|
||||
properties:
|
||||
endpoint:
|
||||
$ref: video-interfaces.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
port@5:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Port connected to the MIPI CSI-2 receiver 4 output.
|
||||
|
||||
properties:
|
||||
endpoint:
|
||||
$ref: video-interfaces.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
port@6:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Port connected to the MIPI CSI-2 receiver 5 output.
|
||||
|
||||
properties:
|
||||
endpoint:
|
||||
$ref: video-interfaces.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
port@10:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Port connected to the ISP0 input.
|
||||
|
||||
properties:
|
||||
endpoint:
|
||||
$ref: video-interfaces.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
port@11:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Port connected to the ISP1 input.
|
||||
|
||||
properties:
|
||||
endpoint:
|
||||
$ref: video-interfaces.yaml#
|
||||
unevaluatedProperties: false
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
|
@ -114,6 +180,75 @@ required:
|
|||
- clocks
|
||||
- ports
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: rockchip,rk3568-vicap
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 4
|
||||
|
||||
clock-names:
|
||||
maxItems: 4
|
||||
|
||||
resets:
|
||||
maxItems: 5
|
||||
|
||||
reset-names:
|
||||
items:
|
||||
- const: arst
|
||||
- const: hrst
|
||||
- const: drst
|
||||
- const: prst
|
||||
- const: irst
|
||||
|
||||
ports:
|
||||
properties:
|
||||
port@2: false
|
||||
|
||||
port@3: false
|
||||
|
||||
port@4: false
|
||||
|
||||
port@5: false
|
||||
|
||||
port@6: false
|
||||
|
||||
port@10: false
|
||||
|
||||
port@11: false
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: rockchip,rk3588-vicap
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
minItems: 5
|
||||
|
||||
clock-names:
|
||||
minItems: 5
|
||||
|
||||
resets:
|
||||
minItems: 9
|
||||
|
||||
reset-names:
|
||||
items:
|
||||
- const: arst
|
||||
- const: hrst
|
||||
- const: drst
|
||||
- const: irst0
|
||||
- const: irst1
|
||||
- const: irst2
|
||||
- const: irst3
|
||||
- const: irst4
|
||||
- const: irst5
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
|
|
|
|||
|
|
@ -9,7 +9,11 @@ title: Rockchip 2D raster graphic acceleration controller (RGA)
|
|||
description:
|
||||
RGA is a standalone 2D raster graphic acceleration unit. It accelerates 2D
|
||||
graphics operations, such as point/line drawing, image scaling, rotation,
|
||||
BitBLT, alpha blending and image blur/sharpness.
|
||||
BitBLT, alpha blending and image blur/sharpness. There exist many versions
|
||||
of this unit that differ in the supported inputs/output formats,
|
||||
the attached IOMMU and the supported operations on the input. As some SoCs
|
||||
include multiple RGA units with different versions, a more specific
|
||||
compatible name to differentiate the concrete unit is used for them.
|
||||
|
||||
maintainers:
|
||||
- Jacob Chen <jacob-chen@iotwrt.com>
|
||||
|
|
@ -20,6 +24,7 @@ properties:
|
|||
oneOf:
|
||||
- const: rockchip,rk3288-rga
|
||||
- const: rockchip,rk3399-rga
|
||||
- const: rockchip,rk3588-rga3
|
||||
- items:
|
||||
- enum:
|
||||
- rockchip,rk3228-rga
|
||||
|
|
@ -45,6 +50,9 @@ properties:
|
|||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
iommus:
|
||||
maxItems: 1
|
||||
|
||||
resets:
|
||||
maxItems: 3
|
||||
|
||||
|
|
|
|||
|
|
@ -20,11 +20,44 @@ properties:
|
|||
const: ti,j721e-csi2rx-shim
|
||||
|
||||
dmas:
|
||||
maxItems: 1
|
||||
minItems: 1
|
||||
maxItems: 32
|
||||
|
||||
dma-names:
|
||||
minItems: 1
|
||||
items:
|
||||
- const: rx0
|
||||
- const: rx1
|
||||
- const: rx2
|
||||
- const: rx3
|
||||
- const: rx4
|
||||
- const: rx5
|
||||
- const: rx6
|
||||
- const: rx7
|
||||
- const: rx8
|
||||
- const: rx9
|
||||
- const: rx10
|
||||
- const: rx11
|
||||
- const: rx12
|
||||
- const: rx13
|
||||
- const: rx14
|
||||
- const: rx15
|
||||
- const: rx16
|
||||
- const: rx17
|
||||
- const: rx18
|
||||
- const: rx19
|
||||
- const: rx20
|
||||
- const: rx21
|
||||
- const: rx22
|
||||
- const: rx23
|
||||
- const: rx24
|
||||
- const: rx25
|
||||
- const: rx26
|
||||
- const: rx27
|
||||
- const: rx28
|
||||
- const: rx29
|
||||
- const: rx30
|
||||
- const: rx31
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
|
@ -62,8 +95,8 @@ examples:
|
|||
|
||||
ti_csi2rx0: ticsi2rx@4500000 {
|
||||
compatible = "ti,j721e-csi2rx-shim";
|
||||
dmas = <&main_udmap 0x4940>;
|
||||
dma-names = "rx0";
|
||||
dmas = <&main_udmap 0x4940>, <&main_udmap 0x4941>;
|
||||
dma-names = "rx0", "rx1";
|
||||
reg = <0x4500000 0x1000>;
|
||||
power-domains = <&k3_pds 26 TI_SCI_PD_EXCLUSIVE>;
|
||||
#address-cells = <1>;
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ of the device. This is because the power state of the device is only changed
|
|||
after the power state transition has taken place. The ``s_ctrl`` callback can be
|
||||
used to obtain device's power state after the power state transition:
|
||||
|
||||
.. c:function:: int pm_runtime_get_if_in_use(struct device *dev);
|
||||
.. c:function:: int pm_runtime_get_if_active(struct device *dev);
|
||||
|
||||
The function returns a non-zero value if it succeeded getting the power count or
|
||||
runtime PM was disabled, in either of which cases the driver may proceed to
|
||||
|
|
|
|||
|
|
@ -93,7 +93,8 @@ where
|
|||
* - variable or constant
|
||||
- description
|
||||
* - link_freq
|
||||
- The value of the ``V4L2_CID_LINK_FREQ`` integer64 menu item.
|
||||
- The value of the :ref:`V4L2_CID_LINK_FREQ <v4l2-cid-link-freq>` integer64
|
||||
menu item.
|
||||
* - nr_of_lanes
|
||||
- Number of data lanes used on the CSI-2 link.
|
||||
* - 2
|
||||
|
|
|
|||
|
|
@ -524,6 +524,29 @@ ignore define CEC_OP_AUD_OUT_COMPENSATED_DELAY
|
|||
ignore define CEC_OP_AUD_OUT_COMPENSATED_NO_DELAY
|
||||
ignore define CEC_OP_AUD_OUT_COMPENSATED_PARTIAL_DELAY
|
||||
|
||||
ignore define CEC_MSG_REQUEST_LIP_SUPPORT
|
||||
ignore define CEC_MSG_REPORT_LIP_SUPPORT
|
||||
ignore define CEC_MSG_REQUEST_AUDIO_AND_VIDEO_LATENCY
|
||||
|
||||
ignore define CEC_OP_HDR_FORMAT_GAMMA_SDR
|
||||
ignore define CEC_OP_HDR_FORMAT_GAMMA_HDR
|
||||
ignore define CEC_OP_HDR_FORMAT_PQ
|
||||
ignore define CEC_OP_HDR_FORMAT_HLG
|
||||
ignore define CEC_OP_HDR_FORMAT_DYNAMIC_HDR_TYPE_1
|
||||
ignore define CEC_OP_HDR_FORMAT_DYNAMIC_HDR_TYPE_2
|
||||
ignore define CEC_OP_HDR_FORMAT_DYNAMIC_HDR_TYPE_4
|
||||
ignore define CEC_OP_HDR_FORMAT_DV_SINK_LED
|
||||
ignore define CEC_OP_HDR_FORMAT_DV_SOURCE_LED
|
||||
ignore define CEC_OP_HDR_FORMAT_HDR10PLUS
|
||||
ignore define CEC_OP_HDR_FORMAT_ETSI_TS_103_433
|
||||
|
||||
ignore define CEC_MSG_REPORT_AUDIO_AND_VIDEO_LATENCY
|
||||
ignore define CEC_MSG_REQUEST_AUDIO_LATENCY
|
||||
ignore define CEC_MSG_REPORT_AUDIO_LATENCY
|
||||
ignore define CEC_MSG_REQUEST_VIDEO_LATENCY
|
||||
ignore define CEC_MSG_REPORT_VIDEO_LATENCY
|
||||
ignore define CEC_MSG_UPDATE_SQID
|
||||
|
||||
ignore define CEC_MSG_CDC_MESSAGE
|
||||
|
||||
ignore define CEC_MSG_CDC_HEC_INQUIRE_STATE
|
||||
|
|
|
|||
|
|
@ -109,6 +109,8 @@ IOCTL reference
|
|||
UVCIOC_CTRL_MAP - Map a UVC control to a V4L2 control
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**This IOCTL is deprecated and will be eventually removed**
|
||||
|
||||
Argument: struct uvc_xu_control_mapping
|
||||
|
||||
**Description**:
|
||||
|
|
|
|||
|
|
@ -1877,7 +1877,7 @@ params syntax' of the :ref:`vp9` specification for more details.
|
|||
:stub-columns: 0
|
||||
:widths: 1 1 2
|
||||
|
||||
* - __u8
|
||||
* - __s16
|
||||
- ``feature_data[8][4]``
|
||||
- Data attached to each feature. Data entry is only valid if the feature
|
||||
is enabled. The array shall be indexed with segment number as the first dimension
|
||||
|
|
|
|||
|
|
@ -737,6 +737,12 @@ enum v4l2_mpeg_video_frame_skip_mode -
|
|||
Enable writing sample aspect ratio in the Video Usability
|
||||
Information. Applicable to the H264 encoder.
|
||||
|
||||
``V4L2_CID_MPEG_VIDEO_BACKGROUND_DETECTION (boolean)``
|
||||
If enabled, the encoder detect a background region in frame and
|
||||
use low bits or skip mode to encode the background region.
|
||||
If a lot of scenes are stationary or background, It may help to
|
||||
reduce the video bitrate. Applicable to the encoder.
|
||||
|
||||
.. _v4l2-mpeg-video-h264-vui-sar-idc:
|
||||
|
||||
``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC``
|
||||
|
|
|
|||
|
|
@ -24,7 +24,10 @@ Image Process Control IDs
|
|||
.. _v4l2-cid-link-freq:
|
||||
|
||||
``V4L2_CID_LINK_FREQ (integer menu)``
|
||||
The frequency of the data bus (e.g. parallel or CSI-2).
|
||||
The fundamental frequency of the operating symbol rate (serial interfaces
|
||||
such as CSI-2) or the sampling rate (parallel interfaces such as DVP or
|
||||
Bt.565) of the data interface. For CSI-2, the frequency is equal to
|
||||
_1 / (2 * UI)_.
|
||||
|
||||
.. _v4l2-cid-pixel-rate:
|
||||
|
||||
|
|
|
|||
52
MAINTAINERS
52
MAINTAINERS
|
|
@ -1167,6 +1167,31 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux.git
|
|||
F: drivers/iommu/amd/
|
||||
F: include/linux/amd-iommu.h
|
||||
|
||||
AMD ISP4 DRIVER
|
||||
M: Bin Du <bin.du@amd.com>
|
||||
M: Nirujogi Pratap <pratap.nirujogi@amd.com>
|
||||
L: linux-media@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git git://linuxtv.org/media.git
|
||||
F: Documentation/admin-guide/media/amdisp4-1.rst
|
||||
F: Documentation/admin-guide/media/amdisp4.dot
|
||||
F: drivers/media/platform/amd/Kconfig
|
||||
F: drivers/media/platform/amd/Makefile
|
||||
F: drivers/media/platform/amd/isp4/Kconfig
|
||||
F: drivers/media/platform/amd/isp4/Makefile
|
||||
F: drivers/media/platform/amd/isp4/isp4.c
|
||||
F: drivers/media/platform/amd/isp4/isp4.h
|
||||
F: drivers/media/platform/amd/isp4/isp4_debug.c
|
||||
F: drivers/media/platform/amd/isp4/isp4_debug.h
|
||||
F: drivers/media/platform/amd/isp4/isp4_fw_cmd_resp.h
|
||||
F: drivers/media/platform/amd/isp4/isp4_hw_reg.h
|
||||
F: drivers/media/platform/amd/isp4/isp4_interface.c
|
||||
F: drivers/media/platform/amd/isp4/isp4_interface.h
|
||||
F: drivers/media/platform/amd/isp4/isp4_subdev.c
|
||||
F: drivers/media/platform/amd/isp4/isp4_subdev.h
|
||||
F: drivers/media/platform/amd/isp4/isp4_video.c
|
||||
F: drivers/media/platform/amd/isp4/isp4_video.h
|
||||
|
||||
AMD KFD
|
||||
M: Felix Kuehling <Felix.Kuehling@amd.com>
|
||||
L: amd-gfx@lists.freedesktop.org
|
||||
|
|
@ -4339,6 +4364,12 @@ S: Maintained
|
|||
F: Documentation/devicetree/bindings/iio/adc/avia-hx711.yaml
|
||||
F: drivers/iio/adc/hx711.c
|
||||
|
||||
AVMATRIX HWS CAPTURE DRIVER
|
||||
M: Ben Hoff <hoff.benjamin.k@gmail.com>
|
||||
L: linux-media@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/media/pci/hws/
|
||||
|
||||
AWINIC AW99706 WLED BACKLIGHT DRIVER
|
||||
M: Junjie Cao <caojunjie650@gmail.com>
|
||||
S: Maintained
|
||||
|
|
@ -12876,6 +12907,12 @@ S: Orphan
|
|||
T: git git://git.code.sf.net/p/intel-sas/isci
|
||||
F: drivers/scsi/isci/
|
||||
|
||||
INTEL COMPUTER VISION SENSING (CVS) DRIVER
|
||||
M: Miguel Vadillo <miguel.vadillo@intel.com>
|
||||
L: linux-media@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/media/i2c/cvs/
|
||||
|
||||
INTEL CPU family model numbers
|
||||
M: Tony Luck <tony.luck@intel.com>
|
||||
M: x86@kernel.org
|
||||
|
|
@ -17487,8 +17524,6 @@ F: Documentation/devicetree/bindings/media/atmel,isc.yaml
|
|||
F: Documentation/devicetree/bindings/media/microchip,xisc.yaml
|
||||
F: drivers/media/platform/microchip/microchip-isc*
|
||||
F: drivers/media/platform/microchip/microchip-sama*-isc*
|
||||
F: drivers/staging/media/deprecated/atmel/atmel-isc*
|
||||
F: drivers/staging/media/deprecated/atmel/atmel-sama*-isc*
|
||||
F: include/linux/atmel-isc-media.h
|
||||
|
||||
MICROCHIP ISI DRIVER
|
||||
|
|
@ -22001,10 +22036,9 @@ F: drivers/bluetooth/btqcomsmd.c
|
|||
F: drivers/bluetooth/hci_qca.c
|
||||
|
||||
QUALCOMM CAMERA SUBSYSTEM DRIVER
|
||||
M: Robert Foss <rfoss@kernel.org>
|
||||
M: Todor Tomov <todor.too@gmail.com>
|
||||
M: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
|
||||
R: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
|
||||
R: Loic Poulain <loic.poulain@oss.qualcomm.com>
|
||||
L: linux-media@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/admin-guide/media/qcom_camss.rst
|
||||
|
|
@ -22850,6 +22884,15 @@ S: Supported
|
|||
F: Documentation/devicetree/bindings/timer/renesas,rz-mtu3.yaml
|
||||
F: drivers/counter/rz-mtu3-cnt.c
|
||||
|
||||
RENESAS RZ/G2L / RZ/V2H(P) CRU
|
||||
M: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
|
||||
M: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
|
||||
L: linux-renesas-soc@vger.kernel.org
|
||||
L: linux-media@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/media/renesas,rzg2l-cru.yaml
|
||||
F: drivers/media/platform/renesas/rzg2l-cru/
|
||||
|
||||
RENESAS RZ/T2H / RZ/N2H A/D DRIVER
|
||||
M: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
|
|
@ -22918,6 +22961,7 @@ F: drivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c
|
|||
|
||||
RENESAS RZ/V2H(P) INPUT VIDEO CONTROL BLOCK DRIVER
|
||||
M: Daniel Scally <dan.scally@ideasonboard.com>
|
||||
M: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
|
||||
L: linux-media@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/media/renesas,r9a09g057-ivc.yaml
|
||||
|
|
|
|||
|
|
@ -87,12 +87,12 @@ void rcar_du_vsp_enable(struct rcar_du_crtc *crtc)
|
|||
|
||||
__rcar_du_plane_setup(crtc->group, &state);
|
||||
|
||||
vsp1_du_setup_lif(crtc->vsp->vsp, crtc->vsp_pipe, &cfg);
|
||||
vsp1_du_enable(crtc->vsp->vsp, crtc->vsp_pipe, &cfg);
|
||||
}
|
||||
|
||||
void rcar_du_vsp_disable(struct rcar_du_crtc *crtc)
|
||||
{
|
||||
vsp1_du_setup_lif(crtc->vsp->vsp, crtc->vsp_pipe, NULL);
|
||||
vsp1_du_disable(crtc->vsp->vsp, crtc->vsp_pipe);
|
||||
}
|
||||
|
||||
void rcar_du_vsp_atomic_begin(struct rcar_du_crtc *crtc)
|
||||
|
|
|
|||
|
|
@ -56,12 +56,12 @@ void rzg2l_du_vsp_enable(struct rzg2l_du_crtc *crtc)
|
|||
.callback_data = crtc,
|
||||
};
|
||||
|
||||
vsp1_du_setup_lif(crtc->vsp->vsp, crtc->vsp_pipe, &cfg);
|
||||
vsp1_du_enable(crtc->vsp->vsp, crtc->vsp_pipe, &cfg);
|
||||
}
|
||||
|
||||
void rzg2l_du_vsp_disable(struct rzg2l_du_crtc *crtc)
|
||||
{
|
||||
vsp1_du_setup_lif(crtc->vsp->vsp, crtc->vsp_pipe, NULL);
|
||||
vsp1_du_disable(crtc->vsp->vsp, crtc->vsp_pipe);
|
||||
}
|
||||
|
||||
void rzg2l_du_vsp_atomic_flush(struct rzg2l_du_crtc *crtc)
|
||||
|
|
|
|||
|
|
@ -1098,6 +1098,15 @@ static const u8 cec_msg_size[256] = {
|
|||
[CEC_MSG_REQUEST_CURRENT_LATENCY] = 4 | BCAST,
|
||||
[CEC_MSG_REPORT_CURRENT_LATENCY] = 6 | BCAST,
|
||||
[CEC_MSG_CDC_MESSAGE] = 2 | BCAST,
|
||||
[CEC_MSG_REQUEST_LIP_SUPPORT] = 4 | DIRECTED,
|
||||
[CEC_MSG_REPORT_LIP_SUPPORT] = 6 | DIRECTED,
|
||||
[CEC_MSG_REQUEST_AUDIO_AND_VIDEO_LATENCY] = 6 | DIRECTED,
|
||||
[CEC_MSG_REPORT_AUDIO_AND_VIDEO_LATENCY] = 6 | DIRECTED,
|
||||
[CEC_MSG_REQUEST_AUDIO_LATENCY] = 3 | DIRECTED,
|
||||
[CEC_MSG_REPORT_AUDIO_LATENCY] = 4 | DIRECTED,
|
||||
[CEC_MSG_REQUEST_VIDEO_LATENCY] = 5 | DIRECTED,
|
||||
[CEC_MSG_REPORT_VIDEO_LATENCY] = 4 | DIRECTED,
|
||||
[CEC_MSG_UPDATE_SQID] = 6 | DIRECTED,
|
||||
};
|
||||
|
||||
/* Called by the CEC adapter if a message is received */
|
||||
|
|
|
|||
|
|
@ -486,7 +486,7 @@ static void tda9950_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static struct i2c_device_id tda9950_ids[] = {
|
||||
{ "tda9950" },
|
||||
{ .name = "tda9950" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, tda9950_ids);
|
||||
|
|
|
|||
|
|
@ -334,6 +334,12 @@ static const struct cec_dmi_match cec_dmi_match_table[] = {
|
|||
{ "Google", "Dirks", "0000:00:02.0", port_ab_conns },
|
||||
/* Google Moxie */
|
||||
{ "Google", "Moxie", "0000:00:02.0", port_b_conns },
|
||||
/* Google Kulnex */
|
||||
{ "Google", "Kulnex", "0000:00:02.0", port_b_conns },
|
||||
/* Google Moxoe */
|
||||
{ "Google", "Moxoe", "0000:00:02.0", port_b_conns },
|
||||
/* Google Dirkson */
|
||||
{ "Google", "Dirkson", "0000:00:02.0", port_ab_conns },
|
||||
};
|
||||
|
||||
static struct device *cros_ec_cec_find_hdmi_dev(struct device *dev,
|
||||
|
|
|
|||
|
|
@ -649,7 +649,7 @@ static int secocec_probe(struct platform_device *pdev)
|
|||
|
||||
ret = secocec_ir_probe(secocec);
|
||||
if (ret)
|
||||
goto err_notifier;
|
||||
goto err_unregister_adapter;
|
||||
|
||||
platform_set_drvdata(pdev, secocec);
|
||||
|
||||
|
|
@ -657,6 +657,10 @@ static int secocec_probe(struct platform_device *pdev)
|
|||
|
||||
return ret;
|
||||
|
||||
err_unregister_adapter:
|
||||
cec_notifier_cec_adap_unregister(secocec->notifier, secocec->cec_adap);
|
||||
cec_unregister_adapter(secocec->cec_adap);
|
||||
goto err;
|
||||
err_notifier:
|
||||
cec_notifier_cec_adap_unregister(secocec->notifier, secocec->cec_adap);
|
||||
err_delete_adapter:
|
||||
|
|
|
|||
|
|
@ -2990,8 +2990,8 @@ static int __vb2_cleanup_fileio(struct vb2_queue *q)
|
|||
* @nonblock: mode selector (1 means blocking calls, 0 means nonblocking)
|
||||
* @read: access mode selector (1 means read, 0 means write)
|
||||
*/
|
||||
static size_t __vb2_perform_fileio(struct vb2_queue *q, char __user *data, size_t count,
|
||||
loff_t *ppos, int nonblock, int read)
|
||||
static ssize_t __vb2_perform_fileio(struct vb2_queue *q, char __user *data, size_t count,
|
||||
loff_t *ppos, int nonblock, int read)
|
||||
{
|
||||
struct vb2_fileio_data *fileio;
|
||||
struct vb2_fileio_buf *buf;
|
||||
|
|
@ -3154,15 +3154,15 @@ static size_t __vb2_perform_fileio(struct vb2_queue *q, char __user *data, size_
|
|||
return ret;
|
||||
}
|
||||
|
||||
size_t vb2_read(struct vb2_queue *q, char __user *data, size_t count,
|
||||
loff_t *ppos, int nonblocking)
|
||||
ssize_t vb2_read(struct vb2_queue *q, char __user *data, size_t count,
|
||||
loff_t *ppos, int nonblocking)
|
||||
{
|
||||
return __vb2_perform_fileio(q, data, count, ppos, nonblocking, 1);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(vb2_read);
|
||||
|
||||
size_t vb2_write(struct vb2_queue *q, const char __user *data, size_t count,
|
||||
loff_t *ppos, int nonblocking)
|
||||
ssize_t vb2_write(struct vb2_queue *q, const char __user *data, size_t count,
|
||||
loff_t *ppos, int nonblocking)
|
||||
{
|
||||
return __vb2_perform_fileio(q, (char __user *) data, count,
|
||||
ppos, nonblocking, 0);
|
||||
|
|
|
|||
|
|
@ -256,8 +256,8 @@ static void a8293_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id a8293_id_table[] = {
|
||||
{ "a8293" },
|
||||
{}
|
||||
{ .name = "a8293" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, a8293_id_table);
|
||||
|
||||
|
|
|
|||
|
|
@ -1553,8 +1553,8 @@ static void af9013_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id af9013_id_table[] = {
|
||||
{ "af9013" },
|
||||
{}
|
||||
{ .name = "af9013" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, af9013_id_table);
|
||||
|
||||
|
|
|
|||
|
|
@ -1173,8 +1173,8 @@ static void af9033_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id af9033_id_table[] = {
|
||||
{ "af9033" },
|
||||
{}
|
||||
{ .name = "af9033" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, af9033_id_table);
|
||||
|
||||
|
|
|
|||
|
|
@ -768,8 +768,8 @@ static void au8522_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id au8522_id[] = {
|
||||
{ "au8522" },
|
||||
{}
|
||||
{ .name = "au8522" },
|
||||
{ }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(i2c, au8522_id);
|
||||
|
|
|
|||
|
|
@ -672,8 +672,8 @@ static void cxd2099_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id cxd2099_id[] = {
|
||||
{ "cxd2099" },
|
||||
{}
|
||||
{ .name = "cxd2099" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, cxd2099_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -723,8 +723,8 @@ static void cxd2820r_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id cxd2820r_id_table[] = {
|
||||
{ "cxd2820r" },
|
||||
{}
|
||||
{ .name = "cxd2820r" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, cxd2820r_id_table);
|
||||
|
||||
|
|
|
|||
|
|
@ -911,28 +911,28 @@ static void dvb_pll_remove(struct i2c_client *client)
|
|||
|
||||
|
||||
static const struct i2c_device_id dvb_pll_id[] = {
|
||||
{"dtt7579", DVB_PLL_THOMSON_DTT7579},
|
||||
{"dtt759x", DVB_PLL_THOMSON_DTT759X},
|
||||
{"z201", DVB_PLL_LG_Z201},
|
||||
{"unknown_1", DVB_PLL_UNKNOWN_1},
|
||||
{"tua6010xs", DVB_PLL_TUA6010XS},
|
||||
{"env57h1xd5", DVB_PLL_ENV57H1XD5},
|
||||
{"tua6034", DVB_PLL_TUA6034},
|
||||
{"tda665x", DVB_PLL_TDA665X},
|
||||
{"tded4", DVB_PLL_TDED4},
|
||||
{"tdhu2", DVB_PLL_TDHU2},
|
||||
{"tbmv", DVB_PLL_SAMSUNG_TBMV},
|
||||
{"sd1878_tda8261", DVB_PLL_PHILIPS_SD1878_TDA8261},
|
||||
{"opera1", DVB_PLL_OPERA1},
|
||||
{"dtos403ih102a", DVB_PLL_SAMSUNG_DTOS403IH102A},
|
||||
{"tdtc9251dh0", DVB_PLL_SAMSUNG_TDTC9251DH0},
|
||||
{"tbdu18132", DVB_PLL_SAMSUNG_TBDU18132},
|
||||
{"tbmu24112", DVB_PLL_SAMSUNG_TBMU24112},
|
||||
{"tdee4", DVB_PLL_TDEE4},
|
||||
{"dtt7520x", DVB_PLL_THOMSON_DTT7520X},
|
||||
{"tua6034_friio", DVB_PLL_TUA6034_FRIIO},
|
||||
{"tda665x_earthpt1", DVB_PLL_TDA665X_EARTH_PT1},
|
||||
{}
|
||||
{ .name = "dtt7579", .driver_data = DVB_PLL_THOMSON_DTT7579 },
|
||||
{ .name = "dtt759x", .driver_data = DVB_PLL_THOMSON_DTT759X },
|
||||
{ .name = "z201", .driver_data = DVB_PLL_LG_Z201 },
|
||||
{ .name = "unknown_1", .driver_data = DVB_PLL_UNKNOWN_1 },
|
||||
{ .name = "tua6010xs", .driver_data = DVB_PLL_TUA6010XS },
|
||||
{ .name = "env57h1xd5", .driver_data = DVB_PLL_ENV57H1XD5 },
|
||||
{ .name = "tua6034", .driver_data = DVB_PLL_TUA6034 },
|
||||
{ .name = "tda665x", .driver_data = DVB_PLL_TDA665X },
|
||||
{ .name = "tded4", .driver_data = DVB_PLL_TDED4 },
|
||||
{ .name = "tdhu2", .driver_data = DVB_PLL_TDHU2 },
|
||||
{ .name = "tbmv", .driver_data = DVB_PLL_SAMSUNG_TBMV },
|
||||
{ .name = "sd1878_tda8261", .driver_data = DVB_PLL_PHILIPS_SD1878_TDA8261 },
|
||||
{ .name = "opera1", .driver_data = DVB_PLL_OPERA1 },
|
||||
{ .name = "dtos403ih102a", .driver_data = DVB_PLL_SAMSUNG_DTOS403IH102A },
|
||||
{ .name = "tdtc9251dh0", .driver_data = DVB_PLL_SAMSUNG_TDTC9251DH0 },
|
||||
{ .name = "tbdu18132", .driver_data = DVB_PLL_SAMSUNG_TBDU18132 },
|
||||
{ .name = "tbmu24112", .driver_data = DVB_PLL_SAMSUNG_TBMU24112 },
|
||||
{ .name = "tdee4", .driver_data = DVB_PLL_TDEE4 },
|
||||
{ .name = "dtt7520x", .driver_data = DVB_PLL_THOMSON_DTT7520X },
|
||||
{ .name = "tua6034_friio", .driver_data = DVB_PLL_TUA6034_FRIIO },
|
||||
{ .name = "tda665x_earthpt1", .driver_data = DVB_PLL_TDA665X_EARTH_PT1 },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1101,8 +1101,8 @@ static int helene_probe(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id helene_id[] = {
|
||||
{ "helene", },
|
||||
{}
|
||||
{ .name = "helene" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, helene_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -2244,8 +2244,8 @@ static void lgdt3306a_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id lgdt3306a_id_table[] = {
|
||||
{ "lgdt3306a" },
|
||||
{}
|
||||
{ .name = "lgdt3306a" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, lgdt3306a_id_table);
|
||||
|
||||
|
|
|
|||
|
|
@ -983,8 +983,8 @@ static void lgdt330x_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id lgdt330x_id_table[] = {
|
||||
{ "lgdt330x" },
|
||||
{}
|
||||
{ .name = "lgdt330x" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, lgdt330x_id_table);
|
||||
|
||||
|
|
|
|||
|
|
@ -2221,11 +2221,11 @@ static void m88ds3103_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id m88ds3103_id_table[] = {
|
||||
{"m88ds3103", M88DS3103_CHIPTYPE_3103},
|
||||
{"m88rs6000", M88DS3103_CHIPTYPE_RS6000},
|
||||
{"m88ds3103b", M88DS3103_CHIPTYPE_3103B},
|
||||
{"m88ds3103c", M88DS3103_CHIPTYPE_3103C},
|
||||
{}
|
||||
{ .name = "m88ds3103", .driver_data = M88DS3103_CHIPTYPE_3103 },
|
||||
{ .name = "m88rs6000", .driver_data = M88DS3103_CHIPTYPE_RS6000 },
|
||||
{ .name = "m88ds3103b", .driver_data = M88DS3103_CHIPTYPE_3103B },
|
||||
{ .name = "m88ds3103c", .driver_data = M88DS3103_CHIPTYPE_3103C },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, m88ds3103_id_table);
|
||||
|
||||
|
|
|
|||
|
|
@ -787,10 +787,10 @@ static const struct of_device_id mn88443x_of_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, mn88443x_of_match);
|
||||
|
||||
static const struct i2c_device_id mn88443x_i2c_id[] = {
|
||||
{ "mn884433", (kernel_ulong_t)&mn88443x_spec_pri },
|
||||
{ "mn884434-0", (kernel_ulong_t)&mn88443x_spec_pri },
|
||||
{ "mn884434-1", (kernel_ulong_t)&mn88443x_spec_sec },
|
||||
{}
|
||||
{ .name = "mn884433", .driver_data = (kernel_ulong_t)&mn88443x_spec_pri },
|
||||
{ .name = "mn884434-0", .driver_data = (kernel_ulong_t)&mn88443x_spec_pri },
|
||||
{ .name = "mn884434-1", .driver_data = (kernel_ulong_t)&mn88443x_spec_sec },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, mn88443x_i2c_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -708,8 +708,8 @@ static void mn88472_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id mn88472_id_table[] = {
|
||||
{ "mn88472" },
|
||||
{}
|
||||
{ .name = "mn88472" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, mn88472_id_table);
|
||||
|
||||
|
|
|
|||
|
|
@ -743,8 +743,8 @@ static void mn88473_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id mn88473_id_table[] = {
|
||||
{ "mn88473" },
|
||||
{}
|
||||
{ .name = "mn88473" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, mn88473_id_table);
|
||||
|
||||
|
|
|
|||
|
|
@ -1346,8 +1346,8 @@ static void mxl692_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id mxl692_id_table[] = {
|
||||
{ "mxl692" },
|
||||
{}
|
||||
{ .name = "mxl692" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, mxl692_id_table);
|
||||
|
||||
|
|
|
|||
|
|
@ -876,8 +876,8 @@ static void rtl2830_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id rtl2830_id_table[] = {
|
||||
{ "rtl2830" },
|
||||
{}
|
||||
{ .name = "rtl2830" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, rtl2830_id_table);
|
||||
|
||||
|
|
|
|||
|
|
@ -1115,18 +1115,18 @@ static void rtl2832_remove(struct i2c_client *client)
|
|||
|
||||
dev_dbg(&client->dev, "\n");
|
||||
|
||||
cancel_delayed_work_sync(&dev->i2c_gate_work);
|
||||
|
||||
i2c_mux_del_adapters(dev->muxc);
|
||||
|
||||
cancel_delayed_work_sync(&dev->i2c_gate_work);
|
||||
|
||||
regmap_exit(dev->regmap);
|
||||
|
||||
kfree(dev);
|
||||
}
|
||||
|
||||
static const struct i2c_device_id rtl2832_id_table[] = {
|
||||
{ "rtl2832" },
|
||||
{}
|
||||
{ .name = "rtl2832" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, rtl2832_id_table);
|
||||
|
||||
|
|
|
|||
|
|
@ -399,7 +399,8 @@ static int rtl2832_sdr_alloc_urbs(struct rtl2832_sdr_dev *dev)
|
|||
}
|
||||
|
||||
/* Must be called with vb_queue_lock hold */
|
||||
static void rtl2832_sdr_cleanup_queued_bufs(struct rtl2832_sdr_dev *dev)
|
||||
static void rtl2832_sdr_cleanup_queued_bufs(struct rtl2832_sdr_dev *dev,
|
||||
enum vb2_buffer_state state)
|
||||
{
|
||||
struct platform_device *pdev = dev->pdev;
|
||||
unsigned long flags;
|
||||
|
|
@ -413,7 +414,7 @@ static void rtl2832_sdr_cleanup_queued_bufs(struct rtl2832_sdr_dev *dev)
|
|||
buf = list_entry(dev->queued_bufs.next,
|
||||
struct rtl2832_sdr_frame_buf, list);
|
||||
list_del(&buf->list);
|
||||
vb2_buffer_done(&buf->vb.vb2_buf, VB2_BUF_STATE_ERROR);
|
||||
vb2_buffer_done(&buf->vb.vb2_buf, state);
|
||||
}
|
||||
spin_unlock_irqrestore(&dev->queued_bufs_lock, flags);
|
||||
}
|
||||
|
|
@ -855,11 +856,15 @@ static int rtl2832_sdr_start_streaming(struct vb2_queue *vq, unsigned int count)
|
|||
|
||||
dev_dbg(&pdev->dev, "\n");
|
||||
|
||||
if (!dev->udev)
|
||||
if (!dev->udev) {
|
||||
rtl2832_sdr_cleanup_queued_bufs(dev, VB2_BUF_STATE_QUEUED);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (mutex_lock_interruptible(&dev->v4l2_lock))
|
||||
if (mutex_lock_interruptible(&dev->v4l2_lock)) {
|
||||
rtl2832_sdr_cleanup_queued_bufs(dev, VB2_BUF_STATE_QUEUED);
|
||||
return -ERESTARTSYS;
|
||||
}
|
||||
|
||||
if (d->props->power_ctrl)
|
||||
d->props->power_ctrl(d, 1);
|
||||
|
|
@ -900,7 +905,11 @@ static int rtl2832_sdr_start_streaming(struct vb2_queue *vq, unsigned int count)
|
|||
if (ret)
|
||||
goto err;
|
||||
|
||||
mutex_unlock(&dev->v4l2_lock);
|
||||
return 0;
|
||||
|
||||
err:
|
||||
rtl2832_sdr_cleanup_queued_bufs(dev, VB2_BUF_STATE_QUEUED);
|
||||
mutex_unlock(&dev->v4l2_lock);
|
||||
|
||||
return ret;
|
||||
|
|
@ -920,7 +929,7 @@ static void rtl2832_sdr_stop_streaming(struct vb2_queue *vq)
|
|||
rtl2832_sdr_kill_urbs(dev);
|
||||
rtl2832_sdr_free_urbs(dev);
|
||||
rtl2832_sdr_free_stream_bufs(dev);
|
||||
rtl2832_sdr_cleanup_queued_bufs(dev);
|
||||
rtl2832_sdr_cleanup_queued_bufs(dev, VB2_BUF_STATE_ERROR);
|
||||
rtl2832_sdr_unset_adc(dev);
|
||||
|
||||
/* sleep tuner */
|
||||
|
|
|
|||
|
|
@ -1281,8 +1281,8 @@ static void si2165_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id si2165_id_table[] = {
|
||||
{ "si2165" },
|
||||
{}
|
||||
{ .name = "si2165" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, si2165_id_table);
|
||||
|
||||
|
|
|
|||
|
|
@ -790,8 +790,8 @@ static void si2168_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id si2168_id_table[] = {
|
||||
{ "si2168" },
|
||||
{}
|
||||
{ .name = "si2168" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, si2168_id_table);
|
||||
|
||||
|
|
|
|||
|
|
@ -407,8 +407,8 @@ static void sp2_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id sp2_id[] = {
|
||||
{ "sp2" },
|
||||
{}
|
||||
{ .name = "sp2" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, sp2_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -5079,8 +5079,8 @@ struct dvb_frontend *stv090x_attach(struct stv090x_config *config,
|
|||
EXPORT_SYMBOL_GPL(stv090x_attach);
|
||||
|
||||
static const struct i2c_device_id stv090x_id_table[] = {
|
||||
{ "stv090x" },
|
||||
{}
|
||||
{ .name = "stv090x" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, stv090x_id_table);
|
||||
|
||||
|
|
|
|||
|
|
@ -470,8 +470,8 @@ const struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe,
|
|||
EXPORT_SYMBOL_GPL(stv6110x_attach);
|
||||
|
||||
static const struct i2c_device_id stv6110x_id_table[] = {
|
||||
{ "stv6110x" },
|
||||
{}
|
||||
{ .name = "stv6110x" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, stv6110x_id_table);
|
||||
|
||||
|
|
|
|||
|
|
@ -830,9 +830,9 @@ static void tc90522_remove(struct i2c_client *client)
|
|||
|
||||
|
||||
static const struct i2c_device_id tc90522_id[] = {
|
||||
{ TC90522_I2C_DEV_SAT, 0 },
|
||||
{ TC90522_I2C_DEV_TER, 1 },
|
||||
{}
|
||||
{ .name = TC90522_I2C_DEV_SAT, .driver_data = 0 },
|
||||
{ .name = TC90522_I2C_DEV_TER, .driver_data = 1 },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, tc90522_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -1230,8 +1230,8 @@ static void tda10071_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id tda10071_id_table[] = {
|
||||
{ "tda10071_cx24118" },
|
||||
{}
|
||||
{ .name = "tda10071_cx24118" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, tda10071_id_table);
|
||||
|
||||
|
|
|
|||
|
|
@ -716,9 +716,9 @@ static void ts2020_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id ts2020_id_table[] = {
|
||||
{ "ts2020" },
|
||||
{ "ts2022" },
|
||||
{}
|
||||
{ .name = "ts2020" },
|
||||
{ .name = "ts2022" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, ts2020_id_table);
|
||||
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ config VIDEO_IMX319
|
|||
|
||||
config VIDEO_IMX334
|
||||
tristate "Sony IMX334 sensor support"
|
||||
depends on OF_GPIO
|
||||
depends on OF
|
||||
select V4L2_CCI_I2C
|
||||
help
|
||||
This is a Video4Linux2 sensor driver for the Sony
|
||||
|
|
@ -248,7 +248,7 @@ config VIDEO_IMX334
|
|||
|
||||
config VIDEO_IMX335
|
||||
tristate "Sony IMX335 sensor support"
|
||||
depends on OF_GPIO
|
||||
depends on OF
|
||||
select V4L2_CCI_I2C
|
||||
help
|
||||
This is a Video4Linux2 sensor driver for the Sony
|
||||
|
|
@ -268,7 +268,7 @@ config VIDEO_IMX355
|
|||
|
||||
config VIDEO_IMX412
|
||||
tristate "Sony IMX412 sensor support"
|
||||
depends on OF_GPIO
|
||||
depends on OF
|
||||
help
|
||||
This is a Video4Linux2 sensor driver for the Sony
|
||||
IMX412 camera.
|
||||
|
|
@ -278,7 +278,7 @@ config VIDEO_IMX412
|
|||
|
||||
config VIDEO_IMX415
|
||||
tristate "Sony IMX415 sensor support"
|
||||
depends on OF_GPIO
|
||||
depends on OF
|
||||
select V4L2_CCI_I2C
|
||||
help
|
||||
This is a Video4Linux2 sensor driver for the Sony
|
||||
|
|
@ -703,7 +703,7 @@ config VIDEO_OV8865
|
|||
|
||||
config VIDEO_OV9282
|
||||
tristate "OmniVision OV9282 sensor support"
|
||||
depends on OF_GPIO
|
||||
depends on OF
|
||||
select V4L2_CCI_I2C
|
||||
help
|
||||
This is a Video4Linux2 sensor driver for the OmniVision
|
||||
|
|
@ -1271,7 +1271,6 @@ config VIDEO_BT866
|
|||
config VIDEO_ISL7998X
|
||||
tristate "Intersil ISL7998x video decoder"
|
||||
depends on VIDEO_DEV && I2C
|
||||
depends on OF_GPIO
|
||||
select MEDIA_CONTROLLER
|
||||
select VIDEO_V4L2_SUBDEV_API
|
||||
select V4L2_FWNODE
|
||||
|
|
@ -1309,7 +1308,6 @@ config VIDEO_MAX9286
|
|||
tristate "Maxim MAX9286 GMSL deserializer support"
|
||||
depends on I2C && I2C_MUX
|
||||
depends on VIDEO_DEV
|
||||
depends on OF_GPIO
|
||||
select V4L2_FWNODE
|
||||
select VIDEO_V4L2_SUBDEV_API
|
||||
select MEDIA_CONTROLLER
|
||||
|
|
@ -1659,6 +1657,8 @@ endmenu
|
|||
menu "Miscellaneous helper chips"
|
||||
visible if !MEDIA_HIDE_ANCILLARY_SUBDRV
|
||||
|
||||
source "drivers/media/i2c/cvs/Kconfig"
|
||||
|
||||
config VIDEO_I2C
|
||||
tristate "I2C transport video support"
|
||||
depends on VIDEO_DEV && I2C
|
||||
|
|
|
|||
|
|
@ -171,3 +171,4 @@ obj-$(CONFIG_VIDEO_VP27SMPX) += vp27smpx.o
|
|||
obj-$(CONFIG_VIDEO_VPX3220) += vpx3220.o
|
||||
obj-$(CONFIG_VIDEO_WM8739) += wm8739.o
|
||||
obj-$(CONFIG_VIDEO_WM8775) += wm8775.o
|
||||
obj-$(CONFIG_VIDEO_INTEL_CVS) += cvs/
|
||||
|
|
|
|||
|
|
@ -347,8 +347,8 @@ static void ad5820_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id ad5820_id_table[] = {
|
||||
{ "ad5820" },
|
||||
{ "ad5821" },
|
||||
{ .name = "ad5820" },
|
||||
{ .name = "ad5821" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, ad5820_id_table);
|
||||
|
|
|
|||
|
|
@ -522,7 +522,7 @@ static void adp1653_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id adp1653_id_table[] = {
|
||||
{ ADP1653_NAME },
|
||||
{ .name = ADP1653_NAME },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, adp1653_id_table);
|
||||
|
|
|
|||
|
|
@ -377,8 +377,8 @@ static void adv7170_remove(struct i2c_client *client)
|
|||
/* ----------------------------------------------------------------------- */
|
||||
|
||||
static const struct i2c_device_id adv7170_id[] = {
|
||||
{ "adv7170" },
|
||||
{ "adv7171" },
|
||||
{ .name = "adv7170" },
|
||||
{ .name = "adv7171" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, adv7170_id);
|
||||
|
|
|
|||
|
|
@ -432,8 +432,8 @@ static void adv7175_remove(struct i2c_client *client)
|
|||
/* ----------------------------------------------------------------------- */
|
||||
|
||||
static const struct i2c_device_id adv7175_id[] = {
|
||||
{ "adv7175" },
|
||||
{ "adv7176" },
|
||||
{ .name = "adv7175" },
|
||||
{ .name = "adv7176" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, adv7175_id);
|
||||
|
|
|
|||
|
|
@ -1626,18 +1626,18 @@ static SIMPLE_DEV_PM_OPS(adv7180_pm_ops, adv7180_suspend, adv7180_resume);
|
|||
#endif
|
||||
|
||||
static const struct i2c_device_id adv7180_id[] = {
|
||||
{ "adv7180", (kernel_ulong_t)&adv7180_info },
|
||||
{ "adv7180cp", (kernel_ulong_t)&adv7180_info },
|
||||
{ "adv7180st", (kernel_ulong_t)&adv7180_info },
|
||||
{ "adv7182", (kernel_ulong_t)&adv7182_info },
|
||||
{ "adv7280", (kernel_ulong_t)&adv7280_info },
|
||||
{ "adv7280-m", (kernel_ulong_t)&adv7280_m_info },
|
||||
{ "adv7281", (kernel_ulong_t)&adv7281_info },
|
||||
{ "adv7281-m", (kernel_ulong_t)&adv7281_m_info },
|
||||
{ "adv7281-ma", (kernel_ulong_t)&adv7281_ma_info },
|
||||
{ "adv7282", (kernel_ulong_t)&adv7282_info },
|
||||
{ "adv7282-m", (kernel_ulong_t)&adv7282_m_info },
|
||||
{}
|
||||
{ .name = "adv7180", .driver_data = (kernel_ulong_t)&adv7180_info },
|
||||
{ .name = "adv7180cp", .driver_data = (kernel_ulong_t)&adv7180_info },
|
||||
{ .name = "adv7180st", .driver_data = (kernel_ulong_t)&adv7180_info },
|
||||
{ .name = "adv7182", .driver_data = (kernel_ulong_t)&adv7182_info },
|
||||
{ .name = "adv7280", .driver_data = (kernel_ulong_t)&adv7280_info },
|
||||
{ .name = "adv7280-m", .driver_data = (kernel_ulong_t)&adv7280_m_info },
|
||||
{ .name = "adv7281", .driver_data = (kernel_ulong_t)&adv7281_info },
|
||||
{ .name = "adv7281-m", .driver_data = (kernel_ulong_t)&adv7281_m_info },
|
||||
{ .name = "adv7281-ma", .driver_data = (kernel_ulong_t)&adv7281_ma_info },
|
||||
{ .name = "adv7282", .driver_data = (kernel_ulong_t)&adv7282_info },
|
||||
{ .name = "adv7282-m", .driver_data = (kernel_ulong_t)&adv7282_m_info },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, adv7180_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -619,8 +619,8 @@ static void adv7183_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id adv7183_id[] = {
|
||||
{ "adv7183" },
|
||||
{}
|
||||
{ .name = "adv7183" },
|
||||
{ }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(i2c, adv7183_id);
|
||||
|
|
|
|||
|
|
@ -502,8 +502,8 @@ static void adv7343_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id adv7343_id[] = {
|
||||
{ "adv7343" },
|
||||
{}
|
||||
{ .name = "adv7343" },
|
||||
{ }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(i2c, adv7343_id);
|
||||
|
|
|
|||
|
|
@ -446,8 +446,8 @@ static void adv7393_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id adv7393_id[] = {
|
||||
{ "adv7393" },
|
||||
{}
|
||||
{ .name = "adv7393" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, adv7393_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -2008,7 +2008,7 @@ static void adv7511_remove(struct i2c_client *client)
|
|||
/* ----------------------------------------------------------------------- */
|
||||
|
||||
static const struct i2c_device_id adv7511_id[] = {
|
||||
{ "adv7511-v4l2" },
|
||||
{ .name = "adv7511-v4l2" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, adv7511_id);
|
||||
|
|
|
|||
|
|
@ -3236,10 +3236,10 @@ static const struct adv76xx_chip_info adv76xx_chip_info[] = {
|
|||
};
|
||||
|
||||
static const struct i2c_device_id adv76xx_i2c_id[] = {
|
||||
{ "adv7604", (kernel_ulong_t)&adv76xx_chip_info[ADV7604] },
|
||||
{ "adv7610", (kernel_ulong_t)&adv76xx_chip_info[ADV7611] },
|
||||
{ "adv7611", (kernel_ulong_t)&adv76xx_chip_info[ADV7611] },
|
||||
{ "adv7612", (kernel_ulong_t)&adv76xx_chip_info[ADV7612] },
|
||||
{ .name = "adv7604", .driver_data = (kernel_ulong_t)&adv76xx_chip_info[ADV7604] },
|
||||
{ .name = "adv7610", .driver_data = (kernel_ulong_t)&adv76xx_chip_info[ADV7611] },
|
||||
{ .name = "adv7611", .driver_data = (kernel_ulong_t)&adv76xx_chip_info[ADV7611] },
|
||||
{ .name = "adv7612", .driver_data = (kernel_ulong_t)&adv76xx_chip_info[ADV7612] },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, adv76xx_i2c_id);
|
||||
|
|
@ -3668,6 +3668,12 @@ static int adv76xx_probe(struct i2c_client *client)
|
|||
|
||||
state->source_pad = state->info->num_dv_ports
|
||||
+ (state->info->has_afe ? 2 : 0);
|
||||
if (WARN_ON(state->source_pad >= ADV76XX_PAD_MAX)) {
|
||||
err = -EINVAL;
|
||||
v4l2_err(sd, "invalid chip info\n");
|
||||
goto err_i2c;
|
||||
}
|
||||
|
||||
for (i = 0; i < state->source_pad; ++i)
|
||||
state->pads[i].flags = MEDIA_PAD_FL_SINK;
|
||||
state->pads[state->source_pad].flags = MEDIA_PAD_FL_SOURCE;
|
||||
|
|
|
|||
|
|
@ -3675,7 +3675,7 @@ static void adv7842_remove(struct i2c_client *client)
|
|||
/* ----------------------------------------------------------------------- */
|
||||
|
||||
static const struct i2c_device_id adv7842_id[] = {
|
||||
{ "adv7842" },
|
||||
{ .name = "adv7842" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, adv7842_id);
|
||||
|
|
|
|||
|
|
@ -304,8 +304,8 @@ static void ak881x_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id ak881x_id[] = {
|
||||
{ "ak8813" },
|
||||
{ "ak8814" },
|
||||
{ .name = "ak8813" },
|
||||
{ .name = "ak8814" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, ak881x_id);
|
||||
|
|
|
|||
|
|
@ -2100,20 +2100,21 @@ static int alvium_ctrl_init(struct alvium_dev *alvium)
|
|||
V4L2_CID_PIXEL_RATE, 0,
|
||||
ALVIUM_DEFAULT_PIXEL_RATE_MHZ, 1,
|
||||
ALVIUM_DEFAULT_PIXEL_RATE_MHZ);
|
||||
ctrls->pixel_rate->flags |= V4L2_CTRL_FLAG_READ_ONLY;
|
||||
|
||||
/* Link freq is fixed */
|
||||
ctrls->link_freq = v4l2_ctrl_new_int_menu(hdl, ops,
|
||||
V4L2_CID_LINK_FREQ,
|
||||
0, 0, &alvium->link_freq);
|
||||
ctrls->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY;
|
||||
if (ctrls->link_freq)
|
||||
ctrls->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY;
|
||||
|
||||
/* Auto/manual white balance */
|
||||
if (alvium->avail_ft.auto_whiteb) {
|
||||
ctrls->auto_wb = v4l2_ctrl_new_std(hdl, ops,
|
||||
V4L2_CID_AUTO_WHITE_BALANCE,
|
||||
0, 1, 1, 1);
|
||||
v4l2_ctrl_auto_cluster(3, &ctrls->auto_wb, 0, false);
|
||||
if (ctrls->auto_wb)
|
||||
v4l2_ctrl_auto_cluster(3, &ctrls->auto_wb, 0, false);
|
||||
}
|
||||
|
||||
ctrls->blue_balance = v4l2_ctrl_new_std(hdl, ops,
|
||||
|
|
@ -2122,6 +2123,7 @@ static int alvium_ctrl_init(struct alvium_dev *alvium)
|
|||
alvium->max_bbalance,
|
||||
alvium->inc_bbalance,
|
||||
alvium->dft_bbalance);
|
||||
|
||||
ctrls->red_balance = v4l2_ctrl_new_std(hdl, ops,
|
||||
V4L2_CID_RED_BALANCE,
|
||||
alvium->min_rbalance,
|
||||
|
|
@ -2136,7 +2138,9 @@ static int alvium_ctrl_init(struct alvium_dev *alvium)
|
|||
V4L2_CID_EXPOSURE_AUTO,
|
||||
V4L2_EXPOSURE_MANUAL, 0,
|
||||
V4L2_EXPOSURE_AUTO);
|
||||
v4l2_ctrl_auto_cluster(2, &ctrls->auto_exp, 1, true);
|
||||
if (ctrls->auto_exp)
|
||||
v4l2_ctrl_auto_cluster(2, &ctrls->auto_exp,
|
||||
V4L2_EXPOSURE_MANUAL, true);
|
||||
}
|
||||
|
||||
ctrls->exposure = v4l2_ctrl_new_std(hdl, ops,
|
||||
|
|
@ -2145,14 +2149,16 @@ static int alvium_ctrl_init(struct alvium_dev *alvium)
|
|||
alvium->max_exp,
|
||||
alvium->inc_exp,
|
||||
alvium->dft_exp);
|
||||
ctrls->exposure->flags |= V4L2_CTRL_FLAG_VOLATILE;
|
||||
if (ctrls->exposure)
|
||||
ctrls->exposure->flags |= V4L2_CTRL_FLAG_VOLATILE;
|
||||
|
||||
/* Auto/manual gain */
|
||||
if (alvium->avail_ft.auto_gain) {
|
||||
ctrls->auto_gain = v4l2_ctrl_new_std(hdl, ops,
|
||||
V4L2_CID_AUTOGAIN,
|
||||
0, 1, 1, 1);
|
||||
v4l2_ctrl_auto_cluster(2, &ctrls->auto_gain, 0, true);
|
||||
if (ctrls->auto_gain)
|
||||
v4l2_ctrl_auto_cluster(2, &ctrls->auto_gain, 0, true);
|
||||
}
|
||||
|
||||
if (alvium->avail_ft.gain) {
|
||||
|
|
@ -2162,7 +2168,8 @@ static int alvium_ctrl_init(struct alvium_dev *alvium)
|
|||
alvium->max_gain,
|
||||
alvium->inc_gain,
|
||||
alvium->dft_gain);
|
||||
ctrls->gain->flags |= V4L2_CTRL_FLAG_VOLATILE;
|
||||
if (ctrls->gain)
|
||||
ctrls->gain->flags |= V4L2_CTRL_FLAG_VOLATILE;
|
||||
}
|
||||
|
||||
if (alvium->avail_ft.sat)
|
||||
|
|
|
|||
|
|
@ -457,9 +457,9 @@ static void bt819_remove(struct i2c_client *client)
|
|||
/* ----------------------------------------------------------------------- */
|
||||
|
||||
static const struct i2c_device_id bt819_id[] = {
|
||||
{ "bt819a" },
|
||||
{ "bt817a" },
|
||||
{ "bt815a" },
|
||||
{ .name = "bt819a" },
|
||||
{ .name = "bt817a" },
|
||||
{ .name = "bt815a" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, bt819_id);
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ static void bt856_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id bt856_id[] = {
|
||||
{ "bt856" },
|
||||
{ .name = "bt856" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, bt856_id);
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ static void bt866_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id bt866_id[] = {
|
||||
{ "bt866" },
|
||||
{ .name = "bt866" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, bt866_id);
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ static void cs3308_remove(struct i2c_client *client)
|
|||
/* ----------------------------------------------------------------------- */
|
||||
|
||||
static const struct i2c_device_id cs3308_id[] = {
|
||||
{ "cs3308" },
|
||||
{ .name = "cs3308" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, cs3308_id);
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ static void cs5345_remove(struct i2c_client *client)
|
|||
/* ----------------------------------------------------------------------- */
|
||||
|
||||
static const struct i2c_device_id cs5345_id[] = {
|
||||
{ "cs5345" },
|
||||
{ .name = "cs5345" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, cs5345_id);
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ static void cs53l32a_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id cs53l32a_id[] = {
|
||||
{ "cs53l32a" },
|
||||
{ .name = "cs53l32a" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, cs53l32a_id);
|
||||
|
|
|
|||
21
drivers/media/i2c/cvs/Kconfig
Normal file
21
drivers/media/i2c/cvs/Kconfig
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
config VIDEO_INTEL_CVS
|
||||
tristate "Intel CVS CSI-2 bridge support"
|
||||
depends on I2C && ACPI && VIDEO_DEV
|
||||
depends on IPU_BRIDGE || !IPU_BRIDGE
|
||||
select MEDIA_CONTROLLER
|
||||
select VIDEO_V4L2_SUBDEV_API
|
||||
select V4L2_FWNODE
|
||||
help
|
||||
This adds support for the Intel Computer Vision Sensing (CVS).
|
||||
|
||||
The driver registers a V4L2 sub-device to arbitrate CSI-2 link
|
||||
ownership between the host and CVS firmware, and configures the
|
||||
device for camera sensor streaming.
|
||||
|
||||
The driver can operate with full I2C transport or in a reduced
|
||||
platform (GPIO-only) mode when I2C is unavailable.
|
||||
|
||||
Say Y to build into the kernel, or M to build as a module.
|
||||
The module will be named intel_cvs. If unsure, say N.
|
||||
4
drivers/media/i2c/cvs/Makefile
Normal file
4
drivers/media/i2c/cvs/Makefile
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
intel_cvs-y := core.o v4l2.o
|
||||
|
||||
obj-$(CONFIG_VIDEO_INTEL_CVS) += intel_cvs.o
|
||||
1043
drivers/media/i2c/cvs/core.c
Normal file
1043
drivers/media/i2c/cvs/core.c
Normal file
File diff suppressed because it is too large
Load Diff
495
drivers/media/i2c/cvs/icvs.h
Normal file
495
drivers/media/i2c/cvs/icvs.h
Normal file
|
|
@ -0,0 +1,495 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2026 Intel Corporation
|
||||
*/
|
||||
|
||||
#ifndef _ICVS_H
|
||||
#define _ICVS_H
|
||||
|
||||
#include <linux/bits.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/wait.h>
|
||||
|
||||
#include <media/media-entity.h>
|
||||
#include <media/v4l2-ctrls.h>
|
||||
#include <media/v4l2-subdev.h>
|
||||
|
||||
/*
|
||||
* PCI device IDs for all IPU generations that co-exist with the CVS bridge.
|
||||
* IPU7 (0x645d) is shared by MTL and LNL; IPU7P5 (0xb05d) is shared by
|
||||
* ARL and PTL. These are not yet in the shared ipu6-pci-table so they are
|
||||
* listed here alongside the IPU6 family for probe-time IPU discovery.
|
||||
*/
|
||||
struct gpio_desc;
|
||||
struct i2c_client;
|
||||
|
||||
/*
|
||||
* GPIO resource counts (ACPI enumerated).
|
||||
*
|
||||
* 4-GPIO configuration has a wake IRQ and supports asynchronous messaging.
|
||||
* 2-GPIO configuration has no IRQ, so communication is synchronous only.
|
||||
*/
|
||||
#define ICVS_GPIO_ASYNC 4
|
||||
#define ICVS_GPIO_SYNC 2
|
||||
|
||||
/* Firmware response prefix (optional, for protocol revision 2.x or newer) */
|
||||
#define ICVS_PREFIX_VAL 0xCAFEB0BA
|
||||
|
||||
/*
|
||||
* CSI bridge sub-device definitions
|
||||
*/
|
||||
/**
|
||||
* enum icvs_csi_cmd_id - Low-level CSI bridge command identifiers
|
||||
*
|
||||
* These numeric IDs are part of the legacy CSI-side protocol not mapped
|
||||
* directly to the higher level firmware opcodes in enum icvs_command. Only
|
||||
* a minimal subset is presently issued/handled by the driver. Others are
|
||||
* reserved for future expansion of the CSI bridge feature set.
|
||||
*
|
||||
* @ICVS_CSI_SET_OWNER: Set CSI sensor ownership between host and CVS
|
||||
* @ICVS_CSI_SET_CONF: Apply CSI link configuration parameters
|
||||
* @ICVS_CSI_PRIVACY_NOTIF: Notify host of a privacy state transition
|
||||
*/
|
||||
enum icvs_csi_cmd_id {
|
||||
ICVS_CSI_SET_OWNER = 0,
|
||||
ICVS_CSI_SET_CONF = 2,
|
||||
ICVS_CSI_PRIVACY_NOTIF = 6,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum icvs_csi_link_owner - CSI-2 link / sensor ownership
|
||||
*
|
||||
* Ownership reflects which endpoint currently controls the attached image
|
||||
* sensor over the CSI-2 link. Transitions may gate streaming or reconfigure
|
||||
* link parameters. The host requests ownership changes via protocol opcodes
|
||||
* and may need to assert GPIO signals on platforms without full capability.
|
||||
*
|
||||
* @ICVS_CSI_LINK_HOST: Host (Linux) owns the sensor and may start streaming
|
||||
* @ICVS_CSI_LINK_CVS: CVS firmware owns the sensor (host must not stream)
|
||||
*/
|
||||
enum icvs_csi_link_owner {
|
||||
ICVS_CSI_LINK_HOST,
|
||||
ICVS_CSI_LINK_CVS,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum icvs_csi_privacy_status - Reported privacy state
|
||||
*
|
||||
* Reflects user privacy (e.g. camera LED assertion and stream gating). The
|
||||
* MAX value is a sentinel used for bounds checking and is not a real state.
|
||||
*
|
||||
* @ICVS_CSI_PRIVACY_OFF: Privacy not asserted (LED off, streaming permitted)
|
||||
* @ICVS_CSI_PRIVACY_ON: Privacy asserted (LED on and/or stream gated)
|
||||
* @ICVS_CSI_PRIVACY_MAX: Sentinel; not a valid operational value
|
||||
*/
|
||||
enum icvs_csi_privacy_status {
|
||||
ICVS_CSI_PRIVACY_OFF,
|
||||
ICVS_CSI_PRIVACY_ON,
|
||||
ICVS_CSI_PRIVACY_MAX
|
||||
};
|
||||
|
||||
/**
|
||||
* enum icvs_csi_pads - Media pads exposed by the CVS sub-device
|
||||
*
|
||||
* The bridge presents a single sink (from the remote sensor) and a single
|
||||
* source (toward the rest of the media graph / consumers). NUM_PADS is used
|
||||
* for sizing arrays and iteration; it is not a real pad index.
|
||||
*
|
||||
* @ICVS_CSI_PAD_SINK: Sink pad receiving frames from remote sensor
|
||||
* @ICVS_CSI_PAD_SOURCE: Source pad emitting frames to downstream entities
|
||||
* @ICVS_CSI_NUM_PADS: Count sentinel (array size / iteration bound)
|
||||
*/
|
||||
enum icvs_csi_pads {
|
||||
ICVS_CSI_PAD_SINK,
|
||||
ICVS_CSI_PAD_SOURCE,
|
||||
ICVS_CSI_NUM_PADS
|
||||
};
|
||||
|
||||
/*
|
||||
* Core driver structures and functions used by both I2C and platform modes
|
||||
*/
|
||||
|
||||
/**
|
||||
* DOC: CVS device quirk flags
|
||||
*
|
||||
* These bit flag macros describe per-device behavioral adjustments applied
|
||||
* after VID/PID matching (see cvs_i2c_check() and cvs_apply_quirks()). They
|
||||
* allow the driver to selectively alter logic paths for firmware / hardware
|
||||
* variants without introducing hard-coded conditionals at each call site.
|
||||
*
|
||||
* @ICVS_NO_MIPI_CONFIG: Device firmware performs its own MIPI link setup;
|
||||
* skip sending HOST_SET_MIPI_CONFIG.
|
||||
* @ICVS_SKIP_FW_RESET: Skip issuing a post firmware-update reset sequence.
|
||||
* @ICVS_NO_CAPS: Device firmware does not support GET_DEV_CAPABILITY;
|
||||
* skip capability query and treat caps as unsupported.
|
||||
* @ICVS_FW_BUF_SIZE_256: Firmware expects chunk transfer buffer size of 256
|
||||
* bytes (override defaults if they differ).
|
||||
* @ICVS_FW_HEADER_SIZE_256: Firmware header size fixed at 256 bytes offset
|
||||
* for start of payload data.
|
||||
* @ICVS_HOST_SENSOR_PWR_CTRL: Host must control sensor power sequencing.
|
||||
* @ICVS_HOST_PRIV_CTRL: Host owns privacy LED gating.
|
||||
* @ICVS_HOST_VISION_SENSING: Host enables vision sensing capability bit
|
||||
* @ICVS_NO_FW_UPDATE: Device does not support firmware update.
|
||||
*/
|
||||
#define ICVS_NO_MIPI_CONFIG BIT(0)
|
||||
#define ICVS_SKIP_FW_RESET BIT(1)
|
||||
#define ICVS_NO_CAPS BIT(2)
|
||||
#define ICVS_FW_BUF_SIZE_256 BIT(3)
|
||||
#define ICVS_FW_HEADER_SIZE_256 BIT(4)
|
||||
#define ICVS_HOST_SENSOR_PWR_CTRL BIT(5)
|
||||
#define ICVS_HOST_PRIV_CTRL BIT(6)
|
||||
#define ICVS_HOST_VISION_SENSING BIT(7)
|
||||
#define ICVS_NO_FW_UPDATE BIT(8)
|
||||
|
||||
/**
|
||||
* struct icvs_device_quirk - Device-specific quirk entry
|
||||
* @vid: Vendor ID
|
||||
* @pid: Product ID
|
||||
* @quirks: Quirk flags for this device
|
||||
*/
|
||||
struct icvs_device_quirk {
|
||||
u16 vid;
|
||||
u16 pid;
|
||||
unsigned long quirks;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct icvs_dt_config - Data type configuration for a virtual channel
|
||||
* @pixel_width: Pixel width in pixels
|
||||
* @pixel_height: Pixel height in pixels
|
||||
* @data_type: MIPI CSI-2 data type (RAW10, RAW12, etc.)
|
||||
* @reserved: Reserved for future use
|
||||
*/
|
||||
struct icvs_dt_config {
|
||||
u16 pixel_width;
|
||||
u16 pixel_height;
|
||||
u8 data_type;
|
||||
u8 reserved[3];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct icvs_vc_config - Virtual channel configuration
|
||||
* @vc: Virtual channel index (0-31)
|
||||
* @dt_count: Number of data types configured
|
||||
* @dt_configs: Array of data type configurations (up to 4)
|
||||
* @reserved: Reserved for future use
|
||||
*/
|
||||
struct icvs_vc_config {
|
||||
u8 vc;
|
||||
u8 dt_count;
|
||||
struct icvs_dt_config dt_configs[4];
|
||||
u8 reserved[6];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct icvs_link_cfg - Host to CVS CSI link configuration
|
||||
* @fps: Frames per second
|
||||
* @nr_of_lanes: Number of CSI-2 data lanes used
|
||||
* @phy_mode: 0 = DPHY, 1 = CPHY
|
||||
* @vc_count: Number of virtual channels enabled
|
||||
* @vc_configs: Per-VC configuration
|
||||
* @link_freq: Link frequency in Hz
|
||||
* @reserved: Reserved for future use
|
||||
*/
|
||||
struct icvs_link_cfg {
|
||||
u8 fps;
|
||||
u8 nr_of_lanes;
|
||||
u8 phy_mode;
|
||||
u8 vc_count;
|
||||
struct icvs_vc_config vc_configs[4];
|
||||
u32 link_freq;
|
||||
u8 reserved[8];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct icvs_fw_version - Firmware version tuple
|
||||
* @major: Major version
|
||||
* @minor: Minor version
|
||||
* @hotfix: Hotfix/patch level
|
||||
* @build: Build number
|
||||
*/
|
||||
struct icvs_fw_version {
|
||||
u32 major;
|
||||
u32 minor;
|
||||
u32 hotfix;
|
||||
u32 build;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct icvs_vid_pid - Device vendor/product IDs
|
||||
* @v_id: Vendor ID
|
||||
* @p_id: Product ID
|
||||
*/
|
||||
struct icvs_vid_pid {
|
||||
u16 v_id;
|
||||
u16 p_id;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct icvs_mipi_data_packet - Encapsulated MIPI link configuration packet
|
||||
* @cmd_id: Command identifier
|
||||
* @size: Payload size (bytes)
|
||||
* @crc: Checksum over payload
|
||||
* @conf: CSI link configuration
|
||||
* @reserved: Reserved for future use
|
||||
*/
|
||||
struct icvs_mipi_data_packet {
|
||||
__be16 cmd_id;
|
||||
u32 size;
|
||||
u32 crc;
|
||||
struct icvs_link_cfg conf;
|
||||
u8 reserved[70];
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* struct icvs_mipi_read_packet - Read-back MIPI configuration
|
||||
* @size: Payload size
|
||||
* @crc: Payload checksum
|
||||
* @conf: CSI link configuration
|
||||
*/
|
||||
struct icvs_mipi_read_packet {
|
||||
u32 size;
|
||||
u32 crc;
|
||||
struct icvs_link_cfg conf;
|
||||
};
|
||||
|
||||
/* Host identifier bitfield masks */
|
||||
#define ICVS_HOST_ID_RGBCAMERA_PWRUP BIT(31)
|
||||
#define ICVS_HOST_ID_PRIVACY_LED BIT(30)
|
||||
#define ICVS_HOST_ID_DEVICE_POWER GENMASK(29, 28)
|
||||
#define ICVS_HOST_ID_VISION_SENSING BIT(27)
|
||||
|
||||
/* Device state bitfield masks (u8) */
|
||||
#define ICVS_DEV_STATE_PRIVACY BIT(0)
|
||||
#define ICVS_DEV_STATE_ON BIT(1)
|
||||
#define ICVS_DEV_STATE_SENSOR_OWNER BIT(2)
|
||||
#define ICVS_DEV_STATE_DOWNLOAD BIT(4)
|
||||
#define ICVS_DEV_STATE_ERROR BIT(6)
|
||||
#define ICVS_DEV_STATE_BUSY BIT(7)
|
||||
|
||||
/* Device capability bitfield masks (u16) */
|
||||
#define ICVS_CAP_HOST_MIPI_REQUIRED BIT(15)
|
||||
#define ICVS_CAP_FW_ANTIROLLBACK BIT(14)
|
||||
#define ICVS_CAP_PRIVACY2VISIONDRIVER BIT(13)
|
||||
#define ICVS_CAP_FWUPDATE_RESET_HOST BIT(12)
|
||||
#define ICVS_CAP_NO_CAMERA_FWUPDATE BIT(11)
|
||||
#define ICVS_CAP_POWER_DOMAIN_SUPPORT BIT(10)
|
||||
#define ICVS_CAP_FW_FLASHED_IN_PLACE BIT(9)
|
||||
#define ICVS_CAP_IO_CONTEXT_HOT BIT(8)
|
||||
|
||||
/**
|
||||
* struct icvs_dev_capabilities - Protocol capabilities reported by device
|
||||
* @protocol_version_major: Major protocol version
|
||||
* @protocol_version_minor: Minor protocol version
|
||||
* @capability: Capability bitfield - use ICVS_CAP_* masks
|
||||
* @max_packet_time: Max packet processing time (ms)
|
||||
* @max_post_dl_time: Max post-download time (s)
|
||||
*/
|
||||
struct icvs_dev_capabilities {
|
||||
u8 protocol_version_major;
|
||||
u8 protocol_version_minor;
|
||||
u16 capability;
|
||||
u16 max_packet_time;
|
||||
u16 max_post_dl_time;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct icvs_cmd - Generic command container
|
||||
* @cmd_id: Command identifier
|
||||
* @param: Parameter union providing multiple variants
|
||||
* @param.param: Raw parameter
|
||||
* @param.host_id: Host identifier (ICVS_SET_DEV_HOST_ID) - use
|
||||
* ICVS_HOST_ID_* masks
|
||||
* @param.conf: CSI link configuration (ICVS_HOST_SET_MIPI_CONFIG)
|
||||
*/
|
||||
struct icvs_cmd {
|
||||
__be16 cmd_id;
|
||||
union {
|
||||
u32 param;
|
||||
u32 host_id;
|
||||
struct icvs_link_cfg conf;
|
||||
} param;
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* struct icvs_resp - Firmware response container
|
||||
* @status: Internal status code
|
||||
* @cmd_id: Original command identifier
|
||||
* @resp: Response union containing variant payload
|
||||
* @resp.state: Device state response (u8, use ICVS_DEV_STATE_* masks)
|
||||
* @resp.cap: Capability response
|
||||
* @resp.conf: Link configuration response
|
||||
* @resp.mipi_read: Raw link config read-back
|
||||
* @resp.vid_pid: Vendor/product identifiers
|
||||
* @resp.fw_version: Firmware version tuple
|
||||
*/
|
||||
struct icvs_resp {
|
||||
u32 status;
|
||||
__be16 cmd_id;
|
||||
union {
|
||||
u8 state;
|
||||
struct icvs_dev_capabilities cap;
|
||||
struct icvs_link_cfg conf;
|
||||
struct icvs_mipi_read_packet mipi_read;
|
||||
struct icvs_vid_pid vid_pid;
|
||||
struct icvs_fw_version fw_version;
|
||||
} resp;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum icvs_resources - Device capability / resource category
|
||||
*
|
||||
* Categorizes hardware resource availability which influences protocol
|
||||
* features (e.g. reset control, wake IRQ, GPIO mediated ownership). Light
|
||||
* capability devices expose a reduced set of control GPIOs; full capability
|
||||
* devices provide all optional signals and features. NOTSUP represents an
|
||||
* unsupported or uninitialized state.
|
||||
*
|
||||
* @ICVS_NOTSUP: Capability not supported / not yet determined
|
||||
* @ICVS_LIGHTCAP: Light capability (limited GPIO / no dedicated wake IRQ)
|
||||
* @ICVS_FULLCAP: Full capability (reset GPIO, wake IRQ, extended protocol)
|
||||
*/
|
||||
enum icvs_resources {
|
||||
ICVS_NOTSUP,
|
||||
ICVS_LIGHTCAP,
|
||||
ICVS_FULLCAP,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum icvs_command - Protocol command opcodes (firmware space 0x0800+)
|
||||
* @ICVS_GET_DEV_STATE: Query current device state bitfield
|
||||
* @ICVS_GET_DEV_FW_VERSION: Retrieve firmware version tuple
|
||||
* @ICVS_GET_DEV_VID_PID: Read vendor / product identifiers
|
||||
* @ICVS_GET_DEV_ERR_CODE: Fetch last error code (if any)
|
||||
* @ICVS_GET_DEV_CAPABILITY: Read protocol capability structure
|
||||
* @ICVS_SET_DEV_HOST_ID: Set host identity / ownership bits
|
||||
* @ICVS_GET_DEV_HOST_ID: Read back host identity
|
||||
* @ICVS_FW_LOADER_START: Begin firmware download sequence
|
||||
* @ICVS_FW_LOADER_DATA: Stream a chunk of firmware payload
|
||||
* @ICVS_FW_LOADER_END: End firmware download / trigger flash
|
||||
* @ICVS_HOST_GET_MIPI_CONFIG: Request current MIPI CSI link configuration
|
||||
* @ICVS_HOST_SET_MIPI_CONFIG: Apply new MIPI CSI link configuration
|
||||
* @ICVS_HOST_SENSOR_OWNER: Toggle CSI sensor ownership (GPIO assist)
|
||||
*/
|
||||
enum icvs_command {
|
||||
ICVS_GET_DEV_STATE = 0x0800,
|
||||
ICVS_GET_DEV_FW_VERSION = 0x0801,
|
||||
ICVS_GET_DEV_VID_PID = 0x0802,
|
||||
ICVS_GET_DEV_ERR_CODE = 0x0803,
|
||||
ICVS_GET_DEV_CAPABILITY = 0x0804,
|
||||
ICVS_SET_DEV_HOST_ID = 0x0805,
|
||||
ICVS_GET_DEV_HOST_ID = 0x0806,
|
||||
ICVS_FW_LOADER_START = 0x0820,
|
||||
ICVS_FW_LOADER_DATA = 0x0821,
|
||||
ICVS_FW_LOADER_END = 0x0822,
|
||||
ICVS_HOST_GET_MIPI_CONFIG = 0x082F,
|
||||
ICVS_HOST_SET_MIPI_CONFIG = 0x0830,
|
||||
ICVS_HOST_SENSOR_OWNER = 0x0831,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum icvs_state - Device state bitfield flags
|
||||
*
|
||||
* These flags correspond to bits in the device state byte returned via
|
||||
* GET_DEV_STATE and decoded in union icvs_dev_state. Multiple bits may be
|
||||
* asserted simultaneously. Reserved bits are omitted.
|
||||
*
|
||||
* @ICVS_DEVICE_OFF_STATE: Raw zero value; device is powered off or
|
||||
* not yet ready
|
||||
* @ICVS_DEVICE_PRIVACY_ON: Privacy mode active (LED asserted and/or
|
||||
* stream gated)
|
||||
* @ICVS_DEVICE_ON_STATE: Device powered and responsive to protocol commands
|
||||
* @ICVS_DEVICE_SENSOR_OWNER: CVS currently owns the attached CSI sensor
|
||||
* @ICVS_DEVICE_DWNLD_STATE: Firmware download / flash operation in progress
|
||||
* @ICVS_DEVICE_ERROR_STATE: Device has reported an error (query
|
||||
* ICVS_GET_DEV_ERR_CODE)
|
||||
* @ICVS_DEVICE_BUSY_STATE: Device is busy processing a prior command
|
||||
*/
|
||||
enum icvs_state {
|
||||
ICVS_DEVICE_OFF_STATE = 0x00,
|
||||
ICVS_DEVICE_PRIVACY_ON = BIT(0),
|
||||
ICVS_DEVICE_ON_STATE = BIT(1),
|
||||
ICVS_DEVICE_SENSOR_OWNER = BIT(2),
|
||||
ICVS_DEVICE_DWNLD_STATE = BIT(4),
|
||||
ICVS_DEVICE_ERROR_STATE = BIT(6),
|
||||
ICVS_DEVICE_BUSY_STATE = BIT(7),
|
||||
};
|
||||
|
||||
/**
|
||||
* struct icvs - Core CVS device context
|
||||
* @i2c_client: I2C client (NULL in platform-only mode)
|
||||
* @work: Delayed work for polling device state / completion
|
||||
* @wq_resp: Last response container populated by workqueue
|
||||
* @cmd_completion: Completion for command waiters
|
||||
* @lock: Mutex protecting command submission & shared state
|
||||
* @subdev: V4L2 sub-device representing the CSI bridge entity
|
||||
* @remote: Remote media pad connected to upstream camera sensor
|
||||
* @notifier: Async notifier for remote sensor discovery
|
||||
* @ctrl_handler: V4L2 control handler
|
||||
* @freq_ctrl: (future) frequency control pointer
|
||||
* @pads: Local media pads (sink/source)
|
||||
* @nr_of_lanes: Active CSI-2 lane count
|
||||
* @link_freq: Current link frequency (Hz)
|
||||
* @ipu_link: PM runtime device link (IPU consumer, CVS supplier)
|
||||
* @res: Resource capability (light/full)
|
||||
* @caps: Reported device protocol capabilities
|
||||
* @prefix: Firmware response prefix present
|
||||
* @quirks: Device-specific quirk flags
|
||||
* @rst: Reset GPIO (full capability only)
|
||||
* @req: Request GPIO (ownership signaling)
|
||||
* @resp: Response GPIO (ownership signaling)
|
||||
* @irq: Wake IRQ (full capability)
|
||||
* @hostwake_event: Waitqueue for wake events
|
||||
* @hostwake_event_arg: Wake event flag
|
||||
*/
|
||||
struct icvs {
|
||||
struct i2c_client *i2c_client;
|
||||
struct delayed_work work;
|
||||
struct icvs_resp wq_resp;
|
||||
struct completion cmd_completion;
|
||||
struct mutex lock; /* Protects command execution and device state */
|
||||
struct v4l2_subdev subdev;
|
||||
struct media_pad *remote;
|
||||
struct v4l2_async_notifier notifier;
|
||||
struct v4l2_ctrl_handler ctrl_handler;
|
||||
struct v4l2_ctrl *freq_ctrl;
|
||||
struct media_pad pads[ICVS_CSI_NUM_PADS];
|
||||
u32 nr_of_lanes;
|
||||
u64 link_freq;
|
||||
struct device_link *ipu_link;
|
||||
enum icvs_resources res;
|
||||
struct icvs_dev_capabilities caps;
|
||||
bool prefix;
|
||||
unsigned long quirks;
|
||||
struct gpio_desc *rst;
|
||||
struct gpio_desc *req;
|
||||
struct gpio_desc *resp;
|
||||
int irq;
|
||||
wait_queue_head_t hostwake_event;
|
||||
bool hostwake_event_arg;
|
||||
};
|
||||
|
||||
/**
|
||||
* cvs_dev - Helper returning the struct device for a CVS context
|
||||
* @ctx: CVS context
|
||||
*
|
||||
* Avoids repeating transport conditional logic at each call site when
|
||||
* acquiring the device pointer for logging or PM operations.
|
||||
*
|
||||
* Return: Device pointer (never NULL if @ctx is valid).
|
||||
*/
|
||||
static inline struct device *cvs_dev(struct icvs *ctx)
|
||||
{
|
||||
return ctx->i2c_client ? &ctx->i2c_client->dev : ctx->subdev.dev;
|
||||
}
|
||||
|
||||
/* Cross-unit interfaces */
|
||||
int cvs_send(struct icvs *ctx, struct icvs_cmd *cmd, size_t len);
|
||||
int cvs_set_link_owner(struct icvs *ctx, enum icvs_csi_link_owner owner);
|
||||
int cvs_csi_init(struct icvs *ctx, struct device *dev, struct i2c_client *i2c);
|
||||
void cvs_csi_remove(struct icvs *ctx);
|
||||
|
||||
#endif /* _ICVS_H */
|
||||
618
drivers/media/i2c/cvs/v4l2.c
Normal file
618
drivers/media/i2c/cvs/v4l2.c
Normal file
|
|
@ -0,0 +1,618 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (C) 2026 Intel Corporation
|
||||
* CVS driver - CSI/V4L2 subdev support
|
||||
*/
|
||||
|
||||
#include <linux/cleanup.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/property.h>
|
||||
|
||||
#include <media/v4l2-async.h>
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-ctrls.h>
|
||||
#include <media/v4l2-event.h>
|
||||
#include <media/v4l2-fwnode.h>
|
||||
#include <media/v4l2-mc.h>
|
||||
#include <media/v4l2-subdev.h>
|
||||
|
||||
#include "icvs.h"
|
||||
|
||||
/*
|
||||
* Helpers
|
||||
*/
|
||||
static inline struct icvs *notifier_to_csi(struct v4l2_async_notifier *n)
|
||||
{
|
||||
return container_of(n, struct icvs, notifier);
|
||||
}
|
||||
|
||||
static inline struct icvs *sd_to_csi(struct v4l2_subdev *sd)
|
||||
{
|
||||
return container_of(sd, struct icvs, subdev);
|
||||
}
|
||||
|
||||
/*
|
||||
* Default formats
|
||||
*/
|
||||
static const struct v4l2_mbus_framefmt cvs_csi_format_mbus_default = {
|
||||
.width = 1,
|
||||
.height = 1,
|
||||
.code = MEDIA_BUS_FMT_Y8_1X8,
|
||||
.field = V4L2_FIELD_NONE,
|
||||
};
|
||||
|
||||
/**
|
||||
* csi_set_link_cfg - Program default CSI-2 link parameters
|
||||
* @ctx: CVS device context
|
||||
*
|
||||
* Populates a HOST_SET_MIPI_CONFIG command using current lane count and
|
||||
* link frequency, then submits it to the device.
|
||||
* Rest of the link parameters are left at firmware defaults.
|
||||
*
|
||||
* Return: 0 on success or negative errno.
|
||||
*/
|
||||
static int csi_set_link_cfg(struct icvs *ctx)
|
||||
{
|
||||
struct icvs_cmd cmd = {
|
||||
.cmd_id = cpu_to_be16(ICVS_HOST_SET_MIPI_CONFIG),
|
||||
.param.conf.nr_of_lanes = ctx->nr_of_lanes,
|
||||
.param.conf.link_freq = ctx->link_freq,
|
||||
};
|
||||
size_t cmd_size = sizeof(cmd.cmd_id) + sizeof(cmd.param.conf);
|
||||
|
||||
guard(mutex)(&ctx->lock);
|
||||
return cvs_send(ctx, &cmd, cmd_size);
|
||||
}
|
||||
|
||||
/*
|
||||
* Streaming
|
||||
*/
|
||||
|
||||
/**
|
||||
* cvs_csi_enable_streams - Start streaming through the bridge
|
||||
* @sd: Sub-device pointer
|
||||
* @state: Active state
|
||||
* @pad: Pad identifier (must be ICVS_CSI_PAD_SOURCE)
|
||||
* @streams_mask: Streams to enable (bit 0 supported)
|
||||
*
|
||||
* Runtime-resumes the bridge (triggering cvs_runtime_resume() to claim CSI-2
|
||||
* link ownership), fetches the link frequency, programs the MIPI configuration,
|
||||
* and forwards the enable request downstream.
|
||||
*
|
||||
* Return: 0 on success or negative errno.
|
||||
*/
|
||||
static int cvs_csi_enable_streams(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *state,
|
||||
u32 pad, u64 streams_mask)
|
||||
{
|
||||
struct icvs *ctx = sd_to_csi(sd);
|
||||
struct v4l2_subdev *remote_sd =
|
||||
media_entity_to_v4l2_subdev(ctx->remote->entity);
|
||||
struct device *dev = cvs_dev(ctx);
|
||||
s64 freq;
|
||||
int ret;
|
||||
|
||||
/* cvs_set_link_owner(ICVS_CSI_LINK_HOST) */
|
||||
ret = pm_runtime_resume_and_get(dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
freq = v4l2_get_link_freq(ctx->remote, 0, 0);
|
||||
if (freq < 0) {
|
||||
ret = freq;
|
||||
goto err_rpm_put;
|
||||
}
|
||||
ctx->link_freq = freq;
|
||||
|
||||
if (ctx->i2c_client) {
|
||||
ret = csi_set_link_cfg(ctx);
|
||||
if (ret < 0)
|
||||
goto err_rpm_put_sync;
|
||||
}
|
||||
|
||||
ret = v4l2_subdev_enable_streams(remote_sd,
|
||||
ctx->remote->index,
|
||||
streams_mask);
|
||||
if (ret)
|
||||
goto err_rpm_put_sync;
|
||||
|
||||
return 0;
|
||||
|
||||
err_rpm_put_sync:
|
||||
/* Bypass autosuspend to immediately release ownership on error */
|
||||
pm_runtime_put_sync(dev);
|
||||
return ret;
|
||||
err_rpm_put:
|
||||
pm_runtime_put_autosuspend(dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* cvs_csi_disable_streams - Stop streaming through the bridge
|
||||
* @sd: Sub-device pointer
|
||||
* @state: Active state
|
||||
* @pad: Pad identifier (must be ICVS_CSI_PAD_SOURCE)
|
||||
* @streams_mask: Streams to disable (bit 0 supported)
|
||||
*
|
||||
* Disables the remote sensor stream then drops the PM reference acquired
|
||||
* during enable. After the autosuspend delay, cvs_runtime_suspend() will
|
||||
* return CSI-2 link ownership to CVS firmware.
|
||||
*
|
||||
* Return: 0 on success or negative errno.
|
||||
*/
|
||||
static int cvs_csi_disable_streams(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *state,
|
||||
u32 pad, u64 streams_mask)
|
||||
{
|
||||
struct icvs *ctx = sd_to_csi(sd);
|
||||
struct v4l2_subdev *remote_sd =
|
||||
media_entity_to_v4l2_subdev(ctx->remote->entity);
|
||||
struct device *dev = cvs_dev(ctx);
|
||||
int ret;
|
||||
|
||||
ret = v4l2_subdev_disable_streams(remote_sd,
|
||||
ctx->remote->index,
|
||||
streams_mask);
|
||||
if (ret)
|
||||
dev_err(dev, "disable streams failed: %d\n", ret);
|
||||
|
||||
/* cvs_set_link_owner(ICVS_CSI_LINK_CVS) */
|
||||
pm_runtime_put_autosuspend(dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Pad operations / formats
|
||||
*/
|
||||
/**
|
||||
* cvs_csi_init_state - Initialize pad formats in subdev state
|
||||
* @sd: Sub-device
|
||||
* @state: State container
|
||||
*
|
||||
* Sets all pad formats to a minimal 1x1 default.
|
||||
*
|
||||
* Return: 0.
|
||||
*/
|
||||
static int cvs_csi_init_state(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *state)
|
||||
{
|
||||
for (unsigned int i = 0; i < sd->entity.num_pads; i++)
|
||||
*v4l2_subdev_state_get_format(state, i) =
|
||||
cvs_csi_format_mbus_default;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* cvs_csi_set_fmt - Negotiate pad format
|
||||
* @sd: Sub-device
|
||||
* @state: State
|
||||
* @format: Desired / returned format
|
||||
*
|
||||
* Mirrors sink format onto source pad. Accepts many media bus codes, falling
|
||||
* back to Y8 if unsupported. Normalizes field setting.
|
||||
*
|
||||
* Return: 0.
|
||||
*/
|
||||
static int cvs_csi_set_fmt(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *state,
|
||||
struct v4l2_subdev_format *format)
|
||||
{
|
||||
struct v4l2_mbus_framefmt *src =
|
||||
v4l2_subdev_state_get_format(state, ICVS_CSI_PAD_SOURCE);
|
||||
struct v4l2_mbus_framefmt *sink =
|
||||
v4l2_subdev_state_get_format(state, ICVS_CSI_PAD_SINK);
|
||||
|
||||
if (format->pad == ICVS_CSI_PAD_SOURCE) { /* source pad mirrors sink */
|
||||
*src = *sink;
|
||||
return 0;
|
||||
}
|
||||
|
||||
v4l_bound_align_image(&format->format.width, 1, 65536, 0,
|
||||
&format->format.height, 1, 65536, 0, 0);
|
||||
|
||||
switch (format->format.code) {
|
||||
/* Accept a large list; default fallback to Y8 */
|
||||
case MEDIA_BUS_FMT_RGB444_1X12:
|
||||
case MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE:
|
||||
case MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE:
|
||||
case MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE:
|
||||
case MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE:
|
||||
case MEDIA_BUS_FMT_RGB565_1X16:
|
||||
case MEDIA_BUS_FMT_BGR565_2X8_BE:
|
||||
case MEDIA_BUS_FMT_BGR565_2X8_LE:
|
||||
case MEDIA_BUS_FMT_RGB565_2X8_BE:
|
||||
case MEDIA_BUS_FMT_RGB565_2X8_LE:
|
||||
case MEDIA_BUS_FMT_RGB666_1X18:
|
||||
case MEDIA_BUS_FMT_RBG888_1X24:
|
||||
case MEDIA_BUS_FMT_RGB666_1X24_CPADHI:
|
||||
case MEDIA_BUS_FMT_BGR888_1X24:
|
||||
case MEDIA_BUS_FMT_GBR888_1X24:
|
||||
case MEDIA_BUS_FMT_RGB888_1X24:
|
||||
case MEDIA_BUS_FMT_RGB888_2X12_BE:
|
||||
case MEDIA_BUS_FMT_RGB888_2X12_LE:
|
||||
case MEDIA_BUS_FMT_ARGB8888_1X32:
|
||||
case MEDIA_BUS_FMT_RGB888_1X32_PADHI:
|
||||
case MEDIA_BUS_FMT_RGB101010_1X30:
|
||||
case MEDIA_BUS_FMT_RGB121212_1X36:
|
||||
case MEDIA_BUS_FMT_RGB161616_1X48:
|
||||
case MEDIA_BUS_FMT_Y8_1X8:
|
||||
case MEDIA_BUS_FMT_UV8_1X8:
|
||||
case MEDIA_BUS_FMT_UYVY8_1_5X8:
|
||||
case MEDIA_BUS_FMT_VYUY8_1_5X8:
|
||||
case MEDIA_BUS_FMT_YUYV8_1_5X8:
|
||||
case MEDIA_BUS_FMT_YVYU8_1_5X8:
|
||||
case MEDIA_BUS_FMT_UYVY8_2X8:
|
||||
case MEDIA_BUS_FMT_VYUY8_2X8:
|
||||
case MEDIA_BUS_FMT_YUYV8_2X8:
|
||||
case MEDIA_BUS_FMT_YVYU8_2X8:
|
||||
case MEDIA_BUS_FMT_Y10_1X10:
|
||||
case MEDIA_BUS_FMT_UYVY10_2X10:
|
||||
case MEDIA_BUS_FMT_VYUY10_2X10:
|
||||
case MEDIA_BUS_FMT_YUYV10_2X10:
|
||||
case MEDIA_BUS_FMT_YVYU10_2X10:
|
||||
case MEDIA_BUS_FMT_Y12_1X12:
|
||||
case MEDIA_BUS_FMT_UYVY12_2X12:
|
||||
case MEDIA_BUS_FMT_VYUY12_2X12:
|
||||
case MEDIA_BUS_FMT_YUYV12_2X12:
|
||||
case MEDIA_BUS_FMT_YVYU12_2X12:
|
||||
case MEDIA_BUS_FMT_UYVY8_1X16:
|
||||
case MEDIA_BUS_FMT_VYUY8_1X16:
|
||||
case MEDIA_BUS_FMT_YUYV8_1X16:
|
||||
case MEDIA_BUS_FMT_YVYU8_1X16:
|
||||
case MEDIA_BUS_FMT_YDYUYDYV8_1X16:
|
||||
case MEDIA_BUS_FMT_UYVY10_1X20:
|
||||
case MEDIA_BUS_FMT_VYUY10_1X20:
|
||||
case MEDIA_BUS_FMT_YUYV10_1X20:
|
||||
case MEDIA_BUS_FMT_YVYU10_1X20:
|
||||
case MEDIA_BUS_FMT_VUY8_1X24:
|
||||
case MEDIA_BUS_FMT_YUV8_1X24:
|
||||
case MEDIA_BUS_FMT_UYYVYY8_0_5X24:
|
||||
case MEDIA_BUS_FMT_UYVY12_1X24:
|
||||
case MEDIA_BUS_FMT_VYUY12_1X24:
|
||||
case MEDIA_BUS_FMT_YUYV12_1X24:
|
||||
case MEDIA_BUS_FMT_YVYU12_1X24:
|
||||
case MEDIA_BUS_FMT_YUV10_1X30:
|
||||
case MEDIA_BUS_FMT_UYYVYY10_0_5X30:
|
||||
case MEDIA_BUS_FMT_AYUV8_1X32:
|
||||
case MEDIA_BUS_FMT_UYYVYY12_0_5X36:
|
||||
case MEDIA_BUS_FMT_YUV12_1X36:
|
||||
case MEDIA_BUS_FMT_YUV16_1X48:
|
||||
case MEDIA_BUS_FMT_UYYVYY16_0_5X48:
|
||||
case MEDIA_BUS_FMT_JPEG_1X8:
|
||||
case MEDIA_BUS_FMT_AHSV8888_1X32:
|
||||
case MEDIA_BUS_FMT_SBGGR8_1X8:
|
||||
case MEDIA_BUS_FMT_SGBRG8_1X8:
|
||||
case MEDIA_BUS_FMT_SGRBG8_1X8:
|
||||
case MEDIA_BUS_FMT_SRGGB8_1X8:
|
||||
case MEDIA_BUS_FMT_SBGGR10_1X10:
|
||||
case MEDIA_BUS_FMT_SGBRG10_1X10:
|
||||
case MEDIA_BUS_FMT_SGRBG10_1X10:
|
||||
case MEDIA_BUS_FMT_SRGGB10_1X10:
|
||||
case MEDIA_BUS_FMT_SBGGR12_1X12:
|
||||
case MEDIA_BUS_FMT_SGBRG12_1X12:
|
||||
case MEDIA_BUS_FMT_SGRBG12_1X12:
|
||||
case MEDIA_BUS_FMT_SRGGB12_1X12:
|
||||
case MEDIA_BUS_FMT_SBGGR14_1X14:
|
||||
case MEDIA_BUS_FMT_SGBRG14_1X14:
|
||||
case MEDIA_BUS_FMT_SGRBG14_1X14:
|
||||
case MEDIA_BUS_FMT_SRGGB14_1X14:
|
||||
case MEDIA_BUS_FMT_SBGGR16_1X16:
|
||||
case MEDIA_BUS_FMT_SGBRG16_1X16:
|
||||
case MEDIA_BUS_FMT_SGRBG16_1X16:
|
||||
case MEDIA_BUS_FMT_SRGGB16_1X16:
|
||||
break;
|
||||
default:
|
||||
format->format.code = MEDIA_BUS_FMT_Y8_1X8;
|
||||
break;
|
||||
}
|
||||
|
||||
if (format->format.field == V4L2_FIELD_ANY)
|
||||
format->format.field = V4L2_FIELD_NONE;
|
||||
|
||||
*sink = format->format;
|
||||
*src = *sink;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* cvs_csi_get_mbus_config - Provide current CSI-2 bus configuration
|
||||
* @sd: Sub-device
|
||||
* @pad: Pad index
|
||||
* @cfg: Returned bus config
|
||||
*
|
||||
* Fills lane ordering and number of lanes; retrieves link frequency from
|
||||
* remote entity.
|
||||
*
|
||||
* Return: 0 on success or negative errno.
|
||||
*/
|
||||
static int cvs_csi_get_mbus_config(struct v4l2_subdev *sd, unsigned int pad,
|
||||
struct v4l2_mbus_config *cfg)
|
||||
{
|
||||
struct icvs *ctx = sd_to_csi(sd);
|
||||
s64 freq;
|
||||
|
||||
cfg->type = V4L2_MBUS_CSI2_DPHY;
|
||||
for (unsigned int i = 0; i < V4L2_MBUS_CSI2_MAX_DATA_LANES; i++)
|
||||
cfg->bus.mipi_csi2.data_lanes[i] = i + 1;
|
||||
cfg->bus.mipi_csi2.num_data_lanes = ctx->nr_of_lanes;
|
||||
|
||||
freq = v4l2_get_link_freq(ctx->remote, 0, 0);
|
||||
if (freq < 0)
|
||||
return -EINVAL;
|
||||
|
||||
ctx->link_freq = freq;
|
||||
cfg->link_freq = freq;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct v4l2_subdev_core_ops cvs_csi_subdev_core_ops = {
|
||||
.subscribe_event = v4l2_ctrl_subdev_subscribe_event,
|
||||
.unsubscribe_event = v4l2_event_subdev_unsubscribe,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_video_ops cvs_csi_video_ops = {
|
||||
.s_stream = v4l2_subdev_s_stream_helper,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_pad_ops cvs_csi_pad_ops = {
|
||||
.get_fmt = v4l2_subdev_get_fmt,
|
||||
.set_fmt = cvs_csi_set_fmt,
|
||||
.get_mbus_config = cvs_csi_get_mbus_config,
|
||||
.enable_streams = cvs_csi_enable_streams,
|
||||
.disable_streams = cvs_csi_disable_streams,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_ops cvs_csi_subdev_ops = {
|
||||
.core = &cvs_csi_subdev_core_ops,
|
||||
.video = &cvs_csi_video_ops,
|
||||
.pad = &cvs_csi_pad_ops,
|
||||
};
|
||||
|
||||
static const struct v4l2_subdev_internal_ops cvs_csi_internal_ops = {
|
||||
.init_state = cvs_csi_init_state,
|
||||
};
|
||||
|
||||
static const struct media_entity_operations cvs_csi_entity_ops = {
|
||||
.link_validate = v4l2_subdev_link_validate,
|
||||
};
|
||||
|
||||
/*
|
||||
* Async notifier
|
||||
*/
|
||||
/**
|
||||
* cvs_csi_notify_bound - Remote sensor bound callback
|
||||
* @notifier: Async notifier
|
||||
* @sd: Remote subdev
|
||||
* @asc: Async match connection
|
||||
*
|
||||
* Locates the source pad of the remote sensor and creates a media link to
|
||||
* the CVS bridge sink pad enabling it by default.
|
||||
*
|
||||
* Return: 0 on success or negative errno.
|
||||
*/
|
||||
static int cvs_csi_notify_bound(struct v4l2_async_notifier *notifier,
|
||||
struct v4l2_subdev *sd,
|
||||
struct v4l2_async_connection *asc)
|
||||
{
|
||||
struct icvs *ctx = notifier_to_csi(notifier);
|
||||
int pad;
|
||||
|
||||
pad = media_entity_get_fwnode_pad(&sd->entity, asc->match.fwnode,
|
||||
MEDIA_PAD_FL_SOURCE);
|
||||
if (pad < 0)
|
||||
return pad;
|
||||
|
||||
ctx->remote = &sd->entity.pads[pad];
|
||||
|
||||
return media_create_pad_link(&sd->entity, pad, &ctx->subdev.entity,
|
||||
ICVS_CSI_PAD_SINK, MEDIA_LNK_FL_ENABLED |
|
||||
MEDIA_LNK_FL_IMMUTABLE);
|
||||
}
|
||||
|
||||
/**
|
||||
* cvs_csi_notify_unbind - Remote sensor unbind callback
|
||||
* @notifier: Notifier
|
||||
* @sd: Remote subdev
|
||||
* @asc: Connection
|
||||
*/
|
||||
static void cvs_csi_notify_unbind(struct v4l2_async_notifier *notifier,
|
||||
struct v4l2_subdev *sd,
|
||||
struct v4l2_async_connection *asc)
|
||||
{
|
||||
struct icvs *ctx = notifier_to_csi(notifier);
|
||||
|
||||
ctx->remote = NULL;
|
||||
}
|
||||
|
||||
static const struct v4l2_async_notifier_operations cvs_csi_notify_ops = {
|
||||
.bound = cvs_csi_notify_bound,
|
||||
.unbind = cvs_csi_notify_unbind,
|
||||
};
|
||||
|
||||
/*
|
||||
* Controls
|
||||
*/
|
||||
/**
|
||||
* cvs_csi_init_controls - Initialize V4L2 controls
|
||||
* @ctx: CVS context
|
||||
*
|
||||
* Currently sets up a read-only privacy control placeholder.
|
||||
*
|
||||
* Return: 0 on success or negative errno.
|
||||
*/
|
||||
static int cvs_csi_init_controls(struct icvs *ctx)
|
||||
{
|
||||
struct v4l2_ctrl *privacy_ctrl;
|
||||
|
||||
v4l2_ctrl_handler_init(&ctx->ctrl_handler, 1);
|
||||
|
||||
privacy_ctrl = v4l2_ctrl_new_std(&ctx->ctrl_handler, NULL,
|
||||
V4L2_CID_PRIVACY, 0, 1, 1, 0);
|
||||
if (privacy_ctrl)
|
||||
privacy_ctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY;
|
||||
if (ctx->ctrl_handler.error) {
|
||||
v4l2_ctrl_handler_free(&ctx->ctrl_handler);
|
||||
return ctx->ctrl_handler.error;
|
||||
}
|
||||
|
||||
ctx->subdev.ctrl_handler = &ctx->ctrl_handler;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Firmware (graph) parsing
|
||||
*/
|
||||
/**
|
||||
* cvs_csi_parse_firmware - Parse firmware (ACPI graph) endpoints
|
||||
* @ctx: CVS context
|
||||
*
|
||||
* Discovers sink and remote source endpoints, validates lane counts and
|
||||
* registers an async notifier for the remote sensor.
|
||||
*
|
||||
* Return: 0 on success or negative errno.
|
||||
*/
|
||||
static int cvs_csi_parse_firmware(struct icvs *ctx)
|
||||
{
|
||||
struct v4l2_fwnode_endpoint ep = { .bus_type = V4L2_MBUS_CSI2_DPHY };
|
||||
struct device *dev = cvs_dev(ctx);
|
||||
struct fwnode_handle *sink_ep, *source_ep;
|
||||
struct v4l2_async_connection *asc;
|
||||
int ret;
|
||||
|
||||
sink_ep = fwnode_graph_get_endpoint_by_id(dev_fwnode(dev), 0, 0, 0);
|
||||
v4l2_async_subdev_nf_init(&ctx->notifier, &ctx->subdev);
|
||||
ctx->notifier.ops = &cvs_csi_notify_ops;
|
||||
|
||||
ret = v4l2_fwnode_endpoint_parse(sink_ep, &ep);
|
||||
if (ret)
|
||||
goto err_nf_cleanup;
|
||||
|
||||
ctx->nr_of_lanes = ep.bus.mipi_csi2.num_data_lanes;
|
||||
source_ep = fwnode_graph_get_endpoint_by_id(dev_fwnode(dev), 1, 0, 0);
|
||||
ret = v4l2_fwnode_endpoint_parse(source_ep, &ep);
|
||||
fwnode_handle_put(source_ep);
|
||||
if (ret)
|
||||
goto err_nf_cleanup;
|
||||
|
||||
if (ctx->nr_of_lanes != ep.bus.mipi_csi2.num_data_lanes) {
|
||||
ret = -EINVAL;
|
||||
goto err_nf_cleanup;
|
||||
}
|
||||
|
||||
asc = v4l2_async_nf_add_fwnode_remote(&ctx->notifier, sink_ep,
|
||||
struct v4l2_async_connection);
|
||||
if (IS_ERR(asc)) {
|
||||
ret = PTR_ERR(asc);
|
||||
goto err_nf_cleanup;
|
||||
}
|
||||
|
||||
ret = v4l2_async_nf_register(&ctx->notifier);
|
||||
if (ret)
|
||||
goto err_nf_cleanup;
|
||||
|
||||
fwnode_handle_put(sink_ep);
|
||||
|
||||
return 0;
|
||||
|
||||
err_nf_cleanup:
|
||||
v4l2_async_nf_cleanup(&ctx->notifier);
|
||||
fwnode_handle_put(sink_ep);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Public CSI init/cleanup used by core probe/remove
|
||||
*/
|
||||
/**
|
||||
* cvs_csi_init - Initialize CSI/V4L2 sub-device side of bridge
|
||||
* @ctx: CVS context
|
||||
* @dev: Parent device
|
||||
* @i2c: I2C client (may be NULL for platform mode)
|
||||
*
|
||||
* Sets up sub-device, media entity pads, async notifier, controls and
|
||||
* registers with the V4L2 framework.
|
||||
*
|
||||
* Return: 0 on success or negative errno.
|
||||
*/
|
||||
int cvs_csi_init(struct icvs *ctx, struct device *dev, struct i2c_client *i2c)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (i2c) {
|
||||
v4l2_i2c_subdev_init(&ctx->subdev, i2c, &cvs_csi_subdev_ops);
|
||||
} else {
|
||||
v4l2_subdev_init(&ctx->subdev, &cvs_csi_subdev_ops);
|
||||
ctx->subdev.dev = dev;
|
||||
}
|
||||
|
||||
ctx->subdev.internal_ops = &cvs_csi_internal_ops;
|
||||
v4l2_set_subdevdata(&ctx->subdev, ctx);
|
||||
ctx->subdev.flags = V4L2_SUBDEV_FL_HAS_DEVNODE;
|
||||
ctx->subdev.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
|
||||
ctx->subdev.entity.ops = &cvs_csi_entity_ops;
|
||||
snprintf(ctx->subdev.name, sizeof(ctx->subdev.name), "Intel CVS");
|
||||
|
||||
ret = cvs_csi_parse_firmware(ctx);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = cvs_csi_init_controls(ctx);
|
||||
if (ret)
|
||||
goto err_nf_unreg;
|
||||
|
||||
ctx->pads[ICVS_CSI_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE;
|
||||
ctx->pads[ICVS_CSI_PAD_SINK].flags = MEDIA_PAD_FL_SINK;
|
||||
ret = media_entity_pads_init(&ctx->subdev.entity, ICVS_CSI_NUM_PADS,
|
||||
ctx->pads);
|
||||
if (ret)
|
||||
goto err_ctrl_cleanup;
|
||||
|
||||
ctx->subdev.state_lock = ctx->ctrl_handler.lock;
|
||||
ret = v4l2_subdev_init_finalize(&ctx->subdev);
|
||||
if (ret)
|
||||
goto err_entity_cleanup;
|
||||
|
||||
ret = v4l2_async_register_subdev(&ctx->subdev);
|
||||
if (ret)
|
||||
goto err_entity_cleanup;
|
||||
|
||||
return 0;
|
||||
|
||||
err_entity_cleanup:
|
||||
media_entity_cleanup(&ctx->subdev.entity);
|
||||
|
||||
err_ctrl_cleanup:
|
||||
v4l2_ctrl_handler_free(&ctx->ctrl_handler);
|
||||
|
||||
err_nf_unreg:
|
||||
v4l2_async_nf_unregister(&ctx->notifier);
|
||||
v4l2_async_nf_cleanup(&ctx->notifier);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* cvs_csi_remove - Cleanup CSI/V4L2 sub-device
|
||||
* @ctx: CVS context
|
||||
*/
|
||||
void cvs_csi_remove(struct icvs *ctx)
|
||||
{
|
||||
v4l2_async_nf_unregister(&ctx->notifier);
|
||||
v4l2_async_nf_cleanup(&ctx->notifier);
|
||||
v4l2_ctrl_handler_free(&ctx->ctrl_handler);
|
||||
v4l2_async_unregister_subdev(&ctx->subdev);
|
||||
v4l2_subdev_cleanup(&ctx->subdev);
|
||||
media_entity_cleanup(&ctx->subdev.entity);
|
||||
}
|
||||
|
||||
MODULE_AUTHOR("Miguel Vadillo <miguel.vadillo@intel.com>");
|
||||
MODULE_DESCRIPTION("CSI/V4L2 support for Intel Vision Sensing Controller");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
|
@ -3989,7 +3989,7 @@ static void cx25840_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id cx25840_id[] = {
|
||||
{ "cx25840" },
|
||||
{ .name = "cx25840" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, cx25840_id);
|
||||
|
|
|
|||
|
|
@ -872,8 +872,8 @@ static void ub913_remove(struct i2c_client *client)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id ub913_id[] = {
|
||||
{ "ds90ub913a-q1" },
|
||||
{}
|
||||
{ .name = "ds90ub913a-q1" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, ub913_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -1347,9 +1347,9 @@ static const struct ub953_hw_data ds90ub971_hw = {
|
|||
};
|
||||
|
||||
static const struct i2c_device_id ub953_id[] = {
|
||||
{ "ds90ub953-q1", (kernel_ulong_t)&ds90ub953_hw },
|
||||
{ "ds90ub971-q1", (kernel_ulong_t)&ds90ub971_hw },
|
||||
{}
|
||||
{ .name = "ds90ub953-q1", .driver_data = (kernel_ulong_t)&ds90ub953_hw },
|
||||
{ .name = "ds90ub971-q1", .driver_data = (kernel_ulong_t)&ds90ub971_hw },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, ub953_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -5266,10 +5266,10 @@ static const struct ub960_hw_data ds90ub9702_hw = {
|
|||
};
|
||||
|
||||
static const struct i2c_device_id ub960_id[] = {
|
||||
{ "ds90ub954-q1", (kernel_ulong_t)&ds90ub954_hw },
|
||||
{ "ds90ub960-q1", (kernel_ulong_t)&ds90ub960_hw },
|
||||
{ "ds90ub9702-q1", (kernel_ulong_t)&ds90ub9702_hw },
|
||||
{}
|
||||
{ .name = "ds90ub954-q1", .driver_data = (kernel_ulong_t)&ds90ub954_hw },
|
||||
{ .name = "ds90ub960-q1", .driver_data = (kernel_ulong_t)&ds90ub960_hw },
|
||||
{ .name = "ds90ub9702-q1", .driver_data = (kernel_ulong_t)&ds90ub9702_hw },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, ub960_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ static int __maybe_unused dw9714_vcm_resume(struct device *dev)
|
|||
}
|
||||
|
||||
static const struct i2c_device_id dw9714_id_table[] = {
|
||||
{ DW9714_NAME },
|
||||
{ .name = DW9714_NAME },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, dw9714_id_table);
|
||||
|
|
|
|||
|
|
@ -439,6 +439,15 @@ static void dw9719_remove(struct i2c_client *client)
|
|||
pm_runtime_set_suspended(&client->dev);
|
||||
}
|
||||
|
||||
static const struct i2c_device_id dw9719_id_table[] = {
|
||||
{ .name = "dw9718s", .driver_data = (kernel_ulong_t)DW9718S },
|
||||
{ .name = "dw9719", .driver_data = (kernel_ulong_t)DW9719 },
|
||||
{ .name = "dw9761", .driver_data = (kernel_ulong_t)DW9761 },
|
||||
{ .name = "dw9800k", .driver_data = (kernel_ulong_t)DW9800K },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, dw9719_id_table);
|
||||
|
||||
static const struct of_device_id dw9719_of_table[] = {
|
||||
{ .compatible = "dongwoon,dw9718s", .data = (const void *)DW9718S },
|
||||
{ .compatible = "dongwoon,dw9719", .data = (const void *)DW9719 },
|
||||
|
|
@ -459,6 +468,7 @@ static struct i2c_driver dw9719_i2c_driver = {
|
|||
},
|
||||
.probe = dw9719_probe,
|
||||
.remove = dw9719_remove,
|
||||
.id_table = dw9719_id_table,
|
||||
};
|
||||
module_i2c_driver(dw9719_i2c_driver);
|
||||
|
||||
|
|
|
|||
|
|
@ -1485,7 +1485,7 @@ static const struct of_device_id et8ek8_of_table[] = {
|
|||
MODULE_DEVICE_TABLE(of, et8ek8_of_table);
|
||||
|
||||
static const struct i2c_device_id et8ek8_id_table[] = {
|
||||
{ ET8EK8_NAME },
|
||||
{ .name = ET8EK8_NAME },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, et8ek8_id_table);
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
|
||||
/* V_TIMING internal */
|
||||
#define IMX219_REG_FRM_LENGTH_A CCI_REG16(0x0160)
|
||||
#define IMX219_FLL_MAX 0xffff
|
||||
#define IMX219_FLL_MAX 0xfffe
|
||||
#define IMX219_VBLANK_MIN 32
|
||||
#define IMX219_REG_LINE_LENGTH_A CCI_REG16(0x0162)
|
||||
#define IMX219_LLP_MIN 0x0d78
|
||||
|
|
@ -142,10 +142,10 @@
|
|||
/* IMX219 native and active pixel array size. */
|
||||
#define IMX219_NATIVE_WIDTH 3296U
|
||||
#define IMX219_NATIVE_HEIGHT 2480U
|
||||
#define IMX219_PIXEL_ARRAY_LEFT 8U
|
||||
#define IMX219_PIXEL_ARRAY_TOP 8U
|
||||
#define IMX219_PIXEL_ARRAY_WIDTH 3280U
|
||||
#define IMX219_PIXEL_ARRAY_HEIGHT 2464U
|
||||
#define IMX219_ACTIVE_AREA_LEFT 8U
|
||||
#define IMX219_ACTIVE_AREA_TOP 8U
|
||||
#define IMX219_ACTIVE_AREA_WIDTH 3280U
|
||||
#define IMX219_ACTIVE_AREA_HEIGHT 2464U
|
||||
|
||||
/* Mode : resolution and related config&values */
|
||||
struct imx219_mode {
|
||||
|
|
@ -675,13 +675,13 @@ static int imx219_set_framefmt(struct imx219 *imx219,
|
|||
bpp = imx219_get_format_bpp(format);
|
||||
|
||||
cci_write(imx219->regmap, IMX219_REG_X_ADD_STA_A,
|
||||
crop->left - IMX219_PIXEL_ARRAY_LEFT, &ret);
|
||||
crop->left - IMX219_ACTIVE_AREA_LEFT, &ret);
|
||||
cci_write(imx219->regmap, IMX219_REG_X_ADD_END_A,
|
||||
crop->left - IMX219_PIXEL_ARRAY_LEFT + crop->width - 1, &ret);
|
||||
crop->left - IMX219_ACTIVE_AREA_LEFT + crop->width - 1, &ret);
|
||||
cci_write(imx219->regmap, IMX219_REG_Y_ADD_STA_A,
|
||||
crop->top - IMX219_PIXEL_ARRAY_TOP, &ret);
|
||||
crop->top - IMX219_ACTIVE_AREA_TOP, &ret);
|
||||
cci_write(imx219->regmap, IMX219_REG_Y_ADD_END_A,
|
||||
crop->top - IMX219_PIXEL_ARRAY_TOP + crop->height - 1, &ret);
|
||||
crop->top - IMX219_ACTIVE_AREA_TOP + crop->height - 1, &ret);
|
||||
|
||||
imx219_get_binning(state, &bin_h, &bin_v);
|
||||
cci_write(imx219->regmap, IMX219_REG_BINNING_MODE_H, bin_h, &ret);
|
||||
|
|
@ -837,11 +837,9 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
|
|||
struct v4l2_mbus_framefmt *format;
|
||||
struct v4l2_rect *crop;
|
||||
u8 bin_h, bin_v, binning;
|
||||
u32 prev_line_len;
|
||||
int ret;
|
||||
|
||||
format = v4l2_subdev_state_get_format(state, 0);
|
||||
prev_line_len = format->width + imx219->hblank->val;
|
||||
|
||||
/*
|
||||
* Adjust the requested format to match the closest mode. The Bayer
|
||||
|
|
@ -867,8 +865,8 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
|
|||
* Use binning to maximize the crop rectangle size, and centre it in the
|
||||
* sensor.
|
||||
*/
|
||||
bin_h = min(IMX219_PIXEL_ARRAY_WIDTH / format->width, 2U);
|
||||
bin_v = min(IMX219_PIXEL_ARRAY_HEIGHT / format->height, 2U);
|
||||
bin_h = min(IMX219_ACTIVE_AREA_WIDTH / format->width, 2U);
|
||||
bin_v = min(IMX219_ACTIVE_AREA_HEIGHT / format->height, 2U);
|
||||
|
||||
/* Ensure bin_h and bin_v are same to avoid 1:2 or 2:1 stretching */
|
||||
binning = min(bin_h, bin_v);
|
||||
|
|
@ -882,7 +880,7 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
|
|||
if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE) {
|
||||
int exposure_max;
|
||||
int exposure_def;
|
||||
int hblank, llp_min;
|
||||
int llp_min;
|
||||
int pixel_rate;
|
||||
|
||||
/* Update limits and set FPS to default */
|
||||
|
|
@ -924,15 +922,8 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
|
|||
llp_min - mode->width);
|
||||
if (ret)
|
||||
return ret;
|
||||
/*
|
||||
* Retain PPL setting from previous mode so that the
|
||||
* line time does not change on a mode change.
|
||||
* Limits have to be recomputed as the controls define
|
||||
* the blanking only, so PPL values need to have the
|
||||
* mode width subtracted.
|
||||
*/
|
||||
hblank = prev_line_len - mode->width;
|
||||
ret = __v4l2_ctrl_s_ctrl(imx219->hblank, hblank);
|
||||
|
||||
ret = __v4l2_ctrl_s_ctrl(imx219->hblank, llp_min - mode->width);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
@ -967,10 +958,10 @@ static int imx219_get_selection(struct v4l2_subdev *sd,
|
|||
|
||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||
case V4L2_SEL_TGT_CROP_BOUNDS:
|
||||
sel->r.top = IMX219_PIXEL_ARRAY_TOP;
|
||||
sel->r.left = IMX219_PIXEL_ARRAY_LEFT;
|
||||
sel->r.width = IMX219_PIXEL_ARRAY_WIDTH;
|
||||
sel->r.height = IMX219_PIXEL_ARRAY_HEIGHT;
|
||||
sel->r.top = IMX219_ACTIVE_AREA_TOP;
|
||||
sel->r.left = IMX219_ACTIVE_AREA_LEFT;
|
||||
sel->r.width = IMX219_ACTIVE_AREA_WIDTH;
|
||||
sel->r.height = IMX219_ACTIVE_AREA_HEIGHT;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ struct imx274_mode {
|
|||
};
|
||||
|
||||
/*
|
||||
* imx274 test pattern related structure
|
||||
* imx274 test pattern related enum
|
||||
*/
|
||||
enum {
|
||||
TEST_PATTERN_DISABLED = 0,
|
||||
|
|
@ -533,7 +533,7 @@ static const struct imx274_mode imx274_modes[] = {
|
|||
/*
|
||||
* struct imx274_ctrls - imx274 ctrl structure
|
||||
* @handler: V4L2 ctrl handler structure
|
||||
* @exposure: Pointer to expsure ctrl structure
|
||||
* @exposure: Pointer to exposure ctrl structure
|
||||
* @gain: Pointer to gain ctrl structure
|
||||
* @vflip: Pointer to vflip ctrl structure
|
||||
* @test_pattern: Pointer to test pattern ctrl structure
|
||||
|
|
@ -547,7 +547,7 @@ struct imx274_ctrls {
|
|||
};
|
||||
|
||||
/*
|
||||
* struct stim274 - imx274 device structure
|
||||
* struct stimx274 - imx274 device structure
|
||||
* @sd: V4L2 subdevice structure
|
||||
* @pad: Media pad structure
|
||||
* @client: Pointer to I2C client
|
||||
|
|
@ -587,9 +587,6 @@ struct stimx274 {
|
|||
? rounddown((dim), (step)) \
|
||||
: rounddown((dim) + (step) / 2, (step))))
|
||||
|
||||
/*
|
||||
* Function declaration
|
||||
*/
|
||||
static int imx274_set_gain(struct stimx274 *priv, struct v4l2_ctrl *ctrl);
|
||||
static int imx274_set_exposure(struct stimx274 *priv, int val);
|
||||
static int imx274_set_vflip(struct stimx274 *priv, int val);
|
||||
|
|
@ -640,9 +637,9 @@ static int imx274_write_table(struct stimx274 *priv, const struct reg_8 table[])
|
|||
|
||||
for (next = table;; next++) {
|
||||
if ((next->addr != range_start + range_count) ||
|
||||
(next->addr == IMX274_TABLE_END) ||
|
||||
(next->addr == IMX274_TABLE_WAIT_MS) ||
|
||||
(range_count == max_range_vals)) {
|
||||
next->addr == IMX274_TABLE_END ||
|
||||
next->addr == IMX274_TABLE_WAIT_MS ||
|
||||
range_count == max_range_vals) {
|
||||
if (range_count == 1)
|
||||
err = regmap_write(regmap,
|
||||
range_start, range_vals[0]);
|
||||
|
|
@ -650,8 +647,6 @@ static int imx274_write_table(struct stimx274 *priv, const struct reg_8 table[])
|
|||
err = regmap_bulk_write(regmap, range_start,
|
||||
&range_vals[0],
|
||||
range_count);
|
||||
else
|
||||
err = 0;
|
||||
|
||||
if (err)
|
||||
return err;
|
||||
|
|
@ -897,14 +892,6 @@ static int imx274_regulators_get(struct device *dev, struct stimx274 *imx274)
|
|||
imx274->supplies);
|
||||
}
|
||||
|
||||
/**
|
||||
* imx274_s_ctrl - This is used to set the imx274 V4L2 controls
|
||||
* @ctrl: V4L2 control to be set
|
||||
*
|
||||
* This function is used to set the V4L2 controls for the imx274 sensor.
|
||||
*
|
||||
* Return: 0 on success, errors otherwise
|
||||
*/
|
||||
static int imx274_s_ctrl(struct v4l2_ctrl *ctrl)
|
||||
{
|
||||
struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
|
||||
|
|
@ -1059,16 +1046,6 @@ static int __imx274_change_compose(struct stimx274 *imx274,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx274_get_fmt - Get the pad format
|
||||
* @sd: Pointer to V4L2 Sub device structure
|
||||
* @sd_state: Pointer to sub device state structure
|
||||
* @fmt: Pointer to pad level media bus format
|
||||
*
|
||||
* This function is used to get the pad format information.
|
||||
*
|
||||
* Return: 0 on success
|
||||
*/
|
||||
static int imx274_get_fmt(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_format *fmt)
|
||||
|
|
@ -1081,16 +1058,6 @@ static int imx274_get_fmt(struct v4l2_subdev *sd,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx274_set_fmt - This is used to set the pad format
|
||||
* @sd: Pointer to V4L2 Sub device structure
|
||||
* @sd_state: Pointer to sub device state information structure
|
||||
* @format: Pointer to pad level media bus format
|
||||
*
|
||||
* This function is used to set the pad format.
|
||||
*
|
||||
* Return: 0 on success
|
||||
*/
|
||||
static int imx274_set_fmt(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_format *format)
|
||||
|
|
@ -1423,16 +1390,6 @@ static void imx274_load_default(struct stimx274 *priv)
|
|||
priv->ctrls.test_pattern->val = TEST_PATTERN_DISABLED;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx274_s_stream - It is used to start/stop the streaming.
|
||||
* @sd: V4L2 Sub device
|
||||
* @on: Flag (True / False)
|
||||
*
|
||||
* This function controls the start or stop of streaming for the
|
||||
* imx274 sensor.
|
||||
*
|
||||
* Return: 0 on success, errors otherwise
|
||||
*/
|
||||
static int imx274_s_stream(struct v4l2_subdev *sd, int on)
|
||||
{
|
||||
struct stimx274 *imx274 = to_imx274(sd);
|
||||
|
|
@ -1951,7 +1908,7 @@ static const struct of_device_id imx274_of_id_table[] = {
|
|||
MODULE_DEVICE_TABLE(of, imx274_of_id_table);
|
||||
|
||||
static const struct i2c_device_id imx274_id[] = {
|
||||
{ "IMX274" },
|
||||
{ .name = "IMX274" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, imx274_id);
|
||||
|
|
@ -1998,7 +1955,6 @@ static int imx274_probe(struct i2c_client *client)
|
|||
struct device *dev = &client->dev;
|
||||
int ret;
|
||||
|
||||
/* initialize imx274 */
|
||||
imx274 = devm_kzalloc(dev, sizeof(*imx274), GFP_KERNEL);
|
||||
if (!imx274)
|
||||
return -ENOMEM;
|
||||
|
|
@ -2163,7 +2119,7 @@ static const struct dev_pm_ops imx274_pm_ops = {
|
|||
|
||||
static struct i2c_driver imx274_i2c_driver = {
|
||||
.driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.name = DRIVER_NAME,
|
||||
.pm = &imx274_pm_ops,
|
||||
.of_match_table = imx274_of_id_table,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -566,18 +566,6 @@ static int imx334_update_exp_gain(struct imx334 *imx334, u32 exposure, u32 gain)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx334_set_ctrl() - Set subdevice control
|
||||
* @ctrl: pointer to v4l2_ctrl structure
|
||||
*
|
||||
* Supported controls:
|
||||
* - V4L2_CID_VBLANK
|
||||
* - cluster controls:
|
||||
* - V4L2_CID_ANALOGUE_GAIN
|
||||
* - V4L2_CID_EXPOSURE
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx334_set_ctrl(struct v4l2_ctrl *ctrl)
|
||||
{
|
||||
struct imx334 *imx334 =
|
||||
|
|
@ -678,14 +666,6 @@ static int imx334_get_format_code(struct imx334 *imx334, u32 code)
|
|||
return imx334_mbus_codes[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* imx334_enum_mbus_code() - Enumerate V4L2 sub-device mbus codes
|
||||
* @sd: pointer to imx334 V4L2 sub-device structure
|
||||
* @sd_state: V4L2 sub-device state
|
||||
* @code: V4L2 sub-device code enumeration need to be filled
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx334_enum_mbus_code(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_mbus_code_enum *code)
|
||||
|
|
@ -698,14 +678,6 @@ static int imx334_enum_mbus_code(struct v4l2_subdev *sd,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx334_enum_frame_size() - Enumerate V4L2 sub-device frame sizes
|
||||
* @sd: pointer to imx334 V4L2 sub-device structure
|
||||
* @sd_state: V4L2 sub-device state
|
||||
* @fsize: V4L2 sub-device size enumeration need to be filled
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx334_enum_frame_size(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_frame_size_enum *fsize)
|
||||
|
|
@ -749,14 +721,6 @@ static void imx334_fill_pad_format(struct imx334 *imx334,
|
|||
fmt->format.xfer_func = V4L2_XFER_FUNC_NONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx334_get_pad_format() - Get subdevice pad format
|
||||
* @sd: pointer to imx334 V4L2 sub-device structure
|
||||
* @sd_state: V4L2 sub-device state
|
||||
* @fmt: V4L2 sub-device format need to be set
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx334_get_pad_format(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_format *fmt)
|
||||
|
|
@ -776,14 +740,6 @@ static int imx334_get_pad_format(struct v4l2_subdev *sd,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx334_set_pad_format() - Set subdevice pad format
|
||||
* @sd: pointer to imx334 V4L2 sub-device structure
|
||||
* @sd_state: V4L2 sub-device state
|
||||
* @fmt: V4L2 sub-device format need to be set
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx334_set_pad_format(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_format *fmt)
|
||||
|
|
@ -815,13 +771,6 @@ static int imx334_set_pad_format(struct v4l2_subdev *sd,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx334_init_state() - Initialize sub-device state
|
||||
* @sd: pointer to imx334 V4L2 sub-device structure
|
||||
* @sd_state: V4L2 sub-device state
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx334_init_state(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state)
|
||||
{
|
||||
|
|
@ -856,15 +805,6 @@ static int imx334_set_framefmt(struct imx334 *imx334)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx334_enable_streams() - Enable specified streams for the sensor
|
||||
* @sd: pointer to the V4L2 subdevice
|
||||
* @state: pointer to the subdevice state
|
||||
* @pad: pad number for which streams are enabled
|
||||
* @streams_mask: bitmask specifying the streams to enable
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx334_enable_streams(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *state, u32 pad,
|
||||
u64 streams_mask)
|
||||
|
|
@ -929,15 +869,6 @@ static int imx334_enable_streams(struct v4l2_subdev *sd,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx334_disable_streams() - Enable specified streams for the sensor
|
||||
* @sd: pointer to the V4L2 subdevice
|
||||
* @state: pointer to the subdevice state
|
||||
* @pad: pad number for which streams are disabled
|
||||
* @streams_mask: bitmask specifying the streams to disable
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx334_disable_streams(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *state, u32 pad,
|
||||
u64 streams_mask)
|
||||
|
|
@ -1067,12 +998,6 @@ static const struct v4l2_subdev_internal_ops imx334_internal_ops = {
|
|||
.init_state = imx334_init_state,
|
||||
};
|
||||
|
||||
/**
|
||||
* imx334_power_on() - Sensor power on sequence
|
||||
* @dev: pointer to i2c device
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx334_power_on(struct device *dev)
|
||||
{
|
||||
struct v4l2_subdev *sd = dev_get_drvdata(dev);
|
||||
|
|
@ -1101,12 +1026,6 @@ static int imx334_power_on(struct device *dev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx334_power_off() - Sensor power off sequence
|
||||
* @dev: pointer to i2c device
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx334_power_off(struct device *dev)
|
||||
{
|
||||
struct v4l2_subdev *sd = dev_get_drvdata(dev);
|
||||
|
|
@ -1206,12 +1125,6 @@ static int imx334_init_controls(struct imx334 *imx334)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx334_probe() - I2C client device binding
|
||||
* @client: pointer to i2c client device
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx334_probe(struct i2c_client *client)
|
||||
{
|
||||
struct imx334 *imx334;
|
||||
|
|
@ -1311,12 +1224,6 @@ static int imx334_probe(struct i2c_client *client)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx334_remove() - I2C client device unbinding
|
||||
* @client: pointer to I2C client device
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static void imx334_remove(struct i2c_client *client)
|
||||
{
|
||||
struct v4l2_subdev *sd = i2c_get_clientdata(client);
|
||||
|
|
|
|||
|
|
@ -698,18 +698,6 @@ static int imx335_update_test_pattern(struct imx335 *imx335, u32 pattern_index)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx335_set_ctrl() - Set subdevice control
|
||||
* @ctrl: pointer to v4l2_ctrl structure
|
||||
*
|
||||
* Supported controls:
|
||||
* - V4L2_CID_VBLANK
|
||||
* - cluster controls:
|
||||
* - V4L2_CID_ANALOGUE_GAIN
|
||||
* - V4L2_CID_EXPOSURE
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx335_set_ctrl(struct v4l2_ctrl *ctrl)
|
||||
{
|
||||
struct imx335 *imx335 =
|
||||
|
|
@ -800,14 +788,6 @@ static int imx335_get_format_code(struct imx335 *imx335, u32 code)
|
|||
return imx335_mbus_codes[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* imx335_enum_mbus_code() - Enumerate V4L2 sub-device mbus codes
|
||||
* @sd: pointer to imx335 V4L2 sub-device structure
|
||||
* @sd_state: V4L2 sub-device configuration
|
||||
* @code: V4L2 sub-device code enumeration need to be filled
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx335_enum_mbus_code(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_mbus_code_enum *code)
|
||||
|
|
@ -820,14 +800,6 @@ static int imx335_enum_mbus_code(struct v4l2_subdev *sd,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx335_enum_frame_size() - Enumerate V4L2 sub-device frame sizes
|
||||
* @sd: pointer to imx335 V4L2 sub-device structure
|
||||
* @sd_state: V4L2 sub-device configuration
|
||||
* @fsize: V4L2 sub-device size enumeration need to be filled
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx335_enum_frame_size(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_frame_size_enum *fsize)
|
||||
|
|
@ -871,14 +843,6 @@ static void imx335_fill_pad_format(struct imx335 *imx335,
|
|||
fmt->format.xfer_func = V4L2_XFER_FUNC_NONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx335_set_pad_format() - Set subdevice pad format
|
||||
* @sd: pointer to imx335 V4L2 sub-device structure
|
||||
* @sd_state: V4L2 sub-device configuration
|
||||
* @fmt: V4L2 sub-device format need to be set
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx335_set_pad_format(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_format *fmt)
|
||||
|
|
@ -923,13 +887,6 @@ static int imx335_set_pad_format(struct v4l2_subdev *sd,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx335_init_state() - Initialize sub-device state
|
||||
* @sd: pointer to imx335 V4L2 sub-device structure
|
||||
* @sd_state: V4L2 sub-device configuration
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx335_init_state(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state)
|
||||
{
|
||||
|
|
@ -947,14 +904,6 @@ static int imx335_init_state(struct v4l2_subdev *sd,
|
|||
return imx335_set_pad_format(sd, sd_state, &fmt);
|
||||
}
|
||||
|
||||
/**
|
||||
* imx335_get_selection() - Selection API
|
||||
* @sd: pointer to imx335 V4L2 sub-device structure
|
||||
* @sd_state: V4L2 sub-device configuration
|
||||
* @sel: V4L2 selection info
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx335_get_selection(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_selection *sel)
|
||||
|
|
@ -1011,15 +960,6 @@ static int imx335_set_framefmt(struct imx335 *imx335)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx335_enable_streams() - Enable sensor streams
|
||||
* @sd: V4L2 subdevice
|
||||
* @state: V4L2 subdevice state
|
||||
* @pad: The pad to enable
|
||||
* @streams_mask: Bitmask of streams to enable
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx335_enable_streams(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *state, u32 pad,
|
||||
u64 streams_mask)
|
||||
|
|
@ -1097,15 +1037,6 @@ static int imx335_enable_streams(struct v4l2_subdev *sd,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx335_disable_streams() - Disable sensor streams
|
||||
* @sd: V4L2 subdevice
|
||||
* @state: V4L2 subdevice state
|
||||
* @pad: The pad to disable
|
||||
* @streams_mask: Bitmask of streams to disable
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx335_disable_streams(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *state, u32 pad,
|
||||
u64 streams_mask)
|
||||
|
|
@ -1299,12 +1230,6 @@ static int imx335_power_on(struct device *dev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx335_power_off() - Sensor power off sequence
|
||||
* @dev: pointer to i2c device
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx335_power_off(struct device *dev)
|
||||
{
|
||||
struct v4l2_subdev *sd = dev_get_drvdata(dev);
|
||||
|
|
@ -1430,12 +1355,6 @@ static int imx335_init_controls(struct imx335 *imx335)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx335_probe() - I2C client device binding
|
||||
* @client: pointer to i2c client device
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx335_probe(struct i2c_client *client)
|
||||
{
|
||||
struct imx335 *imx335;
|
||||
|
|
@ -1530,12 +1449,6 @@ static int imx335_probe(struct i2c_client *client)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx335_remove() - I2C client device unbinding
|
||||
* @client: pointer to I2C client device
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static void imx335_remove(struct i2c_client *client)
|
||||
{
|
||||
struct v4l2_subdev *sd = i2c_get_clientdata(client);
|
||||
|
|
|
|||
|
|
@ -570,18 +570,6 @@ static int imx412_update_exp_gain(struct imx412 *imx412, u32 exposure, u32 gain)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx412_set_ctrl() - Set subdevice control
|
||||
* @ctrl: pointer to v4l2_ctrl structure
|
||||
*
|
||||
* Supported controls:
|
||||
* - V4L2_CID_VBLANK
|
||||
* - cluster controls:
|
||||
* - V4L2_CID_ANALOGUE_GAIN
|
||||
* - V4L2_CID_EXPOSURE
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx412_set_ctrl(struct v4l2_ctrl *ctrl)
|
||||
{
|
||||
struct imx412 *imx412 =
|
||||
|
|
@ -634,14 +622,6 @@ static const struct v4l2_ctrl_ops imx412_ctrl_ops = {
|
|||
.s_ctrl = imx412_set_ctrl,
|
||||
};
|
||||
|
||||
/**
|
||||
* imx412_enum_mbus_code() - Enumerate V4L2 sub-device mbus codes
|
||||
* @sd: pointer to imx412 V4L2 sub-device structure
|
||||
* @sd_state: V4L2 sub-device configuration
|
||||
* @code: V4L2 sub-device code enumeration need to be filled
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx412_enum_mbus_code(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_mbus_code_enum *code)
|
||||
|
|
@ -654,14 +634,6 @@ static int imx412_enum_mbus_code(struct v4l2_subdev *sd,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx412_enum_frame_size() - Enumerate V4L2 sub-device frame sizes
|
||||
* @sd: pointer to imx412 V4L2 sub-device structure
|
||||
* @sd_state: V4L2 sub-device configuration
|
||||
* @fsize: V4L2 sub-device size enumeration need to be filled
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx412_enum_frame_size(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_frame_size_enum *fsize)
|
||||
|
|
@ -701,14 +673,6 @@ static void imx412_fill_pad_format(struct imx412 *imx412,
|
|||
fmt->format.xfer_func = V4L2_XFER_FUNC_NONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx412_get_pad_format() - Get subdevice pad format
|
||||
* @sd: pointer to imx412 V4L2 sub-device structure
|
||||
* @sd_state: V4L2 sub-device configuration
|
||||
* @fmt: V4L2 sub-device format need to be set
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx412_get_pad_format(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_format *fmt)
|
||||
|
|
@ -731,14 +695,6 @@ static int imx412_get_pad_format(struct v4l2_subdev *sd,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx412_set_pad_format() - Set subdevice pad format
|
||||
* @sd: pointer to imx412 V4L2 sub-device structure
|
||||
* @sd_state: V4L2 sub-device configuration
|
||||
* @fmt: V4L2 sub-device format need to be set
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx412_set_pad_format(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_format *fmt)
|
||||
|
|
@ -768,13 +724,6 @@ static int imx412_set_pad_format(struct v4l2_subdev *sd,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx412_init_state() - Initialize sub-device state
|
||||
* @sd: pointer to imx412 V4L2 sub-device structure
|
||||
* @sd_state: V4L2 sub-device configuration
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx412_init_state(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state)
|
||||
{
|
||||
|
|
@ -840,13 +789,6 @@ static int imx412_stop_streaming(struct imx412 *imx412)
|
|||
1, IMX412_MODE_STANDBY);
|
||||
}
|
||||
|
||||
/**
|
||||
* imx412_set_stream() - Enable sensor streaming
|
||||
* @sd: pointer to imx412 subdevice
|
||||
* @enable: set to enable sensor streaming
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx412_set_stream(struct v4l2_subdev *sd, int enable)
|
||||
{
|
||||
struct imx412 *imx412 = to_imx412(sd);
|
||||
|
|
@ -1010,12 +952,6 @@ static const struct v4l2_subdev_internal_ops imx412_internal_ops = {
|
|||
.init_state = imx412_init_state,
|
||||
};
|
||||
|
||||
/**
|
||||
* imx412_power_on() - Sensor power on sequence
|
||||
* @dev: pointer to i2c device
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx412_power_on(struct device *dev)
|
||||
{
|
||||
struct v4l2_subdev *sd = dev_get_drvdata(dev);
|
||||
|
|
@ -1053,12 +989,6 @@ static int imx412_power_on(struct device *dev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx412_power_off() - Sensor power off sequence
|
||||
* @dev: pointer to i2c device
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx412_power_off(struct device *dev)
|
||||
{
|
||||
struct v4l2_subdev *sd = dev_get_drvdata(dev);
|
||||
|
|
@ -1159,12 +1089,6 @@ static int imx412_init_controls(struct imx412 *imx412)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx412_probe() - I2C client device binding
|
||||
* @client: pointer to i2c client device
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static int imx412_probe(struct i2c_client *client)
|
||||
{
|
||||
struct imx412 *imx412;
|
||||
|
|
@ -1254,12 +1178,6 @@ static int imx412_probe(struct i2c_client *client)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* imx412_remove() - I2C client device unbinding
|
||||
* @client: pointer to I2C client device
|
||||
*
|
||||
* Return: 0 if successful, error code otherwise.
|
||||
*/
|
||||
static void imx412_remove(struct i2c_client *client)
|
||||
{
|
||||
struct v4l2_subdev *sd = i2c_get_clientdata(client);
|
||||
|
|
|
|||
|
|
@ -978,10 +978,10 @@ static void ir_remove(struct i2c_client *client)
|
|||
|
||||
static const struct i2c_device_id ir_kbd_id[] = {
|
||||
/* Generic entry for any IR receiver */
|
||||
{ "ir_video", 0 },
|
||||
{ .name = "ir_video", .driver_data = 0 },
|
||||
/* IR device specific entries should be added here */
|
||||
{ "ir_z8f0811_haup", FLAG_TX },
|
||||
{ "ir_z8f0811_hdpvr", FLAG_TX | FLAG_HDPVR },
|
||||
{ .name = "ir_z8f0811_haup", .driver_data = FLAG_TX },
|
||||
{ .name = "ir_z8f0811_hdpvr", .driver_data = FLAG_TX | FLAG_HDPVR },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, ir_kbd_id);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user