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