How to unbind/bind /dev/spidev0.1 on xavier AGX?

how to unbind/bind /dev/spidev0.1 on xavier AGX?

and how to control gpio pin hi/low during early boot up phase ,before driver load?
I need to reset device chip firstly.

Sorry for the late response, have you managed to get issue resolved or still need the support? Thanks

yes,I still have the problem need to support.

You can try adjust your driver load order by “late_initcall()” instead of module_init() and define the GPIO by device tree for it.

Don’t understand what your mean for “nbind/bind /dev/spidev0.1”

WE use TPM on SPI 1 ,and TPM init need reset# signal before load SPI or TPM driver.
originally,We use GPIO04 for TPM reset .and in Jetpack 4.6.0 .it works well.
We can see GPIO04 have a low pulse during system boot up. and enter OS ,the TPM can work
but in Jetpack 5.0.2 .the GPIO04 signal always keep Hi.
So we want to know how to control it like as jetpack4.6.0 to get low pluse during boot up.
or before load SPI or TPM driver we need to send a low pulse to TPM by gpio04.

  1. Check the PINs in …/Linux_for_Tegra/bootloader/t186ref/BCT/tegra19x-mb1-pinmux-p2888-0000-p2822-0000-*.cfg and modify it low and reflash the device to verify.

  2. Add the PIN in your kernel device tree like below to try.

        gpio@2200000 {
                camera-control-output-low {
                        gpio-hog;
                        output-low;
                        gpios = <CAM0_RST_L 0 CAM0_PWDN 0>;
                        label = "cam0-rst", "cam0-pwdn";
                };
        };

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.