diff --git a/drivers/power/pmic/sandbox.c b/drivers/power/pmic/sandbox.c
new file mode 100644
index 0000000..3e56acd
--- /dev/null
+++ b/drivers/power/pmic/sandbox.c
@@ -0,0 +1,79 @@
+/*
+ *  Copyright (C) 2015 Samsung Electronics
+ *  Przemyslaw Marczak  <p.marczak@samsung.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
+#include <fdtdec.h>
+#include <errno.h>
+#include <dm.h>
+#include <i2c.h>
+#include <power/pmic.h>
+#include <power/regulator.h>
+#include <power/sandbox_pmic.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static const struct pmic_child_info pmic_children_info[] = {
+	{ .prefix = SANDBOX_OF_LDO_PREFIX, .driver = SANDBOX_LDO_DRIVER },
+	{ .prefix = SANDBOX_OF_BUCK_PREFIX, .driver = SANDBOX_BUCK_DRIVER },
+	{ },
+};
+
+static int sandbox_pmic_reg_count(struct udevice *dev)
+{
+	return SANDBOX_PMIC_REG_COUNT;
+}
+
+static int sandbox_pmic_write(struct udevice *dev, uint reg,
+			      const uint8_t *buff, int len)
+{
+	if (dm_i2c_write(dev, reg, buff, len)) {
+		error("write error to device: %p register: %#x!", dev, reg);
+		return -EIO;
+	}
+
+	return 0;
+}
+
+static int sandbox_pmic_read(struct udevice *dev, uint reg,
+			     uint8_t *buff, int len)
+{
+	if (dm_i2c_read(dev, reg, buff, len)) {
+		error("read error from device: %p register: %#x!", dev, reg);
+		return -EIO;
+	}
+
+	return 0;
+}
+
+static int sandbox_pmic_bind(struct udevice *dev)
+{
+	if (!pmic_bind_children(dev, dev->of_offset, pmic_children_info))
+		error("%s:%d PMIC: %s - no child found!", __func__, __LINE__,
+							  dev->name);
+
+	/* Always return success for this device - allows for PMIC I/O */
+	return 0;
+}
+
+static struct dm_pmic_ops sandbox_pmic_ops = {
+	.reg_count = sandbox_pmic_reg_count,
+	.read = sandbox_pmic_read,
+	.write = sandbox_pmic_write,
+};
+
+static const struct udevice_id sandbox_pmic_ids[] = {
+	{ .compatible = "sandbox,pmic" },
+	{ }
+};
+
+U_BOOT_DRIVER(sandbox_pmic) = {
+	.name = "sandbox_pmic",
+	.id = UCLASS_PMIC,
+	.of_match = sandbox_pmic_ids,
+	.bind = sandbox_pmic_bind,
+	.ops = &sandbox_pmic_ops,
+};
