Uefi can get gpio status error

we want to get the gpio status in uefi for boot order change ,according the other topic ,i can see the MAIN GPIO controller status(phandle = 0xe3 ,but not AON GPIO controller status(phandle=0xf6).when i print after ControllerIndex is =12 GpioIndex=0! @@@ gpio=E30060 ,uefi can not boot up normally.

Hi wpceswpces,

Are you using the devkit or custom board for AGX Orin?
What’s your Jetpack version in use?

Could you elaborate your use case?

Please also share the full device tree for further check.

Hi,KevinFFF,we are use our custom board for test . Jetpack version is 6.0(r36.3),and we want to select the boot device by the gpio ,Here is my device tree,another question i want to know is why the pin number in the document is continuous,but what i print is discontinuous.



i try the GpioUtil.efi in uefi shell ,it beak as well . here is the log

shell.txt (18.4 KB)



when display e30060 /e30088/e30089,it broken.

i have try some gpio and find the pin which i want but it’s id not as i think before.

The GPIO ID is a 4 Bytes number out of which higher 2 bytes are phandle of gpio controller and lower 2 bytes are gpio number for that controller.
It should be as the following macro, and you could refer to tegra234-gpio.h for port.

#define GPIO(Port, Pin)  ((EMBEDDED_GPIO_PIN)(((Port) << (16)) | (Pin)))

这个头文件可以对上 ,port *8+offset,感谢。

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