From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guennadi Liakhovetski Date: Thu, 08 Jul 2010 14:13:14 +0000 Subject: [PATCH 5/6 v2] fbdev: sh-mobile: HDMI support for SH-Mobile SoCs Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-fbdev@vger.kernel.org Some SH-Mobile SoCs have an HDMI controller and a PHY, attached to one of their LCDC interfaces. This patch adds a preliminary static support for such controllers, this means, that only the 720p mode is handled ATM. Support for more modes and a dynamic switching between them will be added by a follow up patch. Signed-off-by: Guennadi Liakhovetski --- v2: 1. Switched to using runtime pm in SH HDMI 2. Removed platform-specific clock configuration from the HDMI driver 3. Switched to using "clk_get(dev, "ick") for the interface clock 4. Removed accidental clk_enable / disable pair arch/arm/mach-shmobile/board-ap4evb.c | 1 + drivers/video/Kconfig | 8 + drivers/video/Makefile | 1 + drivers/video/sh_mobile_hdmi.c | 1028 +++++++++++++++++++++++++++++++++ drivers/video/sh_mobile_lcdcfb.c | 190 +++++-- include/video/sh_mobile_hdmi.h | 22 + 6 files changed, 1200 insertions(+), 50 deletions(-) create mode 100644 drivers/video/sh_mobile_hdmi.c create mode 100644 include/video/sh_mobile_hdmi.h diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 5d24d4e..3c61c9d 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c @@ -792,6 +792,7 @@ static void __init ap4evb_init(void) static void __init ap4evb_timer_init(void) { + clk_set_rate(&dv_clki_clk, 27000000); sh7372_clock_init(); shmobile_timer.init(); } diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 3dc1038..f00314f 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -1914,6 +1914,14 @@ config FB_SH_MOBILE_LCDC ---help--- Frame buffer driver for the on-chip SH-Mobile LCD controller. +config FB_SH_MOBILE_HDMI + tristate "SuperH Mobile HDMI controller support" + depends on FB_SH_MOBILE_LCDC + select FB_MODE_HELPERS + select PM_RUNTIME + ---help--- + Driver for the on-chip SH-Mobile HDMI controller. + config FB_TMIO tristate "Toshiba Mobile IO FrameBuffer support" depends on FB && MFD_CORE diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 3c3bf86..e525827 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -124,6 +124,7 @@ obj-$(CONFIG_FB_PS3) += ps3fb.o obj-$(CONFIG_FB_SM501) += sm501fb.o obj-$(CONFIG_FB_XILINX) += xilinxfb.o obj-$(CONFIG_SH_MIPI_DSI) += sh_mipi_dsi.o +obj-$(CONFIG_FB_SH_MOBILE_HDMI) += sh_mobile_hdmi.o obj-$(CONFIG_FB_SH_MOBILE_LCDC) += sh_mobile_lcdcfb.o obj-$(CONFIG_FB_OMAP) += omap/ obj-y += omap2/ diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c new file mode 100644 index 0000000..2fde08c --- /dev/null +++ b/drivers/video/sh_mobile_hdmi.c @@ -0,0 +1,1028 @@ +/* + * SH-Mobile High-Definition Multimedia Interface (HDMI) driver + * for SLISHDMI13T and SLIPHDMIT IP cores + * + * Copyright (C) 2010, Guennadi Liakhovetski + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include