Building customer UEFI

Hi,

I’m trying to bring up a Quectel 5G module RM520N-GL(PCIE interface)

Quectel told us the problem we are facing could be a power sequence issue, and told us to try

to do it at the bootloader stage. Is there a way I can control the GPIO pin at bootloader stage?

Kevin

*** Please note that this reply is generated by LLM automatically ***

To address your question, we need to break down the process of bringing up a Quectel 5G module RM520NGL PCIe interface on a Jetson AGX Orin series system.

Firstly, let’s understand the PCIe interface on the Jetson AGX Orin series. The Orin module brings four PCIe interfaces to the module pins for up to seven total lanes (1 x4 + 1 x1 + 1x2) for use on the carrier board. The PCIe x4 interface (PCIE0) operates up to Gen4 speed and supports both Root Port and Endpoint operation.

To control the GPIO pin at the bootloader stage, you can modify the jetson-agx-orin-devkit.conf file in the extracted Jetson Linux release directory. However, this is typically used for configuring the PCIe interface as an Endpoint.

For power sequence issues, you may need to modify the power and reset sequence in the bootloader. The Bring-up Hardware Validation table lists the power and reset sequence and power rail check as one of the validation steps. However, the provided context does not provide detailed information on how to modify the power sequence.

To modify the power sequence, you may need to modify the MB1/MB2 BCT .cfg file, which is checked for pinmux, PMIC, and SDRAM in the Boot Validation table. However, the provided context does not provide detailed information on how to modify the power sequence using the MB1/MB2 BCT .cfg file.

In summary, to control the GPIO pin at the bootloader stage, you can modify the jetson-agx-orin-devkit.conf file. However, for power sequence issues, you may need to modify the MB1/MB2 BCT .cfg file or the power and reset sequence in the bootloader. The provided context does not provide detailed information on how to modify the power sequence.

Here are the steps you can try:

  1. Modify the jetson-agx-orin-devkit.conf file to control the GPIO pin at the bootloader stage.
  2. Check the MB1/MB2 BCT .cfg file for pinmux, PMIC, and SDRAM configuration.
  3. Modify the power and reset sequence in the bootloader to address power sequence issues.

Note: The provided context does not provide detailed information on how to modify the power sequence. You may need to refer to the Jetson AGX Orin series documentation or contact NVIDIA support for more information.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Hi

I know that I can modify the pinmux cfg to change the default state of GPIO, but what

I need here is to set low than high at bootloader stage

Kevin

Hi kevintseng83,

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

You need to write custom driver for this use case.
Maybe you can refer to the following thread first.
AGX xavier with Jetpack 5.1.1:How do I get GPIO status in UEFI? - #8 by KevinFFF

Hi

I’m using custom board

JetPack version 6.2 36.4.3

I’m trying to build my custom uefi following

edk2-nvidia/Platform/NVIDIA/Tegra/build.sh --init-defconfig edk2-nvidia/Platform/NVIDIA/Tegra/DefConfigs/t26x_general.defconfig

but which deconfig should I used.

nvidia-uefi/edk2-nvidia/Platform/NVIDIA/Tegra/DefConfigs# ls
t23x_android.defconfig  t23x_general_igx.defconfig  t23x_simple_emmc.defconfig  t24x_datacenter.defconfig  t26x_general.defconfig      t26x_minimal.defconfig      t26x_simple_ufs.defconfig
t23x_general.defconfig  t23x_minimal.defconfig      t23x_simple_pcie.defconfig  t26x_android.defconfig     t26x_general_igx.defconfig  t26x_simple_pcie.defconfig

I have try t23x_general.defconfig, t26x_general.defconfig

I’m replacing uefi_jetson.bin under bootloader directory

Thanks

Kevin

Please simply run the following command to build UEFI instead and note that Orin is T234 series rather than T264(which is for Thor).


$ edk2_docker edk2-nvidia/Platform/NVIDIA/Jetson/build.sh 

Hi

But there is no Jetson directory under

nvidia-uefi/edk2-nvidia/Platform/NVIDIA# ls
DeviceTree               iasl_ext_dep.yaml  L4TLauncher            NVIDIA.common.fdf      NVIDIA.fvmain.fdf.inc  StandaloneMm.common.dsc.inc     StandaloneMmJetson           Tegra
edk2-acpica-iasl_extdep  Kconfig            NVIDIA.common.dsc      NVIDIA.common.fdf.inc  NVIDIA.global.dsc.inc  StandaloneMmFfa.common.dsc.inc  StandaloneMm.legacy.dsc.inc  TegraVirt
HostBasedTests           KconfigIncludes    NVIDIA.common.dsc.inc  NVIDIA.defconfig       StandaloneMm           StandaloneMmFfa.common.fdf.inc  StandaloneMmOptee

or should I use StandaloneMmJetson

Okay, you may run the example command w/o any modification so that you synced the wrong source for r36.4.3.

Please run the following command to sync the source instead.

$ edk2_docker edkrepo clone nvidia-uefi-r36.4.3 NVIDIA-Platforms r36.4.3

Hi

I have tried the r36.4.3 source and UEFI build works fine

But when I try to add some debug log inside UEFI((I’m using uefi_Jetson_DEBUG.bin)) and flash to device using

sudo ./flash.sh -k A_cpu-bootloader jetson-agx-orin-devkit mmcblk0p1

the first cold boot after flashing, the log message show.

But if I reset the system , the debug log will be gone, do you know why this happened?

Thanks

Kevin

Hi,

After simply using

sudo ./flash.sh jetson-agx-orin-devkit internal

UEFI can be load properly

the problem I’m facing here is I add gpio set in code

  DEBUG ((DEBUG_ERROR, "Set GPIO 33 11111111111111\r\n"));
  
  EMBEDDED_GPIO             *mGpioProtocol;
  EMBEDDED_GPIO_PIN gpio33 = GPIO(0xF1, 33);
  Status = gBS->LocateProtocol (
                &gEmbeddedGpioProtocolGuid,
                NULL,
                (VOID **)&mGpioProtocol
                );
  if (EFI_ERROR(Status)) {
    DEBUG ((DEBUG_ERROR, "Locate GPIO protocol failed: %r\n", Status));
    return Status;
  }
  //DEBUG ((DEBUG_ERROR, "Set GPIO 33 low 22222222222222\r\n"));
  //Status = mGpioProtocol->Set(mGpioProtocol, gpio33, GPIO_MODE_OUTPUT_0) ;  

  //gBS->Stall(3000 * 1000);  
  DEBUG ((DEBUG_ERROR, "Set GPIO 33 high 333333333333333\r\n"));
  Status = mGpioProtocol->Set(mGpioProtocol, gpio33, GPIO_MODE_OUTPUT_1) ;

but after flashing to device(the log all show), the state of gpio33 still show incorrect(I use Multimeter to check), am I doing right here?

I’m trying to set pin PF.04

and the 0XF1 I’m using in MACRO will be the phandle of gpio@2200000

Kevin

There are A/B slots for bootloader, please confirm if you booted from slot-B in second boot.

Could you use oscilloscope instead to check if there’s any pulse?

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