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

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

Merge "clk: qcom: Update SCC regulator configurations for SA 8195"

parents 20b19d93 91e7ffd6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ Qualcomm Technologies, Inc. Sensor Clock Controller Bindings

Required properties:
- compatible: shall contain "qcom,scc-sm8150" or "qcom,scc-sm8150-v2" or
		"qcom,scc-sm6150" or qcom,scc-sa6155".
		"qcom,scc-sm6150" or "qcom,scc-sa6155" or "qcom,scc-sa8195".
- reg: shall contain base register location and length.
- vdd_scc_cx-supply: the logic rail supply.
- #clock-cells: shall contain 1.
+13 −1
Original line number Diff line number Diff line
@@ -576,10 +576,19 @@ static const struct qcom_cc_desc scc_sm8150_desc = {
static const struct of_device_id scc_sm8150_match_table[] = {
	{ .compatible = "qcom,scc-sm8150" },
	{ .compatible = "qcom,scc-sm8150-v2" },
	{ .compatible = "qcom,scc-sa8195" },
	{ }
};
MODULE_DEVICE_TABLE(of, scc_sm8150_match_table);

static void scc_sa8195_fixup(struct platform_device *pdev)
{
	if (of_device_is_compatible(pdev->dev.of_node, "qcom,scc-sa8195")) {
		vdd_scc_cx.num_levels = VDD_MM_NUM;
		vdd_scc_cx.cur_level = VDD_MM_NUM;
	}
}

static void scc_sm8150_fixup_sm8150v2(struct regmap *regmap)
{
	scc_pll.config = &scc_pll_config_sm8150_v2;
@@ -635,7 +644,8 @@ static int scc_sm8150_fixup(struct platform_device *pdev, struct regmap *regmap)
	if (!compat || (compatlen <= 0))
		return -EINVAL;

	if (!strcmp(compat, "qcom,scc-sm8150-v2"))
	if (!strcmp(compat, "qcom,scc-sm8150-v2") ||
			!strcmp(compat, "qcom,scc-sa8195"))
		scc_sm8150_fixup_sm8150v2(regmap);

	return 0;
@@ -652,6 +662,8 @@ static int scc_sm8150_probe(struct platform_device *pdev)
		return PTR_ERR(regmap);
	}

	scc_sa8195_fixup(pdev);

	vdd_scc_cx.regulator[0] = devm_regulator_get(&pdev->dev, "vdd_scc_cx");
	if (IS_ERR(vdd_scc_cx.regulator[0])) {
		ret = PTR_ERR(vdd_scc_cx.regulator[0]);