^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) # Kernel configuration file for the UFS Host Controller
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) # This code is based on drivers/scsi/ufs/Kconfig
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) # Copyright (C) 2011-2013 Samsung India Software Operations
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) # Authors:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) # Santosh Yaraganavi <santosh.sy@samsung.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) # Vinayak Holikatti <h.vinayak@samsung.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) # This program is free software; you can redistribute it and/or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) # modify it under the terms of the GNU General Public License
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) # as published by the Free Software Foundation; either version 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) # of the License, or (at your option) any later version.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) # See the COPYING file in the top-level directory or visit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) # <http://www.gnu.org/licenses/gpl-2.0.html>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) # This program is distributed in the hope that it will be useful,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) # but WITHOUT ANY WARRANTY; without even the implied warranty of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) # GNU General Public License for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) # This program is provided "AS IS" and "WITH ALL FAULTS" and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) # without warranty of any kind. You are solely responsible for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) # determining the appropriateness of using and distributing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) # the program and assume all risks associated with your exercise
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) # of rights with respect to the program, including but not limited
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) # to infringement of third party rights, the risks and costs of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) # program errors, damage to or loss of data, programs or equipment,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) # and unavailability or interruption of operations. Under no
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) # circumstances will the contributor of this Program be liable for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) # any damages of any kind arising from your use or distribution of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) # this program.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) config SCSI_UFSHCD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) tristate "Universal Flash Storage Controller Driver Core"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) depends on SCSI && SCSI_DMA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) select PM_DEVFREQ
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) select DEVFREQ_GOV_SIMPLE_ONDEMAND
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) select NLS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) This selects the support for UFS devices in Linux, say Y and make
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) sure that you know the name of your UFS host adapter (the card
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) inside your computer that "speaks" the UFS protocol, also
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) called UFS Host Controller), because you will be asked for it.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) The module will be called ufshcd.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) To compile this driver as a module, choose M here and read
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) <file:Documentation/scsi/ufs.rst>.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) However, do not compile this as a module if your root file system
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) (the one containing the directory /) is located on a UFS device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) config SCSI_UFSHCD_PCI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) tristate "PCI bus based UFS Controller support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) depends on SCSI_UFSHCD && PCI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) This selects the PCI UFS Host Controller Interface. Select this if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) you have UFS Host Controller with PCI Interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) If you have a controller with this interface, say Y or M here.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) config SCSI_UFS_DWC_TC_PCI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) tristate "DesignWare pci support using a G210 Test Chip"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) depends on SCSI_UFSHCD_PCI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) Synopsys Test Chip is a PHY for prototyping purposes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) config SCSI_UFSHCD_PLATFORM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) tristate "Platform bus based UFS Controller support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) depends on SCSI_UFSHCD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) depends on HAS_IOMEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) This selects the UFS host controller support. Select this if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) you have an UFS controller on Platform bus.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) If you have a controller with this interface, say Y or M here.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) config SCSI_UFS_CDNS_PLATFORM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) tristate "Cadence UFS Controller platform driver"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) depends on SCSI_UFSHCD_PLATFORM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) This selects the Cadence-specific additions to UFSHCD platform driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) config SCSI_UFS_DWC_TC_PLATFORM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) tristate "DesignWare platform support using a G210 Test Chip"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) depends on SCSI_UFSHCD_PLATFORM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) Synopsys Test Chip is a PHY for prototyping purposes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) config SCSI_UFS_QCOM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) tristate "QCOM specific hooks to UFS controller platform driver"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) depends on SCSI_UFSHCD_PLATFORM && ARCH_QCOM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) select QCOM_SCM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) select RESET_CONTROLLER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) This selects the QCOM specific additions to UFSHCD platform driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) UFS host on QCOM needs some vendor specific configuration before
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) accessing the hardware which includes PHY configuration and vendor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) specific registers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) Select this if you have UFS controller on QCOM chipset.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) config SCSI_UFS_MEDIATEK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) tristate "Mediatek specific hooks to UFS controller platform driver"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) depends on SCSI_UFSHCD_PLATFORM && ARCH_MEDIATEK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) select PHY_MTK_UFS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) select RESET_TI_SYSCON
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) This selects the Mediatek specific additions to UFSHCD platform driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) UFS host on Mediatek needs some vendor specific configuration before
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) accessing the hardware which includes PHY configuration and vendor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) specific registers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) Select this if you have UFS controller on Mediatek chipset.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) config SCSI_UFS_HISI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) tristate "Hisilicon specific hooks to UFS controller platform driver"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) depends on (ARCH_HISI || COMPILE_TEST) && SCSI_UFSHCD_PLATFORM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) This selects the Hisilicon specific additions to UFSHCD platform driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) Select this if you have UFS controller on Hisilicon chipset.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) config SCSI_UFS_TI_J721E
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) tristate "TI glue layer for Cadence UFS Controller"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) depends on OF && HAS_IOMEM && (ARCH_K3 || COMPILE_TEST)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) This selects driver for TI glue layer for Cadence UFS Host
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) Controller IP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) Selects this if you have TI platform with UFS controller.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) config SCSI_UFS_BSG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) bool "Universal Flash Storage BSG device node"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) depends on SCSI_UFSHCD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) select BLK_DEV_BSGLIB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) Universal Flash Storage (UFS) is SCSI transport specification for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) accessing flash storage on digital cameras, mobile phones and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) consumer electronic devices.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) A UFS controller communicates with a UFS device by exchanging
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) UFS Protocol Information Units (UPIUs).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) UPIUs can not only be used as a transport layer for the SCSI protocol
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) but are also used by the UFS native command set.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) This transport driver supports exchanging UFS protocol information units
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) with a UFS device. See also the ufshcd driver, which is a SCSI driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) that supports UFS devices.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) Select this if you need a bsg device node for your UFS controller.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) config SCSI_UFS_EXYNOS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) tristate "EXYNOS specific hooks to UFS controller platform driver"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) depends on SCSI_UFSHCD_PLATFORM && (ARCH_EXYNOS || COMPILE_TEST)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) This selects the EXYNOS specific additions to UFSHCD platform driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) UFS host on EXYNOS includes HCI and UNIPRO layer, and associates with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) UFS-PHY driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) Select this if you have UFS host controller on EXYNOS chipset.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) config SCSI_UFS_CRYPTO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) bool "UFS Crypto Engine Support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) depends on SCSI_UFSHCD && BLK_INLINE_ENCRYPTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) Enable Crypto Engine Support in UFS.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) Enabling this makes it possible for the kernel to use the crypto
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) capabilities of the UFS device (if present) to perform crypto
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) operations on data being transferred to/from the device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) config SCSI_UFS_HPB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) bool "Support UFS Host Performance Booster"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) depends on SCSI_UFSHCD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) The UFS HPB feature improves random read performance. It caches
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) L2P (logical to physical) map of UFS to host DRAM. The driver uses HPB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) read command by piggybacking physical page number for bypassing FTL (flash
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) translation layer)'s L2P address translation.