Enable 1GHz OPP am335x-bonegreen-eco
Subsystems (5)
v5 cover Enable 1GHz OPP am335x-bonegreen-eco
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 v5:
- Add a error message.
- Link to v4: https://lore.kernel.org/r/[email protected]
Changes in v4:
- Move the registers unlock in the probe instead of a custom regmap write operation.
- Link to v3: https://lore.kernel.org/r/[email protected]
Changes in v3:
- Remove an unused variable
- Link to v2: https://lore.kernel.org/r/[email protected]
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.
---
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 | 9 +++++++++ include/linux/mfd/tps65219.h | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-)
---
base-commit: 2bb202416d33347102b12bbd1db4837fb6685617
change-id: 20251106-fix_tps65219-dd62141d22cf
Best regards,
Signature · 3 lines
Köry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com
PATCH v5 1/2 mfd: tps65219: Implement LOCK register handling for TPS65214
The TPS65214 PMIC variant has a LOCK_REG register that prevents writes to nearly all registers when locked. Unlock the registers at probe time and leave them unlocked permanently.
This approach is justified because:
- Register locking is very uncommon in typical system operation
- No code path is expected to lock the registers during runtime
- Adding a custom regmap write function would add overhead to every register write, including voltage changes triggered by CPU OPP transitions from the cpufreq governor which could happen quite frequently
---
Changes in v5:
- Add error message.
Changes in v4:
- Move the registers unlock in the probe instead of a custom regmap write operation.
Changes in v3:
- Removed unused variable.
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 | 9 +++++++++ include/linux/mfd/tps65219.h | 2 ++ 2 files changed, 11 insertions(+)
drivers/mfd/tps65219.c +9 -0
@@ -498,6 +498,15 @@ static int tps65219_probe(struct i2c_client *client)return ret; } +if (chip_id ==TPS65214 ) { + ret =i2c_smbus_write_byte_data (client,TPS65214_REG_LOCK , +TPS65214_LOCK_ACCESS_CMD ); +if (ret) { +dev_err (tps->dev,"Failed to unlock registers %d\n" , ret); +return ret; + } + } + ret =devm_regmap_add_irq_chip (tps->dev, tps->regmap, client->irq,IRQF_ONESHOT ,0 , pmic->irq_chip, &tps->irq_data);
include/linux/mfd/tps65219.h +2 -0
@@ -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 Unlock */ +#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)
Signature · 1 line
2.43.0
Re: (subset) [PATCH v5 1/2] mfd: tps65219: Implement LOCK register handling for TPS65214
Quoted 12 lines · Kory Maincent (TI.com)
The TPS65214 PMIC variant has a
LOCK_REGregister that prevents writes to nearly all registers when locked. Unlock the registers at probe time and leave them unlocked permanently.This approach is justified because:
- Register locking is very uncommon in typical system operation
- No code path is expected to lock the registers during runtime
- Adding a custom regmap write function would add overhead to every register write, including voltage changes triggered by CPU OPP transitions from the cpufreq governor which could happen quite frequently
Quoted 1 line
[...]
Applied, thanks!
[1/2] mfd: tps65219: Implement LOCK register handling for TPS65214
commit: 9ef5418bc106177f2330f7bf383f8a2cf29aa435
--
Lee Jones [李琼斯]
PATCH v5 2/2 ARM: dts: am335x-bonegreen-eco: Enable 1GHz OPP by increasing vdd_mpu voltage
In reply to 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.
--- arch/arm/boot/dts/ti/omap/am335x-bonegreen-eco.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/ti/omap/am335x-bonegreen-eco.dts +1 -1
@@ -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; };
Signature · 1 line
2.43.0