aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-ap4evb.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-14 18:11:19 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-14 18:11:19 -0500
commit51be08419dc86c72486ac556aa39bc01026a403d (patch)
tree50ac35ac89f207d2a732b67eb2f1e9b671e5c064 /arch/arm/mach-shmobile/board-ap4evb.c
parentec8013beddd717d1740cfefb1a9b900deef85462 (diff)
parentf787f32e67e00b072f46b2ae3c454d2c0a1fcdb7 (diff)
Merge branch 'fbdev-next' of git://github.com/schandinat/linux-2.6
* 'fbdev-next' of git://github.com/schandinat/linux-2.6: (175 commits) module_param: make bool parameters really bool (drivers/video/i810) Revert "atmel_lcdfb: Adjust HFP calculation so it matches the manual." OMAPDSS: HDMI: Disable DDC internal pull up OMAPDSS: HDMI: Move duplicate code from boardfile OMAPDSS: add OrtusTech COM43H4M10XTC display support OMAP: DSS2: Support for UMSH-8173MD TFT panel ASoC: OMAP: HDMI: Move HDMI codec trigger function to generic HDMI driver OMAPDSS: HDMI: Create function to enable HDMI audio ASoC: OMAP: HDMI: Correct signature of ASoC functions ASoC: OMAP: HDMI: Introduce driver data for audio codec grvga: fix section mismatch warnings video: s3c-fb: Don't keep device runtime active when open video: s3c-fb: Hold runtime PM references when touching registers video: s3c-fb: Take a runtime PM reference when unblanked video: s3c-fb: Disable runtime PM in error paths from probe video: s3c-fb: Use s3c_fb_enable() to enable the framebuffer video: s3c-fb: Make runtime PM functional again drivers/video: fsl-diu-fb: merge fsl_diu_alloc() into map_video_memory() drivers/video: fsl-diu-fb: add default platform ops functions drivers/video: fsl-diu-fb: remove broken reference count enabling the display ...
Diffstat (limited to 'arch/arm/mach-shmobile/board-ap4evb.c')
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index d2e7b73aa9b..aab0a349f75 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -491,7 +491,7 @@ static struct sh_mobile_lcdc_info lcdc_info = {
491 .meram_dev = &meram_info, 491 .meram_dev = &meram_info,
492 .ch[0] = { 492 .ch[0] = {
493 .chan = LCDC_CHAN_MAINLCD, 493 .chan = LCDC_CHAN_MAINLCD,
494 .bpp = 16, 494 .fourcc = V4L2_PIX_FMT_RGB565,
495 .lcd_cfg = ap4evb_lcdc_modes, 495 .lcd_cfg = ap4evb_lcdc_modes,
496 .num_cfg = ARRAY_SIZE(ap4evb_lcdc_modes), 496 .num_cfg = ARRAY_SIZE(ap4evb_lcdc_modes),
497 .meram_cfg = &lcd_meram_cfg, 497 .meram_cfg = &lcd_meram_cfg,
@@ -564,6 +564,30 @@ static struct platform_device keysc_device = {
564}; 564};
565 565
566/* MIPI-DSI */ 566/* MIPI-DSI */
567#define PHYCTRL 0x0070
568static int sh_mipi_set_dot_clock(struct platform_device *pdev,
569 void __iomem *base,
570 int enable)
571{
572 struct clk *pck = clk_get(&pdev->dev, "dsip_clk");
573 void __iomem *phy = base + PHYCTRL;
574
575 if (IS_ERR(pck))
576 return PTR_ERR(pck);
577
578 if (enable) {
579 clk_set_rate(pck, clk_round_rate(pck, 24000000));
580 iowrite32(ioread32(phy) | (0xb << 8), phy);
581 clk_enable(pck);
582 } else {
583 clk_disable(pck);
584 }
585
586 clk_put(pck);
587
588 return 0;
589}
590
567static struct resource mipidsi0_resources[] = { 591static struct resource mipidsi0_resources[] = {
568 [0] = { 592 [0] = {
569 .start = 0xffc60000, 593 .start = 0xffc60000,
@@ -580,7 +604,11 @@ static struct resource mipidsi0_resources[] = {
580static struct sh_mipi_dsi_info mipidsi0_info = { 604static struct sh_mipi_dsi_info mipidsi0_info = {
581 .data_format = MIPI_RGB888, 605 .data_format = MIPI_RGB888,
582 .lcd_chan = &lcdc_info.ch[0], 606 .lcd_chan = &lcdc_info.ch[0],
607 .lane = 2,
583 .vsynw_offset = 17, 608 .vsynw_offset = 17,
609 .flags = SH_MIPI_DSI_SYNC_PULSES_MODE |
610 SH_MIPI_DSI_HSbyteCLK,
611 .set_dot_clock = sh_mipi_set_dot_clock,
584}; 612};
585 613
586static struct platform_device mipidsi0_device = { 614static struct platform_device mipidsi0_device = {
@@ -798,7 +826,7 @@ static struct sh_mobile_lcdc_info sh_mobile_lcdc1_info = {
798 .meram_dev = &meram_info, 826 .meram_dev = &meram_info,
799 .ch[0] = { 827 .ch[0] = {
800 .chan = LCDC_CHAN_MAINLCD, 828 .chan = LCDC_CHAN_MAINLCD,
801 .bpp = 16, 829 .fourcc = V4L2_PIX_FMT_RGB565,
802 .interface_type = RGB24, 830 .interface_type = RGB24,
803 .clock_divider = 1, 831 .clock_divider = 1,
804 .flags = LCDC_FLAGS_DWPOL, 832 .flags = LCDC_FLAGS_DWPOL,