Make the PWM mode on the buck controllers configurable from devicetree.
Some boards require forced PWM mode to keep the supply ripple within
acceptable limits under light load conditions.
Signed-off-by: Martijn de Gouw <martijn.de.gouw@prodrive-technologies.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20250525071823.819342-1-martijn.de.gouw@prodrive-technologies.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Add the compatible string "nxp,pf9453" for the PF9453 regulator. The PF9453
is similar to the PCA9460 but supports only LDO1, LDO2, LDO_SVNS, and
BUCK[1-4].
Restrict LDO and BUCK numbers for nxp,pf9453 and keep the same restriction
for other compatible strings.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20250314-pf9453-v5-1-ab0cf1f871b0@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This reverts commit 27866e3e8a and
implements a new future-proof way of handling the mismatch between
the PMIC driver and the hardware for LDO5.
It turned out that this feature was implemented based on the wrong
assumption that the SD_VSEL signal needs to be controlled as GPIO
in any case.
In fact the straight-forward approach is to mux the signal as
USDHC_VSELECT and let the USDHC controller do the job.
Most users never even used this property and the few who did have
been or are getting migrated to the alternative approach.
In order to know the current status (which of the two control
registers is used) for the LDO5 regulator, we need to route back the
USDHC_VSELECT signal by setting the SION bit in the IOMUX.
By adding the according GPIO as sd-vsel-gpios to the LDO5 node, we
allow the regulator driver to sample the current status of the
SD_VSEL signal that is used to select the correct control register.
The SD_VSEL on the PMIC is always an input. It's driven by the SoC's
VSELECT signal (controlled by the USDHC controller) and we use the
SION bit in the IOMUX to internally loop back the signal in order to
sample it using the GPIO.
As the SD_VSEL pin is directly routed to the LDO5 regulator in the
PMIC, make the sd-vsel-gpios property part of the LDO5 node.
SoC PMIC
+-----------------------+ +-------------------+
| | | |
| | | |
| GPIO <----------+ | | |
| | | SD_VSEL| +-------+ |
| USDHC_VSELECT ->+------------------->| LDO5 | |
| | | +-------+ |
| | | |
+-----------------------+ +-------------------+
For boards which have the SD_VSEL tied to a fixed low level, we add
'nxp,sd-vsel-fixed-low'. The voltage of LDO5 is therefore only controlled
by writing to the LDO5CTRL_L register.
If none of 'nxp,sd-vsel-fixed-low' or 'sd-vsel-gpios' is set, we keep
the same behavior as before. The driver assumes that SD_VSEL is tied
high and the LDO5CTRL_H register can be used, which is in fact not true
for all known boards and works merely by chance.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20241218152842.97483-2-frieder@fris.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Add compatible string 'nxp,pca9452'. pca9452 add 'ldo3' compared with
pca9451a.
Signed-off-by: Joy Zou <joy.zou@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20241205-pca9450-v1-3-aab448b74e78@nxp.com
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
The interrupt is optional in hardware and not connected on
some boards. Make it optional in the binding.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Link: https://patch.msgid.link/20240708084107.38986-3-frieder@fris.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Cleanup bindings dropping unneeded quotes. Once all these are fixed,
checking for this can be enabled in yamllint.
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230317233616.3968003-1-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Enable yamllint to check the preferred commenting style of requiring a
space after a comment character '#'. Fix the cases in the tree which
have a warning with this enabled. Most cases just need a space after the
'#'. A couple of cases with comments which were not intended to be
comments are revealed. Those were in ti,sa2ul.yaml, ti,cal.yaml, and
brcm,bcmgenet.yaml.
Acked-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # drm/msm
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20230303214223.49451-1-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
The device bindings shouldn't put any constraints on the regulator-name
property specified in the generic bindings. This allows using arbitrary
and descriptive names for the regulators.
Suggested-by: Mark Brown <broonie@kernel.org>
Fixes: 7ae9e3a6bf ("dt-bindings: regulator: add pca9450 regulator yaml")
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Link: https://lore.kernel.org/r/20220802064335.8481-1-frieder@fris.de
Signed-off-by: Mark Brown <broonie@kernel.org>
By setting nxp,i2c-lt-enable the I2C level translator is
enabled.
Signed-off-by: Per-Daniel Olsson <perdo@axis.com>
Signed-off-by: Rickard x Andersson <rickaran@axis.com>
Link: https://lore.kernel.org/r/20220429072211.24957-1-rickaran@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>