CRISv32: Fix RS485 port 4 CD Kconfig item.
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / cris / arch-v32 / drivers / Kconfig
1 if ETRAX_ARCH_V32
2
3 config ETRAX_ETHERNET
4 bool "Ethernet support"
5 depends on ETRAX_ARCH_V32
6 select NET_ETHERNET
7 select MII
8 help
9 This option enables the ETRAX FS built-in 10/100Mbit Ethernet
10 controller.
11
12 config ETRAX_NO_PHY
13 bool "PHY not present"
14 depends on ETRAX_ETHERNET
15 default N
16 help
17 This option disables all MDIO communication with an ethernet
18 transceiver connected to the MII interface. This option shall
19 typically be enabled if the MII interface is connected to a
20 switch. This option should normally be disabled. If enabled,
21 speed and duplex will be locked to 100 Mbit and full duplex.
22
23 config ETRAX_ETHERNET_IFACE0
24 depends on ETRAX_ETHERNET
25 bool "Enable network interface 0"
26
27 config ETRAX_ETHERNET_IFACE1
28 depends on (ETRAX_ETHERNET && ETRAXFS)
29 bool "Enable network interface 1 (uses DMA6 and DMA7)"
30
31 config ETRAX_ETHERNET_GBIT
32 depends on (ETRAX_ETHERNET && CRIS_MACH_ARTPEC3)
33 bool "Enable gigabit Ethernet support"
34
35 choice
36 prompt "Eth0 led group"
37 depends on ETRAX_ETHERNET_IFACE0
38 default ETRAX_ETH0_USE_LEDGRP0
39
40 config ETRAX_ETH0_USE_LEDGRP0
41 bool "Use LED grp 0"
42 depends on ETRAX_NBR_LED_GRP_ONE || ETRAX_NBR_LED_GRP_TWO
43 help
44 Use LED grp 0 for eth0
45
46 config ETRAX_ETH0_USE_LEDGRP1
47 bool "Use LED grp 1"
48 depends on ETRAX_NBR_LED_GRP_TWO
49 help
50 Use LED grp 1 for eth0
51
52 config ETRAX_ETH0_USE_LEDGRPNULL
53 bool "Use no LEDs for eth0"
54 help
55 Use no LEDs for eth0
56 endchoice
57
58 choice
59 prompt "Eth1 led group"
60 depends on ETRAX_ETHERNET_IFACE1
61 default ETRAX_ETH1_USE_LEDGRP1
62
63 config ETRAX_ETH1_USE_LEDGRP0
64 bool "Use LED grp 0"
65 depends on ETRAX_NBR_LED_GRP_ONE || ETRAX_NBR_LED_GRP_TWO
66 help
67 Use LED grp 0 for eth1
68
69 config ETRAX_ETH1_USE_LEDGRP1
70 bool "Use LED grp 1"
71 depends on ETRAX_NBR_LED_GRP_TWO
72 help
73 Use LED grp 1 for eth1
74
75 config ETRAX_ETH1_USE_LEDGRPNULL
76 bool "Use no LEDs for eth1"
77 help
78 Use no LEDs for eth1
79 endchoice
80
81 config ETRAXFS_SERIAL
82 bool "Serial-port support"
83 depends on ETRAX_ARCH_V32
84 select SERIAL_CORE
85 select SERIAL_CORE_CONSOLE
86 help
87 Enables the ETRAX FS serial driver for ser0 (ttyS0)
88 You probably want this enabled.
89
90 config ETRAX_RS485
91 bool "RS-485 support"
92 depends on ETRAXFS_SERIAL
93 help
94 Enables support for RS-485 serial communication.
95
96 config ETRAX_RS485_DISABLE_RECEIVER
97 bool "Disable serial receiver"
98 depends on ETRAX_RS485
99 help
100 It is necessary to disable the serial receiver to avoid serial
101 loopback. Not all products are able to do this in software only.
102
103 config ETRAX_SERIAL_PORT0
104 bool "Serial port 0 enabled"
105 depends on ETRAXFS_SERIAL
106 help
107 Enables the ETRAX FS serial driver for ser0 (ttyS0)
108 Normally you want this on. You can control what DMA channels to use
109 if you do not need DMA to something else.
110 ser0 can use dma4 or dma6 for output and dma5 or dma7 for input.
111
112 choice
113 prompt "Ser0 default port type "
114 depends on ETRAX_SERIAL_PORT0
115 default ETRAX_SERIAL_PORT0_TYPE_232
116 help
117 Type of serial port.
118
119 config ETRAX_SERIAL_PORT0_TYPE_232
120 bool "Ser0 is a RS-232 port"
121 help
122 Configure serial port 0 to be a RS-232 port.
123
124 config ETRAX_SERIAL_PORT0_TYPE_485HD
125 bool "Ser0 is a half duplex RS-485 port"
126 depends on ETRAX_RS485
127 help
128 Configure serial port 0 to be a half duplex (two wires) RS-485 port.
129
130 config ETRAX_SERIAL_PORT0_TYPE_485FD
131 bool "Ser0 is a full duplex RS-485 port"
132 depends on ETRAX_RS485
133 help
134 Configure serial port 0 to be a full duplex (four wires) RS-485 port.
135 endchoice
136
137 config ETRAX_SER0_DTR_BIT
138 string "Ser 0 DTR bit (empty = not used)"
139 depends on ETRAX_SERIAL_PORT0
140
141 config ETRAX_SER0_RI_BIT
142 string "Ser 0 RI bit (empty = not used)"
143 depends on ETRAX_SERIAL_PORT0
144
145 config ETRAX_SER0_DSR_BIT
146 string "Ser 0 DSR bit (empty = not used)"
147 depends on ETRAX_SERIAL_PORT0
148
149 config ETRAX_SER0_CD_BIT
150 string "Ser 0 CD bit (empty = not used)"
151 depends on ETRAX_SERIAL_PORT0
152
153 config ETRAX_SERIAL_PORT1
154 bool "Serial port 1 enabled"
155 depends on ETRAXFS_SERIAL
156 help
157 Enables the ETRAX FS serial driver for ser1 (ttyS1).
158
159 choice
160 prompt "Ser1 default port type"
161 depends on ETRAX_SERIAL_PORT1
162 default ETRAX_SERIAL_PORT1_TYPE_232
163 help
164 Type of serial port.
165
166 config ETRAX_SERIAL_PORT1_TYPE_232
167 bool "Ser1 is a RS-232 port"
168 help
169 Configure serial port 1 to be a RS-232 port.
170
171 config ETRAX_SERIAL_PORT1_TYPE_485HD
172 bool "Ser1 is a half duplex RS-485 port"
173 depends on ETRAX_RS485
174 help
175 Configure serial port 1 to be a half duplex (two wires) RS-485 port.
176
177 config ETRAX_SERIAL_PORT1_TYPE_485FD
178 bool "Ser1 is a full duplex RS-485 port"
179 depends on ETRAX_RS485
180 help
181 Configure serial port 1 to be a full duplex (four wires) RS-485 port.
182 endchoice
183
184 config ETRAX_SER1_DTR_BIT
185 string "Ser 1 DTR bit (empty = not used)"
186 depends on ETRAX_SERIAL_PORT1
187
188 config ETRAX_SER1_RI_BIT
189 string "Ser 1 RI bit (empty = not used)"
190 depends on ETRAX_SERIAL_PORT1
191
192 config ETRAX_SER1_DSR_BIT
193 string "Ser 1 DSR bit (empty = not used)"
194 depends on ETRAX_SERIAL_PORT1
195
196 config ETRAX_SER1_CD_BIT
197 string "Ser 1 CD bit (empty = not used)"
198 depends on ETRAX_SERIAL_PORT1
199
200 config ETRAX_SERIAL_PORT2
201 bool "Serial port 2 enabled"
202 depends on ETRAXFS_SERIAL
203 help
204 Enables the ETRAX FS serial driver for ser2 (ttyS2).
205
206 choice
207 prompt "Ser2 default port type"
208 depends on ETRAX_SERIAL_PORT2
209 default ETRAX_SERIAL_PORT2_TYPE_232
210 help
211 What DMA channel to use for ser2
212
213 config ETRAX_SERIAL_PORT2_TYPE_232
214 bool "Ser2 is a RS-232 port"
215 help
216 Configure serial port 2 to be a RS-232 port.
217
218 config ETRAX_SERIAL_PORT2_TYPE_485HD
219 bool "Ser2 is a half duplex RS-485 port"
220 depends on ETRAX_RS485
221 help
222 Configure serial port 2 to be a half duplex (two wires) RS-485 port.
223
224 config ETRAX_SERIAL_PORT2_TYPE_485FD
225 bool "Ser2 is a full duplex RS-485 port"
226 depends on ETRAX_RS485
227 help
228 Configure serial port 2 to be a full duplex (four wires) RS-485 port.
229 endchoice
230
231
232 config ETRAX_SER2_DTR_BIT
233 string "Ser 2 DTR bit (empty = not used)"
234 depends on ETRAX_SERIAL_PORT2
235
236 config ETRAX_SER2_RI_BIT
237 string "Ser 2 RI bit (empty = not used)"
238 depends on ETRAX_SERIAL_PORT2
239
240 config ETRAX_SER2_DSR_BIT
241 string "Ser 2 DSR bit (empty = not used)"
242 depends on ETRAX_SERIAL_PORT2
243
244 config ETRAX_SER2_CD_BIT
245 string "Ser 2 CD bit (empty = not used)"
246 depends on ETRAX_SERIAL_PORT2
247
248 config ETRAX_SERIAL_PORT3
249 bool "Serial port 3 enabled"
250 depends on ETRAXFS_SERIAL
251 help
252 Enables the ETRAX FS serial driver for ser3 (ttyS3).
253
254 choice
255 prompt "Ser3 default port type"
256 depends on ETRAX_SERIAL_PORT3
257 default ETRAX_SERIAL_PORT3_TYPE_232
258 help
259 What DMA channel to use for ser3.
260
261 config ETRAX_SERIAL_PORT3_TYPE_232
262 bool "Ser3 is a RS-232 port"
263 help
264 Configure serial port 3 to be a RS-232 port.
265
266 config ETRAX_SERIAL_PORT3_TYPE_485HD
267 bool "Ser3 is a half duplex RS-485 port"
268 depends on ETRAX_RS485
269 help
270 Configure serial port 3 to be a half duplex (two wires) RS-485 port.
271
272 config ETRAX_SERIAL_PORT3_TYPE_485FD
273 bool "Ser3 is a full duplex RS-485 port"
274 depends on ETRAX_RS485
275 help
276 Configure serial port 3 to be a full duplex (four wires) RS-485 port.
277 endchoice
278
279 config ETRAX_SER3_DTR_BIT
280 string "Ser 3 DTR bit (empty = not used)"
281 depends on ETRAX_SERIAL_PORT3
282
283 config ETRAX_SER3_RI_BIT
284 string "Ser 3 RI bit (empty = not used)"
285 depends on ETRAX_SERIAL_PORT3
286
287 config ETRAX_SER3_DSR_BIT
288 string "Ser 3 DSR bit (empty = not used)"
289 depends on ETRAX_SERIAL_PORT3
290
291 config ETRAX_SER3_CD_BIT
292 string "Ser 3 CD bit (empty = not used)"
293 depends on ETRAX_SERIAL_PORT3
294
295 config ETRAX_SERIAL_PORT4
296 bool "Serial port 4 enabled"
297 depends on ETRAXFS_SERIAL && CRIS_MACH_ARTPEC3
298 help
299 Enables the ETRAX FS serial driver for ser4 (ttyS4).
300
301 choice
302 prompt "Ser4 default port type"
303 depends on ETRAX_SERIAL_PORT4
304 default ETRAX_SERIAL_PORT4_TYPE_232
305 help
306 What DMA channel to use for ser4.
307
308 config ETRAX_SERIAL_PORT4_TYPE_232
309 bool "Ser4 is a RS-232 port"
310 help
311 Configure serial port 4 to be a RS-232 port.
312
313 config ETRAX_SERIAL_PORT4_TYPE_485HD
314 bool "Ser4 is a half duplex RS-485 port"
315 depends on ETRAX_RS485
316 help
317 Configure serial port 4 to be a half duplex (two wires) RS-485 port.
318
319 config ETRAX_SERIAL_PORT4_TYPE_485FD
320 bool "Ser4 is a full duplex RS-485 port"
321 depends on ETRAX_RS485
322 help
323 Configure serial port 4 to be a full duplex (four wires) RS-485 port.
324 endchoice
325
326 choice
327 prompt "Ser4 DMA in channel "
328 depends on ETRAX_SERIAL_PORT4
329 default ETRAX_SERIAL_PORT4_NO_DMA_IN
330 help
331 What DMA channel to use for ser4.
332
333
334 config ETRAX_SERIAL_PORT4_NO_DMA_IN
335 bool "Ser4 uses no DMA for input"
336 help
337 Do not use DMA for ser4 input.
338
339 config ETRAX_SERIAL_PORT4_DMA9_IN
340 bool "Ser4 uses DMA9 for input"
341 depends on ETRAX_SERIAL_PORT4
342 help
343 Enables the DMA9 input channel for ser4 (ttyS4).
344 If you do not enable DMA, an interrupt for each character will be
345 used when receiving data.
346 Normally you want to use DMA, unless you use the DMA channel for
347 something else.
348
349 endchoice
350
351 config ETRAX_SER4_DTR_BIT
352 string "Ser 4 DTR bit (empty = not used)"
353 depends on ETRAX_SERIAL_PORT4
354
355 config ETRAX_SER4_RI_BIT
356 string "Ser 4 RI bit (empty = not used)"
357 depends on ETRAX_SERIAL_PORT4
358
359 config ETRAX_SER4_DSR_BIT
360 string "Ser 4 DSR bit (empty = not used)"
361 depends on ETRAX_SERIAL_PORT4
362
363 config ETRAX_SER4_CD_BIT
364 string "Ser 4 CD bit (empty = not used)"
365 depends on ETRAX_SERIAL_PORT4
366
367 config ETRAX_SYNCHRONOUS_SERIAL
368 bool "Synchronous serial-port support"
369 depends on ETRAX_ARCH_V32
370 help
371 Enables the ETRAX FS synchronous serial driver.
372
373 config ETRAX_SYNCHRONOUS_SERIAL_PORT0
374 bool "Synchronous serial port 0 enabled"
375 depends on ETRAX_SYNCHRONOUS_SERIAL
376 help
377 Enabled synchronous serial port 0.
378
379 config ETRAX_SYNCHRONOUS_SERIAL0_DMA
380 bool "Enable DMA on synchronous serial port 0."
381 depends on ETRAX_SYNCHRONOUS_SERIAL_PORT0
382 help
383 A synchronous serial port can run in manual or DMA mode.
384 Selecting this option will make it run in DMA mode.
385
386 config ETRAX_SYNCHRONOUS_SERIAL_PORT1
387 bool "Synchronous serial port 1 enabled"
388 depends on ETRAX_SYNCHRONOUS_SERIAL && ETRAXFS
389 help
390 Enabled synchronous serial port 1.
391
392 config ETRAX_SYNCHRONOUS_SERIAL1_DMA
393 bool "Enable DMA on synchronous serial port 1."
394 depends on ETRAX_SYNCHRONOUS_SERIAL_PORT1
395 help
396 A synchronous serial port can run in manual or DMA mode.
397 Selecting this option will make it run in DMA mode.
398
399 config ETRAX_AXISFLASHMAP
400 bool "Axis flash-map support"
401 depends on ETRAX_ARCH_V32
402 select MTD
403 select MTD_CFI
404 select MTD_CFI_AMDSTD
405 select MTD_JEDECPROBE
406 select MTD_CHAR
407 select MTD_BLOCK
408 select MTD_PARTITIONS
409 select MTD_CONCAT
410 select MTD_COMPLEX_MAPPINGS
411 help
412 This option enables MTD mapping of flash devices. Needed to use
413 flash memories. If unsure, say Y.
414
415 config ETRAX_AXISFLASHMAP_MTD0WHOLE
416 bool "MTD0 is whole boot flash device"
417 depends on ETRAX_AXISFLASHMAP
418 default N
419 help
420 When this option is not set, mtd0 refers to the first partition
421 on the boot flash device. When set, mtd0 refers to the whole
422 device, with mtd1 referring to the first partition etc.
423
424 config ETRAX_PTABLE_SECTOR
425 int "Byte-offset of partition table sector"
426 depends on ETRAX_AXISFLASHMAP
427 default "65536"
428 help
429 Byte-offset of the partition table in the first flash chip.
430 The default value is 64kB and should not be changed unless
431 you know exactly what you are doing. The only valid reason
432 for changing this is when the flash block size is bigger
433 than 64kB (e.g. when using two parallel 16 bit flashes).
434
435 config ETRAX_NANDFLASH
436 bool "NAND flash support"
437 depends on ETRAX_ARCH_V32
438 select MTD_NAND
439 select MTD_NAND_IDS
440 help
441 This option enables MTD mapping of NAND flash devices. Needed to use
442 NAND flash memories. If unsure, say Y.
443
444 config ETRAX_NANDBOOT
445 bool "Boot from NAND flash"
446 depends on ETRAX_NANDFLASH
447 help
448 This options enables booting from NAND flash devices.
449 Say Y if your boot code, kernel and root file system is in
450 NAND flash. Say N if they are in NOR flash.
451
452 config ETRAX_I2C
453 bool "I2C driver"
454 depends on ETRAX_ARCH_V32
455 help
456 This option enables the I2C driver used by e.g. the RTC driver.
457
458 config ETRAX_V32_I2C_DATA_PORT
459 string "I2C data pin"
460 depends on ETRAX_I2C
461 help
462 The pin to use for I2C data.
463
464 config ETRAX_V32_I2C_CLK_PORT
465 string "I2C clock pin"
466 depends on ETRAX_I2C
467 help
468 The pin to use for I2C clock.
469
470 config ETRAX_GPIO
471 bool "GPIO support"
472 depends on ETRAX_ARCH_V32
473 ---help---
474 Enables the ETRAX general port device (major 120, minors 0-4).
475 You can use this driver to access the general port bits. It supports
476 these ioctl's:
477 #include <linux/etraxgpio.h>
478 fd = open("/dev/gpioa", O_RDWR); // or /dev/gpiob
479 ioctl(fd, _IO(ETRAXGPIO_IOCTYPE, IO_SETBITS), bits_to_set);
480 ioctl(fd, _IO(ETRAXGPIO_IOCTYPE, IO_CLRBITS), bits_to_clear);
481 err = ioctl(fd, _IO(ETRAXGPIO_IOCTYPE, IO_READ_INBITS), &val);
482 Remember that you need to setup the port directions appropriately in
483 the General configuration.
484
485 config ETRAX_VIRTUAL_GPIO
486 bool "Virtual GPIO support"
487 depends on ETRAX_GPIO
488 help
489 Enables the virtual Etrax general port device (major 120, minor 6).
490 It uses an I/O expander for the I2C-bus.
491
492 config ETRAX_VIRTUAL_GPIO_INTERRUPT_PA_PIN
493 int "Virtual GPIO interrupt pin on PA pin"
494 range 0 7
495 depends on ETRAX_VIRTUAL_GPIO
496 help
497 The pin to use on PA for virtual gpio interrupt.
498
499 config ETRAX_PA_CHANGEABLE_DIR
500 hex "PA user changeable dir mask"
501 depends on ETRAX_GPIO
502 default "0x00" if ETRAXFS
503 default "0x00000000" if !ETRAXFS
504 help
505 This is a bitmask (8 bits) with information of what bits in PA that a
506 user can change direction on using ioctl's.
507 Bit set = changeable.
508 You probably want 0 here, but it depends on your hardware.
509
510 config ETRAX_PA_CHANGEABLE_BITS
511 hex "PA user changeable bits mask"
512 depends on ETRAX_GPIO
513 default "0x00" if ETRAXFS
514 default "0x00000000" if !ETRAXFS
515 help
516 This is a bitmask (8 bits) with information of what bits in PA
517 that a user can change the value on using ioctl's.
518 Bit set = changeable.
519
520 config ETRAX_PB_CHANGEABLE_DIR
521 hex "PB user changeable dir mask"
522 depends on ETRAX_GPIO
523 default "0x00000" if ETRAXFS
524 default "0x00000000" if !ETRAXFS
525 help
526 This is a bitmask (18 bits) with information of what bits in PB
527 that a user can change direction on using ioctl's.
528 Bit set = changeable.
529 You probably want 0 here, but it depends on your hardware.
530
531 config ETRAX_PB_CHANGEABLE_BITS
532 hex "PB user changeable bits mask"
533 depends on ETRAX_GPIO
534 default "0x00000" if ETRAXFS
535 default "0x00000000" if !ETRAXFS
536 help
537 This is a bitmask (18 bits) with information of what bits in PB
538 that a user can change the value on using ioctl's.
539 Bit set = changeable.
540
541 config ETRAX_PC_CHANGEABLE_DIR
542 hex "PC user changeable dir mask"
543 depends on ETRAX_GPIO
544 default "0x00000" if ETRAXFS
545 default "0x00000000" if !ETRAXFS
546 help
547 This is a bitmask (18 bits) with information of what bits in PC
548 that a user can change direction on using ioctl's.
549 Bit set = changeable.
550 You probably want 0 here, but it depends on your hardware.
551
552 config ETRAX_PC_CHANGEABLE_BITS
553 hex "PC user changeable bits mask"
554 depends on ETRAX_GPIO
555 default "0x00000" if ETRAXFS
556 default "0x00000000" if ETRAXFS
557 help
558 This is a bitmask (18 bits) with information of what bits in PC
559 that a user can change the value on using ioctl's.
560 Bit set = changeable.
561
562 config ETRAX_PD_CHANGEABLE_DIR
563 hex "PD user changeable dir mask"
564 depends on ETRAX_GPIO && ETRAXFS
565 default "0x00000"
566 help
567 This is a bitmask (18 bits) with information of what bits in PD
568 that a user can change direction on using ioctl's.
569 Bit set = changeable.
570 You probably want 0x00000 here, but it depends on your hardware.
571
572 config ETRAX_PD_CHANGEABLE_BITS
573 hex "PD user changeable bits mask"
574 depends on ETRAX_GPIO && ETRAXFS
575 default "0x00000"
576 help
577 This is a bitmask (18 bits) with information of what bits in PD
578 that a user can change the value on using ioctl's.
579 Bit set = changeable.
580
581 config ETRAX_PE_CHANGEABLE_DIR
582 hex "PE user changeable dir mask"
583 depends on ETRAX_GPIO && ETRAXFS
584 default "0x00000"
585 help
586 This is a bitmask (18 bits) with information of what bits in PE
587 that a user can change direction on using ioctl's.
588 Bit set = changeable.
589 You probably want 0x00000 here, but it depends on your hardware.
590
591 config ETRAX_PE_CHANGEABLE_BITS
592 hex "PE user changeable bits mask"
593 depends on ETRAX_GPIO && ETRAXFS
594 default "0x00000"
595 help
596 This is a bitmask (18 bits) with information of what bits in PE
597 that a user can change the value on using ioctl's.
598 Bit set = changeable.
599
600 config ETRAX_PV_CHANGEABLE_DIR
601 hex "PV user changeable dir mask"
602 depends on ETRAX_VIRTUAL_GPIO
603 default "0x0000"
604 help
605 This is a bitmask (16 bits) with information of what bits in PV
606 that a user can change direction on using ioctl's.
607 Bit set = changeable.
608 You probably want 0x0000 here, but it depends on your hardware.
609
610 config ETRAX_PV_CHANGEABLE_BITS
611 hex "PV user changeable bits mask"
612 depends on ETRAX_VIRTUAL_GPIO
613 default "0x0000"
614 help
615 This is a bitmask (16 bits) with information of what bits in PV
616 that a user can change the value on using ioctl's.
617 Bit set = changeable.
618
619 config ETRAX_CARDBUS
620 bool "Cardbus support"
621 depends on ETRAX_ARCH_V32
622 select HOTPLUG
623 help
624 Enabled the ETRAX Cardbus driver.
625
626 config PCI
627 bool
628 depends on ETRAX_CARDBUS
629 default y
630 select HAVE_GENERIC_DMA_COHERENT
631
632 config ETRAX_IOP_FW_LOAD
633 tristate "IO-processor hotplug firmware loading support"
634 depends on ETRAX_ARCH_V32
635 select FW_LOADER
636 help
637 Enables IO-processor hotplug firmware loading support.
638
639 config ETRAX_STREAMCOPROC
640 tristate "Stream co-processor driver enabled"
641 depends on ETRAX_ARCH_V32
642 help
643 This option enables a driver for the stream co-processor
644 for cryptographic operations.
645
646 source drivers/mmc/Kconfig
647
648 config ETRAX_MMC_IOP
649 tristate "MMC/SD host driver using IO-processor"
650 depends on ETRAX_ARCH_V32 && MMC
651 help
652 This option enables the SD/MMC host controller interface.
653 The host controller is implemented using the built in
654 IO-Processor. Only the SPU is used in this implementation.
655
656 config ETRAX_SPI_MMC
657 # Make this one of several "choices" (possible simultaneously but
658 # suggested uniquely) when an IOP driver emerges for "real" MMC/SD
659 # protocol support.
660 tristate
661 depends on !ETRAX_MMC_IOP
662 default MMC
663 select SPI
664 select MMC_SPI
665 select ETRAX_SPI_MMC_BOARD
666
667 # For the parts that can't be a module (due to restrictions in
668 # framework elsewhere).
669 config ETRAX_SPI_MMC_BOARD
670 boolean
671 default n
672
673 # While the board info is MMC_SPI only, the drivers are written to be
674 # independent of MMC_SPI, so we'll keep SPI non-dependent on the
675 # MMC_SPI config choices (well, except for a single depends-on-line
676 # for the board-info file until a separate non-MMC SPI board file
677 # emerges).
678 # FIXME: When that happens, we'll need to be able to ask for and
679 # configure non-MMC SPI ports together with MMC_SPI ports (if multiple
680 # SPI ports are enabled).
681
682 config SPI_ETRAX_SSER
683 tristate
684 depends on SPI_MASTER && ETRAX_ARCH_V32 && EXPERIMENTAL
685 select SPI_BITBANG
686 help
687 This enables using an synchronous serial (sser) port as a
688 SPI master controller on Axis ETRAX FS and later. The
689 driver can be configured to use any sser port.
690
691 config SPI_ETRAX_GPIO
692 tristate
693 depends on SPI_MASTER && ETRAX_ARCH_V32 && EXPERIMENTAL
694 select SPI_BITBANG
695 help
696 This enables using GPIO pins port as a SPI master controller
697 on Axis ETRAX FS and later. The driver can be configured to
698 use any GPIO pins.
699
700 config ETRAX_SPI_SSER0
701 tristate "SPI using synchronous serial port 0 (sser0)"
702 depends on ETRAX_SPI_MMC
703 default m if MMC_SPI=m
704 default y if MMC_SPI=y
705 default y if MMC_SPI=n
706 select SPI_ETRAX_SSER
707 help
708 Say Y for an MMC/SD socket connected to synchronous serial port 0,
709 or for devices using the SPI protocol on that port. Say m if you
710 want to build it as a module, which will be named spi_crisv32_sser.
711 (You need to select MMC separately.)
712
713 config ETRAX_SPI_SSER0_DMA
714 bool "DMA for SPI on sser0 enabled"
715 depends on ETRAX_SPI_SSER0
716 depends on !ETRAX_SERIAL_PORT1_DMA4_OUT && !ETRAX_SERIAL_PORT1_DMA5_IN
717 default y
718 help
719 Say Y if using DMA (dma4/dma5) for SPI on synchronous serial port 0.
720
721 config ETRAX_SPI_MMC_CD_SSER0_PIN
722 string "MMC/SD card detect pin for SPI on sser0"
723 depends on ETRAX_SPI_SSER0 && MMC_SPI
724 default "pd11"
725 help
726 The pin to use for SD/MMC card detect. This pin should be pulled up
727 and grounded when a card is present. If defined as " " (space), no
728 pin is selected. A card must then always be inserted for proper
729 action.
730
731 config ETRAX_SPI_MMC_WP_SSER0_PIN
732 string "MMC/SD card write-protect pin for SPI on sser0"
733 depends on ETRAX_SPI_SSER0 && MMC_SPI
734 default "pd10"
735 help
736 The pin to use for the SD/MMC write-protect signal for a memory
737 card. If defined as " " (space), the card is considered writable.
738
739 config ETRAX_SPI_SSER1
740 tristate "SPI using synchronous serial port 1 (sser1)"
741 depends on ETRAX_SPI_MMC
742 default m if MMC_SPI=m && ETRAX_SPI_SSER0=n
743 default y if MMC_SPI=y && ETRAX_SPI_SSER0=n
744 default y if MMC_SPI=n && ETRAX_SPI_SSER0=n
745 select SPI_ETRAX_SSER
746 help
747 Say Y for an MMC/SD socket connected to synchronous serial port 1,
748 or for devices using the SPI protocol on that port. Say m if you
749 want to build it as a module, which will be named spi_crisv32_sser.
750 (You need to select MMC separately.)
751
752 config ETRAX_SPI_SSER1_DMA
753 bool "DMA for SPI on sser1 enabled"
754 depends on ETRAX_SPI_SSER1 && !ETRAX_ETHERNET_IFACE1
755 depends on !ETRAX_SERIAL_PORT0_DMA6_OUT && !ETRAX_SERIAL_PORT0_DMA7_IN
756 default y
757 help
758 Say Y if using DMA (dma6/dma7) for SPI on synchronous serial port 1.
759
760 config ETRAX_SPI_MMC_CD_SSER1_PIN
761 string "MMC/SD card detect pin for SPI on sser1"
762 depends on ETRAX_SPI_SSER1 && MMC_SPI
763 default "pd12"
764 help
765 The pin to use for SD/MMC card detect. This pin should be pulled up
766 and grounded when a card is present. If defined as " " (space), no
767 pin is selected. A card must then always be inserted for proper
768 action.
769
770 config ETRAX_SPI_MMC_WP_SSER1_PIN
771 string "MMC/SD card write-protect pin for SPI on sser1"
772 depends on ETRAX_SPI_SSER1 && MMC_SPI
773 default "pd9"
774 help
775 The pin to use for the SD/MMC write-protect signal for a memory
776 card. If defined as " " (space), the card is considered writable.
777
778 config ETRAX_SPI_GPIO
779 tristate "Bitbanged SPI using gpio pins"
780 depends on ETRAX_SPI_MMC
781 select SPI_ETRAX_GPIO
782 default m if MMC_SPI=m && ETRAX_SPI_SSER0=n && ETRAX_SPI_SSER1=n
783 default y if MMC_SPI=y && ETRAX_SPI_SSER0=n && ETRAX_SPI_SSER1=n
784 default y if MMC_SPI=n && ETRAX_SPI_SSER0=n && ETRAX_SPI_SSER1=n
785 help
786 Say Y for an MMC/SD socket connected to general I/O pins (but not
787 a complete synchronous serial ports), or for devices using the SPI
788 protocol on general I/O pins. Slow and slows down the system.
789 Say m to build it as a module, which will be called spi_crisv32_gpio.
790 (You need to select MMC separately.)
791
792 # The default match that of sser0, only because that's how it was tested.
793 config ETRAX_SPI_CS_PIN
794 string "SPI chip select pin"
795 depends on ETRAX_SPI_GPIO
796 default "pc3"
797 help
798 The pin to use for SPI chip select.
799
800 config ETRAX_SPI_CLK_PIN
801 string "SPI clock pin"
802 depends on ETRAX_SPI_GPIO
803 default "pc1"
804 help
805 The pin to use for the SPI clock.
806
807 config ETRAX_SPI_DATAIN_PIN
808 string "SPI MISO (data in) pin"
809 depends on ETRAX_SPI_GPIO
810 default "pc16"
811 help
812 The pin to use for SPI data in from the device.
813
814 config ETRAX_SPI_DATAOUT_PIN
815 string "SPI MOSI (data out) pin"
816 depends on ETRAX_SPI_GPIO
817 default "pc0"
818 help
819 The pin to use for SPI data out to the device.
820
821 config ETRAX_SPI_MMC_CD_GPIO_PIN
822 string "MMC/SD card detect pin for SPI using gpio (space for none)"
823 depends on ETRAX_SPI_GPIO && MMC_SPI
824 default "pd11"
825 help
826 The pin to use for SD/MMC card detect. This pin should be pulled up
827 and grounded when a card is present. If defined as " " (space), no
828 pin is selected. A card must then always be inserted for proper
829 action.
830
831 config ETRAX_SPI_MMC_WP_GPIO_PIN
832 string "MMC/SD card write-protect pin for SPI using gpio (space for none)"
833 depends on ETRAX_SPI_GPIO && MMC_SPI
834 default "pd10"
835 help
836 The pin to use for the SD/MMC write-protect signal for a memory
837 card. If defined as " " (space), the card is considered writable.
838
839 # Avoid choices causing non-working configs by conditionalizing the inclusion.
840 if ETRAX_SPI_MMC
841 source drivers/spi/Kconfig
842 endif
843
844 endif