Hi,
We would like to detect the middle of the three buttons.
And what’s the pin number should we fill in to the second parameter of “gpio_config(gpio_drv, cd_gpio->pin, GPIO_PINMODE_INPUT);” function ?
BR,
Patrick
Hi,
We would like to detect the middle of the three buttons.
And what’s the pin number should we fill in to the second parameter of “gpio_config(gpio_drv, cd_gpio->pin, GPIO_PINMODE_INPUT);” function ?
BR,
Patrick
hello boyi_liao,
suggest you refer to Jetson AGX Xavier OEM Product Design Guide, then you’ll able to check the details of FORCE_RECOVERY_N pin.
you might also access Jetson AGX Xavier Platform Adaptation and Bring-Up Guide, and check the [GPIO Changes] session for the steps to calculate the GPIO numbers.
thanks
Hi JerryChang:
Our question is can we read the status from software in cboot ?
thanks.
hello boyi_liao,
yes, you could read the pin status in cboot,
please access cboot sources via Jetson Download Center
for example,
<i>$l4t-r32.2/public_sources/cboot/bootloader/partner/common/drivers/gpio/tegrabl_gpio.c</i>
static tegrabl_error_t tegrabl_gpio_read(uint32_t gpio_num,
gpio_pin_state_t *state,
void *drv_data)
{...}
you may have modification to customize your cboot binary,
then you could update the cboot partition with the following commands,
thanks
$ sudo ./flash.sh -r -k cpu-bootloader jetson-xavier mmcblk0p1
Hi JerryChang:
I know we can use tegrabl_gpio_read function to read gpio, but according read the doc we stiil didn’t
know what’s the recovery button pin number.
BR,
Patrick
hello boyi_liao,
please download Jetson AGX Xavier Pinmux spreadsheet.
you should check the GPIO pin of the FORCE_RECOVERY_N pin, which is GPIO3_PG.00.
according to [GPIO Changes] session in Jetson AGX Xavier Platform Adaptation and Bring-Up Guide,
you’ll check the port index and also the offset as below.
port index:
<i>$l4t-r32.2/kernel_src/kernel/nvidia/include/dt-bindings/gpio/tegra194-gpio.h</i>
#define TEGRA194_MAIN_GPIO_PORT_G 6
offset:
nvidia@nvidia:~$ dmesg | grep tegra-gpio
[ 1.027424] gpiochip_setup_dev: registered GPIOs 288 to 511 on device: gpiochip0 (tegra-gpio)
[ 1.037438] gpiochip_setup_dev: registered GPIOs 248 to 287 on device: gpiochip1 (tegra-gpio-aon)
then, the calculation of GPIO3_PG.00 = (6*8+0)+288 = 336.
Hi JerryChange:
Thank your response, we still have some questions.
BR,
Patrick
hello boyi_liao,
there’s same GPIO pin number for your usage.
please check comment #6 about TEGRA194_MAIN_GPIO_PORT_G.
thanks