Pin 56 unable to use

  • I have enabled pin 56 in A9X as a gpio pin and attempts to set it as output.

    root@hub:/sys/class/gpio# echo 118 > export

    sh: write error: Device or resource busy

    Despite my best attempts, I seem to be unable to use this as a gpio pin.

    I checked the GPIO reference sheet and it mentions on this specific pin:

    "On efusA9x, if camera uses 10 bit resolution (pins 161-163), SPI_B (pins 54-56) can not be used. This is a hardware option"

    We are currently not using pins 161-163, but I can't find a location in the imx6sx-pinfunc.h that references these 2 pins?

    How do I make sure these 2 pins are disabled as default, so I can use pins 54 and 56 freely?

  • The main reason for the busy error to appear is that in the default device tree, we enable SPI_B which claims the gpio pin. In the device tree under arm/boot/dts/efusa9x.dts you will need to make sure CONFIG_EFUSA9X_SPI_B and CONFIG_EFUSA9X_PARALLEL_CAMERA commented out, because they are both using the pin. After that the IOMUX setting is still missing, so you need to add "MX6SX_PAD_QSPI1A_SS0_B__GPIO4_IO_22 0x1b0b0" to the list of "pinctrl_hog: hoggrp".

    Your F&S Support Team