[PATCHv2 2/4] OMAP: 2420SDP: Port the display driver to new DSS2
Port the old omapfb panel driver for 2420SDP to DSS2. Cc: Hunyue Yau h...@mvista.com Signed-off-by: Tomi Valkeinen tomi.valkei...@ti.com --- drivers/video/omap/Makefile |2 - drivers/video/omap/lcd_2430sdp.c | 203 -- drivers/video/omap2/displays/panel-generic-dpi.c | 21 +++ 3 files changed, 21 insertions(+), 205 deletions(-) delete mode 100644 drivers/video/omap/lcd_2430sdp.c diff --git a/drivers/video/omap/Makefile b/drivers/video/omap/Makefile index 37c03c2..43eb64a 100644 --- a/drivers/video/omap/Makefile +++ b/drivers/video/omap/Makefile @@ -27,8 +27,6 @@ objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1510.o objs-y$(CONFIG_MACH_OMAP_OSK) += lcd_osk.o objs-y$(CONFIG_MACH_OMAP_APOLLON) += lcd_apollon.o -objs-y$(CONFIG_MACH_OMAP_2430SDP) += lcd_2430sdp.o -objs-y$(CONFIG_MACH_OMAP_3430SDP) += lcd_2430sdp.o objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o objs-y$(CONFIG_MACH_HERALD) += lcd_htcherald.o diff --git a/drivers/video/omap/lcd_2430sdp.c b/drivers/video/omap/lcd_2430sdp.c deleted file mode 100644 index e3eccc9..000 --- a/drivers/video/omap/lcd_2430sdp.c +++ /dev/null @@ -1,203 +0,0 @@ -/* - * LCD panel support for the TI 2430SDP board - * - * Copyright (C) 2007 MontaVista - * Author: Hunyue Yau h...@mvista.com - * - * Derived from drivers/video/omap/lcd-apollon.c - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#include linux/module.h -#include linux/platform_device.h -#include linux/delay.h -#include linux/gpio.h -#include linux/i2c/twl.h - -#include plat/mux.h -#include asm/mach-types.h - -#include omapfb.h - -#define SDP2430_LCD_PANEL_BACKLIGHT_GPIO 91 -#define SDP2430_LCD_PANEL_ENABLE_GPIO 154 -#define SDP3430_LCD_PANEL_BACKLIGHT_GPIO 24 -#define SDP3430_LCD_PANEL_ENABLE_GPIO 28 - -static unsigned backlight_gpio; -static unsigned enable_gpio; - -#define LCD_PIXCLOCK_MAX 5400 /* freq 5.4 MHz */ -#define PM_RECEIVER TWL4030_MODULE_PM_RECEIVER -#define ENABLE_VAUX2_DEDICATED 0x09 -#define ENABLE_VAUX2_DEV_GRP0x20 -#define ENABLE_VAUX3_DEDICATED 0x03 -#define ENABLE_VAUX3_DEV_GRP 0x20 - -#define ENABLE_VPLL2_DEDICATED 0x05 -#define ENABLE_VPLL2_DEV_GRP0xE0 -#define TWL4030_VPLL2_DEV_GRP 0x33 -#define TWL4030_VPLL2_DEDICATED 0x36 - -#define t2_out(c, r, v) twl_i2c_write_u8(c, r, v) - - -static int sdp2430_panel_init(struct lcd_panel *panel, - struct omapfb_device *fbdev) -{ - if (machine_is_omap_3430sdp()) { - enable_gpio= SDP3430_LCD_PANEL_ENABLE_GPIO; - backlight_gpio = SDP3430_LCD_PANEL_BACKLIGHT_GPIO; - } else { - enable_gpio= SDP2430_LCD_PANEL_ENABLE_GPIO; - backlight_gpio = SDP2430_LCD_PANEL_BACKLIGHT_GPIO; - } - - gpio_request(enable_gpio, LCD enable);/* LCD panel */ - gpio_request(backlight_gpio, LCD bl); /* LCD backlight */ - gpio_direction_output(enable_gpio, 0); - gpio_direction_output(backlight_gpio, 0); - - return 0; -} - -static void sdp2430_panel_cleanup(struct lcd_panel *panel) -{ - gpio_free(backlight_gpio); - gpio_free(enable_gpio); -} - -static int sdp2430_panel_enable(struct lcd_panel *panel) -{ - u8 ded_val, ded_reg; - u8 grp_val, grp_reg; - - if (machine_is_omap_3430sdp()) { - ded_reg = TWL4030_VAUX3_DEDICATED; - ded_val = ENABLE_VAUX3_DEDICATED; - grp_reg = TWL4030_VAUX3_DEV_GRP; - grp_val = ENABLE_VAUX3_DEV_GRP; - - if (omap_rev() OMAP3430_REV_ES1_0) { - t2_out(PM_RECEIVER, ENABLE_VPLL2_DEDICATED, - TWL4030_VPLL2_DEDICATED); - t2_out(PM_RECEIVER, ENABLE_VPLL2_DEV_GRP, - TWL4030_VPLL2_DEV_GRP); - } - } else { - ded_reg = TWL4030_VAUX2_DEDICATED; - ded_val = ENABLE_VAUX2_DEDICATED; - grp_reg = TWL4030_VAUX2_DEV_GRP; - grp_val = ENABLE_VAUX2_DEV_GRP; - } - - gpio_set_value(enable_gpio, 1); - gpio_set_value(backlight_gpio, 1); - -
Re: [PATCHv2 2/4] OMAP: 2420SDP: Port the display driver to new DSS2
On Monday 12 September 2011 04:51 PM, Valkeinen, Tomi wrote: Port the old omapfb panel driver for 2420SDP to DSS2. Minor comment: The subject and commit message say 2420SDP, but patch says 2430SDP. I'll try to find the name of the panel. Archit Cc: Hunyue Yauh...@mvista.com Signed-off-by: Tomi Valkeinentomi.valkei...@ti.com --- drivers/video/omap/Makefile |2 - drivers/video/omap/lcd_2430sdp.c | 203 -- drivers/video/omap2/displays/panel-generic-dpi.c | 21 +++ 3 files changed, 21 insertions(+), 205 deletions(-) delete mode 100644 drivers/video/omap/lcd_2430sdp.c diff --git a/drivers/video/omap/Makefile b/drivers/video/omap/Makefile index 37c03c2..43eb64a 100644 --- a/drivers/video/omap/Makefile +++ b/drivers/video/omap/Makefile @@ -27,8 +27,6 @@ objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1510.o objs-y$(CONFIG_MACH_OMAP_OSK) += lcd_osk.o objs-y$(CONFIG_MACH_OMAP_APOLLON) += lcd_apollon.o -objs-y$(CONFIG_MACH_OMAP_2430SDP) += lcd_2430sdp.o -objs-y$(CONFIG_MACH_OMAP_3430SDP) += lcd_2430sdp.o objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o objs-y$(CONFIG_MACH_HERALD) += lcd_htcherald.o diff --git a/drivers/video/omap/lcd_2430sdp.c b/drivers/video/omap/lcd_2430sdp.c deleted file mode 100644 index e3eccc9..000 --- a/drivers/video/omap/lcd_2430sdp.c +++ /dev/null @@ -1,203 +0,0 @@ -/* - * LCD panel support for the TI 2430SDP board - * - * Copyright (C) 2007 MontaVista - * Author: Hunyue Yauh...@mvista.com - * - * Derived from drivers/video/omap/lcd-apollon.c - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#includelinux/module.h -#includelinux/platform_device.h -#includelinux/delay.h -#includelinux/gpio.h -#includelinux/i2c/twl.h - -#includeplat/mux.h -#includeasm/mach-types.h - -#include omapfb.h - -#define SDP2430_LCD_PANEL_BACKLIGHT_GPIO 91 -#define SDP2430_LCD_PANEL_ENABLE_GPIO 154 -#define SDP3430_LCD_PANEL_BACKLIGHT_GPIO 24 -#define SDP3430_LCD_PANEL_ENABLE_GPIO 28 - -static unsigned backlight_gpio; -static unsigned enable_gpio; - -#define LCD_PIXCLOCK_MAX 5400 /* freq 5.4 MHz */ -#define PM_RECEIVER TWL4030_MODULE_PM_RECEIVER -#define ENABLE_VAUX2_DEDICATED 0x09 -#define ENABLE_VAUX2_DEV_GRP0x20 -#define ENABLE_VAUX3_DEDICATED 0x03 -#define ENABLE_VAUX3_DEV_GRP 0x20 - -#define ENABLE_VPLL2_DEDICATED 0x05 -#define ENABLE_VPLL2_DEV_GRP0xE0 -#define TWL4030_VPLL2_DEV_GRP 0x33 -#define TWL4030_VPLL2_DEDICATED 0x36 - -#define t2_out(c, r, v) twl_i2c_write_u8(c, r, v) - - -static int sdp2430_panel_init(struct lcd_panel *panel, - struct omapfb_device *fbdev) -{ - if (machine_is_omap_3430sdp()) { - enable_gpio= SDP3430_LCD_PANEL_ENABLE_GPIO; - backlight_gpio = SDP3430_LCD_PANEL_BACKLIGHT_GPIO; - } else { - enable_gpio= SDP2430_LCD_PANEL_ENABLE_GPIO; - backlight_gpio = SDP2430_LCD_PANEL_BACKLIGHT_GPIO; - } - - gpio_request(enable_gpio, LCD enable); /* LCD panel */ - gpio_request(backlight_gpio, LCD bl); /* LCD backlight */ - gpio_direction_output(enable_gpio, 0); - gpio_direction_output(backlight_gpio, 0); - - return 0; -} - -static void sdp2430_panel_cleanup(struct lcd_panel *panel) -{ - gpio_free(backlight_gpio); - gpio_free(enable_gpio); -} - -static int sdp2430_panel_enable(struct lcd_panel *panel) -{ - u8 ded_val, ded_reg; - u8 grp_val, grp_reg; - - if (machine_is_omap_3430sdp()) { - ded_reg = TWL4030_VAUX3_DEDICATED; - ded_val = ENABLE_VAUX3_DEDICATED; - grp_reg = TWL4030_VAUX3_DEV_GRP; - grp_val = ENABLE_VAUX3_DEV_GRP; - - if (omap_rev() OMAP3430_REV_ES1_0) { - t2_out(PM_RECEIVER, ENABLE_VPLL2_DEDICATED, - TWL4030_VPLL2_DEDICATED); - t2_out(PM_RECEIVER, ENABLE_VPLL2_DEV_GRP, - TWL4030_VPLL2_DEV_GRP); - } - } else { - ded_reg = TWL4030_VAUX2_DEDICATED; - ded_val =
Re: [PATCHv2 2/4] OMAP: 2420SDP: Port the display driver to new DSS2
On Mon, 2011-09-12 at 17:18 +0530, Archit Taneja wrote: On Monday 12 September 2011 04:51 PM, Valkeinen, Tomi wrote: Port the old omapfb panel driver for 2420SDP to DSS2. Minor comment: The subject and commit message say 2420SDP, but patch says 2430SDP. Ah, so it does, thanks. I'll try to find the name of the panel. If you find a 2430 SDP board, I guess you can remove the panel by removing a few screws, and the chances are there's the manufacturer and model printed in the back of the panel. Tomi -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv2 2/4] OMAP: 2420SDP: Port the display driver to new DSS2
On Monday 12 September 2011 05:27 PM, Valkeinen, Tomi wrote: On Mon, 2011-09-12 at 17:18 +0530, Archit Taneja wrote: On Monday 12 September 2011 04:51 PM, Valkeinen, Tomi wrote: Port the old omapfb panel driver for 2420SDP to DSS2. Minor comment: The subject and commit message say 2420SDP, but patch says 2430SDP. Ah, so it does, thanks. I'll try to find the name of the panel. If you find a 2430 SDP board, I guess you can remove the panel by removing a few screws, and the chances are there's the manufacturer and model printed in the back of the panel. I found it in a TI site, its a NEC panel, model is called NL2432DR22-11B Tomi -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv2 2/4] OMAP: 2420SDP: Port the display driver to new DSS2
On Mon, 2011-09-12 at 17:45 +0530, Archit Taneja wrote: On Monday 12 September 2011 05:27 PM, Valkeinen, Tomi wrote: On Mon, 2011-09-12 at 17:18 +0530, Archit Taneja wrote: On Monday 12 September 2011 04:51 PM, Valkeinen, Tomi wrote: Port the old omapfb panel driver for 2420SDP to DSS2. Minor comment: The subject and commit message say 2420SDP, but patch says 2430SDP. Ah, so it does, thanks. I'll try to find the name of the panel. If you find a 2430 SDP board, I guess you can remove the panel by removing a few screws, and the chances are there's the manufacturer and model printed in the back of the panel. I found it in a TI site, its a NEC panel, model is called NL2432DR22-11B Thanks, I'll change the name. Tomi -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html