Re: [PATCH] [media] rcar-csi2: add Renesas R-Car MIPI CSI-2 driver
Hi Niklas, On Mon, Jun 27, 2016 at 7:45 PM, Niklas Söderlundwrote: > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/rcar-csi2.txt > @@ -0,0 +1,79 @@ > +Renesas R-Car MIPI CSI-2 driver (rcar-csi2) > +--- > + > +The rcar-csi2 device provides MIPI CSI-2 capabilities for the Renesas R-Car > +family of devices. It is to be used in conjunction with the rcar-vin driver > which > +provides the video input capabilities. > + > + - compatible: Must be one or more of the following > + - "renesas,csi2-r8a7795" for the R8A7795 device Please use "renesas,-" for new bindings, i.e. "renesas,r8a7795-csi2". > + - "renesas,rcar-gen3-csi2" for a generic R-Car Gen3 compatible device. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH] [media] rcar-csi2: add Renesas R-Car MIPI CSI-2 driver
Hi, [auto build test ERROR on linuxtv-media/master] [also build test ERROR on next-20160627] [cannot apply to v4.7-rc5] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Niklas-S-derlund/rcar-csi2-add-Renesas-R-Car-MIPI-CSI-2-driver/20160628-015917 base: git://linuxtv.org/media_tree.git master config: i386-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): drivers/media/platform/rcar-vin/rcar-csi2.c:371:2: error: unknown field 's_stream' specified in initializer .s_stream = rcar_csi2_s_stream, ^ >> drivers/media/platform/rcar-vin/rcar-csi2.c:371:14: error: initialization >> from incompatible pointer type [-Werror=incompatible-pointer-types] .s_stream = rcar_csi2_s_stream, ^~ drivers/media/platform/rcar-vin/rcar-csi2.c:371:14: note: (near initialization for 'rcar_csi2_pad_ops.init_cfg') cc1: some warnings being treated as errors vim +371 drivers/media/platform/rcar-vin/rcar-csi2.c 365 366 static struct v4l2_subdev_core_ops rcar_csi2_subdev_core_ops = { 367 .s_power = rcar_csi2_s_power, 368 }; 369 370 static const struct v4l2_subdev_pad_ops rcar_csi2_pad_ops = { > 371 .s_stream = rcar_csi2_s_stream, 372 .set_fmt = rcar_csi2_set_pad_format, 373 }; 374 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
Re: [PATCH] [media] rcar-csi2: add Renesas R-Car MIPI CSI-2 driver
Hi, [auto build test ERROR on linuxtv-media/master] [also build test ERROR on next-20160627] [cannot apply to v4.7-rc5] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Niklas-S-derlund/rcar-csi2-add-Renesas-R-Car-MIPI-CSI-2-driver/20160628-015917 base: git://linuxtv.org/media_tree.git master config: cris-allmodconfig (attached as .config) compiler: cris-linux-gcc (GCC) 4.6.3 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=cris All error/warnings (new ones prefixed by >>): >> drivers/media/platform/rcar-vin/rcar-csi2.c:371:2: error: unknown field >> 's_stream' specified in initializer >> drivers/media/platform/rcar-vin/rcar-csi2.c:371:2: warning: initialization >> from incompatible pointer type [enabled by default] drivers/media/platform/rcar-vin/rcar-csi2.c:371:2: warning: (near initialization for 'rcar_csi2_pad_ops.init_cfg') [enabled by default] vim +/s_stream +371 drivers/media/platform/rcar-vin/rcar-csi2.c 365 366 static struct v4l2_subdev_core_ops rcar_csi2_subdev_core_ops = { 367 .s_power = rcar_csi2_s_power, 368 }; 369 370 static const struct v4l2_subdev_pad_ops rcar_csi2_pad_ops = { > 371 .s_stream = rcar_csi2_s_stream, 372 .set_fmt = rcar_csi2_set_pad_format, 373 }; 374 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
[PATCH] [media] rcar-csi2: add Renesas R-Car MIPI CSI-2 driver
A V4L2 driver for Renesas R-Car MIPI CSI-2 interface. The driver supports the rcar-vin driver on R-Car Gen3 SoCs where a separate driver is needed to receive CSI-2. Driver is based on a prototype by Koji Matsuoka in the Renesas BSP. Signed-off-by: Niklas Söderlund--- .../devicetree/bindings/media/rcar-csi2.txt| 79 +++ drivers/media/platform/rcar-vin/Kconfig| 11 + drivers/media/platform/rcar-vin/Makefile | 2 + drivers/media/platform/rcar-vin/rcar-csi2.c| 545 + 4 files changed, 637 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/rcar-csi2.txt create mode 100644 drivers/media/platform/rcar-vin/rcar-csi2.c diff --git a/Documentation/devicetree/bindings/media/rcar-csi2.txt b/Documentation/devicetree/bindings/media/rcar-csi2.txt new file mode 100644 index 000..58a89e0 --- /dev/null +++ b/Documentation/devicetree/bindings/media/rcar-csi2.txt @@ -0,0 +1,79 @@ +Renesas R-Car MIPI CSI-2 driver (rcar-csi2) +--- + +The rcar-csi2 device provides MIPI CSI-2 capabilities for the Renesas R-Car +family of devices. It is to be used in conjunction with the rcar-vin driver which +provides the video input capabilities. + + - compatible: Must be one or more of the following + - "renesas,csi2-r8a7795" for the R8A7795 device + - "renesas,rcar-gen3-csi2" for a generic R-Car Gen3 compatible device. + + When compatible with the generic version nodes must list the + SoC-specific version corresponding to the platform first + followed by the generic version. + + - reg: the register base and size for the device registers + - interrupts: the interrupt for the device + - clocks: Reference to the parent clock + +The device node should contain two 'port' child nodes with one child 'endpoint' +node, according to the bindings defined in Documentation/devicetree/bindings/ +media/video-interfaces.txt. Port 0 should connect the device that is the CSI-2 +producer. Port 1 should connect the R-Car VIN device (rcar-vin) consumer. + + - ports: + - port@0: sub-node describing a endpoint to the CSI-2 source + - port@1: sub-node describing a endpoint to the VIN consumer + +Additionally, an alias named csiX will need to be created to specify +which CSI-2 device this is. + +Example: + +/* SoC properties */ + + aliases { + csi40 = + }; + + csi40: csi2@feaa { + compatible = "renesas,csi2-r8a7795"; + reg = <0 0xfeaa 0 0x1>; + interrupts = <0 246 IRQ_TYPE_LEVEL_HIGH>; + clocks = < CPG_MOD 716>; + power-domains = <>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + csi40_out: endpoint@1 { + remote-endpoint = <>; + }; + }; + }; + }; + +/* Board properties */ + +{ + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + csi40_in: endpoint@0 { + clock-lanes = <0>; + data-lanes = <1 2 3 4>; + remote-endpoint = <_1_out>; + }; + }; + }; + }; diff --git a/drivers/media/platform/rcar-vin/Kconfig b/drivers/media/platform/rcar-vin/Kconfig index b2ff2d4..e0774ee 100644 --- a/drivers/media/platform/rcar-vin/Kconfig +++ b/drivers/media/platform/rcar-vin/Kconfig @@ -9,3 +9,14 @@ config VIDEO_RCAR_VIN To compile this driver as a module, choose M here: the module will be called rcar-vin. + +config VIDEO_RCAR_CSI2 + tristate "R-Car MIPI CSI-2 Interface driver" + depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && OF + depends on ARCH_RENESAS || COMPILE_TEST + ---help--- + Support for Renesas R-Car MIPI CSI-2 interface driver. + Supports R-Car Gen3 SoCs. + + To compile this driver as a module, choose M here: the + module will be called rcar-csi2. diff --git a/drivers/media/platform/rcar-vin/Makefile b/drivers/media/platform/rcar-vin/Makefile index 48c5632..81a37f2 100644 --- a/drivers/media/platform/rcar-vin/Makefile +++ b/drivers/media/platform/rcar-vin/Makefile @@ -1,3 +1,5 @@ rcar-vin-objs = rcar-core.o rcar-dma.o rcar-v4l2.o obj-$(CONFIG_VIDEO_RCAR_VIN) += rcar-vin.o + +obj-$(CONFIG_VIDEO_RCAR_CSI2) += rcar-csi2.o diff --git a/drivers/media/platform/rcar-vin/rcar-csi2.c
[PATCH] [media] rcar-csi2: add Renesas R-Car MIPI CSI-2 driver
Hi all, This patch adds support for the R-Car MIPI CSI-2 driver. It is based on top of the media_tree and depends on the series '[PATCH 0/2] move s_stream from v4l2_subdev_video_ops to move s_stream from v4l2_subdev_pad_ops'. It's tested on a Renesas Salvator-X board. The patch itself do not need a pad argument for s_stream but it is tested on a Renesas Salvator-X which have a ADV7482 device in the video input pipeline (RFC for that driver previously posted) which needs the pad argument. If anyone is interested to test on Salvator-X the following branch contains all the patches to grab video (rcar-vin for Gen3, rcar-cis2 and adv7482). https://git.ragnatech.se/linux rcar-vin-gen3 Niklas Söderlund (1): [media] rcar-csi2: add Renesas R-Car MIPI CSI-2 driver .../devicetree/bindings/media/rcar-csi2.txt| 79 +++ drivers/media/platform/rcar-vin/Kconfig| 11 + drivers/media/platform/rcar-vin/Makefile | 2 + drivers/media/platform/rcar-vin/rcar-csi2.c| 545 + 4 files changed, 637 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/rcar-csi2.txt create mode 100644 drivers/media/platform/rcar-vin/rcar-csi2.c -- 2.8.3