diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index f8f0239..d03626e 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -1,3 +1,7 @@
+menu "Power"
+
+source "drivers/power/pmic/Kconfig"
+
 config AXP221_POWER
 	boolean "axp221 / axp223 pmic support"
 	depends on MACH_SUN6I || MACH_SUN8I
@@ -73,3 +77,5 @@
 	disable eldo3. On some A31(s) tablets it might be used to supply
 	1.2V for the SSD2828 chip (converter of parallel LCD interface
 	into MIPI DSI).
+
+endmenu
diff --git a/drivers/power/pmic/Kconfig b/drivers/power/pmic/Kconfig
new file mode 100644
index 0000000..d06d632
--- /dev/null
+++ b/drivers/power/pmic/Kconfig
@@ -0,0 +1,11 @@
+config DM_PMIC
+	bool "Enable Driver Model for PMIC drivers (UCLASS_PMIC)"
+	depends on DM
+	---help---
+	This config enables the driver-model PMIC support.
+	UCLASS_PMIC - designed to provide an I/O interface for PMIC devices.
+	For the multi-function PMIC devices, this can be used as parent I/O
+	device for each IC's interface. Then, each children uses its parent
+	for read/write. For detailed description, please refer to the files:
+	- 'drivers/power/pmic/pmic-uclass.c'
+	- 'include/power/pmic.h'
diff --git a/drivers/power/pmic/Makefile b/drivers/power/pmic/Makefile
index 985cfdb..594f620 100644
--- a/drivers/power/pmic/Makefile
+++ b/drivers/power/pmic/Makefile
@@ -5,6 +5,7 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
+obj-$(CONFIG_DM_PMIC) += pmic-uclass.o
 obj-$(CONFIG_POWER_LTC3676) += pmic_ltc3676.o
 obj-$(CONFIG_POWER_MAX8998) += pmic_max8998.o
 obj-$(CONFIG_POWER_MAX8997) += pmic_max8997.o
diff --git a/drivers/power/pmic/pmic-uclass.c b/drivers/power/pmic/pmic-uclass.c
new file mode 100644
index 0000000..d82d3da
--- /dev/null
+++ b/drivers/power/pmic/pmic-uclass.c
@@ -0,0 +1,158 @@
+/*
+ * Copyright (C) 2014-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 <dm/lists.h>
+#include <dm/device-internal.h>
+#include <dm/uclass-internal.h>
+#include <power/pmic.h>
+#include <linux/ctype.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static ulong str_get_num(const char *ptr, const char *maxptr)
+{
+	if (!ptr || !maxptr)
+		return 0;
+
+	while (!isdigit(*ptr) && ptr++ < maxptr);
+
+	return simple_strtoul(ptr, NULL, 0);
+}
+
+int pmic_bind_childs(struct udevice *pmic, int offset,
+		     const struct pmic_child_info *child_info)
+{
+	const struct pmic_child_info *info;
+	const void *blob = gd->fdt_blob;
+	struct driver *drv;
+	struct udevice *child;
+	const char *node_name;
+	int node_name_len;
+	int bind_count = 0;
+	int node;
+	int prefix_len;
+	int ret;
+
+	debug("%s for '%s' at node offset: %d\n", __func__, pmic->name,
+	      pmic->of_offset);
+
+	for (node = fdt_first_subnode(blob, offset);
+	     node > 0;
+	     node = fdt_next_subnode(blob, node)) {
+		node_name = fdt_get_name(blob, node, &node_name_len);
+
+		debug("* Found child node: '%s' at offset:%d\n", node_name,
+								 node);
+
+		child = NULL;
+		info = child_info;
+		while (info->prefix) {
+			prefix_len = strlen(info->prefix);
+			if (strncasecmp(info->prefix, node_name, prefix_len) ||
+			    !info->driver) {
+				info++;
+				continue;
+			}
+
+			debug("  - compatible prefix: '%s'\n", info->prefix);
+
+			drv = lists_driver_lookup_name(info->driver);
+			if (!drv) {
+				debug("  - driver: '%s' not found!\n",
+				      info->driver);
+				continue;
+			}
+
+			debug("  - found child driver: '%s'\n", drv->name);
+
+			ret = device_bind(pmic, drv, node_name, NULL,
+					  node, &child);
+			if (ret) {
+				debug("  - child binding error: %d\n", ret);
+				continue;
+			}
+
+			debug("  - bound child device: '%s'\n", child->name);
+
+			child->driver_data = str_get_num(node_name +
+							 prefix_len,
+							 node_name +
+							 node_name_len);
+
+			debug("  - set 'child->driver_data': %lu\n",
+			      child->driver_data);
+			break;
+		}
+
+		if (child)
+			bind_count++;
+		else
+			debug("  - compatible prefix not found\n");
+	}
+
+	debug("Bound: %d childs for PMIC: '%s'\n", bind_count, pmic->name);
+	return bind_count;
+}
+
+int pmic_get(const char *name, struct udevice **devp)
+{
+	return uclass_get_device_by_name(UCLASS_PMIC, name, devp);
+}
+
+int pmic_reg_count(struct udevice *dev)
+{
+	const struct dm_pmic_ops *ops = dev_get_driver_ops(dev);
+	if (!ops)
+		return -ENOSYS;
+
+	return ops->reg_count;
+}
+
+int pmic_read(struct udevice *dev, uint reg, uint8_t *buffer, int len)
+{
+	const struct dm_pmic_ops *ops = dev_get_driver_ops(dev);
+	int ret;
+
+	if (!buffer)
+		return -EFAULT;
+
+	if (!ops || !ops->read)
+		return -ENOSYS;
+
+	ret = ops->read(dev, reg, buffer, len);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+
+int pmic_write(struct udevice *dev, uint reg, const uint8_t *buffer, int len)
+{
+	const struct dm_pmic_ops *ops = dev_get_driver_ops(dev);
+	int ret;
+
+	if (!buffer)
+		return -EFAULT;
+
+	if (!ops || !ops->write)
+		return -ENOSYS;
+
+	ret = ops->write(dev, reg, buffer, len);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+
+UCLASS_DRIVER(pmic) = {
+	.id		= UCLASS_PMIC,
+	.name		= "pmic",
+};
