mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-14 03:06:59 +02:00
As per TRM[0] Section 8.7.1 "TPS6594-Q1 Registers", LDOx_Vout
bit 6-1, define the NVM voltage settings.
Along side table 8-4 of above TRM, shows voltage to value mapping.
Driver wrongly using bits 5-1 to calculate voltage, and to convert
voltage to value driver was using buck's calculation.
So fix those calculation.
[0]: https://www.ti.com/lit/ds/symlink/tps6594-q1.pdf
Fixes: 5d7dbd22cf
("power: regulator: tps65941: use function callbacks for conversion ops")
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
59 lines
1.7 KiB
C
59 lines
1.7 KiB
C
#define TPS659411 0x0
|
|
#define TPS659412 0x1
|
|
#define TPS659413 0x2
|
|
#define TPS659414 0x3
|
|
#define LP876441 0x4
|
|
#define TPS65224 0x5
|
|
|
|
/* I2C device address for pmic tps65941 */
|
|
#define TPS65941_I2C_ADDR (0x12 >> 1)
|
|
#define TPS65941_LDO_NUM 4
|
|
#define TPS65941_BUCK_NUM 5
|
|
#define TPS65224_LDO_NUM 3
|
|
#define TPS65224_BUCK_NUM 4
|
|
|
|
/* Drivers name */
|
|
#define TPS65941_LDO_DRIVER "tps65941_ldo"
|
|
#define TPS65941_BUCK_DRIVER "tps65941_buck"
|
|
|
|
#define TPS65941_BUCK_VOLT_MASK 0xFF
|
|
#define TPS65941_BUCK_VOLT_MAX_HEX 0xFF
|
|
#define TPS65941_BUCK_VOLT_MAX 3340000
|
|
#define TPS65941_BUCK_MODE_MASK 0x1
|
|
|
|
#define TPS65941_LDO_VOLT_MASK 0x7E
|
|
#define TPS65941_LDO_VOLT_MAX_HEX 0x3A
|
|
#define TPS65941_LDO_VOLT_MIN_HEX 0x4
|
|
#define TPS65941_LDO_VOLT_MAX 3300000
|
|
#define TPS65941_LDO_VOLT_MIN 600000
|
|
#define TPS65941_LDO_MODE_MASK 0x1
|
|
#define TPS65941_LDO_BYPASS_EN 0x80
|
|
#define TP65941_BUCK_CONF_SLEW_MASK 0x7
|
|
|
|
#define TPS65224_BUCK_VOLT_MAX 3300000
|
|
#define TPS65224_BUCK1_VOLT_MAX_HEX 0xFD
|
|
#define TPS65224_BUCK234_VOLT_MAX_HEX 0x45
|
|
|
|
#define TPS65224_BUCK_CONF_SLEW_MASK 0x3
|
|
#define TPS65224_LDO_VOLT_MASK (0x3F << 1)
|
|
|
|
#define TPS65224_LDO1_VOLT_MIN_HEX 0x0C
|
|
#define TPS65224_LDO23_VOLT_MIN_HEX 0x00
|
|
#define TPS65224_LDO1_VOLT_MAX_HEX 0x36
|
|
#define TPS65224_LDO23_VOLT_MAX_HEX 0x38
|
|
|
|
#define TPS65224_LDO1_VOLT_MAX 3300000
|
|
#define TPS65224_LDO23_VOLT_MAX 3400000
|
|
#define TPS65224_LDO1_VOLT_MIN 1200000
|
|
#define TPS65224_LDO23_VOLT_MIN 600000
|
|
|
|
#define TPS65224_LDO_STEP 50000
|
|
|
|
#define TPS65224_LDO_BYP_CONFIG 7
|
|
|
|
#define TPS65224_LDO1_VOLT_BYP_MIN 2200000
|
|
#define TPS65224_LDO1_VOLT_BYP_MAX 3600000
|
|
|
|
#define TPS65224_LDO23_VOLT_BYP_MIN 1500000
|
|
#define TPS65224_LDO23_VOLT_BYP_MAX 5500000
|