Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: max8973: add support to configure ETR from DT

The MAX8973/MAX77621 feature an Enhanced Transient Response(ETR)
circuit that is enabled through software. The enhanced transient
response reduces the voltage droop during large load steps by
temporarily allowing all three phases to fire in unison, slewing
total inductor current faster than would normally be possible if
all three phases continued to operate 120deg out of phase. The
enhanced transient response detector features two selectable
sensitivity settings, which select the output voltage slew rate
during load transients that triggers the ETR circuit. The sensitivity
of the ETR detector is set by the CKADV[1:0] bits in the CONTROL2
register.

Add support to configure the ETR through platform data from DT.
Update the DT binding document accordingly.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Laxman Dewangan and committed by
Mark Brown
3692db3a 127e1062

+25
+6
Documentation/devicetree/bindings/regulator/max8973-regulator.txt
··· 25 25 -maxim,enable-frequency-shift: boolean, enable 9% frequency shift. 26 26 -maxim,enable-bias-control: boolean, enable bias control. By enabling this 27 27 startup delay can be reduce to 20us from 220us. 28 + -maxim,enable-etr: boolean, enable Enhanced Transient Response. 29 + -maxim,enable-high-etr-sensitivity: boolean, Enhanced transient response 30 + circuit is enabled and set for high sensitivity. If this 31 + property is available then etr will be enable default. 32 + 33 + Enhanced transient response (ETR) will affect the configuration of CKADV. 28 34 29 35 Example: 30 36
+19
drivers/regulator/max8973-regulator.c
··· 421 421 struct device_node *np = dev->of_node; 422 422 int ret; 423 423 u32 pval; 424 + bool etr_enable; 425 + bool etr_sensitivity_high; 424 426 425 427 pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); 426 428 if (!pdata) ··· 453 451 454 452 if (of_property_read_bool(np, "maxim,enable-bias-control")) 455 453 pdata->control_flags |= MAX8973_CONTROL_BIAS_ENABLE; 454 + 455 + etr_enable = of_property_read_bool(np, "maxim,enable-etr"); 456 + etr_sensitivity_high = of_property_read_bool(np, 457 + "maxim,enable-high-etr-sensitivity"); 458 + if (etr_sensitivity_high) 459 + etr_enable = true; 460 + 461 + if (etr_enable) { 462 + if (etr_sensitivity_high) 463 + pdata->control_flags |= 464 + MAX8973_CONTROL_CLKADV_TRIP_75mV_PER_US; 465 + else 466 + pdata->control_flags |= 467 + MAX8973_CONTROL_CLKADV_TRIP_150mV_PER_US; 468 + } else { 469 + pdata->control_flags |= MAX8973_CONTROL_CLKADV_TRIP_DISABLED; 470 + } 456 471 457 472 return pdata; 458 473 }