Hello,
I’m developing custom device tree source based on the source for the Jakku carrier board found in /hardware/nvidia/platform/t19x/jakku/kernel-dts
. For now, I’m just trying to adjust the cam node and i2c mux layout to match our board, and enable the imx477 cam node by default. The former is simply removing imx477 cam1 instance, and enabling access to cam0 with i2cmux index 1, and not the focus of this post. The latter I’m trying to do by adjusting the dts overlays, but it’s not working.
I’m trying to modify the source so that the imx477 device node receives the fragment property status = okay
and the imx219 nodes are disabled. I’ve deleted the three default overlays from the above mentioned folder, including:
- tegra194-p3668-all-p3509-0000-camera-imx219-dual.dts
- tegra194-p3668-all-p3509-0000-camera-imx477-dual.dts
- tegra194-p3668-all-p3509-0000-camera-imx477-imx219.dts
I’ve also removed these from the Makefile. Next, I created a copy of the dts overlay for the imx477-dual configuration, shown below, and added it to the Makefile. I modified the copy to keep disabling both imx219 nodes and enable the imx477 components.
/dts-v1/;
/plugin/;
/ {
overlay-name = "Camera IMX477 Dual";
jetson-header-name = "Jetson Nano CSI Connector";
compatible = "nvidia,p3449-0000+p3668-0000", "nvidia,p3449-0000+p3668-0001", "nvidia,p3509-0000+p3668-0000", "nvidia,p3509-0000+p3668-0001";
/* IMX477 dual sensor module */
fragment@0 {
target = <&imx477_cam0>;
__overlay__ {
status = "okay";
};
};
fragment@1 {
target = <&cam_module0>;
__overlay__ {
status = "okay";
badge = "jakku_front_RBPCV3";
position = "front";
orientation = "1";
};
};
fragment@2 {
target = <&cam_module0_drivernode0>;
__overlay__ {
status = "okay";
pcl_id = "v4l2_sensor";
devname = "imx477 9-001a";
proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@1/rbpcv3_imx477_a@1a";
};
};
fragment@6 {
target = <&imx219_cam0>;
__overlay__ {
status = "disabled";
};
};
fragment@7 {
target = <&rbpcv3_imx477_vi_in0>;
__overlay__ {
status = "okay";
port-index = <0>;
bus-width = <2>;
remote-endpoint = <&rbpcv3_imx477_csi_out0>;
};
};
fragment@9 {
target = <&rbpcv3_imx477_csi_in0>;
__overlay__ {
status = "okay";
port-index = <0>;
bus-width = <2>;
remote-endpoint = <&rbpcv3_imx477_dual_out0>;
};
};
fragment@10 {
target = <&rbpcv3_imx477_csi_out0>;
__overlay__ {
status = "okay";
};
};
fragment@13 {
target = <&imx219_cam1>;
__overlay__ {
status = "disabled";
};
};
};
I’ve made other changes to other dts files to achieve what I described above, but I haven’t yet included them for brevity, can include on request. Upon building, I can decompile the resulting DTO and see my desired changes to the i2cmux/imx477 configuration take effect, but the status
attributes are not present.
// this shows the desired configuration but status disabled
i2c@1 {
reg = <0x1>;
#address-cells = <0x1>;
#size-cells = <0x0>;
linux,phandle = <0x174>;
phandle = <0x174>;
rbpcv3_imx477_a@1a {
compatible = "ridgerun,imx477";
reg = <0x1a>;
devnode = "video0";
physical_w = "3.680";
physical_h = "2.760";
sensor_model = "imx477";
use_sensor_mode_id = "true";
status = "disabled";
reset-gpios = <0x13 0x7c 0x0>;
linux,phandle = <0x175>;
later in that file …
// No status disabled attribute!
rbpcv2_imx219_c@10 {
compatible = "nvidia,imx219";
reg = <0x10>;
devnode = "video1";
physical_w = "3.680";
physical_h = "2.760";
sensor_model = "imx219";
use_sensor_mode_id = "true";
reset-gpios = <0x13 0x7d 0x0>;
linux,phandle = <0x177>;
phandle = <0x177>;
Again, my focus in this post is just on controlling the status attribute from the overlay dtsis provided for the jakku board.
Thanks!