xref: /openbmc/linux/drivers/auxdisplay/Kconfig (revision 2d972b6a)
1# SPDX-License-Identifier: GPL-2.0
2#
3# For a description of the syntax of this configuration file,
4# see Documentation/kbuild/kconfig-language.txt.
5#
6# Auxiliary display drivers configuration.
7#
8
9menuconfig AUXDISPLAY
10	bool "Auxiliary Display support"
11	---help---
12	  Say Y here to get to see options for auxiliary display drivers.
13	  This option alone does not add any kernel code.
14
15	  If you say N, all options in this submenu will be skipped and disabled.
16
17config CHARLCD
18	tristate "Character LCD core support" if COMPILE_TEST
19
20if AUXDISPLAY
21
22config HD44780
23	tristate "HD44780 Character LCD support"
24	depends on GPIOLIB || COMPILE_TEST
25	select CHARLCD
26	---help---
27	  Enable support for Character LCDs using a HD44780 controller.
28	  The LCD is accessible through the /dev/lcd char device (10, 156).
29	  This code can either be compiled as a module, or linked into the
30	  kernel and started at boot.
31	  If you don't understand what all this is about, say N.
32
33config KS0108
34	tristate "KS0108 LCD Controller"
35	depends on PARPORT_PC
36	default n
37	---help---
38	  If you have a LCD controlled by one or more KS0108
39	  controllers, say Y. You will need also another more specific
40	  driver for your LCD.
41
42	  Depends on Parallel Port support. If you say Y at
43	  parport, you will be able to compile this as a module (M)
44	  and built-in as well (Y).
45
46	  To compile this as a module, choose M here:
47	  the module will be called ks0108.
48
49	  If unsure, say N.
50
51config KS0108_PORT
52	hex "Parallel port where the LCD is connected"
53	depends on KS0108
54	default 0x378
55	---help---
56	  The address of the parallel port where the LCD is connected.
57
58	  The first  standard parallel port address is 0x378.
59	  The second standard parallel port address is 0x278.
60	  The third  standard parallel port address is 0x3BC.
61
62	  You can specify a different address if you need.
63
64	  If you don't know what I'm talking about, load the parport module,
65	  and execute "dmesg" or "cat /proc/ioports". You can see there how
66	  many parallel ports are present and which address each one has.
67
68	  Usually you only need to use 0x378.
69
70	  If you compile this as a module, you can still override this
71	  using the module parameters.
72
73config KS0108_DELAY
74	int "Delay between each control writing (microseconds)"
75	depends on KS0108
76	default "2"
77	---help---
78	  Amount of time the ks0108 should wait between each control write
79	  to the parallel port.
80
81	  If your LCD seems to miss random writings, increment this.
82
83	  If you don't know what I'm talking about, ignore it.
84
85	  If you compile this as a module, you can still override this
86	  value using the module parameters.
87
88config CFAG12864B
89	tristate "CFAG12864B LCD"
90	depends on X86
91	depends on FB
92	depends on KS0108
93	select FB_SYS_FILLRECT
94	select FB_SYS_COPYAREA
95	select FB_SYS_IMAGEBLIT
96	select FB_SYS_FOPS
97	default n
98	---help---
99	  If you have a Crystalfontz 128x64 2-color LCD, cfag12864b Series,
100	  say Y. You also need the ks0108 LCD Controller driver.
101
102	  For help about how to wire your LCD to the parallel port,
103	  check Documentation/auxdisplay/cfag12864b
104
105	  Depends on the x86 arch and the framebuffer support.
106
107	  The LCD framebuffer driver can be attached to a console.
108	  It will work fine. However, you can't attach it to the fbdev driver
109	  of the xorg server.
110
111	  To compile this as a module, choose M here:
112	  the modules will be called cfag12864b and cfag12864bfb.
113
114	  If unsure, say N.
115
116config CFAG12864B_RATE
117       int "Refresh rate (hertz)"
118	depends on CFAG12864B
119	default "20"
120	---help---
121	  Refresh rate of the LCD.
122
123	  As the LCD is not memory mapped, the driver has to make the work by
124	  software. This means you should be careful setting this value higher.
125	  If your CPUs are really slow or you feel the system is slowed down,
126	  decrease the value.
127
128	  Be careful modifying this value to a very high value:
129	  You can freeze the computer, or the LCD maybe can't draw as fast as you
130	  are requesting.
131
132	  If you don't know what I'm talking about, ignore it.
133
134	  If you compile this as a module, you can still override this
135	  value using the module parameters.
136
137config IMG_ASCII_LCD
138	tristate "Imagination Technologies ASCII LCD Display"
139	depends on HAS_IOMEM
140	default y if MIPS_MALTA || MIPS_SEAD3
141	select SYSCON
142	help
143	  Enable this to support the simple ASCII LCD displays found on
144	  development boards such as the MIPS Boston, MIPS Malta & MIPS SEAD3
145	  from Imagination Technologies.
146
147config HT16K33
148	tristate "Holtek Ht16K33 LED controller with keyscan"
149	depends on FB && OF && I2C && INPUT
150	select FB_SYS_FOPS
151	select FB_SYS_FILLRECT
152	select FB_SYS_COPYAREA
153	select FB_SYS_IMAGEBLIT
154	select INPUT_MATRIXKMAP
155	select FB_BACKLIGHT
156	help
157	  Say yes here to add support for Holtek HT16K33, RAM mapping 16*8
158	  LED controller driver with keyscan.
159
160endif # AUXDISPLAY
161
162config ARM_CHARLCD
163	bool "ARM Ltd. Character LCD Driver"
164	depends on PLAT_VERSATILE
165	help
166	  This is a driver for the character LCD found on the ARM Ltd.
167	  Versatile and RealView Platform Baseboards. It doesn't do
168	  very much more than display the text "ARM Linux" on the first
169	  line and the Linux version on the second line, but that's
170	  still useful.
171
172config PANEL
173	tristate "Parallel port LCD/Keypad Panel support"
174	depends on PARPORT
175	select CHARLCD
176	---help---
177	  Say Y here if you have an HD44780 or KS-0074 LCD connected to your
178	  parallel port. This driver also features 4 and 6-key keypads. The LCD
179	  is accessible through the /dev/lcd char device (10, 156), and the
180	  keypad through /dev/keypad (10, 185). This code can either be
181	  compiled as a module, or linked into the kernel and started at boot.
182	  If you don't understand what all this is about, say N.
183
184if PANEL
185
186config PANEL_PARPORT
187	int "Default parallel port number (0=LPT1)"
188	range 0 255
189	default "0"
190	---help---
191	  This is the index of the parallel port the panel is connected to. One
192	  driver instance only supports one parallel port, so if your keypad
193	  and LCD are connected to two separate ports, you have to start two
194	  modules with different arguments. Numbering starts with '0' for LPT1,
195	  and so on.
196
197config PANEL_PROFILE
198	int "Default panel profile (0-5, 0=custom)"
199	range 0 5
200	default "5"
201	---help---
202	  To ease configuration, the driver supports different configuration
203	  profiles for past and recent wirings. These profiles can also be
204	  used to define an approximative configuration, completed by a few
205	  other options. Here are the profiles :
206
207	    0 = custom (see further)
208	    1 = 2x16 parallel LCD, old keypad
209	    2 = 2x16 serial LCD (KS-0074), new keypad
210	    3 = 2x16 parallel LCD (Hantronix), no keypad
211	    4 = 2x16 parallel LCD (Nexcom NSA1045) with Nexcom's keypad
212	    5 = 2x40 parallel LCD (old one), with old keypad
213
214	  Custom configurations allow you to define how your display is
215	  wired to the parallel port, and how it works. This is only intended
216	  for experts.
217
218config PANEL_KEYPAD
219	depends on PANEL_PROFILE="0"
220	int "Keypad type (0=none, 1=old 6 keys, 2=new 6 keys, 3=Nexcom 4 keys)"
221	range 0 3
222	default 0
223	---help---
224	  This enables and configures a keypad connected to the parallel port.
225	  The keys will be read from character device 10,185. Valid values are :
226
227	    0 : do not enable this driver
228	    1 : old 6 keys keypad
229	    2 : new 6 keys keypad, as used on the server at www.ant-computing.com
230	    3 : Nexcom NSA1045's 4 keys keypad
231
232	  New profiles can be described in the driver source. The driver also
233	  supports simultaneous keys pressed when the keypad supports them.
234
235config PANEL_LCD
236	depends on PANEL_PROFILE="0"
237	int "LCD type (0=none, 1=custom, 2=old //, 3=ks0074, 4=hantronix, 5=Nexcom)"
238	range 0 5
239	default 0
240	---help---
241	   This enables and configures an LCD connected to the parallel port.
242	   The driver includes an interpreter for escape codes starting with
243	   '\e[L' which are specific to the LCD, and a few ANSI codes. The
244	   driver will be registered as character device 10,156, usually
245	   under the name '/dev/lcd'. There are a total of 6 supported types :
246
247	     0 : do not enable the driver
248	     1 : custom configuration and wiring (see further)
249	     2 : 2x16 & 2x40 parallel LCD (old wiring)
250	     3 : 2x16 serial LCD (KS-0074 based)
251	     4 : 2x16 parallel LCD (Hantronix wiring)
252	     5 : 2x16 parallel LCD (Nexcom wiring)
253
254	   When type '1' is specified, other options will appear to configure
255	   more precise aspects (wiring, dimensions, protocol, ...). Please note
256	   that those values changed from the 2.4 driver for better consistency.
257
258config PANEL_LCD_HEIGHT
259	depends on PANEL_PROFILE="0" && PANEL_LCD="1"
260	int "Number of lines on the LCD (1-2)"
261	range 1 2
262	default 2
263	---help---
264	  This is the number of visible character lines on the LCD in custom profile.
265	  It can either be 1 or 2.
266
267config PANEL_LCD_WIDTH
268	depends on PANEL_PROFILE="0" && PANEL_LCD="1"
269	int "Number of characters per line on the LCD (1-40)"
270	range 1 40
271	default 40
272	---help---
273	  This is the number of characters per line on the LCD in custom profile.
274	  Common values are 16,20,24,40.
275
276config PANEL_LCD_BWIDTH
277	depends on PANEL_PROFILE="0" && PANEL_LCD="1"
278	int "Internal LCD line width (1-40, 40 by default)"
279	range 1 40
280	default 40
281	---help---
282	  Most LCDs use a standard controller which supports hardware lines of 40
283	  characters, although sometimes only 16, 20 or 24 of them are really wired
284	  to the terminal. This results in some non-visible but addressable characters,
285	  and is the case for most parallel LCDs. Other LCDs, and some serial ones,
286	  however, use the same line width internally as what is visible. The KS0074
287	  for example, uses 16 characters per line for 16 visible characters per line.
288
289	  This option lets you configure the value used by your LCD in 'custom' profile.
290	  If you don't know, put '40' here.
291
292config PANEL_LCD_HWIDTH
293	depends on PANEL_PROFILE="0" && PANEL_LCD="1"
294	int "Hardware LCD line width (1-64, 64 by default)"
295	range 1 64
296	default 64
297	---help---
298	  Most LCDs use a single address bit to differentiate line 0 and line 1. Since
299	  some of them need to be able to address 40 chars with the lower bits, they
300	  often use the immediately superior power of 2, which is 64, to address the
301	  next line.
302
303	  If you don't know what your LCD uses, in doubt let 16 here for a 2x16, and
304	  64 here for a 2x40.
305
306config PANEL_LCD_CHARSET
307	depends on PANEL_PROFILE="0" && PANEL_LCD="1"
308	int "LCD character set (0=normal, 1=KS0074)"
309	range 0 1
310	default 0
311	---help---
312	  Some controllers such as the KS0074 use a somewhat strange character set
313	  where many symbols are at unusual places. The driver knows how to map
314	  'standard' ASCII characters to the character sets used by these controllers.
315	  Valid values are :
316
317	     0 : normal (untranslated) character set
318	     1 : KS0074 character set
319
320	  If you don't know, use the normal one (0).
321
322config PANEL_LCD_PROTO
323	depends on PANEL_PROFILE="0" && PANEL_LCD="1"
324	int "LCD communication mode (0=parallel 8 bits, 1=serial)"
325	range 0 1
326	default 0
327	---help---
328	  This driver now supports any serial or parallel LCD wired to a parallel
329	  port. But before assigning signals, the driver needs to know if it will
330	  be driving a serial LCD or a parallel one. Serial LCDs only use 2 wires
331	  (SDA/SCL), while parallel ones use 2 or 3 wires for the control signals
332	  (E, RS, sometimes RW), and 4 or 8 for the data. Use 0 here for a 8 bits
333	  parallel LCD, and 1 for a serial LCD.
334
335config PANEL_LCD_PIN_E
336	depends on PANEL_PROFILE="0" && PANEL_LCD="1" && PANEL_LCD_PROTO="0"
337        int "Parallel port pin number & polarity connected to the LCD E signal (-17...17) "
338	range -17 17
339	default 14
340	---help---
341	  This describes the number of the parallel port pin to which the LCD 'E'
342	  signal has been connected. It can be :
343
344	          0 : no connection (eg: connected to ground)
345	      1..17 : directly connected to any of these pins on the DB25 plug
346	    -1..-17 : connected to the same pin through an inverter (eg: transistor).
347
348	  Default for the 'E' pin in custom profile is '14' (AUTOFEED).
349
350config PANEL_LCD_PIN_RS
351	depends on PANEL_PROFILE="0" && PANEL_LCD="1" && PANEL_LCD_PROTO="0"
352        int "Parallel port pin number & polarity connected to the LCD RS signal (-17...17) "
353	range -17 17
354	default 17
355	---help---
356	  This describes the number of the parallel port pin to which the LCD 'RS'
357	  signal has been connected. It can be :
358
359	          0 : no connection (eg: connected to ground)
360	      1..17 : directly connected to any of these pins on the DB25 plug
361	    -1..-17 : connected to the same pin through an inverter (eg: transistor).
362
363	  Default for the 'RS' pin in custom profile is '17' (SELECT IN).
364
365config PANEL_LCD_PIN_RW
366	depends on PANEL_PROFILE="0" && PANEL_LCD="1" && PANEL_LCD_PROTO="0"
367        int "Parallel port pin number & polarity connected to the LCD RW signal (-17...17) "
368	range -17 17
369	default 16
370	---help---
371	  This describes the number of the parallel port pin to which the LCD 'RW'
372	  signal has been connected. It can be :
373
374	          0 : no connection (eg: connected to ground)
375	      1..17 : directly connected to any of these pins on the DB25 plug
376	    -1..-17 : connected to the same pin through an inverter (eg: transistor).
377
378	  Default for the 'RW' pin in custom profile is '16' (INIT).
379
380config PANEL_LCD_PIN_SCL
381	depends on PANEL_PROFILE="0" && PANEL_LCD="1" && PANEL_LCD_PROTO!="0"
382        int "Parallel port pin number & polarity connected to the LCD SCL signal (-17...17) "
383	range -17 17
384	default 1
385	---help---
386	  This describes the number of the parallel port pin to which the serial
387	  LCD 'SCL' signal has been connected. It can be :
388
389	          0 : no connection (eg: connected to ground)
390	      1..17 : directly connected to any of these pins on the DB25 plug
391	    -1..-17 : connected to the same pin through an inverter (eg: transistor).
392
393	  Default for the 'SCL' pin in custom profile is '1' (STROBE).
394
395config PANEL_LCD_PIN_SDA
396	depends on PANEL_PROFILE="0" && PANEL_LCD="1" && PANEL_LCD_PROTO!="0"
397        int "Parallel port pin number & polarity connected to the LCD SDA signal (-17...17) "
398	range -17 17
399	default 2
400	---help---
401	  This describes the number of the parallel port pin to which the serial
402	  LCD 'SDA' signal has been connected. It can be :
403
404	          0 : no connection (eg: connected to ground)
405	      1..17 : directly connected to any of these pins on the DB25 plug
406	    -1..-17 : connected to the same pin through an inverter (eg: transistor).
407
408	  Default for the 'SDA' pin in custom profile is '2' (D0).
409
410config PANEL_LCD_PIN_BL
411	depends on PANEL_PROFILE="0" && PANEL_LCD="1"
412        int "Parallel port pin number & polarity connected to the LCD backlight signal (-17...17) "
413	range -17 17
414	default 0
415	---help---
416	  This describes the number of the parallel port pin to which the LCD 'BL' signal
417          has been connected. It can be :
418
419	          0 : no connection (eg: connected to ground)
420	      1..17 : directly connected to any of these pins on the DB25 plug
421	    -1..-17 : connected to the same pin through an inverter (eg: transistor).
422
423	  Default for the 'BL' pin in custom profile is '0' (uncontrolled).
424
425config PANEL_CHANGE_MESSAGE
426	bool "Change LCD initialization message ?"
427	default "n"
428	---help---
429	  This allows you to replace the boot message indicating the kernel version
430	  and the driver version with a custom message. This is useful on appliances
431	  where a simple 'Starting system' message can be enough to stop a customer
432	  from worrying.
433
434	  If you say 'Y' here, you'll be able to choose a message yourself. Otherwise,
435	  say 'N' and keep the default message with the version.
436
437config PANEL_BOOT_MESSAGE
438	depends on PANEL_CHANGE_MESSAGE="y"
439	string "New initialization message"
440	default ""
441	---help---
442	  This allows you to replace the boot message indicating the kernel version
443	  and the driver version with a custom message. This is useful on appliances
444	  where a simple 'Starting system' message can be enough to stop a customer
445	  from worrying.
446
447	  An empty message will only clear the display at driver init time. Any other
448	  printf()-formatted message is valid with newline and escape codes.
449
450endif # PANEL
451