Cannot simultaneously use IMX477-camera and PWM at 33 pin on Jetson Nano

1.Which seller did you purchase the product(s) from?
Arducam distributors
2.The Model number of the product(s) you have purchased?
IMX477 motor focused (https://www.arducam.com/product/arducam-12mp-imx477-motorized-focus-high-quality-camera-for-raspberry-pi/)
3.Which Platform are you using the product(s) on?
Jetson Nano B01
4.Which instruction are you following?
Installed driver via this tutorial: https://www.arducam.com/docs/camera-for-jetson-nano/native-jetson-cameras-imx219-imx477/imx477-how-to-install-the-driver/
5.Has your product ever worked properly?
Camera IMX477 works properly with installed driver
6.What problems are you experiencing?
I can’t simultaneously use the IMX477 camera and the hardware PWM on pin 33 on the Jetson Nano.

Infinity cycle:
When I install the driver dor IMX477 using the instructions (https://www.arducam.com/docs/camera-for-jetson-nano/native-jetson-cameras-imx219-imx477/imx477-how-to-install-the-driver/), the device-tree is updated and the FDT field appears in the /boot/extlinux/extlinux.conf, i. e. DT-file is tegra210-p3448-0000-p3449-0000-b00-imx477.dtb. In this case, the camera works.

However, if I activate the hardware PWM on the 33 pin Jetson Nano using jetson-io.py, the device-tree is updated again and the lines appear in /boot/extlinux/extlinux.conf:
LABEL JetsonIO
MENU LABEL Custom 40-pin Header Config
LINUX /boot/arducam/Image
FDT /boot/kernel_tegra210-p3448-0000-p3449-0000-b00-user-custom.dtb
INITRD /boot/initrd
APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0

I need to use the camera and the PWM at the same time. What can I do? Thank you.
7.What attempts at troubleshooting have you already made?

8.How would you like us to help you?
Steps, what should I change in tegra210-p3448-0000-p3449-0000-b00-imx477.dts file (so I need this file too) to enable PWM on 33 pin in tegra210-p3448-0000-p3449-0000-b00-imx477.dtb

Hi @Andrey

Can you tell me the L4T version you are using?
You can use the cat /etc/nv_tegra_release command to view.

If you are using L4T32.6.1, you can use /opt/arducam/jetson-io/jetson-io.py to set GPIO.

If you are using a version prior to L4T32.6.1, then you can try to move the dtb file in the /boot/dtb/ directory to another directory to make a backup, then copy /boot/arducam/tegra210-p3448-0000-p3449-0000-b00-imx477.dtb to /boot/dtb, and then run jetson- io.

Hello! Thank you for your answer.

My L4T version is 32.5.1:
$ cat /etc/nv_tegra_release

R32 (release), REVISION: 5.1, GCID: 26202423, BOARD: t210ref, EABI: aarch64, DATE: Fri Feb 19 16:45:52 UTC 2021

I have jetson-io.py only in /opt/nvidia/jetson-io/ folder and don’t have /opt/arducam/ folder. Does it present only for L4T32.6.1 and newer or you meant /opt/nvidia folder?

I think I got your idea: .dtb file in /boot/dtb it is the base device tree file for Jetson Nano and jetson-io.py uses this file as a base and changes it in order to configure 40-pin-header. If I make back-up of /boot/dtb/kernel_tegra210-p3448-0000-p3449-0000-b00.dtb file and replace boot/dtb/kernel_tegra210-p3448-0000-p3449-0000-b00.dtb with device tree from Arducam for imx477, then jetson-io.py will make changes to this file and make possible to use <imx477 device tree> + <changes for PWM usage>. Am I right?

Thank you. I will try it later and report. However, in future we may need to construct our own .dts file for Jetson Nano. So is it real to get tegra210-p3448-0000-p3449-0000-b00-imx477.dts file in order to view changes and merge it with our own one?

Hi @Andrey

I have jetson-io.py only in /opt/nvidia/jetson-io/ folder and don’t have /opt/arducam/ folder. Does it present only for L4T32.6.1 and newer or you meant /opt/nvidia folder?
Yes, /opt/arducam was added in L4T-R32.6.1.
I think I got your idea: .dtb file in /boot/dtb it is the base device tree file for Jetson Nano and jetson-io.py uses this file as a base and changes it in order to configure 40-pin-header. If I make back-up of /boot/dtb/kernel_tegra210-p3448-0000-p3449-0000-b00.dtb file and replace boot/dtb/kernel_tegra210-p3448-0000-p3449-0000-b00.dtb with device tree from Arducam for imx477, then jetson-io.py will make changes to this file and make possible to use <imx477 device tree> + <changes for PWM usage>. Am I right?
you are right.
Thank you. I will try it later and report. However, in future we may need to construct our own .dts file for Jetson Nano. So is it real to get tegra210-p3448-0000-p3449-0000-b00-imx477.dts file in order to view changes and merge it with our own one?
You can contact [email protected] or leave your email here, I will send the kernel patch to you.