# Configure device using UFS parameters

The device tree specifies the UFS host configuration parameters such as number of gears and lanes, rate value, and timeout values.

The device tree is at `<workspace_root_path>/boot_images/boot/Settings/Soc/Kodiak/Core/Storage/UFS/ufs.dtsi`.

For Dragonwing IQ-9075, see `<workspace_root_path>/boot_images/boot/Setting/soc/LeMans/Core/Storage/UFS/ufs.dtsi`.

The following table lists a sample UFS device tree node in UEFI.

| Device tree node/key | Subnode | Device tree value | Description |
| --- | --- | --- | --- |
| `init_speed_params` | `EnableHighSpeed` | 1 | Enables high speed mode |
| `init_speed_params` | `NumGears` | 4 | Specifies the maximum gear to be used |
| `init_speed_params` | `NumLanes` | 2 | Number of lanes used in UFS device |
| `init_speed_params` | `Rate` | 2 | Values are:<br><br><ul class="simple"><br><li><p>1 = Rate A</p></li><br><li><p>2 = Rate B</p></li><br></ul> |
| `perf_speed_params` | `EnableHighSpeed` | 1 | Enables high speed mode while in perf mode |
| `perf_speed_params` | `NumGears` | 4 | Specifies the maximum gear to be used in perf mode |
| `perf_speed_params` | `NumLanes` | 2 | Number of lanes used in UFS device in perf mode |
| `perf_speed_params` | `Rate` | 2 | Series in perf mode<br>- 1 = Rate A<br>- 2 = Rate B |
| `timeout_values` | `fDeviceInitTimeoutUs` | 2500000 | Denotes timeout (µs) during device init |
| `timeout_values` | `UTRDPollTimeoutUs` | 30000000 | Denotes timeout (µs) for UTRD |
| `BatteryThresholdMv` | – | 3600 | Battery threshold (in mV) to move to Gear1 |
| `LinkStartupRetryCount` | – | 5 | Retry count for Link startup |
| `FUA_Value` | – | 1 | Forced unit access |
| `EnableLogging` | – | 0 | Enables DT serial debug logging in loader<br>- 1 - Enable<br>- 0 - Disable |
| `RefClock` | – | 19200000 | UFS device controller reference clock 19.2 MHz |
| `MphyInitTable` | – | – | Denotes `MphyInit` table |
| `MphyInitEndTable` | – | – | Denotes `MphyInitEnd` table |
| `MphyLaneInitTable` | – | – | Denotes `Mphy` 2-lane Init table |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |

Compile all changes in the `.dtsi` to `xbl_config.elf` and reflash the image to the device.

Qualcomm^®^ tunes the values of the `MphyInitTable`, `MphyInitEndTable`, and `MphyLaneInitTable` configurations for UFS device PHY initialization. For debugging and tuning any PHY-level issue, change these configuration values only with guidance from Qualcomm.

The default values are for UFS device 3.1-compliant part. For UFS device 2.x-compliant part, `NumGears` value should be 3. Don’t change other parameters for the UFS device 2.x part.

# Configure device using SD card parameters

The device tree specifies the SD card parameters such as drive strength, maximum speed mode, and HSR settings. The device tree is at `<workspace_root_path>/boot_images/boot/Settings/Soc/Kodiak/Core/Storage/SDCC/sdcc.dtsi`.

The following is an example of the SD card device tree node in UEFI.

| Device tree node/key | Device tree value | Description |
| --- | --- | --- |
| `DriveStrength` | 0x1FE4 | `DriveStrength` as recommended, sets SDC CLK, CMD, and data drive strengths to 7, 4, 4, respectively. |
| `MaxSpeedMode` | `SDCC_SDR104_MODE` | Defines maximum speed mode. For SD card, the value is `SDCC_SDR104_MODE`. |

Last Published: Jun 27, 2025

[Previous Topic
Modify SD card power management states](https://docs.qualcomm.com/bundle/publicresource/80-70020-6/topics/power-management-states.md) [Next Topic
Configure UFS Linux kernel device tree](https://docs.qualcomm.com/bundle/publicresource/80-70020-6/topics/linux-device-tree.md)

Source: [https://docs.qualcomm.com/doc/80-70020-6/topic/bootloader-uefi-device-tree.html](https://docs.qualcomm.com/doc/80-70020-6/topic/bootloader-uefi-device-tree.html)