HI,
I’d like to modify camera device tree configuration(ov5693) on tx2.
So i modified tegra186-camera-e3326-a00.dtsi according to below sequences.
But my modification was not applied from dmesg.
modify tegra186-camera-e3326-a00.dtsi
./hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-modules/tegra186-camera-e3326-a00.dtsi
build device tree
#!/bin/bash
export CROSS_COMPILE=aarch64-unknown-linux-gnu-
export TEGRA_KERNEL_OUT=./out
export ARCH=arm64
make O=$TEGRA_KERNEL_OUT dtbs
copy dtb files to Linux_for_Tegra/kernel/dtb
cp ./out/arch/arm64/boot/dts/tegra186-quill-p3310-1000-c03-00-base.dtb ~/1.work/1.al/0.nvidia/3.package/r28.1/Lin ux_for_Tegra/kernel/dtb
cp ./out/arch/arm64/boot/dts/tegra186-quill-p3310-1000-a00-00-base.dtb ~/1.work/1.al/0.nvidia/3.package/r28.1/Lin ux_for_Tegra/kernel/dtb
cp ./out/arch/arm64/boot/dts/tegra186-quill-p3310-1000-c03-00-dsi-hdmi-dp.dtb ~/1.work/1.al/0.nvidia/3.package/r2 8.1/Linux_for_Tegra/kernel/dtb
flashing
sudo ./flash.sh -r -k kernel-dtb jetson-tx2 mmcblk0p1
If there is any mistake, plz let me know.
Thanks,
Doohan93
Please check if plugin-manager overwrites your change.
Reference: L4T document, camera development. https://developer.nvidia.com/embedded/dlc/l4t-documentation-28-2-ga
Hi WayneWWW,
I have followed “Sensor Driver Programming Guide” in r28.2 like belows
i added “CONFIG_VIDEO_IMX185=y” tegra18_defconfig and make O=$TEGRA_KERNEL_OUT tegra18_defconfig
i added log printk(“[dooman:%s]\n”, func );, and build / flashing
static int imx185_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct camera_common_data *common_data;
struct imx185 *priv;
int err;
printk("[dooman:%s]\n", __func__);
Device registration - using plugin manager
a. t18x/common/kernel-dts/t18x-common-plugin-manager/tegra186-quill-camera-plugin-manager.dtsi
1671 fragment-imx185@0 {
1672 ids = “LPRD-002001”;
1673 override@0 {
1674 target = <&imx185_cam0>;
1675 overlay {
1676 status = “okay”;
1677 };
1678 };
b. t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-camera-modules.dtsi
264 imx185_cam0: imx185_a@1a {
265 status = “disabled”;
266 };
To enable Plugin Manager support
a. Add my device(imx185) DTSI to the camera lists in:
/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-camera-modules.dtsi
#include “t18x-common-platforms/tegra186-quill-camera-li-mipi-adpt-a00.dtsi”
and i build dtb and flashing
and i removed ov5693 camera board. there was no imx185 camera board on tx2.
I just want to test imx185_probe function is executed on kernel boot time.
But i couldn’t my log in imx185.c
printk(“[dooman:%s]\n”, func );
Plz let me know my sequences is correct?? what is problems??
Thanks
Doohan93
I have resolved by ways as below
removed ov5693 sensor board on TX2
modified tegra186-quill-p3310-1000-a00-00-base.dts
./hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dts
16 #include <t18x-common-platforms/tegra186-quill-common-p3310-1000-a00.dtsi>
17 #include <t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi>
18 //#include <t18x-common-platforms/tegra186-quill-camera-modules.dtsi> // commented
19 #include <t18x-common-platforms/tegra186-quill-camera-li-mipi-adpt-a00.dtsi> // added
20 #include <t18x-common-modules/tegra186-display-e3320-1000-a00.dtsi>
21
22 /* comms dtsi file should be included after gpio dtsi file */
23 #include <t18x-common-platforms/tegra186-quill-comms.dtsi>
24 #include <t18x-common-plugin-manager/tegra186-quill-p3310-1000-a00-plugin-manager.dtsi>
25 #include <t18x-common-modules/tegra186-super-module-e2614-p2597-1000-a00.dtsi>
26 #include <t18x-common-plugin-manager/tegra186-quill-display-plugin-manager.dtsi>
27 #include <t18x-common-prod/tegra186-priv-quill-p3310-1000-a00-prod.dtsi>
28 //#include <t18x-common-plugin-manager/tegra186-quill-camera-plugin-manager.dtsi> // commented
modified tegra186-quill-camera-modules.dtsi
./hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-camera-modules.dtsi
261 tca9546_70: tca9546@70 {
262 status = “okay”;
263 i2c@0 {
264 imx185_cam0: imx185_a@1a {
266 status = “okay”;
267 };
268 };
269 };
i check imx185_probe log using dmesg
Thanks,
Doohan93
kaosun
April 16, 2018, 6:49pm
5
You commented the “tegra186-quill-camera-modules.dtsi” file, why you modified it in step 3? Even you modified it, it will never be executed.
I refered to imx185 device tree file. and i know imx185 dtsi file has a bug.
I have a continuous fail, so i have compared ov5693 device tree. and i found differ depth between ov5693 and imx185.
So i modified imx185 device tree just 2 depth like ov5693. and it was working.
ov5693 device tree (tegra186-camera-e3326-a00.dtsi)
64 i2c@3180000 {
65 ov5693_c@36 {
66 compatible = “nvidia,ov5693”;
67 /* I2C device address /
68 reg = <0x36>;
69
70 / V4L2 device node location */
71 devnode = “video0”;
imx185 device tree (tegra186-camera-li-mipi-adpt-a00.dtsi)
64 i2c@3180000 {
65 tca9546@70 {
66 status = “okay”;
67 i2c@0 {
68 status = “okay”;
69 imx185_a@1a {
70 compatible = “nvidia,imx185”;
71 status = “okay”;
b-2. t18x-common-platforms
ov5693 device tree (tegra186-quill-camera-e3326-a00.dtsi)
27 i2c@3180000 {
28 ov5693_c@36 {
29 /* Define any required hw resources needed by driver /
30 / ie. clocks, io pins, power sources /
31 / mclk-index indicates the index of the /
32 / mclk-name with in the clock-names array */
33
34 clocks = <&tegra_car TEGRA186_CLK_EXTPERIPH1>,
35 <&tegra_car TEGRA186_CLK_PLLP_OUT0>;
imx185 device tree (tegra186-quill-camera-li-mipi-adpt-a00.dtsi)
30 tca9546@70 {
31 compatible = “nxp,pca9546”;
32 compatible = “nvidia,imx185”;
33 reg = <0x70>;
34 #address-cells = <1>;
35 #size-cells = <0>;
36 vcc-supply = <&en_vdd_cam>;
37 vcc_lp = “vcc”;
38 force_bus_start = <CAMERA_I2C_MUX_BUS(0)>;
39 status = “okay”;
40
41 i2c@0 {
42 reg = <0>;
43 i2c-mux,deselect-on-exit;
44 #address-cells = <1>;
45 #size-cells = <0>;
46 status = “okay”;
47 /* pca9570_a@24 {
48 compatible = “nvidia,pca9570”;
49 // compatible = “nvidia,imx185”;
50 reg = <0x24>;
51 channel = “a”;
52 drive_ic = “DRV8838”;
53 }; /
54
55 imx185_a@1a {
56 / Define any required hw resources needed by driver /
57 / ie. clocks, io pins, power sources */
58 compatible = “nvidia,imx185”;
59 status = “okay”;
kayccc
April 19, 2018, 6:46am
7
Great! Thanks for the feedback!
Hello,
I am trying to remove the camera-plugin manager and camera modules dtsi files as I am building a system with a predefined camera setup.
To do that I am doing the following
modified tegra186-quill-p3310-1000-a00-00-base.dts
removed lines:
#include <t18x-common-platforms/tegra186-quill-camera-modules.dtsi>
#include <t18x-common-plugin-manager/tegra186-quill-camera-plugin-manager.dtsi>
added line:
#include <t18x-common-platforms/tegra186-quill-camera-imx214-a00.dtsi>
The last file is where I have my imx214 device tree.
By building the kernel I want to only add the IMX214 driver. Prior to doing so on TX2 platform I have succesfully integrated the camera driver on TX1 platform using JetPack 3.3.
However, when I try to build the dtbs (make O=$TEGRA_KERNEL_OUT dtbs)
I get the following error :
DTC arch/arm64/boot/dts/_ddot_/_ddot_/_ddot_/_ddot_/_ddot_/_ddot_/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-a00-00-base.dtb
ERROR (phandle_references): Reference to non-existent node or label "gpio"
ERROR (phandle_references): Reference to non-existent node or label "gpio"
ERROR (phandle_references): Reference to non-existent node or label "gpio"
How did you manage to build DTB when you removed the camera-plugin-manager dtsi ?
Thanks in advance for any replies.
Please disregard my latest post, I had an error in the pin definition of the dtsi file.
So far I have managed to enable 2 cameras on the TX2 using the Auvidea J140 daughter-board.
The main issue I have is that I cannot find which is the I2C port number and address that are used for the third connector.
So far I have :
i2c@3160000 for csi lanes a-b
i2c@3180000 for csi lanes c-d
I am missing the i2c for csi lanes e-f. I have tried 3190000 but it doesn’t work.
Any ideas on where I can find the correct i2c memory addresses ?
Hi…
First, sorry for late response.
But i used tx2 board one years ago, and i don’t use tx2 board any more.
And i’m very busy because of another project not tx2 project. so i can’t help you…
Sorry again.
Thank you for replying.
I just worked it out.
For anyone that has the same issue the configurtaion is :
i2c@3160000 for csi lanes a-b (i2c0/I2C1)
i2c@3180000 for csi lanes c-d (i2c2/I2C3)
i2c@c250000 for csi lanes e-f (i2c7/I2C8)