Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ad501a2 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "scsi: ufs: obtain VCCQ2 voltage level from DT prior to hard code"

parents 9acb7ee9 047f2cab
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@ Optional properties:
                          Should be specified in pairs (min, max), units uV.
- vccq-supply           : phandle to VCCQ supply regulator node
- vccq2-supply          : phandle to VCCQ2 supply regulator node
- vccq2-voltage-level   : specifies voltage levels for VCCQ2 supply.
                          Should be specified in pairs (min, max), units uV.
- vcc-supply-1p8        : For embedded UFS devices, valid VCC range is 1.7-1.95V
                          or 2.7-3.6V. This boolean property when set, specifies
			  to use low voltage range of 1.7-1.95V. Note for external
+10 −2
Original line number Diff line number Diff line
@@ -202,8 +202,16 @@ static int ufshcd_populate_vreg(struct device *dev, const char *name,
		vreg->min_uV = UFS_VREG_VCCQ_MIN_UV;
		vreg->max_uV = UFS_VREG_VCCQ_MAX_UV;
	} else if (!strcmp(name, "vccq2")) {
		prop = of_get_property(np, "vccq2-voltage-level", &len);
		if (!prop || (len != (2 * sizeof(__be32)))) {
			dev_warn(dev, "%s vccq2-voltage-level property.\n",
				prop ? "invalid format" : "no");
			vreg->min_uV = UFS_VREG_VCCQ2_MIN_UV;
			vreg->max_uV = UFS_VREG_VCCQ2_MAX_UV;
		} else {
			vreg->min_uV = be32_to_cpup(&prop[0]);
			vreg->max_uV = be32_to_cpup(&prop[1]);
		}
	}

	goto out;