ufs_qcom_dou...apt_l0l1l2l3(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ufs_qcom_double_t_adapt_l0l1l2l3(9) β€” Kernel API Manual πŸ¦‹

okay so bestie, welcome to the ufs_qcom_dou...apt_l0l1l2l3(9) page πŸ’– this is a kernel API manual and honestly it's giving "niche M-PHY math but make it fashion." sit down, grab a strawberry drink πŸ“, and let's get into it.


✨ NAME ✨

ufs_qcom_double_t_adapt_l0l1l2l3 β€” literally makes a brand new adapt that doubles the adaptation duration TADAPT_L0_L1_L2_L3, and it derives that new one from the old adapt. no cap. 🫢


🌸 SYNOPSIS 🌸

u32 ufs_qcom_double_t_adapt_l0l1l2l3 (u32 old_adapt );

πŸŽ€ ARGUMENTS πŸŽ€

  • old_adapt β€” the original ADAPT_L0_L1_L2_L3 capability. this is the "before" picture, the starting point, the pre-glow-up era πŸ’…

πŸ”₯ DESCRIPTION πŸ”₯

so here's the ADAPT_length_L0_L1_L2_L3 formula straight from the M-PHY spec, and yes it's exactly this, don't @ me:

if (ADAPT_range_L0_L1_L2_L3 == COARSE) { ADAPT_length_L0_L1_L2_L3 = [0, 12]
ADAPT_L0_L1_L2_L3 = 215 x 2^ADAPT_length_L0_L1_L2_L3 } else if
(ADAPT_range_L0_L1_L2_L3 == FINE) { ADAPT_length_L0_L1_L2_L3 = [0, 127]
TADAPT_L0_L1_L2_L3 = 215 x (ADAPT_length_L0_L1_L2_L3 + 1) }

okay and now, to actually double the adaptation duration TADAPT_L0_L1_L2_L3, it's a two-step situation πŸ‘‘

  1. If the adapt range is COARSE (1'b1), new adapt = old adapt + 1. simple. iconic. no notes. ✨
  2. If the adapt range is FINE (1'b0), it splits into two vibes:
    • a) If the old adapt length is < 64, then (new adapt + 1) = 2 * (old adapt + 1). math is mathing πŸ’–
    • b) If the old adapt length is >= 64, set new adapt to 0x88 using COARSE range β€” because the new adapt you'd get from the equation in a) shall exceed 127 😭 so yeah, we pivot. main character pivot energy.

🌈 EXAMPLES 🌈

ADAPT_range_L0_L1_L2_L3 | ADAPT_length_L0_L1_L2_L3 | TADAPT_L0_L1_L2_L3
(PAM-4 UI) 0                       3                       131072 0
7                       262144 0                       63
2097152 0                       64                      2129920 0
127                     4194304 1                       8
8388608 1                       9                       16777216 1
10                      33554432 1                       11
67108864 1                       12                      134217728

(that's the table, verbatim, exactly as delivered β€” do not reformat, she's perfect as she is πŸŽ€)


⭐ RETURN ⭐

new adapt. that's it. that's the return. 🫑


πŸ’€ SEE ALSO πŸ’€

Kernel file ./drivers/ufs/host/ufs-qcom.c πŸ‘€

then the whole friend group:


aaaand that's the page!! 🧚 from ./drivers/ufs/host, dated October 2026, answering to the name ufs_qcom_dou...apt_l0l1l2l3(9). go double that adapt duration bestie, you got this πŸ’œπŸŒΈβœ¨

πŸ“¦ where this page comes from