Problem with GPIO pins configuration on TK1 under L4T

Hello Support!

After almost a week of struggling we would like to ask your help with the following problem:

Environment:

  • Apalis TK1
  • running L4T image Tezi_21.7-2.8b6. This is a old ubuntu 14.04 taken from your website.
    -BSP 2.8
    Ubuntu GNOME Desktop Environment Based on NVIDIA L4T
    We require this specific OS because we need LVDS support on TK1
  • Custom board with custom GPIO pinout

Problem: while attempting to configure custom GPIO pins faced the misunderstanding / lack of documentation for specific task.

What was done:

  1. Understand that old L4T under BSP 2.8 does not support #gpiod to control pins we had to choose sysfs as the only option available. Obviously that pins which we need on TK1 are not configured by default so we need to perform device tree configuration.
  2. Environment for uBoot and Kernel compilation successfully set followed by your article.
  3. Device tree .dtb file: tegra124-apalis-v1.2-eval.dtb compiled with required for our custom GPIO settings.
  4. While attempting to get this file to TK1 board we found that in /boot folder of TK1 board there are many .dtb files already but no one of them has a name tegra124-apalis-v1.2-eval.dtb
    Understand that this is probably because this TK1 board is configured for different carrier board.
    So the problem is: How to figure which of .dtb is used on TK1 at boot ?
    There is no set env or getenv command in TK1 L4T Linux. There is however busybox where env command is available. However when pooling env from TK1 we unable to see the reference to carrier board type and .dtb name which is in use.

Please explain as for dummies How to find out which .dtb is in use by TK1 at boot? How to see this particular setting, where to see it, how to change it ? Step by step please.

I understand that I likely can try to manually recompile other .dtb files and try to find the correct one to use but this is nor a right aproach.

The .dtb files which we have in our /boot folder are: (keep in mind that we are under BSP 2.8 with old ubuntu)

extlinux
tegra124-jetson_tk1-pm375-000-c00-00.dtb
tegra124-tn8-e1780-1100-a03-01-battery.dtb
tegra124-ardbeg-a03-00.dtb
tegra124-jetson_tk1-pm375-000-c00-00.old
tegra124-tn8-e1780-1100-a03-01.dtb
tegra124-ardbeg.dtb
tegra124-laguna.dtb
tegra124-tn8-e1780-1100-a03-battery.dtb
tegra124-ardbeg-e1780-1000-a00-00-battery.dtb
tegra124-laguna-pm358.dtb
tegra124-tn8-e1780-1100-a03.dtb
tegra124-ardbeg-e1780-1000-a00-00.dtb
tegra124-loki-02-cell-battery.dtb
tegra124-tn8-e1784-1100-a00.dtb
tegra124-ardbeg-e1780-1000-a00-01.dtb
tegra124-loki-03-cell-battery.dtb
tegra124-tn8-e1784-1101-a00-battery.dtb
tegra124-ardbeg-e1780-1000-a03-00-battery.dtb
tegra124-loki.dtb
tegra124-tn8-e1784-1101-a00.dtb
tegra124-ardbeg-e1780-1000-a03-00.dtb
tegra124-loki-e2530-a01.dtb
tegra124-tn8-e1922-1100-a00.dtb
tegra124-ardbeg-e1780-1000-a03-00-powerconfig.dtb
tegra124-loki-e2530-a03.dtb
tegra124-tn8-p1761-1270-a00-battery.dtb
tegra124-ardbeg-e1780-1000-a03-00-sata.dtb
tegra124-loki-e2548-a00.dtb
tegra124-tn8-p1761-1270-a00.dtb
tegra124-ardbeg-e1780-1000-a03-01.dtb
tegra124-loki-mods.dtb
tegra124-tn8-p1761-1270-a02-battery.dtb
tegra124-ardbeg-e1792-1100-a00-00.dtb
tegra124-loki-thor195-e2549-a00.dtb
tegra124-tn8-p1761-1270-a02.dtb
tegra124-ardbeg-e1792-1100-a00-01.dtb
tegra124-norrin.dtb
tegra124-tn8-p1761-1270-a03-battery.dtb
tegra124-ardbeg-vcm30-t124.dtb
tegra124-norrin-pm374-0001-a00-00.dtb
tegra124-tn8-p1761-1270-a03.dtb
tegra124-bonaire.dtb
tegra124-norrin-pm374-0001-a01-00.dtb
tegra124-tn8-p1761-1470-a00-battery.dtb
tegra124-bonaire_sim.dtb
tegra124-p2360.dtb
tegra124-tn8-p1761-1470-a00.dtb
tegra124-e1782_sku1100.dtb
tegra124-thor195.dtb
tegra124-vcm30_t124.dtb
tegra124-e1791.dtb
tegra124-tn8-e1780-1100-a02-01.dtb
zImage
tegra124-e1923.dtb
tegra124-tn8-e1780-1100-a02-battery.dtb
tegra124-foster.dtb

Thank you !

I did check Apalis TK1 (2.8.7 | 2020-06-10 | 155.75 MB) image and found only 2 DTB files inside of Apalis-TK1_LXDE-Image.bootfs.tar.xz archive - tegra124-apalis-eval.dtb and tegra124-apalis-v1.2-eval.dtb
Could you please provide a link to OS image file you are using?

DTB files BLOB passed by U_boot t0 linux kernel during boot . Plese check u_Boot environment variables :

emmcdtbload=setenv dtbparam; load mmc 0:1 ${fdt_addr_r} ${soc}-${fdt_module}-${fdt_board}.dtb && setenv dtbparam ${fdt_addr_r}
soc=tegra124
fdt_module=apalis-v1.2
fdt_board=eval

Alex,
Thank you! I think I figured about the dtb files for TK1 so far. Board has these two files under /media/BOOT. I was able to successfully configure pins and it works so far.

I appreciate if you can take a look in to my other thread here about the problem with sysfs control of GPIO pins routed as GPIO via K20 chip in TK1. I am unable to read state of any GPIO pin which is connected via K20. Firmware inside of K20 is correct, CAN bus works well.
Thank you!