From: Svyatoslav Ryhel <clamor95@gmail.com>
To: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Lee Jones" <lee@kernel.org>, "Pavel Machek" <pavel@kernel.org>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"Svyatoslav Ryhel" <clamor95@gmail.com>,
"Dixit Parmar" <dixitparmar19@gmail.com>,
"Tony Lindgren" <tony@atomide.com>
Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
linux-leds@vger.kernel.org, linux-rtc@vger.kernel.org
Subject: [PATCH v1 02/10] regulator: cpcap-regulator: add support for Mot regulators
Date: Sun, 25 Jan 2026 15:42:54 +0200 [thread overview]
Message-ID: <20260125134302.45958-3-clamor95@gmail.com> (raw)
In-Reply-To: <20260125134302.45958-1-clamor95@gmail.com>
Add support for regulator set used in Motorola Mot board, used as a base
for Atrix 4G and Droid X2 smartphones.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
drivers/regulator/cpcap-regulator.c | 105 ++++++++++++++++++++++++++++
1 file changed, 105 insertions(+)
diff --git a/drivers/regulator/cpcap-regulator.c b/drivers/regulator/cpcap-regulator.c
index 6958d154442b..33307c6340b8 100644
--- a/drivers/regulator/cpcap-regulator.c
+++ b/drivers/regulator/cpcap-regulator.c
@@ -261,6 +261,30 @@ static const struct regulator_ops cpcap_regulator_ops = {
};
static const unsigned int unknown_val_tbl[] = { 0, };
+static const unsigned int sw_mot_val_tbl[] = { 600000, 612500, 625000,
+ 637500, 650000, 662500,
+ 675000, 687500, 700000,
+ 712500, 725000, 737500,
+ 750000, 762500, 775000,
+ 787500, 800000, 812500,
+ 825000, 837500, 850000,
+ 862500, 875000, 887500,
+ 900000, 912500, 925000,
+ 937500, 950000, 962500,
+ 975000, 987500, 1000000,
+ 1012500, 1025000, 1037500,
+ 1050000, 1062500, 1075000,
+ 1087500, 1100000, 1112500,
+ 1125000, 1137500, 1150000,
+ 1162500, 1175000, 1187500,
+ 1200000, 1212500, 1225000,
+ 1237500, 1250000, 1262500,
+ 1275000, 1287500, 1300000,
+ 1312500, 1325000, 1337500,
+ 1350000, 1362500, 1375000,
+ 1387500, 1400000, 1412500,
+ 1425000, 1437500, 1450000,
+ 1462500, 1475000, };
static const unsigned int sw2_sw4_val_tbl[] = { 612500, 625000, 637500,
650000, 662500, 675000,
687500, 700000, 712500,
@@ -284,6 +308,7 @@ static const unsigned int sw2_sw4_val_tbl[] = { 612500, 625000, 637500,
1362500, 1375000, 1387500,
1400000, 1412500, 1425000,
1437500, 1450000, 1462500, };
+static const unsigned int sw3_val_tbl[] = { 1350000, 1800000, 1850000, 1875000, };
static const unsigned int sw5_val_tbl[] = { 0, 5050000, };
static const unsigned int vcam_val_tbl[] = { 2600000, 2700000, 2800000,
2900000, };
@@ -402,6 +427,82 @@ static const struct cpcap_regulator omap4_regulators[] = {
{ /* sentinel */ },
};
+static const struct cpcap_regulator mot_regulators[] = {
+ CPCAP_REG(SW1, CPCAP_REG_S1C1, CPCAP_REG_ASSIGN2,
+ CPCAP_BIT_SW1_SEL, sw_mot_val_tbl,
+ 0x6f00, 0x7f, 0x6800, 0, 0),
+ CPCAP_REG(SW2, CPCAP_REG_S2C1, CPCAP_REG_ASSIGN2,
+ CPCAP_BIT_SW2_SEL, sw_mot_val_tbl,
+ 0x6f00, 0x7f, 0x4804, 0, 0),
+ CPCAP_REG(SW3, CPCAP_REG_S3C, CPCAP_REG_ASSIGN2,
+ CPCAP_BIT_SW3_SEL, sw3_val_tbl,
+ 0x578, 0x3, 0x043c, 0, 0),
+ CPCAP_REG(SW4, CPCAP_REG_S4C1, CPCAP_REG_ASSIGN2,
+ CPCAP_BIT_SW4_SEL, sw_mot_val_tbl,
+ 0x6f00, 0x7f, 0x4909, 0, 0),
+ CPCAP_REG(SW5, CPCAP_REG_S5C, CPCAP_REG_ASSIGN2,
+ CPCAP_BIT_SW5_SEL, sw5_val_tbl,
+ 0x28, 0, 0x20, 0, 0),
+ CPCAP_REG(SW6, CPCAP_REG_S6C, CPCAP_REG_ASSIGN2,
+ CPCAP_BIT_SW6_SEL, unknown_val_tbl,
+ 0, 0, 0, 0, 0),
+ CPCAP_REG(VCAM, CPCAP_REG_VCAMC, CPCAP_REG_ASSIGN2,
+ CPCAP_BIT_VCAM_SEL, vcam_val_tbl,
+ 0x87, 0x30, 0x7, 0, 420),
+ CPCAP_REG(VCSI, CPCAP_REG_VCSIC, CPCAP_REG_ASSIGN3,
+ CPCAP_BIT_VCSI_SEL, vcsi_val_tbl,
+ 0x47, 0x10, 0x7, 0, 350),
+ CPCAP_REG(VDAC, CPCAP_REG_VDACC, CPCAP_REG_ASSIGN3,
+ CPCAP_BIT_VDAC_SEL, vdac_val_tbl,
+ 0x87, 0x30, 0x0, 0, 420),
+ CPCAP_REG(VDIG, CPCAP_REG_VDIGC, CPCAP_REG_ASSIGN2,
+ CPCAP_BIT_VDIG_SEL, vdig_val_tbl,
+ 0x87, 0x30, 0x0, 0, 420),
+ CPCAP_REG(VFUSE, CPCAP_REG_VFUSEC, CPCAP_REG_ASSIGN3,
+ CPCAP_BIT_VFUSE_SEL, vfuse_val_tbl,
+ 0xa0, 0xf, 0x0, 0, 420),
+ CPCAP_REG(VHVIO, CPCAP_REG_VHVIOC, CPCAP_REG_ASSIGN3,
+ CPCAP_BIT_VHVIO_SEL, vhvio_val_tbl,
+ 0x17, 0, 0x2, 0, 0),
+ CPCAP_REG(VSDIO, CPCAP_REG_VSDIOC, CPCAP_REG_ASSIGN2,
+ CPCAP_BIT_VSDIO_SEL, vsdio_val_tbl,
+ 0x87, 0x38, 0x2, 0, 420),
+ CPCAP_REG(VPLL, CPCAP_REG_VPLLC, CPCAP_REG_ASSIGN3,
+ CPCAP_BIT_VPLL_SEL, vpll_val_tbl,
+ 0x47, 0x18, 0x1, 0, 420),
+ CPCAP_REG(VRF1, CPCAP_REG_VRF1C, CPCAP_REG_ASSIGN3,
+ CPCAP_BIT_VRF1_SEL, vrf1_val_tbl,
+ 0xac, 0x2, 0, 0, 10),
+ CPCAP_REG(VRF2, CPCAP_REG_VRF2C, CPCAP_REG_ASSIGN3,
+ CPCAP_BIT_VRF2_SEL, vrf2_val_tbl,
+ 0x23, 0x8, 0, 0, 10),
+ CPCAP_REG(VRFREF, CPCAP_REG_VRFREFC, CPCAP_REG_ASSIGN3,
+ CPCAP_BIT_VRFREF_SEL, vrfref_val_tbl,
+ 0x23, 0x8, 0, 0, 420),
+ CPCAP_REG(VWLAN1, CPCAP_REG_VWLAN1C, CPCAP_REG_ASSIGN3,
+ CPCAP_BIT_VWLAN1_SEL, vwlan1_val_tbl,
+ 0x47, 0x10, 0x5, 0, 420),
+ CPCAP_REG(VWLAN2, CPCAP_REG_VWLAN2C, CPCAP_REG_ASSIGN3,
+ CPCAP_BIT_VWLAN2_SEL, vwlan2_val_tbl,
+ 0x20c, 0xc0, 0xd, 0, 420),
+ CPCAP_REG(VSIM, CPCAP_REG_VSIMC, CPCAP_REG_ASSIGN3,
+ 0xffff, vsim_val_tbl,
+ 0x23, 0x8, 0, 0, 420),
+ CPCAP_REG(VSIMCARD, CPCAP_REG_VSIMC, CPCAP_REG_ASSIGN3,
+ 0xffff, vsimcard_val_tbl,
+ 0x1e80, 0x8, 0x1e00, 0, 420),
+ CPCAP_REG(VVIB, CPCAP_REG_VVIBC, CPCAP_REG_ASSIGN3,
+ CPCAP_BIT_VVIB_SEL, vvib_val_tbl,
+ 0x1, 0xc, 0x1, 0, 500),
+ CPCAP_REG(VUSB, CPCAP_REG_VUSBC, CPCAP_REG_ASSIGN3,
+ CPCAP_BIT_VUSB_SEL, vusb_val_tbl,
+ 0x11c, 0x40, 0xc, 0, 0),
+ CPCAP_REG(VAUDIO, CPCAP_REG_VAUDIOC, CPCAP_REG_ASSIGN4,
+ CPCAP_BIT_VAUDIO_SEL, vaudio_val_tbl,
+ 0x16, 0x1, 0x5, 0, 0),
+ { /* sentinel */ },
+};
+
static const struct cpcap_regulator xoom_regulators[] = {
CPCAP_REG(SW1, CPCAP_REG_S1C1, CPCAP_REG_ASSIGN2,
CPCAP_BIT_SW1_SEL, unknown_val_tbl,
@@ -486,6 +587,10 @@ static const struct of_device_id cpcap_regulator_id_table[] = {
.compatible = "motorola,mapphone-cpcap-regulator",
.data = omap4_regulators,
},
+ {
+ .compatible = "motorola,mot-cpcap-regulator",
+ .data = mot_regulators,
+ },
{
.compatible = "motorola,xoom-cpcap-regulator",
.data = xoom_regulators,
--
2.51.0
next prev parent reply other threads:[~2026-01-25 13:43 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-25 13:42 [PATCH v1 00/10] mfd: cpcap: convert documentation to schema and add Mot board support Svyatoslav Ryhel
2026-01-25 13:42 ` [PATCH v1 01/10] dt-bindings: regulator: cpcap-regulator: convert to schema Svyatoslav Ryhel
2026-01-31 19:46 ` David Lechner
2026-01-31 19:55 ` David Lechner
2026-02-01 7:01 ` Svyatoslav Ryhel
2026-02-01 7:01 ` Svyatoslav Ryhel
2026-01-25 13:42 ` Svyatoslav Ryhel [this message]
2026-01-26 10:10 ` [PATCH v1 02/10] regulator: cpcap-regulator: add support for Mot regulators Andy Shevchenko
2026-01-26 10:13 ` Svyatoslav Ryhel
2026-01-26 11:50 ` Andy Shevchenko
2026-01-25 13:42 ` [PATCH v1 03/10] dt-bindings: iio: adc: cpcap-adc: document Mot ADC Svyatoslav Ryhel
2026-01-31 19:48 ` David Lechner
2026-01-31 19:50 ` David Lechner
2026-02-06 13:31 ` Rob Herring (Arm)
2026-01-25 13:42 ` [PATCH v1 04/10] iio: adc: cpcap-adc: add support for " Svyatoslav Ryhel
2026-01-26 10:11 ` Andy Shevchenko
2026-01-25 13:42 ` [PATCH v1 05/10] dt-bindings: leds: leds-cpcap: convert to schema Svyatoslav Ryhel
2026-01-31 19:59 ` David Lechner
2026-02-06 13:33 ` Rob Herring (Arm)
2026-01-25 13:42 ` [PATCH v1 06/10] dt-bindings: rtc: cpcap-rtc: " Svyatoslav Ryhel
2026-01-25 16:28 ` Rob Herring (Arm)
2026-01-30 22:59 ` (subset) " Alexandre Belloni
2026-01-25 13:42 ` [PATCH v1 07/10] dt-bindings: input: cpcap-pwrbutton: " Svyatoslav Ryhel
2026-01-25 16:43 ` Rob Herring (Arm)
2026-01-31 20:02 ` David Lechner
2026-02-01 7:07 ` Svyatoslav Ryhel
2026-02-03 15:01 ` Rob Herring
2026-02-03 15:03 ` Svyatoslav Ryhel
2026-01-25 13:43 ` [PATCH v1 08/10] dt-bindings: mfg: motorola-cpcap: " Svyatoslav Ryhel
2026-01-26 14:37 ` Rob Herring
2026-01-31 20:07 ` David Lechner
2026-02-01 7:09 ` Svyatoslav Ryhel
2026-01-25 13:43 ` [PATCH v1 09/10] mfd: motorola-cpcap: diverge configuration per-board Svyatoslav Ryhel
2026-01-26 10:13 ` Andy Shevchenko
2026-01-26 10:14 ` Svyatoslav Ryhel
2026-01-25 13:43 ` [PATCH v1 10/10] mfd: motorola-cpcap: add support for Mot CPCAP composition Svyatoslav Ryhel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260125134302.45958-3-clamor95@gmail.com \
--to=clamor95@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andy@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dixitparmar19@gmail.com \
--cc=dlechner@baylibre.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=pavel@kernel.org \
--cc=robh@kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox