Ulf Magnusson | bd6e044 | 2019-11-01 13:45:29 +0100 | [diff] [blame] | 1 | # DesignWare SPI driver configuration options |
| 2 | |
Daniel Leung | a33aecc | 2016-03-17 11:21:49 -0700 | [diff] [blame] | 3 | # Copyright (c) 2015-2016 Intel Corporation |
David B. Kinder | ac74d8b | 2017-01-18 17:01:01 -0800 | [diff] [blame] | 4 | # SPDX-License-Identifier: Apache-2.0 |
Daniel Leung | a33aecc | 2016-03-17 11:21:49 -0700 | [diff] [blame] | 5 | |
Kumar Gala | 5f09eae | 2018-11-20 10:56:37 -0600 | [diff] [blame] | 6 | config HAS_SPI_DW |
| 7 | bool |
| 8 | help |
| 9 | Signifies whether DesignWare SPI compatible HW is available |
| 10 | |
Daniel Leung | a33aecc | 2016-03-17 11:21:49 -0700 | [diff] [blame] | 11 | menuconfig SPI_DW |
Tomasz Bursztyka | d89e8e6 | 2017-06-21 09:16:25 +0200 | [diff] [blame] | 12 | bool "Designware SPI controller driver" |
Kumar Gala | 5f09eae | 2018-11-20 10:56:37 -0600 | [diff] [blame] | 13 | depends on HAS_SPI_DW |
Daniel Leung | a33aecc | 2016-03-17 11:21:49 -0700 | [diff] [blame] | 14 | help |
| 15 | Enable support for Designware's SPI controllers. |
| 16 | |
| 17 | if SPI_DW |
| 18 | |
| 19 | config SPI_DW_ARC_AUX_REGS |
| 20 | bool "Registers are part of ARC auxiliary registers" |
Ulf Magnusson | 8206ed4 | 2019-03-07 06:55:22 +0100 | [diff] [blame] | 21 | depends on ARC |
Daniel Leung | a33aecc | 2016-03-17 11:21:49 -0700 | [diff] [blame] | 22 | default y |
| 23 | help |
| 24 | SPI IP block registers are part of user extended auxiliary |
| 25 | registers and thus their access is different than memory |
| 26 | mapped registers. |
| 27 | |
Chuck Jordan | 7f637af | 2016-05-18 13:11:35 -0700 | [diff] [blame] | 28 | config SPI_DW_FIFO_DEPTH |
David B. Kinder | 3561c73 | 2017-04-24 11:30:10 -0700 | [diff] [blame] | 29 | int "RX and TX FIFO Depth" |
Chuck Jordan | 7f637af | 2016-05-18 13:11:35 -0700 | [diff] [blame] | 30 | help |
| 31 | Corresponds to the SSI_TX_FIFO_DEPTH and |
David B. Kinder | 93e4d72 | 2017-04-21 10:29:51 -0700 | [diff] [blame] | 32 | SSI_RX_FIFO_DEPTH of the DesignWare Synchronous |
Chuck Jordan | 7f637af | 2016-05-18 13:11:35 -0700 | [diff] [blame] | 33 | Serial Interface. Depth ranges from 2-256. |
Daniel Leung | a33aecc | 2016-03-17 11:21:49 -0700 | [diff] [blame] | 34 | |
Watson Zeng | 75a65a0 | 2019-09-10 12:00:15 +0800 | [diff] [blame] | 35 | config SPI_DW_ACCESS_WORD_ONLY |
| 36 | bool "DesignWare SPI only allows word access" |
Watson Zeng | 75a65a0 | 2019-09-10 12:00:15 +0800 | [diff] [blame] | 37 | depends on SPI_DW |
| 38 | help |
| 39 | In some case, e.g. ARC HS Development kit, the peripheral space of |
| 40 | DesignWare SPI only allows word access, byte access will raise |
| 41 | exception. |
| 42 | |
Tomasz Bursztyka | 423f009 | 2018-02-27 07:31:05 +0100 | [diff] [blame] | 43 | if SPI_0 |
| 44 | |
| 45 | config SPI_DW_PORT_0_INTERRUPT_SINGLE_LINE |
| 46 | bool "Single interrupt line for all interrupts" |
| 47 | default y |
| 48 | help |
| 49 | Only one line is used to trigger interrupts: RX, TX and ERROR |
| 50 | interrupt go all through that line, undifferentiated. |
| 51 | |
| 52 | config SPI_DW_PORT_0_CLOCK_GATE |
| 53 | bool "Enable clock gating" |
| 54 | depends on CLOCK_CONTROL |
Tomasz Bursztyka | 423f009 | 2018-02-27 07:31:05 +0100 | [diff] [blame] | 55 | |
| 56 | if SPI_DW_PORT_0_CLOCK_GATE |
| 57 | |
| 58 | config SPI_DW_PORT_0_CLOCK_GATE_DRV_NAME |
| 59 | string |
Tomasz Bursztyka | 423f009 | 2018-02-27 07:31:05 +0100 | [diff] [blame] | 60 | |
Kumar Gala | 9ec2f3b | 2016-05-24 18:17:13 -0500 | [diff] [blame] | 61 | config SPI_DW_PORT_0_CLOCK_GATE_SUBSYS |
Daniel Leung | a33aecc | 2016-03-17 11:21:49 -0700 | [diff] [blame] | 62 | int "Clock controller's subsystem" |
Tomasz Bursztyka | 423f009 | 2018-02-27 07:31:05 +0100 | [diff] [blame] | 63 | |
| 64 | endif # SPI_DW_PORT_0_CLOCK_GATE |
| 65 | |
| 66 | endif # SPI_0 |
| 67 | |
| 68 | if SPI_1 |
| 69 | |
| 70 | config SPI_DW_PORT_1_INTERRUPT_SINGLE_LINE |
| 71 | bool "Single interrupt line for all interrupts" |
| 72 | default y |
| 73 | |
| 74 | config SPI_DW_PORT_1_CLOCK_GATE |
| 75 | bool "Enable clock gating" |
| 76 | depends on CLOCK_CONTROL |
Tomasz Bursztyka | 423f009 | 2018-02-27 07:31:05 +0100 | [diff] [blame] | 77 | |
| 78 | if SPI_DW_PORT_1_CLOCK_GATE |
| 79 | |
| 80 | config SPI_DW_PORT_1_CLOCK_GATE_DRV_NAME |
| 81 | string |
Daniel Leung | a33aecc | 2016-03-17 11:21:49 -0700 | [diff] [blame] | 82 | |
Kumar Gala | 9ec2f3b | 2016-05-24 18:17:13 -0500 | [diff] [blame] | 83 | config SPI_DW_PORT_1_CLOCK_GATE_SUBSYS |
Daniel Leung | a33aecc | 2016-03-17 11:21:49 -0700 | [diff] [blame] | 84 | int "Clock controller's subsystem" |
Daniel Leung | a33aecc | 2016-03-17 11:21:49 -0700 | [diff] [blame] | 85 | |
Tomasz Bursztyka | 423f009 | 2018-02-27 07:31:05 +0100 | [diff] [blame] | 86 | endif # SPI_DW_PORT_1_CLOCK_GATE |
| 87 | |
| 88 | endif # SPI_1 |
Tomasz Bursztyka | a863494 | 2018-02-27 09:25:50 +0100 | [diff] [blame] | 89 | |
| 90 | if SPI_2 |
| 91 | |
| 92 | config SPI_DW_PORT_2_INTERRUPT_SINGLE_LINE |
| 93 | bool "Single interrupt line for all interrupts" |
| 94 | default y |
| 95 | help |
| 96 | Only one line is used to trigger interrupts: RX, TX and ERROR |
| 97 | interrupt go all through that line, undifferentiated. |
| 98 | |
| 99 | config SPI_DW_PORT_2_CLOCK_GATE |
| 100 | bool "Enable clock gating" |
| 101 | depends on CLOCK_CONTROL |
Tomasz Bursztyka | a863494 | 2018-02-27 09:25:50 +0100 | [diff] [blame] | 102 | |
| 103 | if SPI_DW_PORT_2_CLOCK_GATE |
| 104 | |
| 105 | config SPI_DW_PORT_2_CLOCK_GATE_DRV_NAME |
| 106 | string |
| 107 | default "" |
| 108 | |
| 109 | config SPI_DW_PORT_2_CLOCK_GATE_SUBSYS |
| 110 | int "Clock controller's subsystem" |
| 111 | |
| 112 | endif # SPI_DW_PORT_2_CLOCK_GATE |
| 113 | |
| 114 | endif # SPI_2 |
| 115 | |
| 116 | if SPI_3 |
| 117 | |
| 118 | config SPI_DW_PORT_3_INTERRUPT_SINGLE_LINE |
| 119 | bool "Single interrupt line for all interrupts" |
| 120 | default y |
| 121 | help |
| 122 | Only one line is used to trigger interrupts: RX, TX and ERROR |
| 123 | interrupt go all through that line, undifferentiated. |
| 124 | |
| 125 | config SPI_DW_PORT_3_CLOCK_GATE |
| 126 | bool "Enable clock gating" |
| 127 | depends on CLOCK_CONTROL |
Tomasz Bursztyka | a863494 | 2018-02-27 09:25:50 +0100 | [diff] [blame] | 128 | |
| 129 | if SPI_DW_PORT_3_CLOCK_GATE |
| 130 | |
| 131 | config SPI_DW_PORT_3_CLOCK_GATE_DRV_NAME |
| 132 | string |
| 133 | default "" |
| 134 | |
| 135 | config SPI_DW_PORT_3_CLOCK_GATE_SUBSYS |
| 136 | int "Clock controller's subsystem" |
| 137 | |
| 138 | endif # SPI_DW_PORT_3_CLOCK_GATE |
| 139 | |
| 140 | endif # SPI_3 |
| 141 | |
Daniel Leung | a33aecc | 2016-03-17 11:21:49 -0700 | [diff] [blame] | 142 | endif # SPI_DW |