From: Michael Walle <mwalle@kernel.org>
To: Lee Jones <lee@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linus Walleij <linus.walleij@linaro.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Julien Panis <jpanis@baylibre.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-gpio@vger.kernel.org, Michael Walle <mwalle@kernel.org>
Subject: [PATCH v2 3/7] pinctrl: pinctrl-tps6594: Add TPS652G1 PMIC pinctrl and GPIO
Date: Fri, 13 Jun 2025 13:45:14 +0200 [thread overview]
Message-ID: <20250613114518.1772109-4-mwalle@kernel.org> (raw)
In-Reply-To: <20250613114518.1772109-1-mwalle@kernel.org>
The TPS652G1 is a stripped down version of the TPS65224. Compared to the
TPS65224 it lacks some pin mux functions, like the ADC, voltage
monitoring and the second I2C bus.
Signed-off-by: Michael Walle <mwalle@kernel.org>
---
drivers/pinctrl/pinctrl-tps6594.c | 35 +++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/drivers/pinctrl/pinctrl-tps6594.c b/drivers/pinctrl/pinctrl-tps6594.c
index 54cc810f79d6..6726853110d1 100644
--- a/drivers/pinctrl/pinctrl-tps6594.c
+++ b/drivers/pinctrl/pinctrl-tps6594.c
@@ -226,6 +226,10 @@ static const char *const tps65224_nerr_mcu_func_group_names[] = {
"GPIO5",
};
+static const char *const tps652g1_cs_spi_func_group_names[] = {
+ "GPIO1",
+};
+
struct tps6594_pinctrl_function {
struct pinfunction pinfunction;
u8 muxval;
@@ -287,6 +291,18 @@ static const struct tps6594_pinctrl_function tps65224_pinctrl_functions[] = {
FUNCTION(tps65224, nerr_mcu, TPS65224_PINCTRL_NERR_MCU_FUNCTION),
};
+static const struct tps6594_pinctrl_function tps652g1_pinctrl_functions[] = {
+ FUNCTION(tps65224, gpio, TPS6594_PINCTRL_GPIO_FUNCTION),
+ FUNCTION(tps65224, sda_i2c2_sdo_spi, TPS65224_PINCTRL_SDA_I2C2_SDO_SPI_FUNCTION),
+ FUNCTION(tps65224, nsleep2, TPS65224_PINCTRL_NSLEEP2_FUNCTION),
+ FUNCTION(tps65224, nint, TPS65224_PINCTRL_NINT_FUNCTION),
+ FUNCTION(tps652g1, cs_spi, TPS65224_PINCTRL_SCL_I2C2_CS_SPI_FUNCTION),
+ FUNCTION(tps65224, nsleep1, TPS65224_PINCTRL_NSLEEP1_FUNCTION),
+ FUNCTION(tps65224, pb, TPS65224_PINCTRL_PB_FUNCTION),
+ FUNCTION(tps65224, wkup, TPS65224_PINCTRL_WKUP_FUNCTION),
+ FUNCTION(tps65224, syncclkin, TPS65224_PINCTRL_SYNCCLKIN_FUNCTION),
+};
+
struct tps6594_pinctrl {
struct tps6594 *tps;
struct gpio_regmap *gpio_regmap;
@@ -300,6 +316,16 @@ struct tps6594_pinctrl {
struct muxval_remap *remap;
};
+static struct tps6594_pinctrl tps652g1_template_pinctrl = {
+ .funcs = tps652g1_pinctrl_functions,
+ .func_cnt = ARRAY_SIZE(tps652g1_pinctrl_functions),
+ .pins = tps65224_pins,
+ .num_pins = ARRAY_SIZE(tps65224_pins),
+ .mux_sel_mask = TPS65224_MASK_GPIO_SEL,
+ .remap = tps65224_muxval_remap,
+ .remap_cnt = ARRAY_SIZE(tps65224_muxval_remap),
+};
+
static struct tps6594_pinctrl tps65224_template_pinctrl = {
.funcs = tps65224_pinctrl_functions,
.func_cnt = ARRAY_SIZE(tps65224_pinctrl_functions),
@@ -475,6 +501,15 @@ static int tps6594_pinctrl_probe(struct platform_device *pdev)
return -ENOMEM;
switch (tps->chip_id) {
+ case TPS652G1:
+ pctrl_desc->pins = tps65224_pins;
+ pctrl_desc->npins = ARRAY_SIZE(tps65224_pins);
+
+ *pinctrl = tps652g1_template_pinctrl;
+
+ config.ngpio = ARRAY_SIZE(tps65224_gpio_func_group_names);
+ config.ngpio_per_reg = TPS65224_NGPIO_PER_REG;
+ break;
case TPS65224:
pctrl_desc->pins = tps65224_pins;
pctrl_desc->npins = ARRAY_SIZE(tps65224_pins);
--
2.39.5
next prev parent reply other threads:[~2025-06-13 11:45 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-13 11:45 [PATCH v2 0/7] mfd: tps6594: Add TI TPS652G1 support Michael Walle
2025-06-13 11:45 ` [PATCH v2 1/7] " Michael Walle
2025-06-19 13:35 ` Lee Jones
2025-07-10 9:00 ` Lee Jones
2025-07-10 9:06 ` Michael Walle
2025-07-10 9:47 ` Lee Jones
2025-06-13 11:45 ` [PATCH v2 2/7] misc: tps6594-pfsm: Add TI TPS652G1 PMIC PFSM Michael Walle
2025-06-30 7:48 ` Arnd Bergmann
2025-06-13 11:45 ` Michael Walle [this message]
2025-06-18 11:52 ` [PATCH v2 3/7] pinctrl: pinctrl-tps6594: Add TPS652G1 PMIC pinctrl and GPIO Linus Walleij
2025-06-13 11:45 ` [PATCH v2 4/7] regulator: tps6594-regulator: remove interrupt_count Michael Walle
2025-06-13 12:06 ` Mark Brown
2025-06-13 11:45 ` [PATCH v2 5/7] regulator: tps6594-regulator: remove hardcoded buck config Michael Walle
2025-06-13 12:06 ` Mark Brown
2025-06-13 11:45 ` [PATCH v2 6/7] regulator: tps6594-regulator: refactor variant descriptions Michael Walle
2025-06-13 12:07 ` Mark Brown
2025-06-13 11:45 ` [PATCH v2 7/7] regulator: tps6594-regulator: Add TI TPS652G1 PMIC regulators Michael Walle
2025-06-13 12:07 ` Mark Brown
2025-07-02 15:30 ` [PATCH v2 0/7] mfd: tps6594: Add TI TPS652G1 support Lee Jones
2025-07-10 8:58 ` (subset) " Lee Jones
2025-07-10 9:49 ` [GIT PULL] Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window Lee Jones
2025-07-10 9:57 ` Mark Brown
2025-07-10 10:46 ` Michael Walle
2025-07-10 11:04 ` Mark Brown
2025-07-18 7:13 ` Lee Jones
2025-07-18 13:27 ` Mark Brown
2025-07-18 13:38 ` Lee Jones
2025-07-18 14:33 ` Mark Brown
2025-07-11 17:37 ` Linus Walleij
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=20250613114518.1772109-4-mwalle@kernel.org \
--to=mwalle@kernel.org \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jpanis@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).