The Manufacturer ID is defined by JEDEC in JEDEC-JEP106.
The file is read only.
+What: /sys/bus/platform/drivers/ufshcd/*/critical_health
+What: /sys/bus/platform/devices/*.ufs/critical_health
+Date: February 2025
+Contact: Avri Altman <avri.altman@wdc.com>
+Description: Report the number of times a critical health event has been
+ reported by a UFS device. Further insight into the specific
+ issue can be gained by reading one of: bPreEOLInfo,
+ bDeviceLifeTimeEstA, bDeviceLifeTimeEstB,
+ bWriteBoosterBufferLifeTimeEst, and bRPMBLifeTimeEst.
+
+ The file is read only.
++
+ What: /sys/bus/platform/drivers/ufshcd/*/clkscale_enable
+ What: /sys/bus/platform/devices/*.ufs/clkscale_enable
+ Date: January 2025
+ Contact: Ziqi Chen <quic_ziqichen@quicinc.com>
+ Description:
+ This attribute shows whether the UFS clock scaling is enabled or not.
+ And it can be used to enable/disable the clock scaling by writing
+ 1 or 0 to this attribute.
+
+ The attribute is read/write.
+
+ What: /sys/bus/platform/drivers/ufshcd/*/clkgate_enable
+ What: /sys/bus/platform/devices/*.ufs/clkgate_enable
+ Date: January 2025
+ Contact: Ziqi Chen <quic_ziqichen@quicinc.com>
+ Description:
+ This attribute shows whether the UFS clock gating is enabled or not.
+ And it can be used to enable/disable the clock gating by writing
+ 1 or 0 to this attribute.
+
+ The attribute is read/write.
+
+ What: /sys/bus/platform/drivers/ufshcd/*/clkgate_delay_ms
+ What: /sys/bus/platform/devices/*.ufs/clkgate_delay_ms
+ Date: January 2025
+ Contact: Ziqi Chen <quic_ziqichen@quicinc.com>
+ Description:
+ This attribute shows and sets the number of milliseconds of idle time
+ before the UFS driver starts to perform clock gating. This can
+ prevent the UFS from frequently performing clock gating/ungating.
+
+ The attribute is read/write.
#include <linux/platform_device.h>
#include <linux/reset-controller.h>
#include <linux/time.h>
+#include <linux/unaligned.h>
+ #include <linux/units.h>
#include <soc/qcom/ice.h>
return ufs_qcom_set_clk_40ns_cycles(hba, cycles_in_1us);
}
- static int ufs_qcom_clk_scale_up_pre_change(struct ufs_hba *hba)
+ static int ufs_qcom_clk_scale_up_pre_change(struct ufs_hba *hba, unsigned long freq)
{
- struct ufs_qcom_host *host = ufshcd_get_variant(hba);
- struct ufs_pa_layer_attr *attr = &host->dev_req_params;
int ret;
- ret = ufs_qcom_cfg_timers(hba, attr->gear_rx, attr->pwr_rx,
- attr->hs_rate, false, true);
+ ret = ufs_qcom_cfg_timers(hba, true);
if (ret) {
dev_err(hba->dev, "%s ufs cfg timer failed\n", __func__);
return ret;