Skip to content

Instantly share code, notes, and snippets.

@openedev
Last active February 6, 2026 19:16
Show Gist options
  • Select an option

  • Save openedev/351a2bd0cf3e2febcd6c755fdf0d0e84 to your computer and use it in GitHub Desktop.

Select an option

Save openedev/351a2bd0cf3e2febcd6c755fdf0d0e84 to your computer and use it in GitHub Desktop.
RPi IMX415 Regulator
edgeble-6b $ v4l2-ctl -d /dev/video11 --set-fmt-video=width=1920,height=1080,pixelformat=NV12 --stream-mmap=4 --stream-skip=100 --stream-to=11.yuv --stream-count=1 --stream-poll
<6>[ 73.973504] rkisp_hw fdcb0000.rkisp: set isp clk = 594000000Hz
<6>[ 73.980415] rkcif-mipi-lvds: stream[0] start streaming
<3>[ 73.980486] rockchip-mipi-csi2 mipi0-csi2: stream on, src_sd: 00000000ce2081ea, sd_name:rockchip-csi2-dphy0
<3>[ 73.980492] rockchip-mipi-csi2 mipi0-csi2: stream ON
<6>[ 73.980514] rockchip-csi2-dphy0: dphy0, data_rate_mbps 892
<6>[ 73.980520] rockchip-csi2-dphy0: dphy0, data_rate_mbps 892
<6>[ 73.980999] rockchip-csi2-dphy csi2-dcphy0: csi2_dphy_s_stream stream on:1, dphy0, ret 0
<6>[ 73.981006] imx415 7-0037: s_stream: 1. 1920x1080, hdr: 0, bpp: 10
<7>[ 74.083465] imx415 7-0037: set vblank 0x492 vts 2250
<7>[ 74.084894] imx415 7-0037: set exposure(shr0) 1845 = cur_vts(2250) - val(405)
<7>[ 74.085759] imx415 7-0037: set analog gain 0x0
<<<7>[ 74.153830] imx415 7-0037: set exposure(shr0) 1762 = cur_vts(2250) - val(488)
<<7>[ 74.170428] imx415 7-0037: set exposure(shr0) 1585 = cur_vts(2250) - val(665)
<<7>[ 74.187385] imx415 7-0037: set exposure(shr0) 1435 = cur_vts(2250) - val(815)
<<7>[ 74.204137] imx415 7-0037: set exposure(shr0) 1326 = cur_vts(2250) - val(924)
<<7>[ 74.220377] imx415 7-0037: set exposure(shr0) 1286 = cur_vts(2250) - val(964)
<<7>[ 74.237316] imx415 7-0037: set exposure(shr0) 1239 = cur_vts(2250) - val(1011)
<<7>[ 74.253892] imx415 7-0037: set exposure(shr0) 1147 = cur_vts(2250) - val(1103)
<<7>[ 74.270659] imx415 7-0037: set exposure(shr0) 1065 = cur_vts(2250) - val(1185)
<<7>[ 74.287140] imx415 7-0037: set exposure(shr0) 1025 = cur_vts(2250) - val(1225)
<<7>[ 74.303986] imx415 7-0037: set exposure(shr0) 985 = cur_vts(2250) - val(1265)
<<7>[ 74.320655] imx415 7-0037: set exposure(shr0) 921 = cur_vts(2250) - val(1329)
<<7>[ 74.336865] imx415 7-0037: set exposure(shr0) 900 = cur_vts(2250) - val(1350)
<<7>[ 74.353060] imx415 7-0037: set analog gain 0x1
<<7>[ 74.370134] imx415 7-0037: set analog gain 0x2
<<7>[ 74.386908] imx415 7-0037: set analog gain 0x3
<7>[ 74.388242] imx415 7-0037: set exposure(shr0) 900 = cur_vts(2250) - val(1350)
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 60.05 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<6>[ 75.818785] rkcif-mipi-lvds: stream[0] start stopping, total mode 0x2, cur 0x2
<3>[ 75.835119] rockchip-mipi-csi2 mipi0-csi2: stream off, src_sd: 00000000ce2081ea, sd_name:rockchip-csi2-dphy0
<3>[ 75.835127] rockchip-mipi-csi2 mipi0-csi2: stream OFF
<6>[ 75.836151] rockchip-csi2-dphy csi2-dcphy0: csi2_dphy_s_stream_stop stream stop, dphy0
<6>[ 75.836157] rockchip-csi2-dphy csi2-dcphy0: csi2_dphy_s_stream stream on:0, dphy0, ret 0
<6>[ 75.836172] imx415 7-0037: s_stream: 0. 1920x1080, hdr: 0, bpp: 10
<6>[ 75.836624] rkcif-mipi-lvds: stream[0] stopping finished, dma_en 0x0
edgeble-6b $
edgeble-6b $ v4l2-ctl -d /dev/video11 --set-fmt-video=width=1920,height=1080,pixelformat=NV12 --stream-mmap=4 --stream-skip=100 --stream-to=11.yuv --stream-count=1 --stream-poll
<6>[ 78.099802] rkisp_hw fdcb0000.rkisp: set isp clk = 594000000Hz
<6>[ 78.116780] rkisp rkisp0-vir0: first params buf queue
<6>[ 78.118416] rkcif-mipi-lvds: stream[0] start streaming
<3>[ 78.118484] rockchip-mipi-csi2 mipi0-csi2: stream on, src_sd: 00000000ce2081ea, sd_name:rockchip-csi2-dphy0
<3>[ 78.118490] rockchip-mipi-csi2 mipi0-csi2: stream ON
<6>[ 78.118510] rockchip-csi2-dphy0: dphy0, data_rate_mbps 892
<6>[ 78.118515] rockchip-csi2-dphy0: dphy0, data_rate_mbps 892
<6>[ 78.118987] rockchip-csi2-dphy csi2-dcphy0: csi2_dphy_s_stream stream on:1, dphy0, ret 0
<6>[ 78.118993] imx415 7-0037: s_stream: 1. 1920x1080, hdr: 0, bpp: 10
<3>[ 78.120342] m00_b_imx415 7-0037: start stream failed while write regs
<6>[ 78.120995] rockchip-csi2-dphy csi2-dcphy0: csi2_dphy_s_stream_stop stream stop, dphy0
<6>[ 78.121001] rockchip-csi2-dphy csi2-dcphy0: csi2_dphy_s_stream stream on:0, dphy0, ret 0
<3>[ 78.121005] rockchip-mipi-csi2 mipi0-csi2: stream off, src_sd: 00000000ce2081ea, sd_name:rockchip-csi2-dphy0
<3>[ 78.121009] rockchip-mipi-csi2 mipi0-csi2: stream OFF
<3>[ 78.121028] rockchip-mipi-csi2 mipi0-csi2: stream off, src_sd: 00000000ce2081ea, sd_name:rockchip-csi2-dphy0
<6>[ 78.121032] imx415 7-0037: s_stream: 0. 1920x1080, hdr: 0, bpp: 10
select timeout
<4>[ 80.644805] rkisp0-vir0: rkisp_stream_stop id:0 timeout
<6>[ 80.644824] rkcif-mipi-lvds: stream[0] start stopping, total mode 0x0, cur 0x2
<6>[ 80.644828] rkcif-mipi-lvds: stream[0] stopping finished, dma_en 0x0
&{/} {
vcc_3v3_adapter: vcc-3v3-adapter-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc_3v3_adapter";
enable-active-high;
gpio = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&pwdn_gpio_cam0>;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
vin-supply = <&vcc5v0_sys>;
};
dvdd_1v1_cam0: dvdd-1v1-cam0-regulator {
compatible = "regulator-fixed";
regulator-name = "dvdd_1v1_cam0";
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
vin-supply = <&vcc_3v3_adapter>;
};
dovdd_1v8_cam0: dovdd-1v8-cam0-regulator {
compatible = "regulator-fixed";
regulator-name = "dovdd_1v8_cam0";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
vin-supply = <&vcc_3v3_adapter>;
};
avdd_2v9_cam0: avdd-2v9-cam0-regulator {
compatible = "regulator-fixed";
regulator-name = "avdd_2v9_cam0";
regulator-min-microvolt = <2900000>;
regulator-max-microvolt = <2900000>;
vin-supply = <&vcc_3v3_adapter>;
};
};
&pinctrl {
cam0 {
pwdn_gpio_cam0: pwdn-gpio-cam0 {
rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};
&i2c7 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
imx415_0: imx415@37 {
compatible = "sony,imx415";
reg = <0x37>;
clocks = <&cru CLK_MIPI_CAMARAOUT_M1>;
clock-names = "xvclk";
pinctrl-names = "default";
pinctrl-0 = <&mipim0_camera1_clk>;
power-domains = <&power RK3588_PD_VI>;
reset-gpios = <&gpio1 RK_PA3 GPIO_ACTIVE_LOW>;
avdd-supply = <&avdd_2v9_cam0>;
dovdd-supply = <&dovdd_1v8_cam0>;
dvdd-supply = <&dvdd_1v1_cam0>;
rockchip,camera-module-index = <0>;
rockchip,camera-module-facing = "back";
rockchip,camera-module-name = "EDGEBLE-CAM4K-A00";
rockchip,camera-module-lens-name = "DEFAULT";
port {
imx415_0_out0: endpoint {
remote-endpoint = <&mipidphy0_in>;
data-lanes = <1 2 3 4>;
};
};
};
};
edgegpt-6b $ sudo dmesg | grep imx415
[ 12.674174] platform csi2-dcphy0: Fixed dependency cycle(s) with /i2c@fec90000/imx415@37
[ 12.982711] imx415 7-0037: driver version: 00.01.08
[ 12.982719] imx415 7-0037: Get hdr mode failed! no hdr default
[ 12.982729] imx415 7-0037: detect imx415 lane 4
[ 12.982733] imx415 7-0037: current mode 1, cfg_num 11
[ 12.982780] imx415 7-0037: Failed to get power-gpios
[ 12.982784] imx415 7-0037: could not get default pinstate
[ 12.982787] imx415 7-0037: could not get sleep pinstate
[ 12.982790] imx415 7-0037: Looking up dvdd-supply from device tree
[ 12.982833] imx415 7-0037: Looking up dovdd-supply from device tree
[ 12.982873] imx415 7-0037: Looking up avdd-supply from device tree
[ 13.054060] imx415 7-0037: Detected imx415 id 0000e0
[ 13.054079] imx415 7-0037: Consider updating driver imx415 to match on endpoints
[ 13.054089] rockchip-csi2-dphy csi2-dcphy0: dphy0 matches m00_b_imx415 7-0037:bus type 5
[ 14.318465] imx415 7-0037: set exposure(shr0) 1845 = cur_vts(2250) - val(405)
edgegpt-6b $
edgegpt-6b $ sudo i2cdetect -y 7
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment