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