Need help about camera regulators

Hi, Nvidia,
I met regulators error when system boot:
[ 4.844565] driver [ar0234] registered
[ 8.295280] probing v4l2 sensor ar0234 at addr 0x10
[ 8.301287] ar0234 2-0010: camera_common_regulator_get vana ERR: fffffffffffffdfb
[ 8.309852] ar0234 2-0010: camera_common_regulator_get vdig ERR: fffffffffffffdfb
[ 8.318308] ar0234 2-0010: ar0234_power_get: unable to get regulator(s)
[ 8.325880] ar0234 2-0010: unable to power get
[ 8.335501] ar0234 2-0010: tegra camera driver registration failed
[ 8.342765] ar0234: probe of 2-0010 failed with error -14

I have added the definition of regulators in DTS:
ar0234mipi_a@10 {
… …
/* Define any required hw resources needed by driver /
/
ie. clocks, io pins, power sources */
avdd-reg = “vana”;
iovdd-reg = “vif”;
dvdd-reg = “vdig”;

Also, I have added the supplies in DTS:
ar0234mipi_a@10 {

vana-supply = <&p3737_avdd_cam_2v8>;
vif-supply = <&p3737_vdd_1v8_sys>;
vdig-supply = <&p3737_vdd_sys_en>;
};

Could you help to figure out where is the issue or missing?

Thanks

Make sure your HW need those power control.
If not you can remove from the driver and device tree.

Hi ShaneCCC,
Thanks, The adapter board I used needs DVDD AVDD IOVDD from board. Could you help to guide me how to let the avdd and dvdd output from board correct?

Thanks

Do you define below regulator?

p3737_avdd_cam_2v8 p3737_vdd_1v8_sys p3737_vdd_sys_en 

Hi @ShaneCCC
Yes, in the file platform/t23x/concord/kernel-dts/cvb/tegra234-p3737-fixed-regulator.dtsi has these regulator defines.

Please attached tegra234-p3737-fixed-regulator.dtsi here to review.

Thanks

tegra234-p3737-fixed-regulator.zip (1.3 KB)
Hi @ShaneCCC
attached. Thanks!

You may check the node to confirm the regulator.

/sys/devices/platform/regulator*

Hi @ShaneCCC

I got this:

nvidia@nvidia-desktop:~$ sudo ls /sys/devices/platform/regulator*
driver_override modalias power subsystem uevent

Didn’t show any regulator on your system.
Do you dump your device tree to confirm those define?

sudo dtc -I fs -O dts -o extracted_proc.dts /proc/device-tree 

What’s your version?

Hi @ShaneCCC
Attach the dts parsed
extracted_proc.zip (63.3 KB)
How to check version?
Thanks

Hi @ShaneCCC
Is below version info wanted?
nvidia@nvidia-desktop:~$ sudo apt show nvidia-jetpack -a
[sudo] password for nvidia:
Package: nvidia-jetpack
Version: 5.1.1-b56
Priority: standard
Section: metapackages
Maintainer: NVIDIA Corporation
Installed-Size: 199 kB
Depends: nvidia-jetpack-runtime (= 5.1.1-b56), nvidia-jetpack-dev (= 5.1.1-b56)
Homepage: Jetson - Embedded AI Computing Platform | NVIDIA Developer
Download-Size: 29.3 kB
APT-Manual-Installed: yes
APT-Sources: https://repo.download.nvidia.com/jetson/common r35.3/main arm64 Packages
Description: NVIDIA Jetpack Meta Package

nvidia@nvidia-desktop:~$ sudo ls /sys/devices/platform/re*
/sys/devices/platform/reg-dummy:
driver driver_override modalias power regulator subsystem uevent

/sys/devices/platform/regulatory.0:
driver_override modalias power subsystem uevent

Below command to get the version.

cat /etc/nv_tegra_release 

hi @ShaneCCC

nvidia@nvidia-desktop:~$ cat /etc/nv_tegra_release

R35 (release), REVISION: 3.1, GCID: 32827747, BOARD: t186ref, EABI: aarch64, DATE: Sun Mar 19 15:19:21 UTC 2023

nvidia@nvidia-desktop:~$

Hi @ShaneCCC
I saw from other place in this forum, there is difference between -m and -y, I did try and found if I build the driver with -m command into .ko and insmod after system booted, I can get 2.8V, but 1.2V pin is still of 0V level. (insmod way doesn’t meet camera_common_regulator_get vana ERR: fffffffffffffdfb)
Of course if build driver with -y into the kernel image, the error of very beginning of this topic is met(camera_common_regulator_get vana ERR: fffffffffffffdfb).

Hi @ShaneCCC
I saw a red error log in kernel dmesg trace result when streaming with ko insmod:
[ 371.909217] bwmgr API not supported
Is this related with the problem?

HI @ShaneCCC
the way insmod .ko is also ok for me. But by this way still I can not get 1.2V dvdd, I can only get 2.8V and 1.8V. How can I get 1.2V dvdd output at this time? Thanks.

Hi @ShaneCCC
I did some check below:
nvidia@nvidia-desktop:~$ sudo cat /sys/kernel/debug/regulator/vdd_sys_en/regulator/name
vdd_sys_en
nvidia@nvidia-desktop:~$ sudo cat /sys/kernel/debug/regulator/vdd_sys_en/regulator/state
enabled
nvidia@nvidia-desktop:~$ sudo cat /sys/kernel/debug/regulator/vdd_sys_en/regulator/microvolts
1200000

Does above message mean 1.2V is enabled? But why I got 0V when measuring pin 101 of P2 slot(HDR120-2x60-AP-5MM-P (QTH) )on the EVK board?

Hi Nvidia,
Any one can help me to get correct 1.2V dvdd for camera? I’m using AGX orin DVK. Camera is connected to P2 slot(HDR120-2x60-AP-5MM-P (QTH) ) of the DVK board.