* [PATCH v1 0/3] pinctrl: mpfs-mssio: three fixes
@ 2026-08-31 10:50 Conor Dooley
2026-08-31 10:50 ` [PATCH v1 1/3] pinctrl: mpfs-mssio: fix whitespace in debugfs output Conor Dooley
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Conor Dooley @ 2026-08-31 10:50 UTC (permalink / raw)
To: linux-gpio
Cc: conor, Conor Dooley, Daire McNamara, Linus Walleij, linux-riscv,
linux-kernel, Valentina.FernandezAlanis
From: Conor Dooley <conor.dooley@microchip.com>
Three fixes for issues I encountered, one of which is clearly world
ending if not resolved while the other two should go to stable because
they'll cause the wrong bank voltage setting to be applied or reported
in debugfs.
I discovered these myself while working on a new board that needed novel
pinctrl configuration. I think that few customers have probably been
impacted by incorrect bank voltage setting because it requires trying to
set a bank voltage that differs from what the FPGA configuration set, and
not only are the configurations currently in upstream and Microchip's
vendor devicetrees a match for the FPGA settings, I think customers are
using the FPGA configuration tool instead of pinctrl to configure IO
since that's how it has had to be done for the last several years.
pic64gx is where I spotted it since the config tool can't be used there,
so the impact is limited to users of that SoC that want to have non-default
bank voltages.
Cheers,
Conor.
CC: Conor Dooley <conor.dooley@microchip.com>
CC: Daire McNamara <daire.mcnamara@microchip.com>
CC: Linus Walleij <linusw@kernel.org>
CC: linux-riscv@lists.infradead.org
CC: linux-gpio@vger.kernel.org
CC: linux-kernel@vger.kernel.org
CC: Valentina.FernandezAlanis@microchip.com
Conor Dooley (3):
pinctrl: mpfs-mssio: fix whitespace in debugfs output
pinctrl: mpfs-mssio: fix width of unused bank voltage setting
pinctrl: mpfs-mssio: use correct regmap function to set bank voltage
drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--
2.53.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v1 1/3] pinctrl: mpfs-mssio: fix whitespace in debugfs output
2026-08-31 10:50 [PATCH v1 0/3] pinctrl: mpfs-mssio: three fixes Conor Dooley
@ 2026-08-31 10:50 ` Conor Dooley
2026-08-31 10:50 ` [PATCH v1 2/3] pinctrl: mpfs-mssio: fix width of unused bank voltage setting Conor Dooley
2026-08-31 10:50 ` [PATCH v1 3/3] pinctrl: mpfs-mssio: use correct regmap function to set bank voltage Conor Dooley
2 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2026-08-31 10:50 UTC (permalink / raw)
To: linux-gpio
Cc: conor, Conor Dooley, Daire McNamara, Linus Walleij, linux-riscv,
linux-kernel, Valentina.FernandezAlanis
From: Conor Dooley <conor.dooley@microchip.com>
The printout from mpfs_pinctrl_pinconf_dbg_show() is appended to
information from the core, so a leading space is required or the world
will end.
Fixes: 488d704ed7b7 ("pinctrl: add polarfire soc mssio pinctrl driver")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c b/drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c
index ea1026a0d22c..502624221aca 100644
--- a/drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c
+++ b/drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c
@@ -612,7 +612,7 @@ static void mpfs_pinctrl_pinconf_dbg_show(struct pinctrl_dev *pctrl_dev, struct
reg = mpfs_pinctrl_pin_to_iocfg_reg(pin);
offset = mpfs_pinctrl_pin_to_iocfg_offset(pin);
- seq_printf(seq, "pin: %u ", pin);
+ seq_printf(seq, " pin: %u ", pin);
seq_printf(seq, "reg: %x offset: %u ", reg, offset);
if (reg < 0 || offset < 0)
--
2.53.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v1 2/3] pinctrl: mpfs-mssio: fix width of unused bank voltage setting
2026-08-31 10:50 [PATCH v1 0/3] pinctrl: mpfs-mssio: three fixes Conor Dooley
2026-08-31 10:50 ` [PATCH v1 1/3] pinctrl: mpfs-mssio: fix whitespace in debugfs output Conor Dooley
@ 2026-08-31 10:50 ` Conor Dooley
2026-08-31 10:50 ` [PATCH v1 3/3] pinctrl: mpfs-mssio: use correct regmap function to set bank voltage Conor Dooley
2 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2026-08-31 10:50 UTC (permalink / raw)
To: linux-gpio
Cc: conor, Conor Dooley, Daire McNamara, Linus Walleij, linux-riscv,
linux-kernel, Valentina.FernandezAlanis, stable
From: Conor Dooley <conor.dooley@microchip.com>
The bank voltages are only 4 bits wide, so when a pin was unused the
driver was not correctly interpreting it as being at zero volts, because
the driver's value for unused had two extra set bits.
CC: stable@vger.kernel.org
Fixes: 488d704ed7b7 ("pinctrl: add polarfire soc mssio pinctrl driver")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c b/drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c
index 502624221aca..9e6d233804cb 100644
--- a/drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c
+++ b/drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c
@@ -86,7 +86,7 @@ static struct mpfs_pinctrl_bank_voltage mpfs_pinctrl_bank_voltages[8] = {
{ .uv = 1800000, .val = 4 },
{ .uv = 2500000, .val = 6 },
{ .uv = 3300000, .val = 8 },
- { .uv = 0, .val = 0x3f }, // pin unused
+ { .uv = 0, .val = 0xf }, // pin unused
};
static int mpfs_pinctrl_get_drive_strength_ma(u32 drive_strength)
--
2.53.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v1 3/3] pinctrl: mpfs-mssio: use correct regmap function to set bank voltage
2026-08-31 10:50 [PATCH v1 0/3] pinctrl: mpfs-mssio: three fixes Conor Dooley
2026-08-31 10:50 ` [PATCH v1 1/3] pinctrl: mpfs-mssio: fix whitespace in debugfs output Conor Dooley
2026-08-31 10:50 ` [PATCH v1 2/3] pinctrl: mpfs-mssio: fix width of unused bank voltage setting Conor Dooley
@ 2026-08-31 10:50 ` Conor Dooley
2 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2026-08-31 10:50 UTC (permalink / raw)
To: linux-gpio
Cc: conor, Conor Dooley, Daire McNamara, Linus Walleij, linux-riscv,
linux-kernel, Valentina.FernandezAlanis, stable
From: Conor Dooley <conor.dooley@microchip.com>
regmap_assign_bits() is not the correct function to use for an RMW
operation, as it maps to regmap_set_bits() or regmap_clear_bits() and
the former will never zero a bit. Use regmap_update_bits() instead,
which will actually set the bank voltages to what have been requested.
CC: stable@vger.kernel.org
Fixes: 488d704ed7b7 ("pinctrl: add polarfire soc mssio pinctrl driver")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c b/drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c
index 9e6d233804cb..8da0c5312ce3 100644
--- a/drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c
+++ b/drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c
@@ -156,10 +156,10 @@ static void mpfs_pinctrl_set_bank_voltage(struct mpfs_pinctrl *pctrl, unsigned i
u32 val = FIELD_PREP(MPFS_PINCTRL_BANK_VOLTAGE_MASK, bank_voltage);
if (pin < MPFS_PINCTRL_BANK2_START)
- regmap_assign_bits(pctrl->sysreg_regmap, MPFS_PINCTRL_MSSIO_BANK4_CFG_CR,
+ regmap_update_bits(pctrl->sysreg_regmap, MPFS_PINCTRL_MSSIO_BANK4_CFG_CR,
MPFS_PINCTRL_BANK_VOLTAGE_MASK, val);
else
- regmap_assign_bits(pctrl->sysreg_regmap, MPFS_PINCTRL_MSSIO_BANK2_CFG_CR,
+ regmap_update_bits(pctrl->sysreg_regmap, MPFS_PINCTRL_MSSIO_BANK2_CFG_CR,
MPFS_PINCTRL_BANK_VOLTAGE_MASK, val);
}
--
2.53.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-08-31 10:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-31 10:50 [PATCH v1 0/3] pinctrl: mpfs-mssio: three fixes Conor Dooley
2026-08-31 10:50 ` [PATCH v1 1/3] pinctrl: mpfs-mssio: fix whitespace in debugfs output Conor Dooley
2026-08-31 10:50 ` [PATCH v1 2/3] pinctrl: mpfs-mssio: fix width of unused bank voltage setting Conor Dooley
2026-08-31 10:50 ` [PATCH v1 3/3] pinctrl: mpfs-mssio: use correct regmap function to set bank voltage Conor Dooley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox