* [PATCH v3 0/4] Add Toshiba Visconti Video Input Interface driver
@ 2022-08-10 13:28 Yuji Ishikawa
2022-08-10 13:28 ` [PATCH v3 1/4] dt-bindings: media: platform: visconti: Add Toshiba Visconti Video Input Interface bindings Yuji Ishikawa
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Yuji Ishikawa @ 2022-08-10 13:28 UTC (permalink / raw)
To: Hans Verkuil, Laurent Pinchart, Mauro Carvalho Chehab,
Nobuhiro Iwamatsu
Cc: linux-media, linux-arm-kernel, linux-kernel, devicetree,
yuji2.ishikawa
This series is the Video Input Interface driver
for Toshiba's ARM SoC, Visconti[0].
This provides DT binding documentation,
device driver, documentation and MAINTAINER files.
A visconti VIIF driver instance exposes
1 media control device file and 3 video device files
for a VIIF hardware.
Detailed HW/SW are described in documentation directory.
The VIIF hardware has CSI2 receiver,
image signal processor and DMAC inside.
The subdevice for image signal processor provides
vendor specific V4L2 controls.
The device driver depends on two other drivers under development;
clock framework driver and IOMMU driver.
Corresponding features will be added later.
Best regards,
Yuji
Changelog v2:
- Resend v1 because a patch exceeds size limit.
Changelog v3:
- Add documentation to describe SW and HW
- Adapted to media control framework
- Introduced ISP subdevice, capture device
- Remove private IOCTLs and add vendor specific V4L2 controls
- Change function name avoiding camelcase and uppercase letters
[0]: https://toshiba.semicon-storage.com/ap-en/semiconductor/product/image-recognition-processors-visconti.html
Yuji Ishikawa (4):
dt-bindings: media: platform: visconti: Add Toshiba Visconti Video
Input Interface bindings
media: platform: visconti: Add Toshiba Visconti Video Input Interface
driver
documentation: media: add documentation for Toshiba Visconti Video
Input Interface driver
MAINTAINERS: Add entries for Toshiba Visconti Video Input Interface
.../bindings/media/toshiba,visconti-viif.yaml | 103 +
.../driver-api/media/drivers/index.rst | 1 +
.../media/drivers/visconti-viif.rst | 455 +++
MAINTAINERS | 3 +
drivers/media/platform/Kconfig | 2 +
drivers/media/platform/Makefile | 4 +
drivers/media/platform/visconti/Kconfig | 9 +
drivers/media/platform/visconti/Makefile | 9 +
drivers/media/platform/visconti/hwd_viif.c | 1791 +++++++++++
drivers/media/platform/visconti/hwd_viif.h | 701 +++++
.../media/platform/visconti/hwd_viif_csi2rx.c | 723 +++++
.../platform/visconti/hwd_viif_internal.h | 348 ++
.../media/platform/visconti/hwd_viif_l1isp.c | 2727 ++++++++++++++++
.../media/platform/visconti/hwd_viif_reg.h | 2802 +++++++++++++++++
drivers/media/platform/visconti/viif.c | 479 +++
drivers/media/platform/visconti/viif.h | 195 ++
.../media/platform/visconti/viif_capture.c | 1215 +++++++
.../media/platform/visconti/viif_controls.c | 1149 +++++++
drivers/media/platform/visconti/viif_isp.c | 852 +++++
include/uapi/linux/visconti_viif.h | 1724 ++++++++++
20 files changed, 15292 insertions(+)
create mode 100644 Documentation/devicetree/bindings/media/toshiba,visconti-viif.yaml
create mode 100644 Documentation/driver-api/media/drivers/visconti-viif.rst
create mode 100644 drivers/media/platform/visconti/Kconfig
create mode 100644 drivers/media/platform/visconti/Makefile
create mode 100644 drivers/media/platform/visconti/hwd_viif.c
create mode 100644 drivers/media/platform/visconti/hwd_viif.h
create mode 100644 drivers/media/platform/visconti/hwd_viif_csi2rx.c
create mode 100644 drivers/media/platform/visconti/hwd_viif_internal.h
create mode 100644 drivers/media/platform/visconti/hwd_viif_l1isp.c
create mode 100644 drivers/media/platform/visconti/hwd_viif_reg.h
create mode 100644 drivers/media/platform/visconti/viif.c
create mode 100644 drivers/media/platform/visconti/viif.h
create mode 100644 drivers/media/platform/visconti/viif_capture.c
create mode 100644 drivers/media/platform/visconti/viif_controls.c
create mode 100644 drivers/media/platform/visconti/viif_isp.c
create mode 100644 include/uapi/linux/visconti_viif.h
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 1/4] dt-bindings: media: platform: visconti: Add Toshiba Visconti Video Input Interface bindings
2022-08-10 13:28 [PATCH v3 0/4] Add Toshiba Visconti Video Input Interface driver Yuji Ishikawa
@ 2022-08-10 13:28 ` Yuji Ishikawa
2022-08-10 15:11 ` Rob Herring
2022-08-10 15:38 ` Rob Herring
2022-08-10 13:28 ` [PATCH v3 3/4] documentation: media: add documentation for Toshiba Visconti Video Input Interface driver Yuji Ishikawa
` (2 subsequent siblings)
3 siblings, 2 replies; 8+ messages in thread
From: Yuji Ishikawa @ 2022-08-10 13:28 UTC (permalink / raw)
To: Hans Verkuil, Laurent Pinchart, Mauro Carvalho Chehab,
Nobuhiro Iwamatsu
Cc: linux-media, linux-arm-kernel, linux-kernel, devicetree,
yuji2.ishikawa
Adds the Device Tree binding documentation that allows to describe
the Video Input Interface found in Toshiba Visconti SoCs.
Signed-off-by: Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
Reviewed-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
---
Chengelog v2:
- no change
Changelog v3:
- no change
---
.../bindings/media/toshiba,visconti-viif.yaml | 103 ++++++++++++++++++
1 file changed, 103 insertions(+)
create mode 100644 Documentation/devicetree/bindings/media/toshiba,visconti-viif.yaml
diff --git a/Documentation/devicetree/bindings/media/toshiba,visconti-viif.yaml b/Documentation/devicetree/bindings/media/toshiba,visconti-viif.yaml
new file mode 100644
index 000000000..848ea5019
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/toshiba,visconti-viif.yaml
@@ -0,0 +1,103 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/toshiba,visconti-viif.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Toshiba Visconti5 SoC Video Input Interface Device Tree Bindings
+
+maintainers:
+ - Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
+
+description: |
+ Toshiba Visconti5 SoC Video Input Interface (VIIF) receives MIPI CSI2 video stream,
+ processes the stream with embedded image signal processor (L1ISP, L2ISP), then stores pictures to main memory.
+
+properties:
+ compatible:
+ const: toshiba,visconti-viif
+
+ reg:
+ items:
+ - description: registers for capture control
+ - description: registers for CSI2 receiver control
+
+ interrupts:
+ items:
+ - description: Sync Interrupt
+ - description: Status (Error) Interrupt
+ - description: CSI2 Receiver Interrupt
+ - description: L1ISP Interrupt
+
+ index:
+ enum: [0, 1]
+
+ port:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+ description: Input port node, single endpoint describing the CSI-2 transmitter.
+
+ properties:
+ endpoint:
+ $ref: video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ data-lanes:
+ description: VIIF supports 2 or 4 data lines
+ items:
+ minItems: 1
+ maxItems: 4
+ items:
+ - const: 1
+ - const: 2
+ - const: 3
+ - const: 4
+ clock-lanes:
+ description: VIIF supports 1 clock line
+ const: 0
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - port
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ viif0: viif@1c000000 {
+ compatible = "toshiba,visconti-viif";
+ reg = <0 0x1c000000 0 0x6000>,
+ <0 0x1c008000 0 0x400>;
+ interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
+ index = <0>;
+ status = "disabled";
+
+ port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ csi_in0: endpoint {
+ remote-endpoint = <&imx219_out0>;
+ bus-type = <4>;
+ data-lanes = <1 2>;
+ clock-lanes = <0>;
+ clock-noncontinuous;
+ link-frequencies = /bits/ 64 <456000000>;
+ };
+ };
+ };
+ };
+
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3 3/4] documentation: media: add documentation for Toshiba Visconti Video Input Interface driver
2022-08-10 13:28 [PATCH v3 0/4] Add Toshiba Visconti Video Input Interface driver Yuji Ishikawa
2022-08-10 13:28 ` [PATCH v3 1/4] dt-bindings: media: platform: visconti: Add Toshiba Visconti Video Input Interface bindings Yuji Ishikawa
@ 2022-08-10 13:28 ` Yuji Ishikawa
2022-08-10 13:28 ` [PATCH v3 4/4] MAINTAINERS: Add entries for Toshiba Visconti Video Input Interface Yuji Ishikawa
2022-11-24 10:53 ` [PATCH v3 0/4] Add Toshiba Visconti Video Input Interface driver Hans Verkuil
3 siblings, 0 replies; 8+ messages in thread
From: Yuji Ishikawa @ 2022-08-10 13:28 UTC (permalink / raw)
To: Hans Verkuil, Laurent Pinchart, Mauro Carvalho Chehab,
Nobuhiro Iwamatsu
Cc: linux-media, linux-arm-kernel, linux-kernel, devicetree,
yuji2.ishikawa
Added basic description of Video Input Interface driver of
Toshiba Visconti architecture.
It includes hardware organization, structure of the driver
and description of vendor specific V4L2 controls
to configure the embedded image signal processor.
Signed-off-by: Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
---
Changelog v3:
- Newly add documentation to describe SW and HW
---
.../driver-api/media/drivers/index.rst | 1 +
.../media/drivers/visconti-viif.rst | 455 ++++++++++++++++++
2 files changed, 456 insertions(+)
create mode 100644 Documentation/driver-api/media/drivers/visconti-viif.rst
diff --git a/Documentation/driver-api/media/drivers/index.rst b/Documentation/driver-api/media/drivers/index.rst
index 426cda633..abe980fe6 100644
--- a/Documentation/driver-api/media/drivers/index.rst
+++ b/Documentation/driver-api/media/drivers/index.rst
@@ -25,6 +25,7 @@ Video4Linux (V4L) drivers
sh_mobile_ceu_camera
tuners
vimc-devel
+ visconti-viif
zoran
ccs/ccs
diff --git a/Documentation/driver-api/media/drivers/visconti-viif.rst b/Documentation/driver-api/media/drivers/visconti-viif.rst
new file mode 100644
index 000000000..f139f60f9
--- /dev/null
+++ b/Documentation/driver-api/media/drivers/visconti-viif.rst
@@ -0,0 +1,455 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+============================================
+Visconti Video Input Interface (VIIF) Driver
+============================================
+
+Overview
+========
+
+The Visconti VIIF Hardware
+--------------------------
+
+The Visconti Video Input Interface (VIIF) hardware is a proprietary videocapture device of Toshiba.
+Following function modules are integrated:
+
+* MIPI CSI2 receiver (CSI2RX)
+* L1 Image Signal Processor (L1ISP)
+
+ * Correction, enhancement, adjustment on RAW pictures.
+
+* L2 Image Signal Processor (L2ISP)
+
+ * Lens distortion correction
+ * Scaling
+ * Cropping
+
+* Video DMAC
+
+ * format picture (RGB, YUV, Grayscale, ...)
+ * write picture into DRAM
+
+Visconti5 SoC has two VIIF hardware instances.
+
+software architecture
+---------------------
+
+The Visconti VIIF driver is composed of following components:
+
+* (image sensor driver)
+* Visconti ISP subdevice driver
+
+ * corresponding to CSI2RX, L1ISP, L2ISP (Lens distortion correction, Scaling)
+
+* Visconti Capture V4L2 device driver
+
+ * corresponding to L2ISP (Cropping) and Video DMAC
+ * multiple output videobuf queues
+
+ * main path0 (RGB, YUV, Grayscale, ...)
+ * main path1 (RGB, YUV, Grayscale, ...)
+ * sub path (RAW picture)
+
+::
+
+ +-----------+ +------------------------+ +-------------------------+
+ | Sensor | | ISP | | Capture MAIN PATH0 |
+ | subdevice | ---- | subdevice | --+-- | V4L2 device |
+ | (IMX219) | | (CSI2RX, L1ISP, L2ISP) | | | (L2ISP crop, VideoDMAC) |
+ +-----------+ +------------------------+ | +-------------------------+
+ |
+ | +-------------------------+
+ | | Capture MAIN PATH1 |
+ +-- | V4L2 device |
+ | | (L2ISP crop, VideoDMAC) |
+ | +-------------------------+
+ |
+ | +-------------------------+
+ | | Capture SUB PATH |
+ +-- | V4L2 device |
+ | (L2ISP crop, VideoDMAC) |
+ +-------------------------+
+
+
+The VIIF driver provides following device nodes for Visconti5 SoC:
+
+* VIIF0
+
+ * /dev/media0
+ * /dev/video0 (main path0)
+ * /dev/video1 (main path1)
+ * /dev/video2 (sub path)
+
+* VIIF1
+
+ * /dev/media1
+ * /dev/video3
+ * /dev/video4
+ * /dev/video5
+
+Use of coherent memory
+----------------------
+
+Visconti5 SoC has two independent DDR SDRAM controllers.
+Each controller is mapped to 36bit address space.
+
+Accelerator bus masters have two paths to access memory;
+one is directly connected to SDRAM controller,
+the another is connected via a cache coherency bus
+which keeps coherency among CPUs.
+
+From acclerators and CPUs, the address map is following:
+
+* 0x0_8000_0000 DDR0 direct access
+* 0x4_8000_0000 DDR0 coherency bus
+* 0x8_8000_0000 DDR1 direct access
+* 0xC_8000_0000 DDR1 coherency bus
+
+The base address can be specified with "memory" and "reserved-memory" elements
+in a device tree description.
+It's not recommended to mix direct address and coherent address.
+
+The Visconti5 VIIF driver always use only direct address to configure Video DMACs of the hardware.
+This design is to avoid great performance loss at coherency bus caused by massive memory access.
+You should not put the dma_coherent attribute to viif element in device tree.
+Cache operations are done automatically by videobuf2 driver.
+
+Tested environment
+------------------
+
+The Visconti VIIF driver was tested with following items:
+
+* IMX219 image sensor
+* IMX335 image sensor
+* TC358743 HDMI to MIPI CSI2 converter
+
+IOCTLs
+======
+
+Following public IOCTLs are supported
+
+* VIDIOC_QUERYCAP
+* VIDIOC_ENUM_FMT
+* VIDIOC_TRY_FMT
+* VIDIOC_S_FMT
+* VIDIOC_G_FMT
+* VIDIOC_ENUM_INPUT
+* VIDIOC_G_INPUT
+* VIDIOC_S_INPUT
+* VIDIOC_G_SELECTION
+* VIDIOC_S_SELECTION
+* VIDIOC_DV_TIMINGS_CAP
+* VIDIOC_ENUM_DV_TIMINGS
+* VIDIOC_G_DV_TIMINGS
+* VIDIOC_S_DV_TIMINGS
+* VIDIOC_QUERY_DV_TIMINGS
+* VIDIOC_G_EDID
+* VIDIOC_S_EDID
+* VIDIOC_G_PARM
+* VIDIOC_S_PARM
+* VIDIOC_ENUM_FRAMESIZES
+* VIDIOC_ENUM_FRAMEINTERVALS
+* VIDIOC_G_EXT_CTRLS
+* VIDIOC_S_EXT_CTRLS
+
+Vendor specific v4l2 controls
+=============================
+
+.. _V4L2_CID_VISCONTI_VIIF_MAIN_SET_RAWPACK_MODE:
+
+V4L2_CID_VISCONTI_VIIF_MAIN_SET_RAWPACK_MODE
+--------------------------------------------
+
+This control sets the format to pack multiple RAW pixel values into a word.
+
+This control accepts a __u32 value defined as `enum viif_rawpack_mode`.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_INPUT_MODE:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_INPUT_MODE
+--------------------------------------------
+
+This control sets L1ISP preprocessing mode for RAW input images.
+
+This control accepts a `struct viif_l1_input_mode_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_RGB_TO_Y_COEF:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_RGB_TO_Y_COEF
+-----------------------------------------------
+
+This control sets parameters to yield Y value from RGB pixel values.
+
+This control accepts a `struct viif_l1_rgb_to_y_coef_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_AG_MODE:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_AG_MODE
+-----------------------------------------
+
+This control sets rules for yielding analog gains for each feature in L1ISP.
+Related features are:
+
+* Optical Black Clamp Correction (OBCC)
+* Defect Pixel Correction (DPC)
+* RAW Color Noise Reduction (RCNR)
+* Lens Shading Correction (LSC)
+* Color matrix correction (MPRO)
+* Image quality adjustment (VPRO)
+
+The base gain is brought by V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_AG control.
+
+This control accepts a `struct viif_l1_ag_mode_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_AG:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_AG
+------------------------------------
+
+This control sets base analog gain values comonly used in L1ISP features.
+Each analog gain in some features also refers V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_AG_MODE control.
+
+This control accepts a `struct viif_l1_ag_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_HDRE:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_HDRE
+--------------------------------------
+
+This controls sets parameters for HDR Expansion feature.
+
+This control accepts a `struct viif_l1_hdre_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_IMG_EXTRACTION:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_IMG_EXTRACTION
+------------------------------------------------
+
+This control sets black level parameters for L1ISP inputs.
+
+This control accepts a `struct viif_l1_img_extraction_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_DPC:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_DPC
+-------------------------------------
+
+This control sets parameters for Defect Pixel Correction.
+
+This control accepts a `struct viif_l1_dpc_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_PRESET_WHITE_BALANCE:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_PRESET_WHITE_BALANCE
+------------------------------------------------------
+
+This control sets parameters for white balance.
+
+This control accepts a `struct viif_l1_preset_white_balance_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_RAW_COLOR_NOISE_REDUCTION:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_RAW_COLOR_NOISE_REDUCTION
+-----------------------------------------------------------
+
+This control sets parameters for RAW color noise reduction (RCNR) feature.
+
+This control accepts a `struct viif_l1_raw_color_noise_reduction_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_HDRS:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_HDRS
+--------------------------------------
+
+This control sets parameters for HDR synthesis.
+
+This control accepts a `struct viif_l1_hdrs_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_BLACK_LEVEL_CORRECTION:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_BLACK_LEVEL_CORRECTION
+--------------------------------------------------------
+
+This control sets parameters for black level correction feature.
+
+This control accepts a `struct viif_l1_black_level_correction_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_LSC:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_LSC
+-------------------------------------
+
+This control sets parameters for Lens Shading Correction feature.
+L1ISP supports 2 correction methods:
+
+* parabola shading
+* grid shading
+
+This control accepts a `struct viif_l1_lsc_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_MAIN_PROCESS:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_MAIN_PROCESS
+----------------------------------------------
+
+This controls sets parameter for the MAIN PROCESS feature which is composed of:
+
+* demosaic
+* color matrix correction
+
+This control accepts a `struct viif_l1_main_process_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_AWB:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_AWB
+-------------------------------------
+
+This control sets parameter for auto white balance feature.
+
+This control accepts a `struct viif_l1_awb_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_LOCK_AWB_GAIN:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_LOCK_AWB_GAIN
+-------------------------------------------
+
+This control requests enable/disable of lock for AWB gain.
+
+This control accepts a u32 value; 0 for disable lock, 1 for enable lock.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_HDRC:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_HDRC
+--------------------------------------
+
+This control sets parameter for HDR Compression feature.
+
+This control accepts a `struct viif_l1_hdrc_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_HDRC_LTM:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_HDRC_LTM
+------------------------------------------
+
+This control sets parameter for HDR Compression Local Tone Mapping feature.
+
+This control accepts a `struct viif_l1_hdrc_ltm_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_GAMMA:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_GAMMA
+---------------------------------------
+
+This control sets parameter for gamma correction at L1ISP.
+
+This control accepts a `struct viif_l1_gamma_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_IMG_QUALITY_ADJUSTMENT:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_IMG_QUALITY_ADJUSTMENT
+--------------------------------------------------------
+
+This control sets parameter for VPRO feature which is composed of:
+
+* luminance adjustment:
+
+ * brightness adjustment
+ * linear contrast adjusment
+ * nonlinear contrast adjustment
+ * luminance noise reduction
+ * edge enhancement
+
+* chroma adjustment:
+
+ * chroma suppression
+ * color level adjustment
+ * chroma noise reduction
+ * coring suppression
+ * edge chroma suppression
+ * color noise reduction
+
+This control accepts a `struct viif_l1_img_quality_adjustment_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_AVG_LUM_GENERATION:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L1_SET_AVG_LUM_GENERATION
+----------------------------------------------------
+
+This control sets parameter for average luminance statistics feature.
+
+This control accepts a `struct viif_l1_avg_lum_generation_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L2_SET_UNDIST:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L2_SET_UNDIST
+----------------------------------------
+
+This control sets parameter for the lens undistortion feature of L2ISP.
+Lens undistortion parameters are defined as either or combination of polinomial parameter and grid table.
+
+This control accepts a `struct viif_l2_undist_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L2_SET_ROI:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L2_SET_ROI
+-------------------------------------
+
+This control sets dimensions of intermediate images and scaling parameter of L2ISP.
+If you are inserested in cropping pictures,
+you should use VIDIOC_S_SELECTION ioctl for the corresponding capture device.
+
+This control accepts a `struct viif_l2_roi_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_ISP_L2_SET_GAMMA:
+
+V4L2_CID_VISCONTI_VIIF_ISP_L2_SET_GAMMA
+---------------------------------------
+
+This control sets gamma parameter for L2ISP.
+
+This control accepts a `struct viif_l2_gamma_config` instance.
+
+.. _V4L2_CID_VISCONTI_VIIF_CSI2RX_GET_CALIBRATION_STATUS:
+
+V4L2_CID_VISCONTI_VIIF_CSI2RX_GET_CALIBRATION_STATUS
+----------------------------------------------------
+
+This control provides CSI2 receiver calibration status.
+
+This control fills a `struct viif_csi2rx_cal_status` instance with current status.
+
+.. _V4L2_CID_VISCONTI_VIIF_CSI2RX_GET_ERR_STATUS:
+
+V4L2_CID_VISCONTI_VIIF_CSI2RX_GET_ERR_STATUS
+--------------------------------------------
+
+This control provides CSI2 receiver error description.
+
+This control fills a `struct viif_csi2rx_err_status` instance with current status.
+
+.. _V4L2_CID_VISCONTI_VIIF_GET_LAST_CAPTURE_STATUS:
+
+V4L2_CID_VISCONTI_VIIF_GET_LAST_CAPTURE_STATUS
+----------------------------------------------
+
+This control provides status information for the last captured frame.
+
+This control fills a `struct viif_l1_info` instance with current status.
+
+.. _V4L2_CID_VISCONTI_VIIF_GET_REPORTED_ERRORS:
+
+V4L2_CID_VISCONTI_VIIF_GET_REPORTED_ERRORS
+------------------------------------------
+
+This control provides error information since the last read of this control.
+
+This control fills a `struct viif_reported_errors` instance with current status.
+
+Structures
+==========
+
+.. kernel-doc:: include/uapi/linux/visconti_viif.h
+
+Code example
+============
+
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3 4/4] MAINTAINERS: Add entries for Toshiba Visconti Video Input Interface
2022-08-10 13:28 [PATCH v3 0/4] Add Toshiba Visconti Video Input Interface driver Yuji Ishikawa
2022-08-10 13:28 ` [PATCH v3 1/4] dt-bindings: media: platform: visconti: Add Toshiba Visconti Video Input Interface bindings Yuji Ishikawa
2022-08-10 13:28 ` [PATCH v3 3/4] documentation: media: add documentation for Toshiba Visconti Video Input Interface driver Yuji Ishikawa
@ 2022-08-10 13:28 ` Yuji Ishikawa
2022-11-24 10:53 ` [PATCH v3 0/4] Add Toshiba Visconti Video Input Interface driver Hans Verkuil
3 siblings, 0 replies; 8+ messages in thread
From: Yuji Ishikawa @ 2022-08-10 13:28 UTC (permalink / raw)
To: Hans Verkuil, Laurent Pinchart, Mauro Carvalho Chehab,
Nobuhiro Iwamatsu
Cc: linux-media, linux-arm-kernel, linux-kernel, devicetree,
yuji2.ishikawa
Added entries for visconti Video Input Interface driver, including;
* device tree bindings
* source files
* documentation files
Signed-off-by: Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
---
Changelog v2:
- no change
Changelog v3:
- added entry for driver API documentation
---
MAINTAINERS | 3 +++
1 file changed, 3 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index dd36acc87..04423ae9a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2792,12 +2792,15 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Supported
T: git git://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti.git
F: Documentation/devicetree/bindings/arm/toshiba.yaml
+F: Documentation/devicetree/bindings/media/toshiba,visconti-viif.yaml
F: Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml
F: Documentation/devicetree/bindings/gpio/toshiba,gpio-visconti.yaml
F: Documentation/devicetree/bindings/pci/toshiba,visconti-pcie.yaml
F: Documentation/devicetree/bindings/pinctrl/toshiba,visconti-pinctrl.yaml
F: Documentation/devicetree/bindings/watchdog/toshiba,visconti-wdt.yaml
+F: Documentation/driver-api/media/drivers/visconti-viif.rst
F: arch/arm64/boot/dts/toshiba/
+F: drivers/media/platform/visconti/
F: drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
F: drivers/gpio/gpio-visconti.c
F: drivers/pci/controller/dwc/pcie-visconti.c
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v3 1/4] dt-bindings: media: platform: visconti: Add Toshiba Visconti Video Input Interface bindings
2022-08-10 13:28 ` [PATCH v3 1/4] dt-bindings: media: platform: visconti: Add Toshiba Visconti Video Input Interface bindings Yuji Ishikawa
@ 2022-08-10 15:11 ` Rob Herring
2022-08-10 15:38 ` Rob Herring
1 sibling, 0 replies; 8+ messages in thread
From: Rob Herring @ 2022-08-10 15:11 UTC (permalink / raw)
To: Yuji Ishikawa
Cc: Laurent Pinchart, linux-arm-kernel, Hans Verkuil,
Nobuhiro Iwamatsu, linux-kernel, devicetree,
Mauro Carvalho Chehab, linux-media
On Wed, 10 Aug 2022 22:28:19 +0900, Yuji Ishikawa wrote:
> Adds the Device Tree binding documentation that allows to describe
> the Video Input Interface found in Toshiba Visconti SoCs.
>
> Signed-off-by: Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
> Reviewed-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> ---
> Chengelog v2:
> - no change
>
> Changelog v3:
> - no change
> ---
> .../bindings/media/toshiba,visconti-viif.yaml | 103 ++++++++++++++++++
> 1 file changed, 103 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/media/toshiba,visconti-viif.yaml
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
./Documentation/devicetree/bindings/media/toshiba,visconti-viif.yaml:14:111: [warning] line too long (112 > 110 characters) (line-length)
dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/toshiba,visconti-viif.yaml: properties:port:properties:endpoint:properties:data-lanes:items: 'oneOf' conditional failed, one must be fixed:
{'minItems': 1, 'maxItems': 4, 'items': [{'const': 1}, {'const': 2}, {'const': 3}, {'const': 4}]} should not be valid under {'required': ['maxItems']}
hint: "maxItems" is not needed with an "items" list
{'minItems': 1, 'maxItems': 4, 'items': [{'const': 1}, {'const': 2}, {'const': 3}, {'const': 4}]} is not of type 'array'
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/toshiba,visconti-viif.yaml: ignoring, error in schema: properties: port: properties: endpoint: properties: data-lanes: items
Documentation/devicetree/bindings/media/toshiba,visconti-viif.example.dtb:0:0: /example-0/soc/viif@1c000000: failed to match any schema with compatible: ['toshiba,visconti-viif']
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/
This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 1/4] dt-bindings: media: platform: visconti: Add Toshiba Visconti Video Input Interface bindings
2022-08-10 13:28 ` [PATCH v3 1/4] dt-bindings: media: platform: visconti: Add Toshiba Visconti Video Input Interface bindings Yuji Ishikawa
2022-08-10 15:11 ` Rob Herring
@ 2022-08-10 15:38 ` Rob Herring
2022-11-30 1:36 ` yuji2.ishikawa
1 sibling, 1 reply; 8+ messages in thread
From: Rob Herring @ 2022-08-10 15:38 UTC (permalink / raw)
To: Yuji Ishikawa
Cc: Hans Verkuil, Laurent Pinchart, Mauro Carvalho Chehab,
Nobuhiro Iwamatsu, linux-media, linux-arm-kernel, linux-kernel,
devicetree
On Wed, Aug 10, 2022 at 10:28:19PM +0900, Yuji Ishikawa wrote:
> Adds the Device Tree binding documentation that allows to describe
> the Video Input Interface found in Toshiba Visconti SoCs.
>
> Signed-off-by: Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
> Reviewed-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> ---
> Chengelog v2:
> - no change
>
> Changelog v3:
> - no change
> ---
> .../bindings/media/toshiba,visconti-viif.yaml | 103 ++++++++++++++++++
> 1 file changed, 103 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/media/toshiba,visconti-viif.yaml
>
> diff --git a/Documentation/devicetree/bindings/media/toshiba,visconti-viif.yaml b/Documentation/devicetree/bindings/media/toshiba,visconti-viif.yaml
> new file mode 100644
> index 000000000..848ea5019
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/toshiba,visconti-viif.yaml
> @@ -0,0 +1,103 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/toshiba,visconti-viif.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Toshiba Visconti5 SoC Video Input Interface Device Tree Bindings
> +
> +maintainers:
> + - Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> +
> +description: |
Don't need '|' if no formatting.
> + Toshiba Visconti5 SoC Video Input Interface (VIIF) receives MIPI CSI2 video stream,
> + processes the stream with embedded image signal processor (L1ISP, L2ISP), then stores pictures to main memory.
Wrap lines at 80 char.
> +
> +properties:
> + compatible:
> + const: toshiba,visconti-viif
> +
> + reg:
> + items:
> + - description: registers for capture control
> + - description: registers for CSI2 receiver control
> +
> + interrupts:
> + items:
> + - description: Sync Interrupt
> + - description: Status (Error) Interrupt
> + - description: CSI2 Receiver Interrupt
> + - description: L1ISP Interrupt
> +
> + index:
> + enum: [0, 1]
No, we don't do indices in DT. Why do you need this?
> +
> + port:
> + $ref: /schemas/graph.yaml#/$defs/port-base
> + unevaluatedProperties: false
> + description: Input port node, single endpoint describing the CSI-2 transmitter.
> +
> + properties:
> + endpoint:
> + $ref: video-interfaces.yaml#
> + unevaluatedProperties: false
> +
> + properties:
> + data-lanes:
> + description: VIIF supports 2 or 4 data lines
> + items:
> + minItems: 1
> + maxItems: 4
> + items:
> + - const: 1
> + - const: 2
> + - const: 3
> + - const: 4
blank line
> + clock-lanes:
> + description: VIIF supports 1 clock line
> + const: 0
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - port
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + soc {
> + #address-cells = <2>;
> + #size-cells = <2>;
> +
> + viif0: viif@1c000000 {
Drop unused labels.
> + compatible = "toshiba,visconti-viif";
> + reg = <0 0x1c000000 0 0x6000>,
> + <0 0x1c008000 0 0x400>;
> + interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
> + index = <0>;
> + status = "disabled";
Why is your example disabled? Don't put 'status' in examples.
> +
> + port {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + csi_in0: endpoint {
> + remote-endpoint = <&imx219_out0>;
> + bus-type = <4>;
> + data-lanes = <1 2>;
> + clock-lanes = <0>;
> + clock-noncontinuous;
> + link-frequencies = /bits/ 64 <456000000>;
> + };
> + };
> + };
> + };
> +
> --
> 2.17.1
>
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 0/4] Add Toshiba Visconti Video Input Interface driver
2022-08-10 13:28 [PATCH v3 0/4] Add Toshiba Visconti Video Input Interface driver Yuji Ishikawa
` (2 preceding siblings ...)
2022-08-10 13:28 ` [PATCH v3 4/4] MAINTAINERS: Add entries for Toshiba Visconti Video Input Interface Yuji Ishikawa
@ 2022-11-24 10:53 ` Hans Verkuil
3 siblings, 0 replies; 8+ messages in thread
From: Hans Verkuil @ 2022-11-24 10:53 UTC (permalink / raw)
To: Yuji Ishikawa, Laurent Pinchart, Mauro Carvalho Chehab,
Nobuhiro Iwamatsu
Cc: linux-media, linux-arm-kernel, linux-kernel, devicetree
Hi Yuji,
On 10/08/2022 15:28, Yuji Ishikawa wrote:
> This series is the Video Input Interface driver
> for Toshiba's ARM SoC, Visconti[0].
> This provides DT binding documentation,
> device driver, documentation and MAINTAINER files.
>
> A visconti VIIF driver instance exposes
> 1 media control device file and 3 video device files
> for a VIIF hardware.
> Detailed HW/SW are described in documentation directory.
> The VIIF hardware has CSI2 receiver,
> image signal processor and DMAC inside.
> The subdevice for image signal processor provides
> vendor specific V4L2 controls.
>
> The device driver depends on two other drivers under development;
> clock framework driver and IOMMU driver.
> Corresponding features will be added later.
I'm not sure what the status is of this series. There were comments for patch 1,
and also note that patch 2 never made it to the linux-media mailinglist (too large,
it should be split up in smaller patches).
I'm marking it as 'Changes Requested' in patchwork, so please post a v4
and I will do my best to review it.
Also please ping me in the future to encourage me to review it. These are
big drivers and it takes a lot of time to review, so I have a tendency (wrong,
I know) keep postponing it. A ping helps me prioritize it.
Regards,
Hans
>
> Best regards,
> Yuji
>
> Changelog v2:
> - Resend v1 because a patch exceeds size limit.
>
> Changelog v3:
> - Add documentation to describe SW and HW
> - Adapted to media control framework
> - Introduced ISP subdevice, capture device
> - Remove private IOCTLs and add vendor specific V4L2 controls
> - Change function name avoiding camelcase and uppercase letters
>
> [0]: https://toshiba.semicon-storage.com/ap-en/semiconductor/product/image-recognition-processors-visconti.html
>
> Yuji Ishikawa (4):
> dt-bindings: media: platform: visconti: Add Toshiba Visconti Video
> Input Interface bindings
> media: platform: visconti: Add Toshiba Visconti Video Input Interface
> driver
> documentation: media: add documentation for Toshiba Visconti Video
> Input Interface driver
> MAINTAINERS: Add entries for Toshiba Visconti Video Input Interface
>
> .../bindings/media/toshiba,visconti-viif.yaml | 103 +
> .../driver-api/media/drivers/index.rst | 1 +
> .../media/drivers/visconti-viif.rst | 455 +++
> MAINTAINERS | 3 +
> drivers/media/platform/Kconfig | 2 +
> drivers/media/platform/Makefile | 4 +
> drivers/media/platform/visconti/Kconfig | 9 +
> drivers/media/platform/visconti/Makefile | 9 +
> drivers/media/platform/visconti/hwd_viif.c | 1791 +++++++++++
> drivers/media/platform/visconti/hwd_viif.h | 701 +++++
> .../media/platform/visconti/hwd_viif_csi2rx.c | 723 +++++
> .../platform/visconti/hwd_viif_internal.h | 348 ++
> .../media/platform/visconti/hwd_viif_l1isp.c | 2727 ++++++++++++++++
> .../media/platform/visconti/hwd_viif_reg.h | 2802 +++++++++++++++++
> drivers/media/platform/visconti/viif.c | 479 +++
> drivers/media/platform/visconti/viif.h | 195 ++
> .../media/platform/visconti/viif_capture.c | 1215 +++++++
> .../media/platform/visconti/viif_controls.c | 1149 +++++++
> drivers/media/platform/visconti/viif_isp.c | 852 +++++
> include/uapi/linux/visconti_viif.h | 1724 ++++++++++
> 20 files changed, 15292 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/media/toshiba,visconti-viif.yaml
> create mode 100644 Documentation/driver-api/media/drivers/visconti-viif.rst
> create mode 100644 drivers/media/platform/visconti/Kconfig
> create mode 100644 drivers/media/platform/visconti/Makefile
> create mode 100644 drivers/media/platform/visconti/hwd_viif.c
> create mode 100644 drivers/media/platform/visconti/hwd_viif.h
> create mode 100644 drivers/media/platform/visconti/hwd_viif_csi2rx.c
> create mode 100644 drivers/media/platform/visconti/hwd_viif_internal.h
> create mode 100644 drivers/media/platform/visconti/hwd_viif_l1isp.c
> create mode 100644 drivers/media/platform/visconti/hwd_viif_reg.h
> create mode 100644 drivers/media/platform/visconti/viif.c
> create mode 100644 drivers/media/platform/visconti/viif.h
> create mode 100644 drivers/media/platform/visconti/viif_capture.c
> create mode 100644 drivers/media/platform/visconti/viif_controls.c
> create mode 100644 drivers/media/platform/visconti/viif_isp.c
> create mode 100644 include/uapi/linux/visconti_viif.h
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH v3 1/4] dt-bindings: media: platform: visconti: Add Toshiba Visconti Video Input Interface bindings
2022-08-10 15:38 ` Rob Herring
@ 2022-11-30 1:36 ` yuji2.ishikawa
0 siblings, 0 replies; 8+ messages in thread
From: yuji2.ishikawa @ 2022-11-30 1:36 UTC (permalink / raw)
To: robh
Cc: hverkuil, laurent.pinchart, mchehab, nobuhiro1.iwamatsu,
linux-media, linux-arm-kernel, linux-kernel, devicetree
Hello Rob,
Thank you for your comments and sorry for this too late reply.
> -----Original Message-----
> From: Rob Herring <robh@kernel.org>
> Sent: Thursday, August 11, 2022 12:38 AM
> To: ishikawa yuji(石川 悠司 ○RDC□AITC○EA開)
> <yuji2.ishikawa@toshiba.co.jp>
> Cc: Hans Verkuil <hverkuil@xs4all.nl>; Laurent Pinchart
> <laurent.pinchart@ideasonboard.com>; Mauro Carvalho Chehab
> <mchehab@kernel.org>; iwamatsu nobuhiro(岩松 信洋 □SWC◯ACT)
> <nobuhiro1.iwamatsu@toshiba.co.jp>; linux-media@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org;
> devicetree@vger.kernel.org
> Subject: Re: [PATCH v3 1/4] dt-bindings: media: platform: visconti: Add Toshiba
> Visconti Video Input Interface bindings
>
> On Wed, Aug 10, 2022 at 10:28:19PM +0900, Yuji Ishikawa wrote:
> > Adds the Device Tree binding documentation that allows to describe the
> > Video Input Interface found in Toshiba Visconti SoCs.
> >
> > Signed-off-by: Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
> > Reviewed-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> > ---
> > Chengelog v2:
> > - no change
> >
> > Changelog v3:
> > - no change
> > ---
> > .../bindings/media/toshiba,visconti-viif.yaml | 103
> > ++++++++++++++++++
> > 1 file changed, 103 insertions(+)
> > create mode 100644
> > Documentation/devicetree/bindings/media/toshiba,visconti-viif.yaml
> >
> > diff --git
> > a/Documentation/devicetree/bindings/media/toshiba,visconti-viif.yaml
> > b/Documentation/devicetree/bindings/media/toshiba,visconti-viif.yaml
> > new file mode 100644
> > index 000000000..848ea5019
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/media/toshiba,visconti-viif.ya
> > +++ ml
> > @@ -0,0 +1,103 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/media/toshiba,visconti-viif.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Toshiba Visconti5 SoC Video Input Interface Device Tree
> > +Bindings
> > +
> > +maintainers:
> > + - Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> > +
> > +description: |
>
> Don't need '|' if no formatting.
I'll remove '|'.
> > + Toshiba Visconti5 SoC Video Input Interface (VIIF) receives MIPI
> > + CSI2 video stream, processes the stream with embedded image signal
> processor (L1ISP, L2ISP), then stores pictures to main memory.
>
> Wrap lines at 80 char.
I'll update the description.
> > +
> > +properties:
> > + compatible:
> > + const: toshiba,visconti-viif
> > +
> > + reg:
> > + items:
> > + - description: registers for capture control
> > + - description: registers for CSI2 receiver control
> > +
> > + interrupts:
> > + items:
> > + - description: Sync Interrupt
> > + - description: Status (Error) Interrupt
> > + - description: CSI2 Receiver Interrupt
> > + - description: L1ISP Interrupt
> > +
> > + index:
> > + enum: [0, 1]
>
> No, we don't do indices in DT. Why do you need this?
The property 'index' can have value <0> or <1>.
A node with 'index=<0>' corresponds to 0'th VIIF HW instance (VIIF0).
Also, there's 1'st VIIF HW instance (VIIF1) with a bit different operation-mode set.
Sorry for asking question for a comment months ago.
Let me clarify:
* The problem is NOT defining style of 'index' with enum
* The problem is NOT that 'index' is reserved keyword
* The problem is having additional sequential ID for a node,
while 'reg' (usually, the base address of registers) can identify instance.
Therefore, 'index' should be removed,
and vendor-specific property can be used to declare each feature only on VIIF1.
Is this correct understanding or am I still missing the point?
> > +
> > + port:
> > + $ref: /schemas/graph.yaml#/$defs/port-base
> > + unevaluatedProperties: false
> > + description: Input port node, single endpoint describing the CSI-2
> transmitter.
> > +
> > + properties:
> > + endpoint:
> > + $ref: video-interfaces.yaml#
> > + unevaluatedProperties: false
> > +
> > + properties:
> > + data-lanes:
> > + description: VIIF supports 2 or 4 data lines
> > + items:
> > + minItems: 1
> > + maxItems: 4
> > + items:
> > + - const: 1
> > + - const: 2
> > + - const: 3
> > + - const: 4
>
> blank line
I'll fix this
>
> > + clock-lanes:
> > + description: VIIF supports 1 clock line
> > + const: 0
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - interrupts
> > + - port
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/interrupt-controller/arm-gic.h>
> > + #include <dt-bindings/interrupt-controller/irq.h>
> > +
> > + soc {
> > + #address-cells = <2>;
> > + #size-cells = <2>;
> > +
> > + viif0: viif@1c000000 {
>
> Drop unused labels.
I'll fix this.
>
> > + compatible = "toshiba,visconti-viif";
> > + reg = <0 0x1c000000 0 0x6000>,
> > + <0 0x1c008000 0 0x400>;
> > + interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>,
> > + <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
> > + <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>,
> > + <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
> > + index = <0>;
> > + status = "disabled";
>
> Why is your example disabled? Don't put 'status' in examples.
I'll remove 'status'.
>
> > +
> > + port {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + csi_in0: endpoint {
> > + remote-endpoint = <&imx219_out0>;
> > + bus-type = <4>;
> > + data-lanes = <1 2>;
> > + clock-lanes = <0>;
> > + clock-noncontinuous;
> > + link-frequencies = /bits/ 64 <456000000>;
> > + };
> > + };
> > + };
> > + };
> > +
> > --
> > 2.17.1
> >
> >
> >
Regards,
Yuji Ishikawa
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-11-30 1:43 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-10 13:28 [PATCH v3 0/4] Add Toshiba Visconti Video Input Interface driver Yuji Ishikawa
2022-08-10 13:28 ` [PATCH v3 1/4] dt-bindings: media: platform: visconti: Add Toshiba Visconti Video Input Interface bindings Yuji Ishikawa
2022-08-10 15:11 ` Rob Herring
2022-08-10 15:38 ` Rob Herring
2022-11-30 1:36 ` yuji2.ishikawa
2022-08-10 13:28 ` [PATCH v3 3/4] documentation: media: add documentation for Toshiba Visconti Video Input Interface driver Yuji Ishikawa
2022-08-10 13:28 ` [PATCH v3 4/4] MAINTAINERS: Add entries for Toshiba Visconti Video Input Interface Yuji Ishikawa
2022-11-24 10:53 ` [PATCH v3 0/4] Add Toshiba Visconti Video Input Interface driver Hans Verkuil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).