# Bootloader/UEFI 设备树

Source: [https://docs.qualcomm.com/doc/80-70014-6Y/topic/bootloader_uefi_device_tree.html](https://docs.qualcomm.com/doc/80-70014-6Y/topic/bootloader_uefi_device_tree.html)

设备树指定了 UFS 主机配置参数，例如档位数、通道数、速率值、超时值等。

## UFS

设备树位于 &lt;workspace\_root\_path&gt;\boot\_images\boot\Settings\Soc\Kodiak\Core\Storage\UFS\ufs.dtsi。

下面将介绍 UEFI 中的 UFS 设备树节点。

| 设备树节点/键 | 子节点 | 设备树值 | 备注 |
| --- | --- | --- | --- |
| `init_speed_params` | `EnableHighSpeed` | 1 | 启用 HS 模式 |
| `init_speed_params` | `NumGears` | 4 | 待使用的最大档位。 |
| `init_speed_params` | `NumLanes` | 2 | UFS 中使用的通道数 |
| `init_speed_params` | `速率` | 2 | <ul class="ul"><br>                                    <li class="li">1 = 速率 A</li><br><br>                                    <li class="li">2 = 速率 B</li><br><br>                                </ul> |
| `perf_speed_params` | `EnableHighSpeed` | 1 | 在 perf 模式下启用 HS 模式 |
| `perf_speed_params` | `NumGears` | 4 | 在 perf 模式下使用的最大档位。 |
| `perf_speed_params` | `NumLanes` | 2 | 在 perf 模式下 UFS 使用的通道数 |
| `perf_speed_params` | `速率` | 2 | 在 perf 模式下的序列<ul class="ul"><br>                                    <li class="li">1 = 速率 A</li><br><br>                                    <li class="li">2 = 速率 B</li><br><br>                                </ul> |
| `timeout_values` | `fDeviceInitTimeoutUs` | 2500000 | 设备初始化期间的超时 (µs) |
| `timeout_values` | `UTRDPollTimeoutUs` | 30000000 | UTRD 超时 (µs) |
| `BatteryThresholdMv` |  | 3600 | 移至 1 档的电池阈值（单位为 mV） |
| `LinkStartupRetryCount` |  | 5 | 链路启动的重试计数 |
| `FUA_Value` |  | 1 | 强制单位访问 |
| `EnableLogging` |  | 0 | 在加载程序中启用 DT 串行调试日志<ul class="ul"><br>                                    <li class="li">1 - 启用</li><br><br>                                    <li class="li">0 - 禁用</li><br><br>                                </ul> |
| `RefClock` |  | 19200000 | UFS 控制器参考时钟 19.2 MHz |
| `MphyInitTable` |  |  | MphyInit 表 |
| `MphyInitEndTable` |  |  | `MphyInitEnd` 表 |
| `MphyLaneInitTable` |  |  | Mphy 2 通道初始化表 |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |

任何在 .dtsi 中的更改都应编译成 xbl\_config.elf 并将镜像重新刷写到设备上。

Note: `MphyInitTable`、`MphyInitEndTable` 和 `MphyLaneInitTable` 均用于 UFS phy 初始化，且这些值由 Qualcomm 调整。对于任何 phy 层问题的调试/调整，这些值应在 Qualcomm 团队的指导下进行更改。

Note: 默认值适用于 UFS 3.1 部分。对于 UFS 2.x 部分，`NumGears` 值应为 3。对于 UFS 2.x 部分，其他参数不需要更改。

**Parent Topic:** [配置](https://docs.qualcomm.com/doc/80-70014-6Y/topic/configuration.html)

Last Published: Aug 09, 2024

[Previous Topic
SD 卡电源管理状态](https://docs.qualcomm.com/bundle/publicresource/80-70014-6Y/topics/sd-card-power-management.md) [Next Topic
Linux 设备树](https://docs.qualcomm.com/bundle/publicresource/80-70014-6Y/topics/linux-device-tree.md)