Linux-Media Archive on lore.kernel.org
 help / color / Atom feed
From: Philipp Zabel <pza@pengutronix.de>
To: Fabio Estevam <festevam@gmail.com>
Cc: "Михайлов Алексей Анатольевич" <minimumlaw@gmail.com>,
	"Steve Longerbeam" <slongerbeam@gmail.com>,
	linux-media <linux-media@vger.kernel.org>
Subject: Re: IMX219 MIPI Sensor (meda-tree) with vaniila I.MX6Q media drivers
Date: Fri, 27 Mar 2020 08:45:23 +0100
Message-ID: <20200327074523.GA3412@pengutronix.de> (raw)
In-Reply-To: <CAOMZO5B3NXBEmQdUqKDSTYpf=Y5LLZYz7mJLqRMh8T3+O6WvqA@mail.gmail.com>

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

  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26  8:28 Михайлов Алексей Анатольевич
2020-03-26 18:56 ` Fabio Estevam
2020-03-27  7:45   ` Philipp Zabel [this message]
2020-03-27  8:12     ` Alex Mihaylov
2020-03-27 21:18       ` Steve Longerbeam
2020-03-28  4:45         ` Михайлов Алексей Анатольевич
2020-03-26 19:17 ` Fabio Estevam
2020-03-27  7:49   ` Alex Mihaylov
2020-03-26 18:45 Alex Mihaylov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200327074523.GA3412@pengutronix.de \
    --to=pza@pengutronix.de \
    --cc=festevam@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=minimumlaw@gmail.com \
    --cc=slongerbeam@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Media Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-media/0 linux-media/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-media linux-media/ https://lore.kernel.org/linux-media \
		linux-media@vger.kernel.org
	public-inbox-index linux-media

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-media


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git