Hello,
I want to run the Sony IMX219 camera on the Avnet Maaxboard.
The manufacturer said: "Out of box the yocto and debian images only support the OV5640 camera based solutions. Any additional image sensor support will need to be added."
I use the layer of the manufacturer (https://github.com/Avnet/meta-maaxboard) on the hardknott version.
I would like to know what is the procedure to make this camera work.
Sincerely
i failed to imgrate the imx219 neither. i bought ov5640 mipitosas board,and i just replaced the imx219 with ov5640 senor. the pin connection is same with the ov5640's.
because the imx210 driver is provided in drivers/media/i2c/ , i just enable it by set it in menuconfig menu.
my dts file was as below
&mipi_csi_1 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port {
mipi1_sensor_ep: endpoint@0 {
remote-endpoint = <&imx219_mipi1_ep>;
data-lanes = <1 2>;
bus-type = <4>;
};
csi1_mipi_ep: endpoint@1 {
remote-endpoint = <&csi1_ep>;
};
};
};
&mipi_csi_2 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port {
mipi2_sensor_ep: endpoint@0 {
remote-endpoint = <&imx219_mipi2_ep>;
data-lanes = <1 2>;
bus-type = <4>;
};
csi2_mipi_ep: endpoint@1 {
remote-endpoint = <&csi2_ep>;
};
};
};
&i2c1 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c1>;
status = "okay";
imx219_mipi2: imx219_mipi2@34 {
compatible = "sony,imx219";
reg = <0x34>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_csi2_pwn>, <&pinctrl_csi_rst>;
clocks = <&clk IMX8MQ_CLK_CLKO2>;
clock-names = "csi_mclk";
assigned-clocks = <&clk IMX8MQ_CLK_CLKO2>;
assigned-clock-parents = <&clk IMX8MQ_SYS2_PLL_200M>;
assigned-clock-rates = <20000000>;
csi_id = <1>;
pwn-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
mclk = <20000000>;
mclk_source = <0>;
port {
imx219_mipi2_ep: endpoint {
remote-endpoint = <&mipi2_sensor_ep>;
};
};
};
after changing the dtb file in uboot, i didn't find the imx219 log during kernal starting.
UPDATE
As igor advised me I started from the ov5640 dts file to write the imx219 one.
I manage to boot and load my dts file, the lsmod command tells me that the driver is loaded, and appears /dev/video0.
But when i use ffmpeg to take a picture, i got:
My DTS look like:
/dts-v1/;
/plugin/;
#include <dt-bindings/clock/imx8mq-clock.h>
#include <dt-bindings/gpio/gpio.h>
/{
compatible = "avnet,maaxboard", "fsl,imx8mq";
fragment@0 {
target = <&i2c1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
imx219_mipi@10 {
compatible = "sony,imx219";
reg = <0x10>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_csi1>;
clocks = <&clk IMX8MQ_CLK_CLKO2>;
clock-names = "csi_mclk";
csi_id = <0>;
pwn-gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
rst-gpios = <&gpio3 18 GPIO_ACTIVE_HIGH>;
status = "okay";
mclk = <24000000>;
mclk_source = <0>;
port {
imx219_mipi1_ep: endpoint {
clock-lanes = <0>;
data-lanes = <1 2 3 4>;
remote-endpoint = <&mipi1_sensor_ep>;
};
};
};
};
};
fragment@1 {
target = <&csi1_bridge>;
__overlay__ {
status = "okay";
};
};
fragment@2 {
target = <&mipi_csi_1>;
__overlay__ {
status = "okay";
rxhs-settle = <0x07>;
port {
mipi1_sensor_ep: endpoint@0 {
remote-endpoint = <&imx219_mipi1_ep>;
clock-lanes = <0>;
data-lanes = <1 2 3 4>;
bus-type = <4>;
};
};
};
};
};
Is my dts file bad or misconfigured?
Sincerely
Thomas
Thank you for your reply! I am working on it
I'm sorry, I'm very new to the device tree world, but I understand that DTS are not operating system dependent.
Is it a good thing to take this DTS: https://isrc.iscas.ac.cn/gitlab/mirrors/github.com/raspberrypi_linux/-/blob/a52033815d8a1735cfdea6d0...
Thomas
Hi Thomas
unfortunately IMX219 camera is not supported by nxp in its bsps, sorry.
As starting point one can look at below ov5640 dts example and adjust specific
for new camera parameters, like lanes( clock-lanes = ...; data-lanes = <...>;) camera format,
hs-settle values
https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_5.4.x_2.3.0/arch/arm64/boot/dts/free...
hs-settle values can be found on
Best regards
igor