GPIO access on Aquila carrier board

Hello,

I was looking to control the gpio_12_csi_1 to interface camera on aquila carrier board, it doesn’t seem to change the state of pin. Is there anything I am missing to configure the gpio?

Regards,

Himanshu

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


GPIO Configuration on Aquila Carrier Board

Hello Himanshu,

I’d be glad to help with configuring GPIO_12_CSI_1 on your Aquila carrier board! To provide the most accurate guidance, could you let me know:

  • Which SoM are you using with the Aquila carrier board? (e.g., Aquila AM69)
  • Which OS and version are you running? (e.g., Torizon OS 7.2.0, Yocto BSP 6.x)

You can get this information by running the tdx-info command on your device. For more details, see: Getting Device Information with Tdx-Info | Toradex Developer Center

Initial Analysis

Based on the Aquila Carrier Board Design Guide, GPIO_12_CSI_1 is described as “Reserved general-purpose IO for MIPI CSI_1 interface” and operates at 1.8V CMOS logic level (1)(2). This pin is specifically reserved for camera interface functionality.

Likely Configuration Requirements

For GPIO pins that are multiplexed with other functions (like CSI camera interfaces), you typically need to:

  1. Create a device tree overlay to configure the pin multiplexing from CSI function to GPIO function (3)
  2. Disable any conflicting camera/CSI interfaces that might be using the pin (3)
  3. Apply the overlay using TorizonCore Builder or direct overlay configuration (4)

Once you provide your platform details, I can give you specific device tree overlay examples and pin configuration steps for your exact hardware setup.

Common platforms include:

  • Hardware: Aquila AM69, Verdin i.MX8M Plus, Verdin AM62
  • OS: Torizon OS 6.x, Torizon OS 7.x, Yocto BSP 6.x, BSP 7.x

Best regards,
Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

torizon@aquila-am69-12594705:~$ sudo tdx-info

Software summary

Bootloader: U-Boot

Kernel version: 6.6.129-7.6.0 #1-Torizon SMP PREEMPT Tue Mar 31 11:40:26 UTC 2026
Distro name: NAME=“Torizon OS”
Distro version: VERSION_ID=7.6.0-build.36
Distro variant: VARIANT=“Docker”

Hardware info

HW model: Toradex Aquila AM69 on Aquila Development Board

Toradex version: 0211 V1.1A
Processor arch: aarch64

Perfect! Now I can provide specific guidance for your Aquila AM69 setup running Torizon OS 7.6.0.

GPIO Configuration for Aquila AM69

For GPIO_12_CSI_1 on the Aquila AM69, you’ll need to create a device tree overlay to properly configure the pin multiplexing from its default CSI camera function to GPIO mode.

Step 1: Create Device Tree Overlay

Create a device tree overlay file (e.g., aquila-am69_gpio12_overlay.dts) to configure GPIO_12_CSI_1:

/dts-v1/;
/plugin/;

/ {
    compatible = "toradex,aquila-am69";

    fragment@0 {
        target = <&main_pmx0>;
        __overlay__ {
            gpio12_pins: gpio12-pins {
                pinctrl-single,pins = <
                    /* Configure GPIO_12_CSI_1 as GPIO */
                    /* You'll need to check the exact pin configuration */
                >;
            };
        };
    };

    fragment@1 {
        target = <&main_gpio0>; /* Adjust based on actual GPIO bank */
        __overlay__ {
            pinctrl-names = "default";
            pinctrl-0 = <&gpio12_pins>;
            
            gpio12_hog: gpio12-hog {
                gpio-hog;
                gpios = <12 0>; /* Adjust GPIO number and flags */
                output-low; /* or output-high */
                line-name = "GPIO_12_CSI_1";
            };
        };
    };
};

Step 2: Apply the Overlay Using TorizonCore Builder

First, clone the device tree repository for your Torizon version(1):

$ git clone -b toradex_ti-linux-6.6.y git://git.toradex.com/linux-toradex.git linux
$ git clone -b toradex_ti-linux-6.6.y git://git.toradex.com/device-tree-overlays.git device-trees

Then apply the overlay using TorizonCore Builder(1):

$ torizoncore-builder dto deploy --remote-host <your-ip> --remote-username torizon --remote-password torizon --force --reboot aquila-am69_gpio12_overlay.dts

Step 3: Verify GPIO Configuration

After reboot, check if the overlay was applied successfully(1):

# ls /proc/device-tree/chosen/overlays/
# cat /proc/device-tree/chosen/overlays/aquila-am69_gpio12_overlay.dtbo

If the value is 0, the overlay was applied successfully(1).

Important Notes

  1. Pin Multiplexing: GPIO_12_CSI_1 is likely multiplexed with camera functionality, so you may need to disable any CSI camera overlays that might conflict(1).

  2. Exact Pin Configuration: You’ll need to verify the exact pin control settings and GPIO bank/number for GPIO_12_CSI_1 in the AM69 documentation.

  3. Recovery Option: If the overlay breaks boot, you can disable overlays in U-Boot by setting skip_fdt_overlays=1(1).

Alternative Quick Test Method

For quick prototyping, you can also modify the overlays.txt file directly on the device(1), but this approach is only recommended for evaluation purposes.

The key is ensuring proper pin multiplexing configuration in your device tree overlay to switch the pin from its default CSI function to GPIO mode.

Best regards,
Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

For below overlay file, I get below result

torizon@aquila-am69-:~$ sudo cat /sys/kernel/debug/gpio | grep 657
Password:
gpio-657 (AQUILA_B19 |regulator-camera-csi) out lo ACTIVE LOW
torizon@aquila-am69-:~$ sudo cat /sys/kernel/debug/regulator/regulator_summary | grep V_CSI
V_CSI 1 0 0 unknown 0mV 0mA 0mV 0mV

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include “k3-pinctrl.h”

/ {
compatible = “toradex,aquila-am69”;

fragment@0 {
    target = <&main_pmx0>;

    __overlay__ {

        pinctrl_gpio_12_csi_1: gpio-12-csi-1-pins {
            pinctrl-single,pins = <
                J784S4_IOPAD(0x0c0, PIN_OUTPUT, 7)
            >;
        };
    };
};

fragment@1 {
    target-path = "/";

    __overlay__ {

        regulator_camera_csi_1: regulator-camera-csi-1 {
            compatible = "regulator-fixed";

            regulator-name = "V_CSI";

            pinctrl-names = "default";
            pinctrl-0 = <&pinctrl_gpio_12_csi_1>;

            gpio = <&main_gpio0 48 GPIO_ACTIVE_LOW>;

            startup-delay-us = <5000>;

            regulator-boot-on;
            regulator-always-on;
        };
    };
};

}; What is going wrong?

@hdevi
After your exchange with Toradex AI, you provided more useful information that should help us investigate and resolve the issue.

Let me summarize what we know so far:

  • You are using an Aquila AM69 Octa 32GB IT V1.1A module with the Aquila Development Board. Unfortunately, you did not share the revision of the Development Board, which may be important for the investigation.
  • You are running Torizon OS v7.6.0.
  • You are trying to change the state of gpio_12_csi_1, which is routed to the Aquila X1 B19 pin and is available on the Development Board at the J6 header.

Could you please clarify the following?

  • How exactly did you try to change the pin state?
  • How did you verify the pin state?
  • Which Device Tree or Device Tree Overlay was applied?
    *Have you had a chance to familiarize yourself with this article?

Hi @hdevi ,

Just wanted to check in here on these questions.

Best,