ipq806x: replace caf nss-gmac driver by upstream stmmac
[openwrt/openwrt.git] / target / linux / ipq806x / patches-3.18 / 124-regulator-rpm-add-support-for-RPM-controller-SMB208.patch
1 From 0f5bb5b5de3b18877373f746bdb85d8ea0efeedf Mon Sep 17 00:00:00 2001
2 From: Josh Cartwright <joshc@codeaurora.org>
3 Date: Thu, 20 Nov 2014 13:41:25 -0600
4 Subject: [PATCH] regulator: rpm: add support for RPM-controller SMB208
5
6 The IPQ8064 reference boards make use of SMB208 regulators which are
7 controlled by RPM. Implement support for these regulators in the RPM
8 regulator driver.
9
10 Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
11 Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
12 Signed-off-by: Mark Brown <broonie@kernel.org>
13 ---
14 drivers/regulator/qcom_rpm-regulator.c | 19 +++++++++++++++++++
15 1 file changed, 19 insertions(+)
16
17 --- a/drivers/regulator/qcom_rpm-regulator.c
18 +++ b/drivers/regulator/qcom_rpm-regulator.c
19 @@ -183,6 +183,13 @@ static const struct regulator_linear_ran
20 REGULATOR_LINEAR_RANGE(1500000, 64, 100, 50000),
21 };
22
23 +static const struct regulator_linear_range smb208_ranges[] = {
24 + REGULATOR_LINEAR_RANGE( 375000, 0, 29, 12500),
25 + REGULATOR_LINEAR_RANGE( 750000, 30, 89, 12500),
26 + REGULATOR_LINEAR_RANGE(1500000, 90, 153, 25000),
27 + REGULATOR_LINEAR_RANGE(3100000, 154, 234, 25000),
28 +};
29 +
30 static const struct regulator_linear_range ncp_ranges[] = {
31 REGULATOR_LINEAR_RANGE(1500000, 0, 31, 50000),
32 };
33 @@ -559,6 +566,16 @@ static const struct qcom_rpm_reg pm8921_
34 .parts = &rpm8960_switch_parts,
35 };
36
37 +static const struct qcom_rpm_reg smb208_smps = {
38 + .desc.linear_ranges = smb208_ranges,
39 + .desc.n_linear_ranges = ARRAY_SIZE(smb208_ranges),
40 + .desc.n_voltages = 235,
41 + .desc.ops = &uV_ops,
42 + .parts = &rpm8960_smps_parts,
43 + .supports_force_mode_auto = false,
44 + .supports_force_mode_bypass = false,
45 +};
46 +
47 static const struct of_device_id rpm_of_match[] = {
48 { .compatible = "qcom,rpm-pm8058-pldo", .data = &pm8058_pldo },
49 { .compatible = "qcom,rpm-pm8058-nldo", .data = &pm8058_nldo },
50 @@ -578,6 +595,8 @@ static const struct of_device_id rpm_of_
51 { .compatible = "qcom,rpm-pm8921-ftsmps", .data = &pm8921_ftsmps },
52 { .compatible = "qcom,rpm-pm8921-ncp", .data = &pm8921_ncp },
53 { .compatible = "qcom,rpm-pm8921-switch", .data = &pm8921_switch },
54 +
55 + { .compatible = "qcom,rpm-smb208", .data = &smb208_smps },
56 { }
57 };
58 MODULE_DEVICE_TABLE(of, rpm_of_match);