Hi all, me again…
I’m trying to bring up the Framos 662 sensor on our custom board, but for some reason I can’t get the linking to work.
We’ve got the following kernel modules installed
Module
vvcam_isp
vvcam_dwe
vvcam_video
imx8_media_dev
imx662
galcore
I can see the sensor gets registered as a subdevice in dmesg
5.079145] enter imx662_probe
[ 5.082765] enter imx662_power_on
[ 5.130659] enter imx662_set_exp exposure received: 500 control: 1
[ 5.137490] enter imx662_set_exp exposure register: 1213 integration_time_line: 37
[ 5.150900] enter imx662_set_gain: gain received: 0 control: 1
[ 5.156776] imx662_set_gain: gain register: 0
[ 5.163500] enter imx662_set_black_level black level: 50
[ 5.171183] enter imx662_set_black_level black level: 50
[ 5.176531] enter imx662_set_data_rate data rate received: 7
[ 5.176539] imx662_change_data_rate++
[ 5.178324] imx662_change_data_rate: Setting data rate to value: 7
[ 5.192957] imx662_adjust_hmax_register:++
[ 5.203877] imx662_adjust_hmax_register: one line : 13333
[ 5.209390] enter imx662_set_sync_mode sync mode 0
[ 5.214799] enter imx662_configure_triggering_pins
[ 5.221074] enter imx662_set_fps fps received: 60
[ 5.225811] enter imx662_set_fps vmax register: 1250 line_time 13333
[ 5.235112] enter imx662_set_test_pattern
[ 5.241948] imx662_probe camera mipi imx662, is found
[ 6.263408] imx8_media_dev: module is from the staging directory, the quality is unknown, you have been warned.
[ 6.276655] mx8-img-md: Registered sensor subdevice: imx662 2-001a (1)
[ 6.301027] mx8-img-md: created link [imx662 2-001a] => [mxc-mipi-csi2.0]
Media controller shows
Media controller API version 5.15.148
Media device information
------------------------
driver vvcam-video
model viv_media
serial
bus info
hw revision 0x0
driver version 5.15.148
Device topology
- entity 1: viv_v4l20 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video2
pad0: Sink
<- "vvcam-isp.0":0 [ENABLED]
- entity 5: vvcam-isp.0 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/v4l-subdev0
pad0: Source
-> "viv_v4l20":0 [ENABLED]
- entity 7: vvcam-dwe.0 (2 pads, 0 link)
type Node subtype V4L flags 0
device node name /dev/v4l-subdev1
pad0: Source
pad1: Sink
and
root@meercam-worker-framos-test:~ # v4l2-ctl --list-devices
():
/dev/v4l-subdev0
/dev/v4l-subdev1
VIV (platform:viv0):
/dev/video2
vsi_v4l2dec (platform:vsi_v4l2dec):
/dev/video1
vsi_v4l2enc (platform:vsi_v4l2enc):
/dev/video0
viv_media (platform:vvcam-video):
/dev/media0
I wondered if anyone has an example dmesg with this camera successfully loading?
I am curious to see if I’ve got one or more of the following:
- Some kernel config I am missing?
- An additional kernel module missing?
- Something wrong in the dts?!!?
My dts looks like this ( apologies for the old fragment syntax, I haven’t yet converted… )
/dts-v1/;
/plugin/;
#include <dt-bindings/clock/imx8mp-clock.h>
#include <dt-bindings/gpio/gpio.h>
/ {
/* ------------------------------------------------------------------ *
* Fragment 0 – fixed regulators (unchanged) *
* ------------------------------------------------------------------ */
fragment@0 {
target-path = "/";
__overlay__ {
reg_cam1: regulator-cam1 {
compatible = "regulator-fixed";
regulator-name = "cam_pvdd1";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-always-on;
};
reg_cam2: regulator-cam2 {
compatible = "regulator-fixed";
regulator-name = "cam_pvdd2";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-always-on;
};
};
};
/* ------------------------------------------------------------------ *
* Fragment 1 – cameradev *
* ------------------------------------------------------------------ */
fragment@1 {
target = <&cameradev>;
__overlay__ {
status = "okay";
};
};
/* ------------------------------------------------------------------ *
* Fragment 2 – IMX662 @ I²C2 (bus-address 0x1b) *
* ------------------------------------------------------------------ */
fragment@2 {
target = <&i2c2>;
__overlay__ {
status = "okay";
clock-frequency = <100000>;
imx662_mipi@1a {
assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
assigned-clock-rates = <24000000>;
clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
clock-names = "csi_mclk";
compatible = "framos,imx662";
reg = <0x1a>;
csi_id = <0>;
mipi_csi;
rst-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; /* Meercam SODIMM 212 */
cam_pvdd-supply = <®_cam2>;
status = "okay";
port {
imx662_mipi_0_ep: endpoint {
data-lanes = <1 2 3 4>;
clock-lanes = <0>;
max-pixel-frequency = /bits/ 64 <500000000>;
remote-endpoint = <&mipi_csi0_ep>;
};
};
};
};
};
/* ------------------------------------------------------------------ *
* Fragment 2 – IMX662 @ I²C3 (bus-address 0x1a) *
* ------------------------------------------------------------------ */
fragment@3 {
target = <&i2c3>;
__overlay__ {
status = "okay";
clock-frequency = <100000>;
imx662_mipi1@1a {
/* ---- clocks ---- */
assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
assigned-clock-rates = <24000000>;
clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
clock-names = "csi_mclk";
/* ---- identity ---- */
compatible = "framos,imx662";
reg = <0x1a>;
csi_id = <1>;
mipi_csi;
/* ---- GPIO / supplies ---- */
rst-gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; /* Meercam SODIMM 210 */
cam_pvdd-supply = <®_cam1>;
status = "okay";
/* ---- endpoint ---- */
port {
imx662_mipi_1_ep: endpoint {
data-lanes = <1 2 3 4>;
clock-lanes = <0>;
max-pixel-frequency = /bits/ 64 <500000000>;
remote-endpoint = <&mipi_csi1_ep>;
};
};
};
};
};
/* ------------------------------------------------------------------ *
* Fragment 4 – disable ISI_0 *
* ------------------------------------------------------------------ */
fragment@4 {
target = <&isi_0>;
__overlay__ {
status = "disabled";
};
};
/* ------------------------------------------------------------------ *
* Fragment 5 – disable ISI_1 *
* ------------------------------------------------------------------ */
fragment@5 {
target = <&isi_1>;
__overlay__ {
status = "disabled";
};
};
/* ------------------------------------------------------------------ *
* Fragment 6 – enable ISP_0 *
* ------------------------------------------------------------------ */
fragment@6 {
target = <&isp_0>;
__overlay__ {
status = "okay";
};
};
/* ------------------------------------------------------------------ *
* Fragment 7 – enable ISP_1 *
* ------------------------------------------------------------------ */
fragment@7 {
target = <&isp_1>;
__overlay__ {
status = "okay";
};
};
/* ------------------------------------------------------------------ *
* Fragment 8 – enable Dewarp *
* ------------------------------------------------------------------ */
fragment@8 {
target = <&dewarp>;
__overlay__ {
status = "okay";
};
};
/* ------------------------------------------------------------------ *
* Fragment 9 – MIPI-CSI 0 endpoint *
* ------------------------------------------------------------------ */
fragment@9 {
target = <&mipi_csi_0>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port@0 {
reg = <0>;
mipi_csi0_ep: endpoint {
data-lanes = <1 2 3 4>; /* number of lanes */
csis-hs-settle = <13>;
csis-clk-settle = <2>;
csis-wclk;
remote-endpoint = <&imx662_mipi_0_ep>;
};
};
};
};
/* ------------------------------------------------------------------ *
* Fragment 10 – MIPI-CSI 1 endpoint *
* ------------------------------------------------------------------ */
fragment@10 {
target = <&mipi_csi_1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port@1 {
reg = <1>;
mipi_csi1_ep: endpoint {
data-lanes = <1 2 3 4>; /* number of lanes */
csis-hs-settle = <13>;
csis-clk-settle = <2>;
csis-wclk;
remote-endpoint = <&imx662_mipi_1_ep>;
};
};
};
};
};
i2cdetect also the driver bound…
Any help would be greatly appreciated…
edit:
It’s worth noting we’ve succesfully tested this with a different camera module NOT using ISP, so I figure there’s something I am missing there.