From e4e35fa112a6d6df5cbac2b2df9d57d441bb4007 Mon Sep 17 00:00:00 2001 From: Yuichi Motohashi Date: Mon, 26 Aug 2024 12:59:01 +0900 Subject: [PATCH 1/4] Added R35.4.1 support for Orin developer kit --- drivers/src/Makefile | 8 +++++++ drivers/src/make_overlay_dts_orin-devkit.py | 25 ++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/drivers/src/Makefile b/drivers/src/Makefile index fa716e5..d08e462 100644 --- a/drivers/src/Makefile +++ b/drivers/src/Makefile @@ -166,6 +166,14 @@ else ifeq ($(L4T_RELEASE_MAIN), R35) TARGET_ISX021_IMX490_DTS := tier4-isx021-imx490-gmsl-device-tree-overlay-orin-devkit-r3521 TARGET_IMX490_DTS := tier4-imx490-gmsl-device-tree-overlay-orin-devkit-r3521 MAKE_OVERLAY_DTS_CMD := make_overlay_dts_orin-devkit.py r35.2.1 + else ifeq ($(L4T_RELEASE_MAJOR), 4) # 35.4.1 + KERNELRELEASE := 5.10.104-tegra + TARGET_ISX021_DTS := tier4-isx021-gmsl-device-tree-overlay-orin-devkit-r3521 + TARGET_IMX490_DTS := tier4-imx490-gmsl-device-tree-overlay-orin-devkit-r3521 + TARGET_IMX728_DTS := tier4-imx728-gmsl-device-tree-overlay-orin-devkit-r3521 + TARGET_ISX021_IMX490_DTS := tier4-isx021-imx490-gmsl-device-tree-overlay-orin-devkit-r3521 + TARGET_ISX021_IMX490_IMX728_DTS := tier4-isx021-imx490-imx728-gmsl-device-tree-overlay-orin-devkit-r3521 + MAKE_OVERLAY_DTS_CMD := make_overlay_dts_orin-devkit.py r35.4.1 else KERNELRELEASE := Unknown TARGET_ISX021_DTS := Unknown diff --git a/drivers/src/make_overlay_dts_orin-devkit.py b/drivers/src/make_overlay_dts_orin-devkit.py index 1206047..8790709 100755 --- a/drivers/src/make_overlay_dts_orin-devkit.py +++ b/drivers/src/make_overlay_dts_orin-devkit.py @@ -2937,7 +2937,7 @@ def get_serdes_pix_clk(str_revision, str_camera_type): if l4t_revision == "R35.1": str_rev_num = "351" -elif l4t_revision == "R35.2.1": +elif l4t_revision == "R35.2.1" or "R35.4.1": str_rev_num = "3521" else: print(" Error!! : 1st argument should be R35.1 or R35.2.1") @@ -2969,6 +2969,29 @@ def get_serdes_pix_clk(str_revision, str_camera_type): usage() sys.exit() +print(f"{l4t_revision=}") + +# Replacing for R35.4.1. +# This is due to the implementation of `min_gain_val` being -1 in L4T R35.4.1. +if l4t_revision == "R35.4.1": + str_i2c_isx021_0_p2 = str_i2c_isx021_0_p2.replace('min_gain_val = "0"', 'min_gain_val = "1"') + str_i2c_isx021_1_p2 = str_i2c_isx021_1_p2.replace('min_gain_val = "0"', 'min_gain_val = "1"') + str_i2c_isx021_2_p2 = str_i2c_isx021_2_p2.replace('min_gain_val = "0"', 'min_gain_val = "1"') + str_i2c_isx021_3_p2 = str_i2c_isx021_3_p2.replace('min_gain_val = "0"', 'min_gain_val = "1"') + str_i2c_isx021_4_p2 = str_i2c_isx021_4_p2.replace('min_gain_val = "0"', 'min_gain_val = "1"') + str_i2c_isx021_5_p2 = str_i2c_isx021_5_p2.replace('min_gain_val = "0"', 'min_gain_val = "1"') + str_i2c_isx021_6_p2 = str_i2c_isx021_6_p2.replace('min_gain_val = "0"', 'min_gain_val = "1"') + str_i2c_isx021_7_p2 = str_i2c_isx021_7_p2.replace('min_gain_val = "0"', 'min_gain_val = "1"') + + str_i2c_imx490_0_p2 = str_i2c_imx490_0_p2.replace('min_gain_val = "0"', 'min_gain_val = "1"') + str_i2c_imx490_1_p2 = str_i2c_imx490_1_p2.replace('min_gain_val = "0"', 'min_gain_val = "1"') + str_i2c_imx490_2_p2 = str_i2c_imx490_2_p2.replace('min_gain_val = "0"', 'min_gain_val = "1"') + str_i2c_imx490_3_p2 = str_i2c_imx490_3_p2.replace('min_gain_val = "0"', 'min_gain_val = "1"') + str_i2c_imx490_4_p2 = str_i2c_imx490_4_p2.replace('min_gain_val = "0"', 'min_gain_val = "1"') + str_i2c_imx490_5_p2 = str_i2c_imx490_5_p2.replace('min_gain_val = "0"', 'min_gain_val = "1"') + str_i2c_imx490_6_p2 = str_i2c_imx490_6_p2.replace('min_gain_val = "0"', 'min_gain_val = "1"') + str_i2c_imx490_7_p2 = str_i2c_imx490_7_p2.replace('min_gain_val = "0"', 'min_gain_val = "1"') + for i in range(MAX_NUM_CAMERAS): if i & 0x0 == 0: err = check_and_set_next_port(i, temp_cam) From a88e54e5ffa776e0a5243cc977c962bb256c9231 Mon Sep 17 00:00:00 2001 From: Yuichi Motohashi Date: Mon, 26 Aug 2024 15:09:38 +0900 Subject: [PATCH 2/4] chore: misc changes --- drivers/src/make_overlay_dts_orin-devkit.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/src/make_overlay_dts_orin-devkit.py b/drivers/src/make_overlay_dts_orin-devkit.py index 8790709..acb5aed 100755 --- a/drivers/src/make_overlay_dts_orin-devkit.py +++ b/drivers/src/make_overlay_dts_orin-devkit.py @@ -2940,7 +2940,7 @@ def get_serdes_pix_clk(str_revision, str_camera_type): elif l4t_revision == "R35.2.1" or "R35.4.1": str_rev_num = "3521" else: - print(" Error!! : 1st argument should be R35.1 or R35.2.1") + print(" Error!! : 1st argument should be R35.1 or R35.2.1 or R35.4.1") usage() str_rev_num = "000" @@ -2969,8 +2969,6 @@ def get_serdes_pix_clk(str_revision, str_camera_type): usage() sys.exit() -print(f"{l4t_revision=}") - # Replacing for R35.4.1. # This is due to the implementation of `min_gain_val` being -1 in L4T R35.4.1. if l4t_revision == "R35.4.1": From f3dd9e978e3c2d53f1bf3a3a421fc5783a8c7d93 Mon Sep 17 00:00:00 2001 From: Yuichi Motohashi Date: Mon, 26 Aug 2024 15:42:06 +0900 Subject: [PATCH 3/4] changed version number --- drivers/debian/changelog | 8 +++++++- drivers/debian/prerm | 2 +- drivers/dkms.conf | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/debian/changelog b/drivers/debian/changelog index a4ac5e3..0d4d63f 100644 --- a/drivers/debian/changelog +++ b/drivers/debian/changelog @@ -1,4 +1,10 @@ -tier4-camera-gmsl (1.4.4) UNRELEASED; urgency=medium +tier4-camera-gmsl (1.4.5) focal; urgency=medium + + * Added L4T 35.4.1 support for Nvidia Jetson AGX Orin development kit. + + -- tier4 Mon, 26 Aug 2024 15:36:53 +0900 + +tier4-camera-gmsl (1.4.4) focal; urgency=medium * Fixed MAX9295 output clock frequency settings. This fixes the camera frame rate in the case of master mode. diff --git a/drivers/debian/prerm b/drivers/debian/prerm index ceba5d4..dae7fdf 100755 --- a/drivers/debian/prerm +++ b/drivers/debian/prerm @@ -2,7 +2,7 @@ #!/bin/sh NAME=tier4-camera-gmsl -VERSION=1.4.4 +VERSION=1.4.5 KERNEL_REL=$(uname -r) set -e case "$1" in diff --git a/drivers/dkms.conf b/drivers/dkms.conf index 3b0ff66..cc3b645 100644 --- a/drivers/dkms.conf +++ b/drivers/dkms.conf @@ -1,5 +1,5 @@ PACKAGE_NAME="tier4-camera-gmsl" -PACKAGE_VERSION="1.4.4" +PACKAGE_VERSION="1.4.5" PROCS_NUM=`nproc` [ $PROCS_NUM -gt 16 ] && PROCS_NUM=16 MAKE="make all -j$PROCS_NUM" From cd581d42c8a28404dd64a96197552674befbd6a7 Mon Sep 17 00:00:00 2001 From: Yuichi Motohashi Date: Thu, 29 Aug 2024 17:50:35 +0900 Subject: [PATCH 4/4] fixed l4t revision judgement logic --- drivers/src/make_overlay_dts_orin-devkit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/src/make_overlay_dts_orin-devkit.py b/drivers/src/make_overlay_dts_orin-devkit.py index acb5aed..adcda0c 100755 --- a/drivers/src/make_overlay_dts_orin-devkit.py +++ b/drivers/src/make_overlay_dts_orin-devkit.py @@ -2937,7 +2937,7 @@ def get_serdes_pix_clk(str_revision, str_camera_type): if l4t_revision == "R35.1": str_rev_num = "351" -elif l4t_revision == "R35.2.1" or "R35.4.1": +elif (l4t_revision == "R35.2.1") or (l4t_revision == "R35.4.1"): str_rev_num = "3521" else: print(" Error!! : 1st argument should be R35.1 or R35.2.1 or R35.4.1")