Linux-Media Archive on lore.kernel.org
 help / color / Atom feed
From: Alex Mihaylov <minimumlaw@gmail.com>
To: Fabio Estevam <festevam@gmail.com>,
	Steve Longerbeam <slongerbeam@gmail.com>,
	Philipp Zabel <p.zabel@pengutronix.de>
Cc: 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 10:49:07 +0300
Message-ID: <e9603747-f7d9-161f-b9e6-9adc7f1cdf7e@gmail.com> (raw)
In-Reply-To: <CAOMZO5Bz+qh7S3s8SfJRPVjjvokMx-r6udzFg=0poJmCbzMj9w@mail.gmail.com>

Hi!

Oooppps! My mistake. Before you answer in logs:

localhost ~ # dmesg | grep -i imx219
IMX219_1V2: supplied by P3V3
IMX219_1V8: supplied by P3V3
IMX219_2V8: supplied by P3V3
imx219 9-0010: 9-0010 supply VANA not found, using dummy regulator
imx219 9-0010: 9-0010 supply VDIG not found, using dummy regulator
imx219 9-0010: 9-0010 supply VDDL not found, using dummy regulator
imx-media: imx219 9-0010:0 -> imx6-mipi-csi2:0
localhost ~ #

P3V3 always on regulator, so all 3 regs always on. On Raspberry Camera 
V2.1 all of them enabled by single GPIO. This GPIO on my schematic 
pull-up to 3,3V. So for first step I fix DTB
- clock-names = "xclk";
- DOVDD-supply = <&imx219_1v8_reg>; /* 1.8v */
- AVDD-supply = <&imx219_2v8_reg>;  /* 2.8v */
- DVDD-supply = <&imx219_1v2_reg>;  /* 1.2v */
+ VDIG-supply = <&imx219_1v8_reg>; /* 1.8v */
+ VANA-supply = <&imx219_2v8_reg>; /* 2.8v */
+ VDDL-supply = <&imx219_1v2_reg>; /* 1.2v */

Result:
localhost ~ # dmesg | grep -i imx219
[    0.102656] IMX219_1V2: supplied by P3V3
[    0.102737] IMX219_1V8: supplied by P3V3
[    0.102798] IMX219_2V8: supplied by P3V3
[   13.851525] imx-media: imx219 9-0010:0 -> imx6-mipi-csi2:0
localhost ~ #

No visible changes from original message.

Next step. Our schematic have separate, controlled by GPIO, voltage 
switch for raspberry camera 3,3V supply. I try use them:

@@ -111,7 +108,6 @@ p3v3_cam_reg: p3v3_cam_regulator {
  regulator-max-microvolt = <3300000>;
  vin-supply = <&p3v3_reg>;
  gpio = <&gpio2 25 GPIO_ACTIVE_LOW>;
- regulator-always-on; /* XP25: force on (1-2)/normal (2-3) */
};

also in all IMX219 regulators fix vin-supply and disable always-on mode
- vin-supply = <&p3v3_reg>;
- regulator-always-on;
+ vin-supply = <&p3v3_cam_reg>;

I see more noice about regulators in log, but capture still not start

localhost ~ # dmesg | grep -i imx219
[    0.103533] IMX219_1V2: supplied by P3V3_CAM
[    0.103612] IMX219_1V8: supplied by P3V3_CAM
[    0.103672] IMX219_2V8: supplied by P3V3_CAM
[   13.668314] imx-media: imx219 9-0010:0 -> imx6-mipi-csi2:0
[   35.671233] IMX219_1V2: disabling
[   35.671246] IMX219_1V8: disabling
[   35.671255] IMX219_2V8: disabling
localhost ~ # ./camera_init.sh
localhost ~ # gst-launch-1.0 v4l2src device=/dev/video2 ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed 
to allocate required memory.
Additional debug info:
/var/tmp/portage/media-plugins/gst-plugins-v4l2-1.14.5/work/gst-plugins-good-1.14.5/sys/v4l2/gstv4l2src.c(656): 
gst_v4l2src_decide_allocation (): 
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Buffer pool activation failed
Execution ended after 0:00:00.017843333
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
#

So, I fix cosmetic with DTS. But, unfortunately, this not fix troubles.

> 
> No clock-names is described in
> Documentation/devicetree/bindings/media/i2c/imx219.yaml
> 
>>                  DOVDD-supply = <&imx219_1v8_reg>; /* 1.8v */
>>                  AVDD-supply = <&imx219_2v8_reg>;  /* 2.8v */
>>                  DVDD-supply = <&imx219_1v2_reg>;  /* 1.2v */
> 
> These supplies names do not match the ones described in:
> Documentation/devicetree/bindings/media/i2c/imx219.yaml
> 

  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
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 [this message]
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=e9603747-f7d9-161f-b9e6-9adc7f1cdf7e@gmail.com \
    --to=minimumlaw@gmail.com \
    --cc=festevam@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --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