Commit Graph

10 Commits

Author SHA1 Message Date
Axel Lin 1e50433c57
regulator: pf8x00: Use regulator_map_voltage_ascend for pf8x00_buck7_ops
The voltages in pf8x00_sw7_voltages are in ascendant order, so use
regulator_map_voltage_ascend.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Adrien Grassein <adrien.grassein@gmail.com>
Link: https://lore.kernel.org/r/20210216060128.126938-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10 12:47:46 +00:00
Mark Brown f03e2a72e5
Merge remote-tracking branch 'regulator/for-5.12' into regulator-next 2021-02-12 14:00:07 +00:00
Axel Lin 64f09ea1b5
regulator: pf8x00: Fix typo for PF8200 chip name
Trivial typo fix.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Adrien Grassein <adrien.grassein@gmail.com>
Link: https://lore.kernel.org/r/20210128120151.554411-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-28 17:11:33 +00:00
Christoph Fritz 4288b4ccda
regulator: pf8x00: set ramp_delay for bucks
This patch sets ramp_delay for bucks to the max value given by the
datasheet.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Reviewed-by: Adrien Grassein <adrien.grassein@gmail.com>
Link: https://lore.kernel.org/r/60d8eb8feefd26380cc9c6503f835e569be90465.camel@googlemail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-25 17:17:56 +00:00
Christoph Fritz 7fefe72b0f
regulator: pf8x00: Add suspend support
This patch adds suspend/resume support so that it is possible to
configure the LDOs and BUCKs as on or off during suspend phase as
well as to configure suspend specific voltages.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Link: https://lore.kernel.org/r/4c2e79d4fa96befdc9a6c59c3ff27b0a34f9fb56.camel@googlemail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-25 13:11:04 +00:00
Adrien Grassein 475a5d85ff
regulator: pf8x00: fix nxp,phase-shift
Fix the ternary condition which is a bad coding style
in the kernel

I also remove the defering configuration of the nxp,phase-shift.
The configuration is now done at parsing time. It save some memory
and it's better for comprehension.

I also use the OTP default configuration when the parameter is wrong
or not specified.
I think that it's better to use the default configuration from the chip
than an arbitrary value.

Signed-off-by: Adrien Grassein <adrien.grassein@gmail.com>
Link: https://lore.kernel.org/r/20210114174714.122561-7-adrien.grassein@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-15 14:16:15 +00:00
Adrien Grassein 35a9334993
regulator: pf8x00: use linear range for buck 1-6
Use a linear range to describe the voltages of the
bucks 1-6 instead of listing it one by one (via a macro)

Signed-off-by: Adrien Grassein <adrien.grassein@gmail.com>
Link: https://lore.kernel.org/r/20210114174714.122561-6-adrien.grassein@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-15 14:16:14 +00:00
Adrien Grassein 245f5f6522
regulator: pf8x00: mark nxp,ilim-ma property as deprecated
This property seems useless because we can use the
regulator-max-microamp generic property to do the same
and using generic code.

As this property was already released in a kernel version,
we can't remove it, just mark it as deprecated.

Signed-off-by: Adrien Grassein <adrien.grassein@gmail.com>
Link: https://lore.kernel.org/r/20210114174714.122561-5-adrien.grassein@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-15 14:16:13 +00:00
Mark Brown df9716ec9a
regulator: pf8x00: Use specific compatible strings for devices
The pf8x00 driver supports three devices, the DT compatible strings
and I2C IDs should enumerate these specifically rather than using a
wildcard so that we don't collide with anything incompatible in the
same ID range in the future and so that we can handle any software
visible differences between the variants we find.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20201215132024.13356-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-16 13:53:55 +00:00
Jagan Teki d3795d6321
regulator: Add NXP PF8X00 regulator driver
Add NXP PF8100/PF8121A/PF8200 regulator driver.

PF8100/PF8121A/PF8200 is PMIC designed for highperformance
consumer applications. It features seven high efficiency buck,
four linear and one vsnvs regulators.

Tested in Engicam i.Core MX8M Mini SOM platform boards.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Link: https://lore.kernel.org/r/20201130112329.104614-2-jagan@amarulasolutions.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-30 12:56:19 +00:00