diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig
index bb00de7..447c4c3 100644
--- a/drivers/input/Kconfig
+++ b/drivers/input/Kconfig
@@ -1,3 +1,12 @@
+config DM_KEYBOARD
+	bool "Enable driver model keyboard support"
+	depends on DM
+	help
+	  This adds a uclass for keyboards and implements keyboard support
+	  using driver model. The API is implemented by keyboard.h and
+	  includes methods to start/stop the device, check for available
+	  input and update LEDs if the keyboard has them.
+
 config CROS_EC_KEYB
 	bool "Enable Chrome OS EC keyboard support"
 	help
diff --git a/drivers/input/Makefile b/drivers/input/Makefile
index b1161c5..9388dfe 100644
--- a/drivers/input/Makefile
+++ b/drivers/input/Makefile
@@ -5,6 +5,8 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
+obj-$(CONFIG_DM_KEYBOARD) += keyboard-uclass.o
+
 obj-$(CONFIG_I8042_KBD) += i8042.o
 obj-$(CONFIG_TEGRA_KEYBOARD) += tegra-kbc.o
 obj-$(CONFIG_TWL4030_INPUT) += twl4030.o
diff --git a/drivers/input/keyboard-uclass.c b/drivers/input/keyboard-uclass.c
new file mode 100644
index 0000000..e2ce25c
--- /dev/null
+++ b/drivers/input/keyboard-uclass.c
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2015 Google, Inc
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <keyboard.h>
+
+static int keyboard_start(struct stdio_dev *sdev)
+{
+	struct udevice *dev = sdev->priv;
+	struct keyboard_ops *ops = keyboard_get_ops(dev);
+
+	if (ops->start)
+		return ops->start(dev);
+
+	return 0;
+}
+
+static int keyboard_stop(struct stdio_dev *sdev)
+{
+	struct udevice *dev = sdev->priv;
+	struct keyboard_ops *ops = keyboard_get_ops(dev);
+
+	if (ops->stop)
+		return ops->stop(dev);
+
+	return 0;
+}
+
+static int keyboard_tstc(struct stdio_dev *sdev)
+{
+	struct udevice *dev = sdev->priv;
+	struct keyboard_priv *priv = dev_get_uclass_priv(dev);
+	struct keyboard_ops *ops = keyboard_get_ops(dev);
+
+	/* Just get input to do this for us if we can */
+	if (priv->input.dev)
+		return input_tstc(&priv->input);
+	else if (ops->tstc)
+		return ops->tstc(dev);
+
+	return -ENOSYS;
+}
+
+static int keyboard_getc(struct stdio_dev *sdev)
+{
+	struct udevice *dev = sdev->priv;
+	struct keyboard_priv *priv = dev_get_uclass_priv(dev);
+	struct keyboard_ops *ops = keyboard_get_ops(dev);
+
+	/* Just get input to do this for us if we can */
+	if (priv->input.dev)
+		return input_getc(&priv->input);
+	else if (ops->getc)
+		return ops->getc(dev);
+
+	return -ENOSYS;
+}
+
+static int keyboard_pre_probe(struct udevice *dev)
+{
+	struct keyboard_priv *priv = dev_get_uclass_priv(dev);
+	struct stdio_dev *sdev = &priv->sdev;
+	int ret;
+
+	strlcpy(sdev->name, dev->name, sizeof(sdev->name));
+	sdev->flags = DEV_FLAGS_INPUT;
+	sdev->getc = keyboard_getc;
+	sdev->tstc = keyboard_tstc;
+	sdev->start = keyboard_start;
+	sdev->stop = keyboard_stop;
+	sdev->priv = dev;
+	ret = input_init(&priv->input, 0);
+	if (ret) {
+		debug("%s: Cannot set up input, ret=%d - please add DEBUG to drivers/input/input.c to figure out the cause\n",
+		      __func__, ret);
+		return ret;
+	}
+
+	return 0;
+}
+
+UCLASS_DRIVER(keyboard) = {
+	.id		= UCLASS_KEYBOARD,
+	.name		= "keyboard",
+	.pre_probe	= keyboard_pre_probe,
+	.per_device_auto_alloc_size = sizeof(struct keyboard_priv),
+};
