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