Re: IMX219 MIPI Sensor (meda-tree) with vaniila I.MX6Q media drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, Mar 26, 2020 at 03:56:20PM -0300, Fabio Estevam wrote:
> Adding Steve and Philipp in case they have some ideas.
> 
> 
> On Thu, Mar 26, 2020 at 5:30 AM Михайлов Алексей Анатольевич
> <minimumlaw@xxxxxxxxx> wrote:
> >
> > Hi!
> >
> > We build custom CPU Module with NXP/Freescale IMX6QuadPlus CPU.I use
> > latest stable kernel from kernel.org. This time kernel version 5.5.11.
> > Also I connect to I.MX MIPI cameras from RaspberryPI (Rev 2.1 with Sony
> > IMX219). For IMX219 used actual driver from [1]. Usersapce based on
> > Gentoo Linux, have media-utils version 1.2.1, v4l2-utils version 1.18.0,
> > gstreamer version 1.14.5 with v4l2 plugins. Also Wayland version 1.17
> > based graphics with XWayland.
> >
> > Camera write in DTB:
> > ==== cut: DTB fragments ====
> > / {
> > [skiped]
> >         imx219_clk: camera-clk {
> >                 compatible = "fixed-clock";
> >                 #clock-cells = <0>;
> >                 clock-frequency = <24000000>;
> >         };
> >
> >         imx219_1v2_reg: cam1v2_regulator {
> >                 compatible = "regulator-fixed";
> >                 regulator-name = "IMX219_1V2";
> >                 regulator-min-microvolt = <1200000>;
> >                 regulator-max-microvolt = <1200000>;
> >                 vin-supply = <&p3v3_reg>;
> >                 regulator-always-on;
> >         };
> >
> >         imx219_1v8_reg: cam1v8_regulator {
> >                 compatible = "regulator-fixed";
> >                 regulator-name = "IMX219_1V8";
> >                 regulator-min-microvolt = <1800000>;
> >                 regulator-max-microvolt = <1800000>;
> >                 vin-supply = <&p3v3_reg>;
> >                 regulator-always-on;
> >         };
> >
> >         imx219_2v8_reg: cam2v8_regulator {
> >                 compatible = "regulator-fixed";
> >                 regulator-name = "IMX219_2V8";
> >                 regulator-min-microvolt = <2800000>;
> >                 regulator-max-microvolt = <2800000>;
> >                 vin-supply = <&p3v3_reg>;
> >                 regulator-always-on;
> >         };
> > [skiped]
> > csi_i2c: i2c-mux@1 { /* CSI camera */
> >         #address-cells = <1>;
> >         #size-cells = <0>;
> >         reg = <1>;
> >         sensor@10 {     /* Raspberry Camera V2 */
> >                 compatible = "sony,imx219";
> >                 reg = <0x10>;
> >                 #address-cells = <1>;
> >                 #size-cells = <0>;
> >                 clocks = <&imx219_clk>;
> >                 clock-names = "xclk";
> >                 DOVDD-supply = <&imx219_1v8_reg>; /* 1.8v */
> >                 AVDD-supply = <&imx219_2v8_reg>;  /* 2.8v */
> >                 DVDD-supply = <&imx219_1v2_reg>;  /* 1.2v */
> >
> >                 port {
> >                         csi_sensor_out: endpoint {
> >                                 remote-endpoint = <&csi_port_in>;
> >                                 link-frequencies = /bits/ 64 <456000000>;
> >                                 clock-lanes = <0>;
> >                                 data-lanes = <1 2>;
> >                         };
> >                 };
> >         };
> > };
> > [skiped]
> > &mipi_csi {
> >         status = "okay";
> >
> >         port@0 {
> >                 reg = <0>;
> >                 csi_port_in: endpoint {
> >                         remote-endpoint = <&csi_sensor_out>;
> >                         clock-lanes = <0>;
> >                         data-lanes = <1 2>;
> >                 };
> >         };
> > };
> > [skiped]
> > ==== cut: DTB fragments ====
> >
> > I use script for init connected camera
> >
> > ==== cut: Camera init script ===
> > #!/bin/bash
> >
> > # sensor output format and resolutions
> > # RaspberryPI Camera rev 2.1 (Sony I.MX219)
> > I_FORMAT=SRGGB10_1X10
> > I_RESOLUTION=1920x1080
> > CROP=(0,0)/640x480
> >
> > # capture format and resolution
> > O_FORMAT=AYUV32
> > O_RESOLUTION=640x480
> >
> > # viewport format and resolution
> > V_FORMAT=AYUV32
> > V_RESOLUTION=640x480
> >
> > # Reset all media links
> > media-ctl -r
> >
> > # Sersor to IPU and PRP path
> > # RaspberryPI Camera rev 2.1 (Sony I.MX219)
> > media-ctl -l "'imx219 9-0010':0 -> 'imx6-mipi-csi2':0[1]"
> > media-ctl -l "'imx6-mipi-csi2':2 -> 'ipu1_csi1':0[1]"
> > media-ctl -l "'ipu1_csi1':1 -> 'ipu1_ic_prp':0[1]"
> > # media-ctl -l "'ipu1_csi1':2 -> 'ipu1_csi1 capture':0[1]" # /dev/video3
> > (unused, unprocessed)
      ^
The IPUv3 IC hardware does not support processing Bayer formats.
Those can only be written straight to RAM using this path.

regards
Philipp



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux