* [PATCH v2 0/2] Enable 1GHz OPP am335x-bonegreen-eco
@ 2025-11-06 10:49 Kory Maincent (TI.com)
2025-11-06 10:49 ` [PATCH v2 1/2] mfd: tps65219: Implement LOCK register handling for TPS65214 Kory Maincent (TI.com)
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Kory Maincent (TI.com) @ 2025-11-06 10:49 UTC (permalink / raw)
To: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Lee Jones, Shree Ramamoorthy, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Andrew Davis, Bajjuri Praneeth, Thomas Petazzoni, linux-omap,
linux-kernel, devicetree, Kory Maincent (TI.com), stable
The vdd_mpu regulator maximum voltage was previously limited to 1.2985V,
which prevented the CPU from reaching the 1GHz operating point. This
limitation was put in place because voltage changes were not working
correctly, causing the board to stall when attempting higher frequencies.
Increase the maximum voltage to 1.3515V to allow the full 1GHz OPP to be
used.
Add a TPS65219 PMIC driver fixes that properly implement the LOCK register
handling, to make voltage transitions work reliably.
Changes in v2:
- Setup a custom regmap_bus only for the TPS65214 instead of checking
the chip_id every time reg_write is called.
- Add the am335x-bonegreen-eco devicetree change in the same patch
series.
Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
Kory Maincent (TI.com) (2):
mfd: tps65219: Implement LOCK register handling for TPS65214
ARM: dts: am335x-bonegreen-eco: Enable 1GHz OPP by increasing vdd_mpu voltage
arch/arm/boot/dts/ti/omap/am335x-bonegreen-eco.dts | 2 +-
drivers/mfd/tps65219.c | 51 +++++++++++++++++++++-
include/linux/mfd/tps65219.h | 2 +
3 files changed, 53 insertions(+), 2 deletions(-)
---
base-commit: 1c353dc8d962de652bc7ad2ba2e63f553331391c
change-id: 20251106-fix_tps65219-dd62141d22cf
Best regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v2 1/2] mfd: tps65219: Implement LOCK register handling for TPS65214 2025-11-06 10:49 [PATCH v2 0/2] Enable 1GHz OPP am335x-bonegreen-eco Kory Maincent (TI.com) @ 2025-11-06 10:49 ` Kory Maincent (TI.com) 2025-11-06 22:18 ` kernel test robot 2025-11-06 10:49 ` [PATCH v2 2/2] ARM: dts: am335x-bonegreen-eco: Enable 1GHz OPP by increasing vdd_mpu voltage Kory Maincent (TI.com) 2025-11-07 21:25 ` [PATCH v2 0/2] Enable 1GHz OPP am335x-bonegreen-eco Shree Ramamoorthy 2 siblings, 1 reply; 7+ messages in thread From: Kory Maincent (TI.com) @ 2025-11-06 10:49 UTC (permalink / raw) To: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros, Tony Lindgren, Lee Jones, Shree Ramamoorthy, Rob Herring, Krzysztof Kozlowski, Conor Dooley Cc: Andrew Davis, Bajjuri Praneeth, Thomas Petazzoni, linux-omap, linux-kernel, devicetree, Kory Maincent (TI.com), stable The TPS65214 PMIC variant has a LOCK_REG register that prevents writes to nearly all registers. Implement custom regmap operations that automatically unlock before writes and re-lock afterwards for TPS65214, while leaving other chip variants unaffected. The implementation follows the regmap-i2c design pattern. Cc: <stable@vger.kernel.org> Fixes: 7947219ab1a2d ("mfd: tps65219: Add support for TI TPS65214 PMIC") Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com> --- Changes in v2: - Setup a custom regmap_bus only for the TPS65214 instead of checking the chip_id every time reg_write is called. --- drivers/mfd/tps65219.c | 51 +++++++++++++++++++++++++++++++++++++++++++- include/linux/mfd/tps65219.h | 2 ++ 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/tps65219.c b/drivers/mfd/tps65219.c index 65a952555218d..7e916a9ce2335 100644 --- a/drivers/mfd/tps65219.c +++ b/drivers/mfd/tps65219.c @@ -473,6 +473,50 @@ static const struct tps65219_chip_data chip_info_table[] = { }, }; +static int tps65214_reg_write(void *context, unsigned int reg, unsigned int val) +{ + struct i2c_client *i2c = context; + struct tps65219 *tps; + int ret; + + if (val > 0xff || reg > 0xff) + return -EINVAL; + + tps = i2c_get_clientdata(i2c); + ret = i2c_smbus_write_byte_data(i2c, TPS65214_REG_LOCK, + TPS65214_LOCK_ACCESS_CMD); + if (ret) + return ret; + + ret = i2c_smbus_write_byte_data(i2c, reg, val); + if (ret) + return ret; + + return i2c_smbus_write_byte_data(i2c, TPS65214_REG_LOCK, 0); +} + +static int tps65214_reg_read(void *context, unsigned int reg, unsigned int *val) +{ + struct i2c_client *i2c = context; + int ret; + + if (reg > 0xff) + return -EINVAL; + + ret = i2c_smbus_read_byte_data(i2c, reg); + if (ret < 0) + return ret; + + *val = ret; + + return 0; +} + +static const struct regmap_bus tps65214_regmap_bus = { + .reg_write = tps65214_reg_write, + .reg_read = tps65214_reg_read, +}; + static int tps65219_probe(struct i2c_client *client) { struct tps65219 *tps; @@ -491,7 +535,12 @@ static int tps65219_probe(struct i2c_client *client) chip_id = (uintptr_t)i2c_get_match_data(client); pmic = &chip_info_table[chip_id]; - tps->regmap = devm_regmap_init_i2c(client, &tps65219_regmap_config); + if (chip_id == TPS65214) + tps->regmap = devm_regmap_init(&client->dev, + &tps65214_regmap_bus, client, + &tps65219_regmap_config); + else + tps->regmap = devm_regmap_init_i2c(client, &tps65219_regmap_config); if (IS_ERR(tps->regmap)) { ret = PTR_ERR(tps->regmap); dev_err(tps->dev, "Failed to allocate register map: %d\n", ret); diff --git a/include/linux/mfd/tps65219.h b/include/linux/mfd/tps65219.h index 55234e771ba73..198ee319dd1db 100644 --- a/include/linux/mfd/tps65219.h +++ b/include/linux/mfd/tps65219.h @@ -149,6 +149,8 @@ enum pmic_id { #define TPS65215_ENABLE_LDO2_EN_MASK BIT(5) #define TPS65214_ENABLE_LDO1_EN_MASK BIT(5) #define TPS65219_ENABLE_LDO4_EN_MASK BIT(6) +/* Register Lock */ +#define TPS65214_LOCK_ACCESS_CMD 0x5a /* power ON-OFF sequence slot */ #define TPS65219_BUCKS_LDOS_SEQUENCE_OFF_SLOT_MASK GENMASK(3, 0) #define TPS65219_BUCKS_LDOS_SEQUENCE_ON_SLOT_MASK GENMASK(7, 4) -- 2.43.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] mfd: tps65219: Implement LOCK register handling for TPS65214 2025-11-06 10:49 ` [PATCH v2 1/2] mfd: tps65219: Implement LOCK register handling for TPS65214 Kory Maincent (TI.com) @ 2025-11-06 22:18 ` kernel test robot 2025-11-10 13:42 ` Lee Jones 0 siblings, 1 reply; 7+ messages in thread From: kernel test robot @ 2025-11-06 22:18 UTC (permalink / raw) To: Kory Maincent (TI.com), Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros, Tony Lindgren, Lee Jones, Shree Ramamoorthy, Rob Herring, Krzysztof Kozlowski, Conor Dooley Cc: oe-kbuild-all, Andrew Davis, Bajjuri Praneeth, Thomas Petazzoni, linux-omap, linux-kernel, devicetree, Kory Maincent (TI.com), stable Hi Kory, kernel test robot noticed the following build warnings: [auto build test WARNING on 1c353dc8d962de652bc7ad2ba2e63f553331391c] url: https://github.com/intel-lab-lkp/linux/commits/Kory-Maincent-TI-com/mfd-tps65219-Implement-LOCK-register-handling-for-TPS65214/20251106-185551 base: 1c353dc8d962de652bc7ad2ba2e63f553331391c patch link: https://lore.kernel.org/r/20251106-fix_tps65219-v2-1-a7d608c4272f%40bootlin.com patch subject: [PATCH v2 1/2] mfd: tps65219: Implement LOCK register handling for TPS65214 config: i386-buildonly-randconfig-003-20251107 (https://download.01.org/0day-ci/archive/20251107/202511070607.Il9q9meO-lkp@intel.com/config) compiler: gcc-13 (Debian 13.3.0-16) 13.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251107/202511070607.Il9q9meO-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202511070607.Il9q9meO-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/mfd/tps65219.c: In function 'tps65214_reg_write': >> drivers/mfd/tps65219.c:479:26: warning: variable 'tps' set but not used [-Wunused-but-set-variable] 479 | struct tps65219 *tps; | ^~~ vim +/tps +479 drivers/mfd/tps65219.c 475 476 static int tps65214_reg_write(void *context, unsigned int reg, unsigned int val) 477 { 478 struct i2c_client *i2c = context; > 479 struct tps65219 *tps; 480 int ret; 481 482 if (val > 0xff || reg > 0xff) 483 return -EINVAL; 484 485 tps = i2c_get_clientdata(i2c); 486 ret = i2c_smbus_write_byte_data(i2c, TPS65214_REG_LOCK, 487 TPS65214_LOCK_ACCESS_CMD); 488 if (ret) 489 return ret; 490 491 ret = i2c_smbus_write_byte_data(i2c, reg, val); 492 if (ret) 493 return ret; 494 495 return i2c_smbus_write_byte_data(i2c, TPS65214_REG_LOCK, 0); 496 } 497 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] mfd: tps65219: Implement LOCK register handling for TPS65214 2025-11-06 22:18 ` kernel test robot @ 2025-11-10 13:42 ` Lee Jones 2025-11-12 8:59 ` Kory Maincent 0 siblings, 1 reply; 7+ messages in thread From: Lee Jones @ 2025-11-10 13:42 UTC (permalink / raw) To: kernel test robot Cc: Kory Maincent (TI.com), Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros, Tony Lindgren, Shree Ramamoorthy, Rob Herring, Krzysztof Kozlowski, Conor Dooley, oe-kbuild-all, Andrew Davis, Bajjuri Praneeth, Thomas Petazzoni, linux-omap, linux-kernel, devicetree, stable On Fri, 07 Nov 2025, kernel test robot wrote: > Hi Kory, > > kernel test robot noticed the following build warnings: > > [auto build test WARNING on 1c353dc8d962de652bc7ad2ba2e63f553331391c] > > url: https://github.com/intel-lab-lkp/linux/commits/Kory-Maincent-TI-com/mfd-tps65219-Implement-LOCK-register-handling-for-TPS65214/20251106-185551 > base: 1c353dc8d962de652bc7ad2ba2e63f553331391c > patch link: https://lore.kernel.org/r/20251106-fix_tps65219-v2-1-a7d608c4272f%40bootlin.com > patch subject: [PATCH v2 1/2] mfd: tps65219: Implement LOCK register handling for TPS65214 > config: i386-buildonly-randconfig-003-20251107 (https://download.01.org/0day-ci/archive/20251107/202511070607.Il9q9meO-lkp@intel.com/config) > compiler: gcc-13 (Debian 13.3.0-16) 13.3.0 > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251107/202511070607.Il9q9meO-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot <lkp@intel.com> > | Closes: https://lore.kernel.org/oe-kbuild-all/202511070607.Il9q9meO-lkp@intel.com/ > > All warnings (new ones prefixed by >>): > > drivers/mfd/tps65219.c: In function 'tps65214_reg_write': > >> drivers/mfd/tps65219.c:479:26: warning: variable 'tps' set but not used [-Wunused-but-set-variable] > 479 | struct tps65219 *tps; > | ^~~ > > > vim +/tps +479 drivers/mfd/tps65219.c > > 475 > 476 static int tps65214_reg_write(void *context, unsigned int reg, unsigned int val) > 477 { > 478 struct i2c_client *i2c = context; > > 479 struct tps65219 *tps; Please fix. -- Lee Jones [李琼斯] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] mfd: tps65219: Implement LOCK register handling for TPS65214 2025-11-10 13:42 ` Lee Jones @ 2025-11-12 8:59 ` Kory Maincent 0 siblings, 0 replies; 7+ messages in thread From: Kory Maincent @ 2025-11-12 8:59 UTC (permalink / raw) To: Lee Jones Cc: kernel test robot, Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros, Tony Lindgren, Shree Ramamoorthy, Rob Herring, Krzysztof Kozlowski, Conor Dooley, oe-kbuild-all, Andrew Davis, Bajjuri Praneeth, Thomas Petazzoni, linux-omap, linux-kernel, devicetree, stable On Mon, 10 Nov 2025 13:42:21 +0000 Lee Jones <lee@kernel.org> wrote: > On Fri, 07 Nov 2025, kernel test robot wrote: > > > Hi Kory, > > > > kernel test robot noticed the following build warnings: > > > > [auto build test WARNING on 1c353dc8d962de652bc7ad2ba2e63f553331391c] > > > > url: > > https://github.com/intel-lab-lkp/linux/commits/Kory-Maincent-TI-com/mfd-tps65219-Implement-LOCK-register-handling-for-TPS65214/20251106-185551 > > base: 1c353dc8d962de652bc7ad2ba2e63f553331391c patch link: > > https://lore.kernel.org/r/20251106-fix_tps65219-v2-1-a7d608c4272f%40bootlin.com > > patch subject: [PATCH v2 1/2] mfd: tps65219: Implement LOCK register > > handling for TPS65214 config: i386-buildonly-randconfig-003-20251107 > > (https://download.01.org/0day-ci/archive/20251107/202511070607.Il9q9meO-lkp@intel.com/config) > > compiler: gcc-13 (Debian 13.3.0-16) 13.3.0 reproduce (this is a W=1 build): > > (https://download.01.org/0day-ci/archive/20251107/202511070607.Il9q9meO-lkp@intel.com/reproduce) > > > > If you fix the issue in a separate patch/commit (i.e. not just a new > > version of the same patch/commit), kindly add following tags > > | Reported-by: kernel test robot <lkp@intel.com> > > | Closes: > > https://lore.kernel.org/oe-kbuild-all/202511070607.Il9q9meO-lkp@intel.com/ > > > > All warnings (new ones prefixed by >>): > > > > drivers/mfd/tps65219.c: In function 'tps65214_reg_write': > > >> drivers/mfd/tps65219.c:479:26: warning: variable 'tps' set but not used > > >> [-Wunused-but-set-variable] > > 479 | struct tps65219 *tps; > > | ^~~ > > > > > > vim +/tps +479 drivers/mfd/tps65219.c > > > > 475 > > 476 static int tps65214_reg_write(void *context, unsigned int > > reg, unsigned int val) 477 { > > 478 struct i2c_client *i2c = context; > > > 479 struct tps65219 *tps; > > Please fix. Yes, I will do it this week, I was waiting for few days in case of more reviews. Regards, -- Köry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] ARM: dts: am335x-bonegreen-eco: Enable 1GHz OPP by increasing vdd_mpu voltage 2025-11-06 10:49 [PATCH v2 0/2] Enable 1GHz OPP am335x-bonegreen-eco Kory Maincent (TI.com) 2025-11-06 10:49 ` [PATCH v2 1/2] mfd: tps65219: Implement LOCK register handling for TPS65214 Kory Maincent (TI.com) @ 2025-11-06 10:49 ` Kory Maincent (TI.com) 2025-11-07 21:25 ` [PATCH v2 0/2] Enable 1GHz OPP am335x-bonegreen-eco Shree Ramamoorthy 2 siblings, 0 replies; 7+ messages in thread From: Kory Maincent (TI.com) @ 2025-11-06 10:49 UTC (permalink / raw) To: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros, Tony Lindgren, Lee Jones, Shree Ramamoorthy, Rob Herring, Krzysztof Kozlowski, Conor Dooley Cc: Andrew Davis, Bajjuri Praneeth, Thomas Petazzoni, linux-omap, linux-kernel, devicetree, Kory Maincent (TI.com) The vdd_mpu regulator maximum voltage was previously limited to 1.2985V, which prevented the CPU from reaching the 1GHz operating point. This limitation was put in place because voltage changes were not working correctly, causing the board to stall when attempting higher frequencies. With the recent TPS65219 PMIC driver fixes that properly implement the LOCK register handling, voltage transitions now work reliably. Increase the maximum voltage to 1.3515V to allow the full 1GHz OPP to be used. Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com> --- arch/arm/boot/dts/ti/omap/am335x-bonegreen-eco.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/ti/omap/am335x-bonegreen-eco.dts b/arch/arm/boot/dts/ti/omap/am335x-bonegreen-eco.dts index d21118cdb6c2c..f00abfdd2cbd4 100644 --- a/arch/arm/boot/dts/ti/omap/am335x-bonegreen-eco.dts +++ b/arch/arm/boot/dts/ti/omap/am335x-bonegreen-eco.dts @@ -63,7 +63,7 @@ regulators { buck1: buck1 { regulator-name = "vdd_mpu"; regulator-min-microvolt = <925000>; - regulator-max-microvolt = <1298500>; + regulator-max-microvolt = <1351500>; regulator-boot-on; regulator-always-on; }; -- 2.43.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] Enable 1GHz OPP am335x-bonegreen-eco 2025-11-06 10:49 [PATCH v2 0/2] Enable 1GHz OPP am335x-bonegreen-eco Kory Maincent (TI.com) 2025-11-06 10:49 ` [PATCH v2 1/2] mfd: tps65219: Implement LOCK register handling for TPS65214 Kory Maincent (TI.com) 2025-11-06 10:49 ` [PATCH v2 2/2] ARM: dts: am335x-bonegreen-eco: Enable 1GHz OPP by increasing vdd_mpu voltage Kory Maincent (TI.com) @ 2025-11-07 21:25 ` Shree Ramamoorthy 2 siblings, 0 replies; 7+ messages in thread From: Shree Ramamoorthy @ 2025-11-07 21:25 UTC (permalink / raw) To: Kory Maincent (TI.com), Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros, Tony Lindgren, Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley Cc: Andrew Davis, Bajjuri Praneeth, Thomas Petazzoni, linux-omap, linux-kernel, devicetree, stable Hi Kory, On 11/6/2025 4:49 AM, Kory Maincent (TI.com) wrote: > The vdd_mpu regulator maximum voltage was previously limited to 1.2985V, > which prevented the CPU from reaching the 1GHz operating point. This > limitation was put in place because voltage changes were not working > correctly, causing the board to stall when attempting higher frequencies. > Increase the maximum voltage to 1.3515V to allow the full 1GHz OPP to be > used. > > Add a TPS65219 PMIC driver fixes that properly implement the LOCK register > handling, to make voltage transitions work reliably. > > Changes in v2: > - Setup a custom regmap_bus only for the TPS65214 instead of checking > the chip_id every time reg_write is called. > - Add the am335x-bonegreen-eco devicetree change in the same patch > series. Reviewed-by: Shree Ramamoorthy <s-ramamoorthy@ti.com> > > Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com> > --- > Kory Maincent (TI.com) (2): > mfd: tps65219: Implement LOCK register handling for TPS65214 > ARM: dts: am335x-bonegreen-eco: Enable 1GHz OPP by increasing vdd_mpu voltage > > arch/arm/boot/dts/ti/omap/am335x-bonegreen-eco.dts | 2 +- > drivers/mfd/tps65219.c | 51 +++++++++++++++++++++- > include/linux/mfd/tps65219.h | 2 + > 3 files changed, 53 insertions(+), 2 deletions(-) > --- > base-commit: 1c353dc8d962de652bc7ad2ba2e63f553331391c > change-id: 20251106-fix_tps65219-dd62141d22cf > > Best regards, ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-11-12 8:59 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-11-06 10:49 [PATCH v2 0/2] Enable 1GHz OPP am335x-bonegreen-eco Kory Maincent (TI.com) 2025-11-06 10:49 ` [PATCH v2 1/2] mfd: tps65219: Implement LOCK register handling for TPS65214 Kory Maincent (TI.com) 2025-11-06 22:18 ` kernel test robot 2025-11-10 13:42 ` Lee Jones 2025-11-12 8:59 ` Kory Maincent 2025-11-06 10:49 ` [PATCH v2 2/2] ARM: dts: am335x-bonegreen-eco: Enable 1GHz OPP by increasing vdd_mpu voltage Kory Maincent (TI.com) 2025-11-07 21:25 ` [PATCH v2 0/2] Enable 1GHz OPP am335x-bonegreen-eco Shree Ramamoorthy
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).