Discussion:
[U-Boot] [PATCH v5 2/3] rockchip: rk3399-puma: defconfig: enable FAN53555 regulator driver
Philipp Tomsich
2018-11-30 19:00:09 UTC
Permalink
With a driver for the FAN53555 regulator family available, let's
enable it for the RK3399-Q7 (which has two of these devices
on-module).

We enable this for the full U-Boot stage only, as these regulators
provide a suitable default voltage and supply non-critical (i.e.
for booting up) power rails only.

Signed-off-by: Philipp Tomsich <***@theobroma-systems.com>
---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

configs/puma-rk3399_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/configs/puma-rk3399_defconfig b/configs/puma-rk3399_defconfig
index bec03c7..e83a616 100644
--- a/configs/puma-rk3399_defconfig
+++ b/configs/puma-rk3399_defconfig
@@ -77,6 +77,7 @@ CONFIG_PINCTRL=y
CONFIG_SPL_PINCTRL=y
CONFIG_PINCTRL_ROCKCHIP_RK3399=y
CONFIG_DM_PMIC=y
+CONFIG_DM_PMIC_FAN53555=y
CONFIG_PMIC_RK8XX=y
CONFIG_SPL_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
--
2.1.4
Philipp Tomsich
2018-11-30 19:00:10 UTC
Permalink
This post might be inappropriate. Click to display it.
Philipp Tomsich
2018-12-10 00:01:53 UTC
Permalink
Post by Philipp Tomsich
Now that we have FAN53555 support, we can enable the regulators in our
DTS. To make these easier to identify on the U-Boot commandline, we
rename them to the names of the voltage rails they control.
---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None
arch/arm/dts/rk3399-puma.dtsi | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Applied to u-boot-rockchip, thanks!

Philipp Tomsich
2018-12-10 00:01:54 UTC
Permalink
This adds a driver for the FAN53555 family of regulators and wraps it
in a PMIC implementation.
While these devices support a 'normal' and 'suspend' mode (controlled
via an external pin) to switch between two programmable voltages, this
incarnation of the driver assumes that the device is always operating
in 'normal' mode.
Only setting/reading the programmed voltage is supported at this time
- switching the selected voltage (via a GPIO)
- disabling the voltage output via software-control
This matches the functionality of the Linux driver.
Tested on a RK3399-Q7 (with 'option 5' devices): setting voltages from
the U-Boot shell and verifying output voltages on the board.
---
- introduced a PMIC (as requested by SJG) to wrap the single regulator
- fix issues introduced when updating for review comments (sorry for
this: my submit-branch had diverged from the WIP-branch I used for
testing and I didn't notice)
- update for review comments
- adapted documentation on the device-tree binding from Linux
doc/device-tree-bindings/regulator/fan53555.txt | 23 +++
drivers/power/pmic/Kconfig | 14 ++
drivers/power/pmic/Makefile | 1 +
drivers/power/pmic/fan53555.c | 82 +++++++++
drivers/power/regulator/Kconfig | 16 ++
drivers/power/regulator/Makefile | 1 +
drivers/power/regulator/fan53555.c | 222 ++++++++++++++++++++++++
7 files changed, 359 insertions(+)
create mode 100644 doc/device-tree-bindings/regulator/fan53555.txt
create mode 100644 drivers/power/pmic/fan53555.c
create mode 100644 drivers/power/regulator/fan53555.c
Applied to u-boot-rockchip, thanks!
Philipp Tomsich
2018-12-10 00:01:54 UTC
Permalink
Post by Philipp Tomsich
With a driver for the FAN53555 regulator family available, let's
enable it for the RK3399-Q7 (which has two of these devices
on-module).
We enable this for the full U-Boot stage only, as these regulators
provide a suitable default voltage and supply non-critical (i.e.
for booting up) power rails only.
---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None
configs/puma-rk3399_defconfig | 1 +
1 file changed, 1 insertion(+)
Applied to u-boot-rockchip, thanks!
Loading...