Device tree properties for camera driver

Hi,
As mentioned in Camera sensor driver device guide:

<b>XXX-gpio</b>: Specifies the general-purpose input/output (GPIO) pins for the device, where XXX is the GPIO pin for the camera.
Default GPIO pins for the camera include:
• H3 - Camera0 Reset
• H6 - Camera0 Power Down
• T6 - Camera1 Reset
• T5 - Camera1 Power Down

Then should I use Camera Power Down GPIO to control enable pin of external regulator. In case that I have 2 external regulators (1.2V and 1.8V) which should be power-up in order. Should I use 2 Camera Power Down GPIO?

By the way, I am not so clear about the purpose of XXX-supply and XXX-reg.

• vana-supply = <&en_vdd_cam_hv_2v8>; // analog 2.8v
• vdig-supply = <&en-vdd-cam_1v2>; // digital 1.2v
• vif-supply = <&en-vdd-cam>; // interface 1.8v
• vvcm-supply = <&en_vdd_vcm_2v8>; // analog 2.8v for vcm

and

• avdd-reg = “vana”;
• dvdd-reg = “vdig”
• iovdd-reg = “vif”
• vcmvdd-reg = “vvcm”

Anyone please help to clarify. Thank you so much!

hello Hung-Lam,

these are regular power units for camera devices.
you should also check your camera board schematic to confirm necessary regulators.

BTW, you could check power tree to have more details.
for example,

$ sudo -i
# cat /sys/kernel/debug/regulator/power_tree
 
... 
----regulator.6 (avdd-cam-2v8)----
	Consumer List:
		31-001a-vana: OFF [0:0:0]
		30-001a-vana: OFF [0:0:0]
	States: OFF
		Open Count: 2
		Enable Count: 0
	Machine Constraints:
		Min Microvolt: 2800000
		Max Microvolt: 2800000

Thanks a lot, JerryChang.

I am able to figure out the regulator device tree at tegra194-fixed-regulator-p2822-1000.dtsi

...
		p2822_avdd_cam_2v8: regulator@107 {
			compatible = "regulator-fixed";
			reg = <107>;
			regulator-name = "avdd-cam-2v8";
			regulator-min-microvolt = <2800000>;
			regulator-max-microvolt = <2800000>;
			gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(N, 0) 0>;
			enable-active-high;
		};
...

My camera board has 2 external regulators with the enable pins, therefore I may add 2 more regulators into this .dtsi file, then update in camera driver dtsi as well.