Hello Simon,
On 05/10/2015 03:57 PM, Simon Glass wrote:
Hi Przemyslaw,
On 8 May 2015 at 10:20, Przemyslaw Marczak <p.marc...@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.marc...@samsung.com>
---
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 | 145 ++++++++++
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 | 189 +++++++++++++
10 files changed, 906 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
Acked-by: Simon Glass <s...@chromium.org>
Tested on sandbox:
Tested-by: Simon Glass <s...@chromium.org>
I expected i2c_pmic_emul to get its settings from the device tree too
- is that not possible for some reason?
Regards,
Simon
Hmm, I could add some reg default array to the emul node, will check it.
Best regards,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marc...@samsung.com
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot