diff mbox

[U-Boot,33/55] dm: video: Add support for the NXP PTN3460 bridge

Message ID 1435882592-487-34-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass July 3, 2015, 12:16 a.m. UTC
This chip provides an eDP to LVDS bridge which is useful for SoCs that don't
support LVDS displays (or it would waste scarce pins). There is no setup
required by this chip, other than to adjust power-down and reset pins, and
those are managed by the uclass.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/video/bridge/Kconfig   |  9 +++++++++
 drivers/video/bridge/Makefile  |  1 +
 drivers/video/bridge/ptn3460.c | 38 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 48 insertions(+)
 create mode 100644 drivers/video/bridge/ptn3460.c

Comments

Simon Glass July 27, 2015, 11:30 p.m. UTC | #1
On 2 July 2015 at 18:16, Simon Glass <sjg@chromium.org> wrote:
> This chip provides an eDP to LVDS bridge which is useful for SoCs that don't
> support LVDS displays (or it would waste scarce pins). There is no setup
> required by this chip, other than to adjust power-down and reset pins, and
> those are managed by the uclass.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  drivers/video/bridge/Kconfig   |  9 +++++++++
>  drivers/video/bridge/Makefile  |  1 +
>  drivers/video/bridge/ptn3460.c | 38 ++++++++++++++++++++++++++++++++++++++
>  3 files changed, 48 insertions(+)
>  create mode 100644 drivers/video/bridge/ptn3460.c

Applied to u-boot-dm.
diff mbox

Patch

diff --git a/drivers/video/bridge/Kconfig b/drivers/video/bridge/Kconfig
index 589795d..2a3b6c4 100644
--- a/drivers/video/bridge/Kconfig
+++ b/drivers/video/bridge/Kconfig
@@ -16,3 +16,12 @@  config VIDEO_BRIDGE_PARADE_PS862X
 	  to be connected to an eDP output device such as an SoC that lacks
 	  LVDS capability, or where LVDS requires too many signals to route
 	  on the PCB. Setup parameters are provided in the device tree.
+
+config VIDEO_BRIDGE_NXP_PTN3460
+	bool "Support NXP PTN3460 DP->LVDS bridge"
+	depends on VIDEO_BRIDGE
+	help
+	  The NXP PTN3460 is a DisplayPort-to-LVDS (Low voltage differential
+	  signalling) converter. It enables an LVDS LCD panel to be connected
+	  to an eDP output device such as an SoC that lacks LVDS capability,
+	  or where LVDS requires too many signals to route on the PCB.
diff --git a/drivers/video/bridge/Makefile b/drivers/video/bridge/Makefile
index c7cc563..ce731fa 100644
--- a/drivers/video/bridge/Makefile
+++ b/drivers/video/bridge/Makefile
@@ -6,3 +6,4 @@ 
 
 obj-$(CONFIG_VIDEO_BRIDGE) += video-bridge-uclass.o
 obj-$(CONFIG_VIDEO_BRIDGE_PARADE_PS862X) += ps862x.o
+obj-$(CONFIG_VIDEO_BRIDGE_NXP_PTN3460) += ptn3460.o
diff --git a/drivers/video/bridge/ptn3460.c b/drivers/video/bridge/ptn3460.c
new file mode 100644
index 0000000..2e2ae7c
--- /dev/null
+++ b/drivers/video/bridge/ptn3460.c
@@ -0,0 +1,38 @@ 
+/*
+ * Copyright (C) 2015 Google, Inc
+ * Written by Simon Glass <sjg@chromium.org>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <video_bridge.h>
+
+static int ptn3460_attach(struct udevice *dev)
+{
+	int ret;
+
+	debug("%s: %s\n", __func__, dev->name);
+	ret = video_bridge_set_active(dev, true);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+
+struct video_bridge_ops ptn3460_ops = {
+	.attach = ptn3460_attach,
+};
+
+static const struct udevice_id ptn3460_ids[] = {
+	{ .compatible = "nxp,ptn3460", },
+	{ }
+};
+
+U_BOOT_DRIVER(parade_ptn3460) = {
+	.name	= "nmp_ptn3460",
+	.id	= UCLASS_VIDEO_BRIDGE,
+	.of_match = ptn3460_ids,
+	.ops	= &ptn3460_ops,
+};