aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-08-06 13:13:19 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-08-06 13:13:19 -0400
commit500b9fc922cbec572f4fd1436533bfaed5011262 (patch)
treeaac4b7de0871e66740aeaf3510f7a59280026592 /include
parentf165eb77f49cb6f6e86e2f2f09183904b2965d19 (diff)
parentbeccb12f6fbcc73339f127ff1f00638f076c933f (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/genesis-2.6 into devel-stable
Conflicts: drivers/net/irda/sh_irda.c
Diffstat (limited to 'include')
-rw-r--r--include/linux/serial_core.h3
-rw-r--r--include/linux/sh_clk.h23
-rw-r--r--include/video/mipi_display.h130
-rw-r--r--include/video/sh_mipi_dsi.h35
-rw-r--r--include/video/sh_mobile_hdmi.h22
-rw-r--r--include/video/sh_mobile_lcdc.h41
6 files changed, 230 insertions, 24 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index f10db6e5f3b5..522832023a69 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -186,6 +186,9 @@
186#define PORT_ALTERA_JTAGUART 91 186#define PORT_ALTERA_JTAGUART 91
187#define PORT_ALTERA_UART 92 187#define PORT_ALTERA_UART 92
188 188
189/* SH-SCI */
190#define PORT_SCIFB 93
191
189#ifdef __KERNEL__ 192#ifdef __KERNEL__
190 193
191#include <linux/compiler.h> 194#include <linux/compiler.h>
diff --git a/include/linux/sh_clk.h b/include/linux/sh_clk.h
index 1636d1e2a5f1..875ce50719a9 100644
--- a/include/linux/sh_clk.h
+++ b/include/linux/sh_clk.h
@@ -25,6 +25,10 @@ struct clk {
25 int id; 25 int id;
26 26
27 struct clk *parent; 27 struct clk *parent;
28 struct clk **parent_table; /* list of parents to */
29 unsigned short parent_num; /* choose between */
30 unsigned char src_shift; /* source clock field in the */
31 unsigned char src_width; /* configuration register */
28 struct clk_ops *ops; 32 struct clk_ops *ops;
29 33
30 struct list_head children; 34 struct list_head children;
@@ -138,13 +142,22 @@ int sh_clk_div4_enable_register(struct clk *clks, int nr,
138int sh_clk_div4_reparent_register(struct clk *clks, int nr, 142int sh_clk_div4_reparent_register(struct clk *clks, int nr,
139 struct clk_div4_table *table); 143 struct clk_div4_table *table);
140 144
141#define SH_CLK_DIV6(_parent, _reg, _flags) \ 145#define SH_CLK_DIV6_EXT(_parent, _reg, _flags, _parents, \
142{ \ 146 _num_parents, _src_shift, _src_width) \
143 .parent = _parent, \ 147{ \
144 .enable_reg = (void __iomem *)_reg, \ 148 .parent = _parent, \
145 .flags = _flags, \ 149 .enable_reg = (void __iomem *)_reg, \
150 .flags = _flags, \
151 .parent_table = _parents, \
152 .parent_num = _num_parents, \
153 .src_shift = _src_shift, \
154 .src_width = _src_width, \
146} 155}
147 156
157#define SH_CLK_DIV6(_parent, _reg, _flags) \
158 SH_CLK_DIV6_EXT(_parent, _reg, _flags, NULL, 0, 0, 0)
159
148int sh_clk_div6_register(struct clk *clks, int nr); 160int sh_clk_div6_register(struct clk *clks, int nr);
161int sh_clk_div6_reparent_register(struct clk *clks, int nr);
149 162
150#endif /* __SH_CLOCK_H */ 163#endif /* __SH_CLOCK_H */
diff --git a/include/video/mipi_display.h b/include/video/mipi_display.h
new file mode 100644
index 000000000000..ddcc8ca7316b
--- /dev/null
+++ b/include/video/mipi_display.h
@@ -0,0 +1,130 @@
1/*
2 * Defines for Mobile Industry Processor Interface (MIPI(R))
3 * Display Working Group standards: DSI, DCS, DBI, DPI
4 *
5 * Copyright (C) 2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de>
6 * Copyright (C) 2006 Nokia Corporation
7 * Author: Imre Deak <imre.deak@nokia.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13#ifndef MIPI_DISPLAY_H
14#define MIPI_DISPLAY_H
15
16/* MIPI DSI Processor-to-Peripheral transaction types */
17enum {
18 MIPI_DSI_V_SYNC_START = 0x01,
19 MIPI_DSI_V_SYNC_END = 0x11,
20 MIPI_DSI_H_SYNC_START = 0x21,
21 MIPI_DSI_H_SYNC_END = 0x31,
22
23 MIPI_DSI_COLOR_MODE_OFF = 0x02,
24 MIPI_DSI_COLOR_MODE_ON = 0x12,
25 MIPI_DSI_SHUTDOWN_PERIPHERAL = 0x22,
26 MIPI_DSI_TURN_ON_PERIPHERAL = 0x32,
27
28 MIPI_DSI_GENERIC_SHORT_WRITE_0_PARAM = 0x03,
29 MIPI_DSI_GENERIC_SHORT_WRITE_1_PARAM = 0x13,
30 MIPI_DSI_GENERIC_SHORT_WRITE_2_PARAM = 0x23,
31
32 MIPI_DSI_GENERIC_READ_REQUEST_0_PARAM = 0x04,
33 MIPI_DSI_GENERIC_READ_REQUEST_1_PARAM = 0x14,
34 MIPI_DSI_GENERIC_READ_REQUEST_2_PARAM = 0x24,
35
36 MIPI_DSI_DCS_SHORT_WRITE = 0x05,
37 MIPI_DSI_DCS_SHORT_WRITE_PARAM = 0x15,
38
39 MIPI_DSI_DCS_READ = 0x06,
40
41 MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE = 0x37,
42
43 MIPI_DSI_END_OF_TRANSMISSION = 0x08,
44
45 MIPI_DSI_NULL_PACKET = 0x09,
46 MIPI_DSI_BLANKING_PACKET = 0x19,
47 MIPI_DSI_GENERIC_LONG_WRITE = 0x29,
48 MIPI_DSI_DCS_LONG_WRITE = 0x39,
49
50 MIPI_DSI_LOOSELY_PACKED_PIXEL_STREAM_YCBCR20 = 0x0c,
51 MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR24 = 0x1c,
52 MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16 = 0x2c,
53
54 MIPI_DSI_PACKED_PIXEL_STREAM_30 = 0x0d,
55 MIPI_DSI_PACKED_PIXEL_STREAM_36 = 0x1d,
56 MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR12 = 0x3d,
57
58 MIPI_DSI_PACKED_PIXEL_STREAM_16 = 0x0e,
59 MIPI_DSI_PACKED_PIXEL_STREAM_18 = 0x1e,
60 MIPI_DSI_PIXEL_STREAM_3BYTE_18 = 0x2e,
61 MIPI_DSI_PACKED_PIXEL_STREAM_24 = 0x3e,
62};
63
64/* MIPI DSI Peripheral-to-Processor transaction types */
65enum {
66 MIPI_DSI_RX_ACKNOWLEDGE_AND_ERROR_REPORT = 0x02,
67 MIPI_DSI_RX_END_OF_TRANSMISSION = 0x08,
68 MIPI_DSI_RX_GENERIC_SHORT_READ_RESPONSE_1BYTE = 0x11,
69 MIPI_DSI_RX_GENERIC_SHORT_READ_RESPONSE_2BYTE = 0x12,
70 MIPI_DSI_RX_GENERIC_LONG_READ_RESPONSE = 0x1a,
71 MIPI_DSI_RX_DCS_LONG_READ_RESPONSE = 0x1c,
72 MIPI_DSI_RX_DCS_SHORT_READ_RESPONSE_1BYTE = 0x21,
73 MIPI_DSI_RX_DCS_SHORT_READ_RESPONSE_2BYTE = 0x22,
74};
75
76/* MIPI DCS commands */
77enum {
78 MIPI_DCS_NOP = 0x00,
79 MIPI_DCS_SOFT_RESET = 0x01,
80 MIPI_DCS_GET_DISPLAY_ID = 0x04,
81 MIPI_DCS_GET_RED_CHANNEL = 0x06,
82 MIPI_DCS_GET_GREEN_CHANNEL = 0x07,
83 MIPI_DCS_GET_BLUE_CHANNEL = 0x08,
84 MIPI_DCS_GET_DISPLAY_STATUS = 0x09,
85 MIPI_DCS_GET_POWER_MODE = 0x0A,
86 MIPI_DCS_GET_ADDRESS_MODE = 0x0B,
87 MIPI_DCS_GET_PIXEL_FORMAT = 0x0C,
88 MIPI_DCS_GET_DISPLAY_MODE = 0x0D,
89 MIPI_DCS_GET_SIGNAL_MODE = 0x0E,
90 MIPI_DCS_GET_DIAGNOSTIC_RESULT = 0x0F,
91 MIPI_DCS_ENTER_SLEEP_MODE = 0x10,
92 MIPI_DCS_EXIT_SLEEP_MODE = 0x11,
93 MIPI_DCS_ENTER_PARTIAL_MODE = 0x12,
94 MIPI_DCS_ENTER_NORMAL_MODE = 0x13,
95 MIPI_DCS_EXIT_INVERT_MODE = 0x20,
96 MIPI_DCS_ENTER_INVERT_MODE = 0x21,
97 MIPI_DCS_SET_GAMMA_CURVE = 0x26,
98 MIPI_DCS_SET_DISPLAY_OFF = 0x28,
99 MIPI_DCS_SET_DISPLAY_ON = 0x29,
100 MIPI_DCS_SET_COLUMN_ADDRESS = 0x2A,
101 MIPI_DCS_SET_PAGE_ADDRESS = 0x2B,
102 MIPI_DCS_WRITE_MEMORY_START = 0x2C,
103 MIPI_DCS_WRITE_LUT = 0x2D,
104 MIPI_DCS_READ_MEMORY_START = 0x2E,
105 MIPI_DCS_SET_PARTIAL_AREA = 0x30,
106 MIPI_DCS_SET_SCROLL_AREA = 0x33,
107 MIPI_DCS_SET_TEAR_OFF = 0x34,
108 MIPI_DCS_SET_TEAR_ON = 0x35,
109 MIPI_DCS_SET_ADDRESS_MODE = 0x36,
110 MIPI_DCS_SET_SCROLL_START = 0x37,
111 MIPI_DCS_EXIT_IDLE_MODE = 0x38,
112 MIPI_DCS_ENTER_IDLE_MODE = 0x39,
113 MIPI_DCS_SET_PIXEL_FORMAT = 0x3A,
114 MIPI_DCS_WRITE_MEMORY_CONTINUE = 0x3C,
115 MIPI_DCS_READ_MEMORY_CONTINUE = 0x3E,
116 MIPI_DCS_SET_TEAR_SCANLINE = 0x44,
117 MIPI_DCS_GET_SCANLINE = 0x45,
118 MIPI_DCS_READ_DDB_START = 0xA1,
119 MIPI_DCS_READ_DDB_CONTINUE = 0xA8,
120};
121
122/* MIPI DCS pixel formats */
123#define MIPI_DCS_PIXEL_FMT_24BIT 7
124#define MIPI_DCS_PIXEL_FMT_18BIT 6
125#define MIPI_DCS_PIXEL_FMT_16BIT 5
126#define MIPI_DCS_PIXEL_FMT_12BIT 3
127#define MIPI_DCS_PIXEL_FMT_8BIT 2
128#define MIPI_DCS_PIXEL_FMT_3BIT 1
129
130#endif
diff --git a/include/video/sh_mipi_dsi.h b/include/video/sh_mipi_dsi.h
new file mode 100644
index 000000000000..18bca08f9f59
--- /dev/null
+++ b/include/video/sh_mipi_dsi.h
@@ -0,0 +1,35 @@
1/*
2 * Public SH-mobile MIPI DSI header
3 *
4 * Copyright (C) 2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef VIDEO_SH_MIPI_DSI_H
11#define VIDEO_SH_MIPI_DSI_H
12
13enum sh_mipi_dsi_data_fmt {
14 MIPI_RGB888,
15 MIPI_RGB565,
16 MIPI_RGB666_LP,
17 MIPI_RGB666,
18 MIPI_BGR888,
19 MIPI_BGR565,
20 MIPI_BGR666_LP,
21 MIPI_BGR666,
22 MIPI_YUYV,
23 MIPI_UYVY,
24 MIPI_YUV420_L,
25 MIPI_YUV420,
26};
27
28struct sh_mobile_lcdc_chan_cfg;
29
30struct sh_mipi_dsi_info {
31 enum sh_mipi_dsi_data_fmt data_format;
32 struct sh_mobile_lcdc_chan_cfg *lcd_chan;
33};
34
35#endif
diff --git a/include/video/sh_mobile_hdmi.h b/include/video/sh_mobile_hdmi.h
new file mode 100644
index 000000000000..577cf18cce89
--- /dev/null
+++ b/include/video/sh_mobile_hdmi.h
@@ -0,0 +1,22 @@
1/*
2 * SH-Mobile High-Definition Multimedia Interface (HDMI)
3 *
4 * Copyright (C) 2010, Guennadi Liakhovetski <g.liakhovetski@gmx.de>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef SH_MOBILE_HDMI_H
12#define SH_MOBILE_HDMI_H
13
14struct sh_mobile_lcdc_chan_cfg;
15struct device;
16
17struct sh_mobile_hdmi_info {
18 struct sh_mobile_lcdc_chan_cfg *lcd_chan;
19 struct device *lcd_dev;
20};
21
22#endif
diff --git a/include/video/sh_mobile_lcdc.h b/include/video/sh_mobile_lcdc.h
index 288205457713..55d700e8566e 100644
--- a/include/video/sh_mobile_lcdc.h
+++ b/include/video/sh_mobile_lcdc.h
@@ -3,24 +3,27 @@
3 3
4#include <linux/fb.h> 4#include <linux/fb.h>
5 5
6enum { RGB8, /* 24bpp, 8:8:8 */ 6enum {
7 RGB9, /* 18bpp, 9:9 */ 7 RGB8, /* 24bpp, 8:8:8 */
8 RGB12A, /* 24bpp, 12:12 */ 8 RGB9, /* 18bpp, 9:9 */
9 RGB12B, /* 12bpp */ 9 RGB12A, /* 24bpp, 12:12 */
10 RGB16, /* 16bpp */ 10 RGB12B, /* 12bpp */
11 RGB18, /* 18bpp */ 11 RGB16, /* 16bpp */
12 RGB24, /* 24bpp */ 12 RGB18, /* 18bpp */
13 SYS8A, /* 24bpp, 8:8:8 */ 13 RGB24, /* 24bpp */
14 SYS8B, /* 18bpp, 8:8:2 */ 14 YUV422, /* 16bpp */
15 SYS8C, /* 18bpp, 2:8:8 */ 15 SYS8A, /* 24bpp, 8:8:8 */
16 SYS8D, /* 16bpp, 8:8 */ 16 SYS8B, /* 18bpp, 8:8:2 */
17 SYS9, /* 18bpp, 9:9 */ 17 SYS8C, /* 18bpp, 2:8:8 */
18 SYS12, /* 24bpp, 12:12 */ 18 SYS8D, /* 16bpp, 8:8 */
19 SYS16A, /* 16bpp */ 19 SYS9, /* 18bpp, 9:9 */
20 SYS16B, /* 18bpp, 16:2 */ 20 SYS12, /* 24bpp, 12:12 */
21 SYS16C, /* 18bpp, 2:16 */ 21 SYS16A, /* 16bpp */
22 SYS18, /* 18bpp */ 22 SYS16B, /* 18bpp, 16:2 */
23 SYS24 };/* 24bpp */ 23 SYS16C, /* 18bpp, 2:16 */
24 SYS18, /* 18bpp */
25 SYS24, /* 24bpp */
26};
24 27
25enum { LCDC_CHAN_DISABLED = 0, 28enum { LCDC_CHAN_DISABLED = 0,
26 LCDC_CHAN_MAINLCD, 29 LCDC_CHAN_MAINLCD,
@@ -52,7 +55,7 @@ struct sh_mobile_lcdc_board_cfg {
52 struct sh_mobile_lcdc_sys_bus_ops *sys_ops); 55 struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
53 void (*start_transfer)(void *board_data, void *sys_ops_handle, 56 void (*start_transfer)(void *board_data, void *sys_ops_handle,
54 struct sh_mobile_lcdc_sys_bus_ops *sys_ops); 57 struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
55 void (*display_on)(void *board_data); 58 void (*display_on)(void *board_data, struct fb_info *info);
56 void (*display_off)(void *board_data); 59 void (*display_off)(void *board_data);
57}; 60};
58 61