Skip to contentSkip to conversation

S5PV210: added MIPI-DSI Driver.

PATCH New Inki Dae 1 participant 1 message Nov 18, 2010

Subsystems (5)
lore
Share & tools
lore

Inki Dae

author
#0 lore raw

PATCH 3/3 S5PV210: added MIPI-DSI Driver.

---
 arch/arm/mach-s5pv210/include/mach/regs-clock.h |    3 +-
 arch/arm/plat-samsung/Kconfig                   |    6 +
 arch/arm/plat-samsung/Makefile                  |    2 +
 arch/arm/plat-samsung/include/plat/dsim.h       |  447 +++++++++++++++
 arch/arm/plat-samsung/include/plat/mipi_ddi.h   |   98 ++++
 arch/arm/plat-samsung/include/plat/regs-dsim.h  |  281 +++++++++
 arch/arm/plat-samsung/setup-dsim.c              |  144 +++++
 drivers/video/Kconfig                           |    7 +
 drivers/video/Makefile                          |    2 +
 drivers/video/s5p-dsim.c                        |  463 +++++++++++++++
 drivers/video/s5p_dsim_common.c                 |  691 +++++++++++++++++++++++
 drivers/video/s5p_dsim_common.h                 |   35 ++
 drivers/video/s5p_dsim_lowlevel.c               |  569 +++++++++++++++++++
 drivers/video/s5p_dsim_lowlevel.h               |  101 ++++
 14 files changed, 2848 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/plat-samsung/include/plat/dsim.h
 create mode 100644 arch/arm/plat-samsung/include/plat/mipi_ddi.h
 create mode 100644 arch/arm/plat-samsung/include/plat/regs-dsim.h
 create mode 100644 arch/arm/plat-samsung/setup-dsim.c
 create mode 100644 drivers/video/s5p-dsim.c
 create mode 100644 drivers/video/s5p_dsim_common.c
 create mode 100644 drivers/video/s5p_dsim_common.h
 create mode 100644 drivers/video/s5p_dsim_lowlevel.c
 create mode 100644 drivers/video/s5p_dsim_lowlevel.h
arch/arm/mach-s5pv210/include/mach/regs-clock.h +2 -1
index ebaabe0..c8b9366 100644
@@ -196,7 +196,8 @@
 #define S5P_OTHERS_USB_SIG_MASK		(1 << 16)
 
 /* MIPI */
-#define S5P_MIPI_DPHY_EN		(3)
+#define S5P_MIPI_DPHY_EN		(3 << 0)
+#define S5P_MIPI_M_RESETN		(1 << 1)
 
 /* S5P_DAC_CONTROL */
 #define S5P_DAC_ENABLE			(1)
arch/arm/plat-samsung/Kconfig +6 -0
index dcd6eff..cadbe32 100644
@@ -257,6 +257,12 @@ config S3C64XX_DEV_SPI
 	  Compile in platform device definitions for S3C64XX's type
 	  SPI controllers.
 
+config S5PV210_SETUP_DSIM
+	bool
+	depends on REGULATOR 
+	help
+	  Common setup code for MIPI-DSIM
+
 config SAMSUNG_DEV_TS
 	bool
 	help
arch/arm/plat-samsung/Makefile +2 -0
index afcce47..bf866eb 100644
@@ -59,6 +59,8 @@ obj-$(CONFIG_SAMSUNG_DEV_IDE)	+= dev-ide.o
 obj-$(CONFIG_SAMSUNG_DEV_TS)	+= dev-ts.o
 obj-$(CONFIG_SAMSUNG_DEV_KEYPAD)	+= dev-keypad.o
 
+obj-$(CONFIG_S5PV210_SETUP_DSIM)  += setup-dsim.o
+
 # DMA support
 
 obj-$(CONFIG_S3C_DMA)		+= dma.o
arch/arm/plat-samsung/include/plat/dsim.h new file +447 -0

447 lines not on this page · raw message

arch/arm/plat-samsung/include/plat/mipi_ddi.h new file +98 -0

98 lines not on this page · raw message

arch/arm/plat-samsung/include/plat/regs-dsim.h new file +281 -0

281 lines not on this page · raw message

arch/arm/plat-samsung/setup-dsim.c new file +144 -0

144 lines not on this page · raw message

drivers/video/Kconfig +7 -0
index 27c1fb4..6cdb4bc 100644
@@ -1996,6 +1996,13 @@ config FB_S3C2410_DEBUG
 	  Turn on debugging messages. Note that you can set/unset at run time
 	  through sysfs
 
+config S5P_MIPI_DSI
+	tristate "Samsung SoC MIPI-DSI support."
+	depends on FB_S3C && ARCH_S5PV210
+	default n
+	---help---
+	  This enables support for MIPI-DSI device.
+
 config FB_NUC900
         bool "NUC900 LCD framebuffer support"
         depends on FB && ARCH_W90X900
drivers/video/Makefile +2 -0
index 485e8ed..6d1be1a 100644
@@ -115,6 +115,8 @@ obj-$(CONFIG_FB_SH7760)		  += sh7760fb.o
 obj-$(CONFIG_FB_IMX)              += imxfb.o
 obj-$(CONFIG_FB_S3C)		  += s3c-fb.o
 obj-$(CONFIG_FB_S3C2410)	  += s3c2410fb.o
+obj-$(CONFIG_S5P_MIPI_DSI)	  += s5p-dsim.o s5p_dsim_common.o \
+    					s5p_dsim_lowlevel.o
 obj-$(CONFIG_FB_FSL_DIU)	  += fsl-diu-fb.o
 obj-$(CONFIG_FB_COBALT)           += cobalt_lcdfb.o
 obj-$(CONFIG_FB_PNX4008_DUM)	  += pnx4008/
drivers/video/s5p-dsim.c new file +463 -0

463 lines not on this page · raw message

drivers/video/s5p_dsim_common.c new file +691 -0

691 lines not on this page · raw message

drivers/video/s5p_dsim_common.h new file +35 -0
new file mode 100644
index 0000000..95f51bc
@@ -0,0 +1,35 @@
+/* linux/drivers/video/samsung/s5p_dsim_common.h
+ *
+ * Header file for Samsung MIPI-DSI common driver.
+ *
+ * Copyright (c) 2009 Samsung Electronics
+ * InKi Dae <[email protected]>
+ *
+ * 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.
+*/
+
+#ifndef _S5P_DSIM_COMMON_H
+#define _S5P_DSIM_COMMON_H
+
+extern int s5p_dsim_init_header_fifo(struct dsim_global *dsim);
+extern int s5p_dsim_pll_on(struct dsim_global *dsim, unsigned int enable);
+extern unsigned long s5p_dsim_change_pll(struct dsim_global *dsim,
+	unsigned int pre_divider, unsigned int main_divider,
+	unsigned int scaler);
+extern int s5p_dsim_set_clock(struct dsim_global *dsim,
+	unsigned int byte_clk_sel, unsigned int enable);
+extern int s5p_dsim_init_dsim(struct dsim_global *dsim);
+extern int s5p_dsim_set_display_mode(struct dsim_global *dsim,
+	struct dsim_lcd_config *main_lcd, struct dsim_lcd_config *sub_lcd);
+extern int s5p_dsim_init_link(struct dsim_global *dsim);
+extern int s5p_dsim_set_hs_enable(struct dsim_global *dsim);
+extern int s5p_dsim_set_data_transfer_mode(struct dsim_global *dsim,
+	unsigned int data_path, unsigned int hs_enable);
+extern int s5p_dsim_enable_frame_done_int(struct dsim_global *dsim,
+	unsigned int enable);
+
+extern struct fb_info *registered_fb[FB_MAX] __read_mostly;
+
+#endif /* _S5P_DSIM_COMMON_H */
drivers/video/s5p_dsim_lowlevel.c new file +569 -0

569 lines not on this page · raw message

drivers/video/s5p_dsim_lowlevel.h new file +101 -0

101 lines not on this page · raw message

Signature · 1 line
1.5.4.3