[U-Boot] [PATCH V2 09/13] sandbox: add: sandbox PMIC device drivers: I2C emul, pmic, regulator

Simon Glass sjg at chromium.org
Fri May 15 15:56:38 CEST 2015


On 13 May 2015 at 05:38, Przemyslaw Marczak <p.marczak at samsung.com> wrote:
> This commit adds emulation of sandbox PMIC device, which includes:
> - PMIC I2C emulation driver
> - PMIC I/O driver (UCLASS_PMIC)
> - PMIC regulator driver (UCLASS_REGULATOR)
>
> The sandbox PMIC has 12 significant registers and 4 as padding to 16 bytes,
> which allows using 'i2c md' command with the default count (16).
>
> The sandbox PMIC provides regulators:
> - 2x BUCK
> - 2x LDO
>
> Each, with adjustable output:
> - Enable state
> - Voltage
> - Current limit (LDO1/BUCK1 only)
> - Operation mode (different for BUCK and LDO)
>
> Each attribute has it's own register, beside the enable state, which depends
> on operation mode.
>
> The header file: sandbox_pmic.h includes PMIC's default register values,
> which are set on i2c pmic emul driver's probe() method.
>
> Signed-off-by: Przemyslaw Marczak <p.marczak at samsung.com>
> Acked-by: Simon Glass <sjg at chromium.org>
> Tested on sandbox:
> Tested-by: Simon Glass <sjg at chromium.org>
> ---
> Changes V2:
> - pmic emul driver: get the default register settings from fdt
> - cleanup of sandbox_pmic.h
> ---
>  doc/device-tree-bindings/pmic/sandbox.txt      |  35 +++
>  doc/device-tree-bindings/regulator/sandbox.txt |  45 ++++
>  drivers/power/pmic/Kconfig                     |  25 ++
>  drivers/power/pmic/Makefile                    |   3 +-
>  drivers/power/pmic/i2c_pmic_emul.c             | 142 ++++++++++
>  drivers/power/pmic/sandbox.c                   |  79 ++++++
>  drivers/power/regulator/Kconfig                |  30 +++
>  drivers/power/regulator/Makefile               |   1 +
>  drivers/power/regulator/sandbox.c              | 355 +++++++++++++++++++++++++
>  include/power/sandbox_pmic.h                   | 105 ++++++++
>  10 files changed, 819 insertions(+), 1 deletion(-)
>  create mode 100644 doc/device-tree-bindings/pmic/sandbox.txt
>  create mode 100644 doc/device-tree-bindings/regulator/sandbox.txt
>  create mode 100644 drivers/power/pmic/i2c_pmic_emul.c
>  create mode 100644 drivers/power/pmic/sandbox.c
>  create mode 100644 drivers/power/regulator/sandbox.c
>  create mode 100644 include/power/sandbox_pmic.h

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list