.. _SD.Bootloader.UphyLaneConfig:

.. include:: /content/swdocs.rsts

.. spelling::
   pad
   init
   DTS
   sdmmc
   SDMMC
   hv
   eqos
   io
   ao
   ufs
   qspi
   DTSI
   SoC
   PMC
   IMPL
   bct
   GPIO
   pinmux
   dtsi
   pinctrl
   lpdr
   tristate
   ps
   PADCTL
   i2c
   I2C
   DRAM
   FPS
   PWM
   MMIO
   PMIC
   Vout
   SOC
   Hz
   pwm
   mmio
   pad
   prod
   QSPI
   DDR
   ddr
   SDR
   sdr
   BootROM
   val
   qspiflash
   sata
   BPMP
   FW
   UPHY
   uphy
   hsio
   nvhs
   pll

UPHY Lane Configuration
!!!!!!!!!!!!!!!!!!!!!!!

UPHY lanes can be configured to be owned by various IPs such as XUSB, NVME, MPHY, PCIE, NVLINK, and so on. MB1 supports NVME and UFS as boot devices for the UPHY lanes that need to be configured to access the storage in MB1 and MB2. This configuration file defines the UPHY lane configurations that are needed for MB1.

.. note::
   In T23x, BPMP-FW is loaded by MB1 and MB2 relies on BPMP-FW for UPHY configuration.

Each entry in the configuration file is in the following form: 

.. code-block:: none

   / {
      uphy-lane {
         <instance-type {
             lane-owner-map = < <id> <owner-id> >,
                              < <id> <owner-id> >;
         };
      };
  };


where:

- ``<instance-type>`` is the type of UPHY that needs to be configured, and it can be hsio or nvhs.
- ``<uphy-component>`` is ``lane`` or ``pll`` that needs to be configured.
- ``<id>`` is the lane/pll number that needs to be configured.
- ``<owner-id>`` is the unique ID of the owner to which lane/pll will be assigned.

The UPHY lane configurations are in the ``hardware/nvidia/platform/t23x/<platform>/bct/`` directory.

Here is the new DTS example UPHY lane DTS configuration file: 

.. code-block:: none

   /dts-v1/;

   / {
      uphy-lane {
         hsio  {
              lane-owner-map = <10 2>,
                               <11 1>;
         };
      };
   };

Here is the previous CFG file format:

.. code-block:: none

   //UPHY
   uphy-lane.major = 1;
   uphy-lane.minor = 0;
   uphy-lane.hsio.lane.10 = 2; 
   uphy-lane.hsio.lane.11 = 1;