From: Svyatoslav Ryhel <clamor95@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Lee Jones <lee@kernel.org>,
Pavel Machek <pavel@kernel.org>,
Svyatoslav Ryhel <clamor95@gmail.com>,
David Lechner <dlechner@baylibre.com>,
Tony Lindgren <tony@atomide.com>
Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org
Subject: [PATCH v5 6/6] mfd: motorola-cpcap: add support for Mot CPCAP composition
Date: Sun, 10 May 2026 14:08:04 +0300 [thread overview]
Message-ID: <20260510110804.33045-7-clamor95@gmail.com> (raw)
In-Reply-To: <20260510110804.33045-1-clamor95@gmail.com>
Add a MFD subdevice composition used in Tegra20 based Mot board
(Motorola Atrix 4G and Droid X2).
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
drivers/mfd/motorola-cpcap.c | 30 ++++++++++++++++++++++++++++++
include/linux/mfd/motorola-cpcap.h | 1 +
2 files changed, 31 insertions(+)
diff --git a/drivers/mfd/motorola-cpcap.c b/drivers/mfd/motorola-cpcap.c
index f5a7fdd89dd5..bd9fb0d61ba6 100644
--- a/drivers/mfd/motorola-cpcap.c
+++ b/drivers/mfd/motorola-cpcap.c
@@ -270,6 +270,28 @@ static const struct mfd_cell cpcap_mapphone_mfd_devices[] = {
MFD_CELL_NAME("cpcap-codec"),
};
+/*
+ * The Mot board features a USB-PHY and charger similar to the ones in
+ * Mapphone; however, because Mot is based on Tegra20, it is incompatible
+ * with the existing implementation, which is tightly interconnected with
+ * the OMAP USB PHY.
+ */
+static const struct mfd_cell cpcap_mot_mfd_devices[] = {
+ MFD_CELL_OF("cpcap_adc", NULL, NULL, 0, 0, "motorola,mot-cpcap-adc"),
+ MFD_CELL_OF("cpcap_battery", NULL, NULL, 0, 0,
+ "motorola,cpcap-battery"),
+ MFD_CELL_OF("cpcap-regulator", NULL, NULL, 0, 0,
+ "motorola,mot-cpcap-regulator"),
+ MFD_CELL_OF("cpcap-rtc", NULL, NULL, 0, 0, "motorola,cpcap-rtc"),
+ MFD_CELL_OF("cpcap-pwrbutton", NULL, NULL, 0, 0,
+ "motorola,cpcap-pwrbutton"),
+ MFD_CELL_OF("cpcap-led", NULL, NULL, 0, 0, "motorola,cpcap-led-red"),
+ MFD_CELL_OF("cpcap-led", NULL, NULL, 0, 1, "motorola,cpcap-led-green"),
+ MFD_CELL_OF("cpcap-led", NULL, NULL, 0, 2, "motorola,cpcap-led-blue"),
+ MFD_CELL_OF("cpcap-led", NULL, NULL, 0, 3, "motorola,cpcap-led-adl"),
+ MFD_CELL_NAME("cpcap-codec"),
+};
+
static int cpcap_probe(struct spi_device *spi)
{
struct cpcap_ddata *cpcap;
@@ -294,6 +316,10 @@ static int cpcap_probe(struct spi_device *spi)
cells = cpcap_mapphone_mfd_devices;
num_cells = ARRAY_SIZE(cpcap_mapphone_mfd_devices);
break;
+ case CPCAP_MOT:
+ cells = cpcap_mot_mfd_devices;
+ num_cells = ARRAY_SIZE(cpcap_mot_mfd_devices);
+ break;
default:
return dev_err_probe(&spi->dev, -EINVAL,
"Unknown device %d\n", cpcap->variant);
@@ -343,6 +369,9 @@ static const struct of_device_id cpcap_of_match[] = {
}, {
.compatible = "motorola,mapphone-cpcap",
.data = (void *)CPCAP_MAPPHONE
+ }, {
+ .compatible = "motorola,mot-cpcap",
+ .data = (void *)CPCAP_MOT
},
{ /* sentinel */ }
};
@@ -351,6 +380,7 @@ MODULE_DEVICE_TABLE(of, cpcap_of_match);
static const struct spi_device_id cpcap_spi_ids[] = {
{ "cpcap", CPCAP_DEFAULT },
{ "mapphone-cpcap", CPCAP_MAPPHONE },
+ { "mot-cpcap", CPCAP_MOT },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(spi, cpcap_spi_ids);
diff --git a/include/linux/mfd/motorola-cpcap.h b/include/linux/mfd/motorola-cpcap.h
index 1a85b06272c8..bb23363eeccd 100644
--- a/include/linux/mfd/motorola-cpcap.h
+++ b/include/linux/mfd/motorola-cpcap.h
@@ -28,6 +28,7 @@
enum cpcap_variant {
CPCAP_DEFAULT = 1,
CPCAP_MAPPHONE,
+ CPCAP_MOT,
CPCAP_MAX
};
--
2.51.0
prev parent reply other threads:[~2026-05-10 11:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-10 11:07 [PATCH v5 0/6] mfd: cpcap: convert documentation to schema and add Mot board support Svyatoslav Ryhel
2026-05-10 11:07 ` [PATCH v5 1/6] dt-bindings: leds: leds-cpcap: convert to DT schema Svyatoslav Ryhel
2026-05-10 12:44 ` Rob Herring (Arm)
2026-05-10 11:08 ` [PATCH v5 2/6] dt-bindings: input: cpcap-pwrbutton: " Svyatoslav Ryhel
2026-05-10 12:44 ` Rob Herring (Arm)
2026-05-10 11:08 ` [PATCH v5 3/6] dt-bindings: mfd: motorola-cpcap: " Svyatoslav Ryhel
2026-05-10 11:08 ` [PATCH v5 4/6] dt-bindings: mfd: motorola-cpcap: document Mapphone and Mot CPCAP Svyatoslav Ryhel
2026-05-10 11:08 ` [PATCH v5 5/6] mfd: motorola-cpcap: diverge configuration per-board Svyatoslav Ryhel
2026-05-10 11:08 ` Svyatoslav Ryhel [this message]
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=20260510110804.33045-7-clamor95@gmail.com \
--to=clamor95@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=dmitry.torokhov@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--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