Kconfig 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  1. #
  2. # I2C subsystem configuration
  3. #
  4. menuconfig I2C
  5. bool "I2C support"
  6. default y
  7. help
  8. Note:
  9. This is a stand-in for an option to enable I2C support. In fact this
  10. simply enables building of the I2C directory for U-Boot. The actual
  11. I2C feature is enabled by DM_I2C (for driver model) and
  12. the #define CONFIG_SYS_I2C_LEGACY (for the legacy I2C stack).
  13. So at present there is no need to ever disable this option.
  14. Eventually it will:
  15. Enable support for the I2C (Inter-Integrated Circuit) bus in U-Boot.
  16. I2C works with a clock and data line which can be driven by a
  17. one or more masters or slaves. It is a fairly complex bus but is
  18. widely used as it only needs two lines for communication. Speeds of
  19. 400kbps are typical but up to 3.4Mbps is supported by some
  20. hardware. Enable this option to build the drivers in drivers/i2c as
  21. part of a U-Boot build.
  22. if I2C
  23. config DM_I2C
  24. bool "Enable Driver Model for I2C drivers"
  25. depends on DM
  26. help
  27. Enable driver model for I2C. The I2C uclass interface: probe, read,
  28. write and speed, is implemented with the bus drivers operations,
  29. which provide methods for bus setting and data transfer. Each chip
  30. device (bus child) info is kept as parent plat. The interface
  31. is defined in include/i2c.h.
  32. config SPL_DM_I2C
  33. bool "Enable Driver Model for I2C drivers in SPL"
  34. depends on SPL_DM && DM_I2C
  35. default y
  36. help
  37. Enable driver model for I2C. The I2C uclass interface: probe, read,
  38. write and speed, is implemented with the bus drivers operations,
  39. which provide methods for bus setting and data transfer. Each chip
  40. device (bus child) info is kept as parent platdata. The interface
  41. is defined in include/i2c.h.
  42. config I2C_CROS_EC_TUNNEL
  43. tristate "Chrome OS EC tunnel I2C bus"
  44. depends on CROS_EC
  45. help
  46. This provides an I2C bus that will tunnel i2c commands through to
  47. the other side of the Chrome OS EC to the I2C bus connected there.
  48. This will work whatever the interface used to talk to the EC (SPI,
  49. I2C or LPC). Some Chromebooks use this when the hardware design
  50. does not allow direct access to the main PMIC from the AP.
  51. config I2C_CROS_EC_LDO
  52. bool "Provide access to LDOs on the Chrome OS EC"
  53. depends on CROS_EC
  54. ---help---
  55. On many Chromebooks the main PMIC is inaccessible to the AP. This is
  56. often dealt with by using an I2C pass-through interface provided by
  57. the EC. On some unfortunate models (e.g. Spring) the pass-through
  58. is not available, and an LDO message is available instead. This
  59. option enables a driver which provides very basic access to those
  60. regulators, via the EC. We implement this as an I2C bus which
  61. emulates just the TPS65090 messages we know about. This is done to
  62. avoid duplicating the logic in the TPS65090 regulator driver for
  63. enabling/disabling an LDO.
  64. config I2C_SET_DEFAULT_BUS_NUM
  65. bool "Set default I2C bus number"
  66. depends on DM_I2C
  67. help
  68. Set default number of I2C bus to be accessed. This option provides
  69. behaviour similar to old (i.e. pre DM) I2C bus driver.
  70. config I2C_DEFAULT_BUS_NUMBER
  71. hex "I2C default bus number"
  72. depends on I2C_SET_DEFAULT_BUS_NUM
  73. default 0x0
  74. help
  75. Number of default I2C bus to use
  76. config DM_I2C_GPIO
  77. bool "Enable Driver Model for software emulated I2C bus driver"
  78. depends on DM_I2C && DM_GPIO
  79. help
  80. Enable the i2c bus driver emulation by using the GPIOs. The bus GPIO
  81. configuration is given by the device tree. Kernel-style device tree
  82. bindings are supported.
  83. Binding info: doc/device-tree-bindings/i2c/i2c-gpio.txt
  84. config SPL_DM_I2C_GPIO
  85. bool "Enable Driver Model for software emulated I2C bus driver in SPL"
  86. depends on SPL_DM && DM_I2C_GPIO && SPL_DM_GPIO && SPL_GPIO
  87. default y
  88. help
  89. Enable the i2c bus driver emulation by using the GPIOs. The bus GPIO
  90. configuration is given by the device tree. Kernel-style device tree
  91. bindings are supported.
  92. Binding info: doc/device-tree-bindings/i2c/i2c-gpio.txt
  93. config SYS_I2C_AT91
  94. bool "Atmel I2C driver"
  95. depends on DM_I2C && ARCH_AT91
  96. help
  97. Add support for the Atmel I2C driver. A serious problem is that there
  98. is no documented way to issue repeated START conditions for more than
  99. two messages, as needed to support combined I2C messages. Use the
  100. i2c-gpio driver unless your system can cope with this limitation.
  101. Binding info: doc/device-tree-bindings/i2c/i2c-at91.txt
  102. config SYS_I2C_IPROC
  103. bool "Broadcom I2C driver"
  104. depends on DM_I2C
  105. help
  106. Broadcom I2C driver.
  107. Add support for Broadcom I2C driver.
  108. Say yes here to to enable the Broadco I2C driver.
  109. config SYS_I2C_FSL
  110. bool "Freescale I2C bus driver"
  111. depends on DM_I2C
  112. help
  113. Add support for Freescale I2C busses as used on MPC8240, MPC8245, and
  114. MPC85xx processors.
  115. config SYS_I2C_CADENCE
  116. tristate "Cadence I2C Controller"
  117. depends on DM_I2C
  118. help
  119. Say yes here to select Cadence I2C Host Controller. This controller is
  120. e.g. used by Xilinx Zynq.
  121. config SYS_I2C_CA
  122. tristate "Cortina-Access I2C Controller"
  123. depends on DM_I2C && CORTINA_PLATFORM
  124. default n
  125. help
  126. Add support for the Cortina Access I2C host controller.
  127. Say yes here to select Cortina-Access I2C Host Controller.
  128. config SYS_I2C_DAVINCI
  129. bool "Davinci I2C Controller"
  130. depends on (ARCH_KEYSTONE || ARCH_DAVINCI)
  131. help
  132. Say yes here to add support for Davinci and Keystone I2C controller
  133. config SYS_I2C_DW
  134. bool "Designware I2C Controller"
  135. default n
  136. help
  137. Say yes here to select the Designware I2C Host Controller. This
  138. controller is used in various SoCs, e.g. the ST SPEAr, Altera
  139. SoCFPGA, Synopsys ARC700 and some Intel x86 SoCs.
  140. config SYS_I2C_ASPEED
  141. bool "Aspeed I2C Controller"
  142. depends on DM_I2C && ARCH_ASPEED
  143. help
  144. Say yes here to select Aspeed I2C Host Controller. The driver
  145. supports AST2500 and AST2400 controllers, but is very limited.
  146. Only single master mode is supported and only byte-by-byte
  147. synchronous reads and writes are supported, no Pool Buffers or DMA.
  148. config SYS_I2C_INTEL
  149. bool "Intel I2C/SMBUS driver"
  150. depends on DM_I2C
  151. help
  152. Add support for the Intel SMBUS driver. So far this driver is just
  153. a stub which perhaps some basic init. There is no implementation of
  154. the I2C API meaning that any I2C operations will immediately fail
  155. for now.
  156. config SYS_I2C_IMX_LPI2C
  157. bool "NXP i.MX LPI2C driver"
  158. help
  159. Add support for the NXP i.MX LPI2C driver.
  160. config SYS_I2C_LPC32XX
  161. bool "LPC32XX I2C driver"
  162. depends on ARCH_LPC32XX
  163. help
  164. Enable support for the LPC32xx I2C driver.
  165. config SYS_I2C_MESON
  166. bool "Amlogic Meson I2C driver"
  167. depends on DM_I2C && ARCH_MESON
  168. help
  169. Add support for the I2C controller available in Amlogic Meson
  170. SoCs. The controller supports programmable bus speed including
  171. standard (100kbits/s) and fast (400kbit/s) speed and allows the
  172. software to define a flexible format of the bit streams. It has an
  173. internal buffer holding up to 8 bytes for transfers and supports
  174. both 7-bit and 10-bit addresses.
  175. config SYS_I2C_MXC
  176. bool "NXP MXC I2C driver"
  177. help
  178. Add support for the NXP I2C driver. This supports up to four bus
  179. channels and operating on standard mode up to 100 kbits/s and fast
  180. mode up to 400 kbits/s.
  181. # These settings are not used with DM_I2C, however SPL doesn't use
  182. # DM_I2C even if DM_I2C is enabled, and so might use these settings even
  183. # when main u-boot does not!
  184. if SYS_I2C_MXC && (!DM_I2C || SPL)
  185. config SYS_I2C_MXC_I2C1
  186. bool "NXP MXC I2C1"
  187. help
  188. Add support for NXP MXC I2C Controller 1.
  189. Required for SoCs which have I2C MXC controller 1 eg LS1088A, LS2080A
  190. config SYS_I2C_MXC_I2C2
  191. bool "NXP MXC I2C2"
  192. help
  193. Add support for NXP MXC I2C Controller 2.
  194. Required for SoCs which have I2C MXC controller 2 eg LS1088A, LS2080A
  195. config SYS_I2C_MXC_I2C3
  196. bool "NXP MXC I2C3"
  197. help
  198. Add support for NXP MXC I2C Controller 3.
  199. Required for SoCs which have I2C MXC controller 3 eg LS1088A, LS2080A
  200. config SYS_I2C_MXC_I2C4
  201. bool "NXP MXC I2C4"
  202. help
  203. Add support for NXP MXC I2C Controller 4.
  204. Required for SoCs which have I2C MXC controller 4 eg LS1088A, LS2080A
  205. config SYS_I2C_MXC_I2C5
  206. bool "NXP MXC I2C5"
  207. help
  208. Add support for NXP MXC I2C Controller 5.
  209. Required for SoCs which have I2C MXC controller 5 eg LX2160A
  210. config SYS_I2C_MXC_I2C6
  211. bool "NXP MXC I2C6"
  212. help
  213. Add support for NXP MXC I2C Controller 6.
  214. Required for SoCs which have I2C MXC controller 6 eg LX2160A
  215. config SYS_I2C_MXC_I2C7
  216. bool "NXP MXC I2C7"
  217. help
  218. Add support for NXP MXC I2C Controller 7.
  219. Required for SoCs which have I2C MXC controller 7 eg LX2160A
  220. config SYS_I2C_MXC_I2C8
  221. bool "NXP MXC I2C8"
  222. help
  223. Add support for NXP MXC I2C Controller 8.
  224. Required for SoCs which have I2C MXC controller 8 eg LX2160A
  225. endif
  226. if SYS_I2C_MXC_I2C1
  227. config SYS_MXC_I2C1_SPEED
  228. int "I2C Channel 1 speed"
  229. default 40000000 if TARGET_LS2080A_EMU
  230. default 100000
  231. help
  232. MXC I2C Channel 1 speed
  233. config SYS_MXC_I2C1_SLAVE
  234. int "I2C1 Slave"
  235. default 0
  236. help
  237. MXC I2C1 Slave
  238. endif
  239. if SYS_I2C_MXC_I2C2
  240. config SYS_MXC_I2C2_SPEED
  241. int "I2C Channel 2 speed"
  242. default 40000000 if TARGET_LS2080A_EMU
  243. default 100000
  244. help
  245. MXC I2C Channel 2 speed
  246. config SYS_MXC_I2C2_SLAVE
  247. int "I2C2 Slave"
  248. default 0
  249. help
  250. MXC I2C2 Slave
  251. endif
  252. if SYS_I2C_MXC_I2C3
  253. config SYS_MXC_I2C3_SPEED
  254. int "I2C Channel 3 speed"
  255. default 100000
  256. help
  257. MXC I2C Channel 3 speed
  258. config SYS_MXC_I2C3_SLAVE
  259. int "I2C3 Slave"
  260. default 0
  261. help
  262. MXC I2C3 Slave
  263. endif
  264. if SYS_I2C_MXC_I2C4
  265. config SYS_MXC_I2C4_SPEED
  266. int "I2C Channel 4 speed"
  267. default 100000
  268. help
  269. MXC I2C Channel 4 speed
  270. config SYS_MXC_I2C4_SLAVE
  271. int "I2C4 Slave"
  272. default 0
  273. help
  274. MXC I2C4 Slave
  275. endif
  276. if SYS_I2C_MXC_I2C5
  277. config SYS_MXC_I2C5_SPEED
  278. int "I2C Channel 5 speed"
  279. default 100000
  280. help
  281. MXC I2C Channel 5 speed
  282. config SYS_MXC_I2C5_SLAVE
  283. int "I2C5 Slave"
  284. default 0
  285. help
  286. MXC I2C5 Slave
  287. endif
  288. if SYS_I2C_MXC_I2C6
  289. config SYS_MXC_I2C6_SPEED
  290. int "I2C Channel 6 speed"
  291. default 100000
  292. help
  293. MXC I2C Channel 6 speed
  294. config SYS_MXC_I2C6_SLAVE
  295. int "I2C6 Slave"
  296. default 0
  297. help
  298. MXC I2C6 Slave
  299. endif
  300. if SYS_I2C_MXC_I2C7
  301. config SYS_MXC_I2C7_SPEED
  302. int "I2C Channel 7 speed"
  303. default 100000
  304. help
  305. MXC I2C Channel 7 speed
  306. config SYS_MXC_I2C7_SLAVE
  307. int "I2C7 Slave"
  308. default 0
  309. help
  310. MXC I2C7 Slave
  311. endif
  312. if SYS_I2C_MXC_I2C8
  313. config SYS_MXC_I2C8_SPEED
  314. int "I2C Channel 8 speed"
  315. default 100000
  316. help
  317. MXC I2C Channel 8 speed
  318. config SYS_MXC_I2C8_SLAVE
  319. int "I2C8 Slave"
  320. default 0
  321. help
  322. MXC I2C8 Slave
  323. endif
  324. config SYS_I2C_NEXELL
  325. bool "Nexell I2C driver"
  326. depends on DM_I2C
  327. help
  328. Add support for the Nexell I2C driver. This is used with various
  329. Nexell parts such as S5Pxx18 series SoCs. All chips
  330. have several I2C ports and all are provided, controlled by the
  331. device tree.
  332. config SYS_I2C_OCORES
  333. bool "ocores I2C driver"
  334. depends on DM_I2C
  335. help
  336. Add support for ocores I2C controller. For details see
  337. https://opencores.org/projects/i2c
  338. config SYS_I2C_OMAP24XX
  339. bool "TI OMAP2+ I2C driver"
  340. depends on ARCH_OMAP2PLUS || ARCH_K3
  341. help
  342. Add support for the OMAP2+ I2C driver.
  343. if SYS_I2C_OMAP24XX
  344. config SYS_OMAP24_I2C_SLAVE
  345. int "I2C Slave addr channel 0"
  346. default 1
  347. help
  348. OMAP24xx I2C Slave address channel 0
  349. config SYS_OMAP24_I2C_SPEED
  350. int "I2C Slave channel 0 speed"
  351. default 100000
  352. help
  353. OMAP24xx Slave speed channel 0
  354. endif
  355. config SYS_I2C_RCAR_I2C
  356. bool "Renesas RCar I2C driver"
  357. depends on (RCAR_GEN3 || RCAR_GEN2) && DM_I2C
  358. help
  359. Support for Renesas RCar I2C controller.
  360. config SYS_I2C_RCAR_IIC
  361. bool "Renesas RCar Gen3 IIC driver"
  362. depends on (RCAR_GEN3 || RCAR_GEN2) && DM_I2C
  363. help
  364. Support for Renesas RCar Gen3 IIC controller.
  365. config SYS_I2C_ROCKCHIP
  366. bool "Rockchip I2C driver"
  367. depends on DM_I2C
  368. help
  369. Add support for the Rockchip I2C driver. This is used with various
  370. Rockchip parts such as RK3126, RK3128, RK3036 and RK3288. All chips
  371. have several I2C ports and all are provided, controlled by the
  372. device tree.
  373. config SYS_I2C_SANDBOX
  374. bool "Sandbox I2C driver"
  375. depends on SANDBOX && DM_I2C
  376. help
  377. Enable I2C support for sandbox. This is an emulation of a real I2C
  378. bus. Devices can be attached to the bus using the device tree
  379. which specifies the driver to use. See sandbox.dts as an example.
  380. config SYS_I2C_OCTEON
  381. bool "Octeon II/III/TX/TX2 I2C driver"
  382. depends on (ARCH_OCTEON || ARCH_OCTEONTX || ARCH_OCTEONTX2) && DM_I2C
  383. default y
  384. help
  385. Add support for the Marvell Octeon I2C driver. This is used with
  386. various Octeon parts such as Octeon II/III and OcteonTX/TX2. All
  387. chips have several I2C ports and all are provided, controlled by
  388. the device tree.
  389. config SYS_I2C_S3C24X0
  390. bool "Samsung I2C driver"
  391. depends on ARCH_EXYNOS4 && DM_I2C
  392. help
  393. Support for Samsung I2C controller as Samsung SoCs.
  394. config SYS_I2C_STM32F7
  395. bool "STMicroelectronics STM32F7 I2C support"
  396. depends on (STM32F7 || STM32H7 || ARCH_STM32MP) && DM_I2C
  397. help
  398. Enable this option to add support for STM32 I2C controller
  399. introduced with STM32F7/H7 SoCs. This I2C controller supports :
  400. _ Slave and master modes
  401. _ Multimaster capability
  402. _ Standard-mode (up to 100 kHz)
  403. _ Fast-mode (up to 400 kHz)
  404. _ Fast-mode Plus (up to 1 MHz)
  405. _ 7-bit and 10-bit addressing mode
  406. _ Multiple 7-bit slave addresses (2 addresses, 1 with configurable mask)
  407. _ All 7-bit addresses acknowledge mode
  408. _ General call
  409. _ Programmable setup and hold times
  410. _ Easy to use event management
  411. _ Optional clock stretching
  412. _ Software reset
  413. config SYS_I2C_SYNQUACER
  414. bool "Socionext SynQuacer I2C controller"
  415. depends on ARCH_SYNQUACER && DM_I2C
  416. help
  417. Support for Socionext Synquacer I2C controller. This I2C controller
  418. will be used for RTC and LS-connector on DeveloperBox.
  419. config SYS_I2C_TEGRA
  420. bool "NVIDIA Tegra internal I2C controller"
  421. depends on ARCH_TEGRA
  422. help
  423. Support for NVIDIA I2C controller available in Tegra SoCs.
  424. config SYS_I2C_UNIPHIER
  425. bool "UniPhier I2C driver"
  426. depends on ARCH_UNIPHIER && DM_I2C
  427. default y
  428. help
  429. Support for UniPhier I2C controller driver. This I2C controller
  430. is used on PH1-LD4, PH1-sLD8 or older UniPhier SoCs.
  431. config SYS_I2C_UNIPHIER_F
  432. bool "UniPhier FIFO-builtin I2C driver"
  433. depends on ARCH_UNIPHIER && DM_I2C
  434. default y
  435. help
  436. Support for UniPhier FIFO-builtin I2C controller driver.
  437. This I2C controller is used on PH1-Pro4 or newer UniPhier SoCs.
  438. config SYS_I2C_VERSATILE
  439. bool "Arm Ltd Versatile I2C bus driver"
  440. depends on DM_I2C && TARGET_VEXPRESS64_JUNO
  441. help
  442. Add support for the Arm Ltd Versatile Express I2C driver. The I2C host
  443. controller is present in the development boards manufactured by Arm Ltd.
  444. config SYS_I2C_MVTWSI
  445. bool "Marvell I2C driver"
  446. depends on DM_I2C
  447. help
  448. Support for Marvell I2C controllers as used on the orion5x and
  449. kirkwood SoC families.
  450. config TEGRA186_BPMP_I2C
  451. bool "Enable Tegra186 BPMP-based I2C driver"
  452. depends on TEGRA186_BPMP
  453. help
  454. Support for Tegra I2C controllers managed by the BPMP (Boot and
  455. Power Management Processor). On Tegra186, some I2C controllers are
  456. directly controlled by the main CPU, whereas others are controlled
  457. by the BPMP, and can only be accessed by the main CPU via IPC
  458. requests to the BPMP. This driver covers the latter case.
  459. config SYS_I2C_BUS_MAX
  460. int "Max I2C busses"
  461. depends on ARCH_KEYSTONE || ARCH_OMAP2PLUS || ARCH_SOCFPGA
  462. default 2 if TI816X
  463. default 3 if OMAP34XX || AM33XX || AM43XX || ARCH_KEYSTONE
  464. default 4 if ARCH_SOCFPGA || OMAP44XX || TI814X
  465. default 5 if OMAP54XX
  466. help
  467. Define the maximum number of available I2C buses.
  468. config SYS_I2C_XILINX_XIIC
  469. bool "Xilinx AXI I2C driver"
  470. depends on DM_I2C
  471. help
  472. Support for Xilinx AXI I2C controller.
  473. config SYS_I2C_IHS
  474. bool "gdsys IHS I2C driver"
  475. depends on DM_I2C
  476. help
  477. Support for gdsys IHS I2C driver on FPGA bus.
  478. source "drivers/i2c/muxes/Kconfig"
  479. endif