<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/ufs, branch next</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>ufs: qcom: Remove redundant POST_CHANGE clock setup call</title>
<updated>2026-05-18T09:04:14+00:00</updated>
<author>
<name>Balaji Selvanathan</name>
<email>balaji.selvanathan@oss.qualcomm.com</email>
</author>
<published>2026-04-27T09:26:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6d2bcb6398cf3b7caa9e80add7c49e28a1e9a6c6'/>
<id>6d2bcb6398cf3b7caa9e80add7c49e28a1e9a6c6</id>
<content type='text'>
The ufs_qcom_init() function was calling ufs_qcom_setup_clocks() with
POST_CHANGE twice. The first call after setting PA_TXHSADAPTTYPE
correctly enables the device reference clock. The second call after
ufs_qcom_advertise_quirks() is redundant as the clock is already
enabled.

Signed-off-by: Balaji Selvanathan &lt;balaji.selvanathan@oss.qualcomm.com&gt;
Reviewed-by: Sumit Garg &lt;sumit.garg@oss.qualcomm.com&gt;
Reviewed-by: Neha Malcom Francis &lt;n-francis@ti.com&gt;
Reviewed-by: Casey Connolly &lt;casey.connolly@linaro.org&gt;
Link: https://patch.msgid.link/20260427-ufs_clk-v2-7-36e10a7c0ef6@oss.qualcomm.com
Signed-off-by: Casey Connolly &lt;casey.connolly@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ufs_qcom_init() function was calling ufs_qcom_setup_clocks() with
POST_CHANGE twice. The first call after setting PA_TXHSADAPTTYPE
correctly enables the device reference clock. The second call after
ufs_qcom_advertise_quirks() is redundant as the clock is already
enabled.

Signed-off-by: Balaji Selvanathan &lt;balaji.selvanathan@oss.qualcomm.com&gt;
Reviewed-by: Sumit Garg &lt;sumit.garg@oss.qualcomm.com&gt;
Reviewed-by: Neha Malcom Francis &lt;n-francis@ti.com&gt;
Reviewed-by: Casey Connolly &lt;casey.connolly@linaro.org&gt;
Link: https://patch.msgid.link/20260427-ufs_clk-v2-7-36e10a7c0ef6@oss.qualcomm.com
Signed-off-by: Casey Connolly &lt;casey.connolly@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: ufs: qcom: Initialize and enable clocks before hardware access</title>
<updated>2026-05-18T09:04:14+00:00</updated>
<author>
<name>Balaji Selvanathan</name>
<email>balaji.selvanathan@oss.qualcomm.com</email>
</author>
<published>2026-04-27T09:26:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=83edbe9426a4f4b22d118c9b11d82dfb3cb472ee'/>
<id>83edbe9426a4f4b22d118c9b11d82dfb3cb472ee</id>
<content type='text'>
Move UFS clock initialization and enabling before hardware setup
to ensure clocks are running when accessing UFS registers.

Previously, U-Boot depended on earlier bootloader stages to
initialize UFS clocks. When these bootloaders failed to do so,
UFS registers became inaccessible, causing initialization to fail.
This change makes U-Boot initialize and enable UFS clocks early
in the init sequence, removing the dependency on previous
bootloaders.

Signed-off-by: Balaji Selvanathan &lt;balaji.selvanathan@oss.qualcomm.com&gt;
Reviewed-by: Sumit Garg &lt;sumit.garg@oss.qualcomm.com&gt;
Reviewed-by: Casey Connolly &lt;casey.connolly@linaro.org&gt;
Link: https://patch.msgid.link/20260427-ufs_clk-v2-6-36e10a7c0ef6@oss.qualcomm.com
Signed-off-by: Casey Connolly &lt;casey.connolly@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move UFS clock initialization and enabling before hardware setup
to ensure clocks are running when accessing UFS registers.

Previously, U-Boot depended on earlier bootloader stages to
initialize UFS clocks. When these bootloaders failed to do so,
UFS registers became inaccessible, causing initialization to fail.
This change makes U-Boot initialize and enable UFS clocks early
in the init sequence, removing the dependency on previous
bootloaders.

Signed-off-by: Balaji Selvanathan &lt;balaji.selvanathan@oss.qualcomm.com&gt;
Reviewed-by: Sumit Garg &lt;sumit.garg@oss.qualcomm.com&gt;
Reviewed-by: Casey Connolly &lt;casey.connolly@linaro.org&gt;
Link: https://patch.msgid.link/20260427-ufs_clk-v2-6-36e10a7c0ef6@oss.qualcomm.com
Signed-off-by: Casey Connolly &lt;casey.connolly@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ufs: rcar-gen5: Update line reset configuration</title>
<updated>2026-04-22T08:09:40+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2026-04-15T21:58:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1089ed95f54e43ddbbe19712b69d9ace374e572c'/>
<id>1089ed95f54e43ddbbe19712b69d9ace374e572c</id>
<content type='text'>
Synchronize line reset configuration with SDK 4.28 parameters.
These values are programmed into the PHY.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Link: https://patch.msgid.link/20260415215837.448867-1-marek.vasut+renesas@mailbox.org
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Synchronize line reset configuration with SDK 4.28 parameters.
These values are programmed into the PHY.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Link: https://patch.msgid.link/20260415215837.448867-1-marek.vasut+renesas@mailbox.org
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ufs: core: Fix heap corruption due to out of bounds write</title>
<updated>2026-04-22T08:06:01+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2026-03-29T23:11:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c7ebdb9871dfd6e170a6dfeee39be234c37a4b53'/>
<id>c7ebdb9871dfd6e170a6dfeee39be234c37a4b53</id>
<content type='text'>
The ufshcd_read_string_desc() can perform out of bounds write and
corrupt heap in case the input utf-16 string contains code points
which convert to anything more than plain 7-bit ASCII string.

This occurs because utf16_to_utf8(dst, src, size) in U-Boot behaves
differently than Linux utf16s_to_utf8s(..., maxlen), but the porting
process did not take that into consideration. The U-Boot variant of
the function converts up to $size utf-16 fixed-length 16-bit input
characters into as many 1..4 Byte long variable-length utf-8 output
characters. That means for 16 Byte input, the output can be up to 64
Bytes long. The Linux variant converts up utf-16 input into up to
$maxlen Bytes worth of utf-8 output, but stops at the $maxlen limit.
That means for 16 Byte input with maxlen=32, the processing will stop
after writing 32 output Bytes.

In case of U-Boot, use of utf16_to_utf8() leads to potential corruption
of data past the $size Bytes and therefore corruption of surrounding
content on the heap.

The fix is as simple, allocate buffer that is sufficient to fit the
utf-8 string. The rest of the code in ufshcd_read_string_desc() does
correctly limit the buffer to fit into the DMA descriptor afterward.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Link: https://patch.msgid.link/20260329231151.332108-1-marek.vasut+renesas@mailbox.org
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ufshcd_read_string_desc() can perform out of bounds write and
corrupt heap in case the input utf-16 string contains code points
which convert to anything more than plain 7-bit ASCII string.

This occurs because utf16_to_utf8(dst, src, size) in U-Boot behaves
differently than Linux utf16s_to_utf8s(..., maxlen), but the porting
process did not take that into consideration. The U-Boot variant of
the function converts up to $size utf-16 fixed-length 16-bit input
characters into as many 1..4 Byte long variable-length utf-8 output
characters. That means for 16 Byte input, the output can be up to 64
Bytes long. The Linux variant converts up utf-16 input into up to
$maxlen Bytes worth of utf-8 output, but stops at the $maxlen limit.
That means for 16 Byte input with maxlen=32, the processing will stop
after writing 32 output Bytes.

In case of U-Boot, use of utf16_to_utf8() leads to potential corruption
of data past the $size Bytes and therefore corruption of surrounding
content on the heap.

The fix is as simple, allocate buffer that is sufficient to fit the
utf-8 string. The rest of the code in ufshcd_read_string_desc() does
correctly limit the buffer to fit into the DMA descriptor afterward.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Link: https://patch.msgid.link/20260329231151.332108-1-marek.vasut+renesas@mailbox.org
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ufs: rockchip: Make use of controller resets</title>
<updated>2026-04-22T08:03:54+00:00</updated>
<author>
<name>Alexey Charkov</name>
<email>alchark@flipper.net</email>
</author>
<published>2026-03-16T16:50:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c7299ff33ebfabe35baa6656590d977dedfba5b0'/>
<id>c7299ff33ebfabe35baa6656590d977dedfba5b0</id>
<content type='text'>
Assert Rockchip UFS controller resets during initialization and HCE
enable, as it is done by the Linux driver.

This is required to make some UFS chips, such as Foresee FEUDNN064G-C2G0,
work properly.

Note that the resets were already requested in the probe function, just
not used.

Signed-off-by: Alexey Charkov &lt;alchark@flipper.net&gt;
Link: https://patch.msgid.link/20260316-rockchip-ufs-reset-v1-1-808eb017459a@flipper.net
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Assert Rockchip UFS controller resets during initialization and HCE
enable, as it is done by the Linux driver.

This is required to make some UFS chips, such as Foresee FEUDNN064G-C2G0,
work properly.

Note that the resets were already requested in the probe function, just
not used.

Signed-off-by: Alexey Charkov &lt;alchark@flipper.net&gt;
Link: https://patch.msgid.link/20260316-rockchip-ufs-reset-v1-1-808eb017459a@flipper.net
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ufs: mediatek: clean up zero terminator</title>
<updated>2026-04-17T22:05:54+00:00</updated>
<author>
<name>David Lechner</name>
<email>dlechner@baylibre.com</email>
</author>
<published>2026-03-30T20:42:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7a3b13460b651ee345635b43088e43c4070cf396'/>
<id>7a3b13460b651ee345635b43088e43c4070cf396</id>
<content type='text'>
Remove spurious blank line and trailing comma of the zero terminator at
the end of the devicetree compatible list.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Reviewed-by: Macpaul Lin &lt;macpaul.lin@mediatek.com&gt;
Link: https://patch.msgid.link/20260330-mtk-genio-720-ufs-v1-2-3bad8362ed70@baylibre.com
Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove spurious blank line and trailing comma of the zero terminator at
the end of the devicetree compatible list.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Reviewed-by: Macpaul Lin &lt;macpaul.lin@mediatek.com&gt;
Link: https://patch.msgid.link/20260330-mtk-genio-720-ufs-v1-2-3bad8362ed70@baylibre.com
Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ufs: ufs-mediatek: add mt8183-ufshci compatible</title>
<updated>2026-04-17T22:05:54+00:00</updated>
<author>
<name>David Lechner</name>
<email>dlechner@baylibre.com</email>
</author>
<published>2026-03-30T20:42:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6dbb7af1f423f71efa51fc434a6a8ed84cd90650'/>
<id>6dbb7af1f423f71efa51fc434a6a8ed84cd90650</id>
<content type='text'>
Add a new compatible match for mediatek,mt8183-ufshci.

This compatible is already defined in upstream devicetree bindings.

Link: https://patch.msgid.link/20260330-mtk-genio-720-ufs-v1-1-3bad8362ed70@baylibre.com
Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new compatible match for mediatek,mt8183-ufshci.

This compatible is already defined in upstream devicetree bindings.

Link: https://patch.msgid.link/20260330-mtk-genio-720-ufs-v1-1-3bad8362ed70@baylibre.com
Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: ufs: ufs-mediatek: add MT8195 compatible</title>
<updated>2026-04-17T22:05:54+00:00</updated>
<author>
<name>Julien Stephan</name>
<email>jstephan@baylibre.com</email>
</author>
<published>2026-03-18T16:51:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c4792df2641c81bf4c071f8ef167b457249f9ed7'/>
<id>c4792df2641c81bf4c071f8ef167b457249f9ed7</id>
<content type='text'>
Add MT8195 compatible string.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Julien Stephan &lt;jstephan@baylibre.com&gt;
Link: https://patch.msgid.link/20260318-mt8195-add-ufs-support-v2-8-f18eeeeb0e72@baylibre.com
Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add MT8195 compatible string.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Julien Stephan &lt;jstephan@baylibre.com&gt;
Link: https://patch.msgid.link/20260318-mt8195-add-ufs-support-v2-8-f18eeeeb0e72@baylibre.com
Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: ufs: ufs-mediatek: implement clocking</title>
<updated>2026-04-17T22:05:54+00:00</updated>
<author>
<name>Julien Stephan</name>
<email>jstephan@baylibre.com</email>
</author>
<published>2026-03-18T16:50:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a694f49c4940cf9faa93caa931a37cfaf63a7eaa'/>
<id>a694f49c4940cf9faa93caa931a37cfaf63a7eaa</id>
<content type='text'>
Implement clocking.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Julien Stephan &lt;jstephan@baylibre.com&gt;
Link: https://patch.msgid.link/20260318-mt8195-add-ufs-support-v2-7-f18eeeeb0e72@baylibre.com
Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement clocking.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Julien Stephan &lt;jstephan@baylibre.com&gt;
Link: https://patch.msgid.link/20260318-mt8195-add-ufs-support-v2-7-f18eeeeb0e72@baylibre.com
Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: ufs: ufs-mediatek: fix phy handling</title>
<updated>2026-04-17T22:05:54+00:00</updated>
<author>
<name>Julien Stephan</name>
<email>jstephan@baylibre.com</email>
</author>
<published>2026-03-18T16:50:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ac6e41ee6e6596c17e7a7ebbd15723f82c4fd20f'/>
<id>ac6e41ee6e6596c17e7a7ebbd15723f82c4fd20f</id>
<content type='text'>
Currently mphy is declared as a pointer inside ufs_mtk_host struct, but
it is never initialized.

Fix this by using a struct phy directly in ufs_mtk_host struct instead
of a struct phy*. Update all call to mphy accordingly.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Julien Stephan &lt;jstephan@baylibre.com&gt;
Link: https://patch.msgid.link/20260318-mt8195-add-ufs-support-v2-6-f18eeeeb0e72@baylibre.com
Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently mphy is declared as a pointer inside ufs_mtk_host struct, but
it is never initialized.

Fix this by using a struct phy directly in ufs_mtk_host struct instead
of a struct phy*. Update all call to mphy accordingly.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Julien Stephan &lt;jstephan@baylibre.com&gt;
Link: https://patch.msgid.link/20260318-mt8195-add-ufs-support-v2-6-f18eeeeb0e72@baylibre.com
Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
