Kconfig 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590
  1. if ARCH_SUNXI
  2. # Note only one of these may be selected at a time! But hidden choices are
  3. # not supported by Kconfig
  4. config SUNXI_GEN_SUN4I
  5. bool
  6. ---help---
  7. Select this for sunxi SoCs which have resets and clocks set up
  8. as the original A10 (mach-sun4i).
  9. config SUNXI_GEN_SUN6I
  10. bool
  11. ---help---
  12. Select this for sunxi SoCs which have sun6i like periphery, like
  13. separate ahb reset control registers, custom pmic bus, new style
  14. watchdog, etc.
  15. choice
  16. prompt "Sunxi SoC Variant"
  17. optional
  18. config MACH_SUN4I
  19. bool "sun4i (Allwinner A10)"
  20. select CPU_V7
  21. select SUNXI_GEN_SUN4I
  22. select SUPPORT_SPL
  23. config MACH_SUN5I
  24. bool "sun5i (Allwinner A13)"
  25. select CPU_V7
  26. select SUNXI_GEN_SUN4I
  27. select SUPPORT_SPL
  28. config MACH_SUN6I
  29. bool "sun6i (Allwinner A31)"
  30. select CPU_V7
  31. select CPU_V7_HAS_NONSEC
  32. select CPU_V7_HAS_VIRT
  33. select SUNXI_GEN_SUN6I
  34. select SUPPORT_SPL
  35. select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
  36. config MACH_SUN7I
  37. bool "sun7i (Allwinner A20)"
  38. select CPU_V7
  39. select CPU_V7_HAS_NONSEC
  40. select CPU_V7_HAS_VIRT
  41. select SUNXI_GEN_SUN4I
  42. select SUPPORT_SPL
  43. select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
  44. config MACH_SUN8I_A23
  45. bool "sun8i (Allwinner A23)"
  46. select CPU_V7
  47. select CPU_V7_HAS_NONSEC
  48. select CPU_V7_HAS_VIRT
  49. select SUNXI_GEN_SUN6I
  50. select SUPPORT_SPL
  51. select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
  52. config MACH_SUN8I_A33
  53. bool "sun8i (Allwinner A33)"
  54. select CPU_V7
  55. select CPU_V7_HAS_NONSEC
  56. select CPU_V7_HAS_VIRT
  57. select SUNXI_GEN_SUN6I
  58. select SUPPORT_SPL
  59. select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
  60. config MACH_SUN9I
  61. bool "sun9i (Allwinner A80)"
  62. select CPU_V7
  63. select SUNXI_GEN_SUN6I
  64. endchoice
  65. # The sun8i SoCs share a lot, this helps to avoid a lot of "if A23 || A33"
  66. config MACH_SUN8I
  67. bool
  68. default y if MACH_SUN8I_A23 || MACH_SUN8I_A33
  69. config DRAM_CLK
  70. int "sunxi dram clock speed"
  71. default 312 if MACH_SUN6I || MACH_SUN8I
  72. default 360 if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
  73. ---help---
  74. Set the dram clock speed, valid range 240 - 480, must be a multiple
  75. of 24.
  76. if MACH_SUN5I || MACH_SUN7I
  77. config DRAM_MBUS_CLK
  78. int "sunxi mbus clock speed"
  79. default 300
  80. ---help---
  81. Set the mbus clock speed. The maximum on sun5i hardware is 300MHz.
  82. endif
  83. config DRAM_ZQ
  84. int "sunxi dram zq value"
  85. default 123 if MACH_SUN4I || MACH_SUN5I || MACH_SUN6I || MACH_SUN8I
  86. default 127 if MACH_SUN7I
  87. ---help---
  88. Set the dram zq value.
  89. config DRAM_ODT_EN
  90. bool "sunxi dram odt enable"
  91. default n if !MACH_SUN8I_A23
  92. default y if MACH_SUN8I_A23
  93. ---help---
  94. Select this to enable dram odt (on die termination).
  95. if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
  96. config DRAM_EMR1
  97. int "sunxi dram emr1 value"
  98. default 0 if MACH_SUN4I
  99. default 4 if MACH_SUN5I || MACH_SUN7I
  100. ---help---
  101. Set the dram controller emr1 value.
  102. config DRAM_TPR3
  103. hex "sunxi dram tpr3 value"
  104. default 0
  105. ---help---
  106. Set the dram controller tpr3 parameter. This parameter configures
  107. the delay on the command lane and also phase shifts, which are
  108. applied for sampling incoming read data. The default value 0
  109. means that no phase/delay adjustments are necessary. Properly
  110. configuring this parameter increases reliability at high DRAM
  111. clock speeds.
  112. config DRAM_DQS_GATING_DELAY
  113. hex "sunxi dram dqs_gating_delay value"
  114. default 0
  115. ---help---
  116. Set the dram controller dqs_gating_delay parmeter. Each byte
  117. encodes the DQS gating delay for each byte lane. The delay
  118. granularity is 1/4 cycle. For example, the value 0x05060606
  119. means that the delay is 5 quarter-cycles for one lane (1.25
  120. cycles) and 6 quarter-cycles (1.5 cycles) for 3 other lanes.
  121. The default value 0 means autodetection. The results of hardware
  122. autodetection are not very reliable and depend on the chip
  123. temperature (sometimes producing different results on cold start
  124. and warm reboot). But the accuracy of hardware autodetection
  125. is usually good enough, unless running at really high DRAM
  126. clocks speeds (up to 600MHz). If unsure, keep as 0.
  127. choice
  128. prompt "sunxi dram timings"
  129. default DRAM_TIMINGS_VENDOR_MAGIC
  130. ---help---
  131. Select the timings of the DDR3 chips.
  132. config DRAM_TIMINGS_VENDOR_MAGIC
  133. bool "Magic vendor timings from Android"
  134. ---help---
  135. The same DRAM timings as in the Allwinner boot0 bootloader.
  136. config DRAM_TIMINGS_DDR3_1066F_1333H
  137. bool "JEDEC DDR3-1333H with down binning to DDR3-1066F"
  138. ---help---
  139. Use the timings of the standard JEDEC DDR3-1066F speed bin for
  140. DRAM_CLK <= 533MHz and the timings of the DDR3-1333H speed bin
  141. for DRAM_CLK > 533MHz. This covers the majority of DDR3 chips
  142. used in Allwinner A10/A13/A20 devices. In the case of DDR3-1333
  143. or DDR3-1600 chips, be sure to check the DRAM datasheet to confirm
  144. that down binning to DDR3-1066F is supported (because DDR3-1066F
  145. uses a bit faster timings than DDR3-1333H).
  146. config DRAM_TIMINGS_DDR3_800E_1066G_1333J
  147. bool "JEDEC DDR3-800E / DDR3-1066G / DDR3-1333J"
  148. ---help---
  149. Use the timings of the slowest possible JEDEC speed bin for the
  150. selected DRAM_CLK. Depending on the DRAM_CLK value, it may be
  151. DDR3-800E, DDR3-1066G or DDR3-1333J.
  152. endchoice
  153. endif
  154. if MACH_SUN8I_A23
  155. config DRAM_ODT_CORRECTION
  156. int "sunxi dram odt correction value"
  157. default 0
  158. ---help---
  159. Set the dram odt correction value (range -255 - 255). In allwinner
  160. fex files, this option is found in bits 8-15 of the u32 odt_en variable
  161. in the [dram] section. When bit 31 of the odt_en variable is set
  162. then the correction is negative. Usually the value for this is 0.
  163. endif
  164. config SYS_CLK_FREQ
  165. default 912000000 if MACH_SUN7I
  166. default 1008000000 if MACH_SUN4I || MACH_SUN5I || MACH_SUN6I || MACH_SUN8I
  167. config SYS_CONFIG_NAME
  168. default "sun4i" if MACH_SUN4I
  169. default "sun5i" if MACH_SUN5I
  170. default "sun6i" if MACH_SUN6I
  171. default "sun7i" if MACH_SUN7I
  172. default "sun8i" if MACH_SUN8I
  173. default "sun9i" if MACH_SUN9I
  174. config SYS_BOARD
  175. default "sunxi"
  176. config SYS_SOC
  177. default "sunxi"
  178. config UART0_PORT_F
  179. bool "UART0 on MicroSD breakout board"
  180. default n
  181. ---help---
  182. Repurpose the SD card slot for getting access to the UART0 serial
  183. console. Primarily useful only for low level u-boot debugging on
  184. tablets, where normal UART0 is difficult to access and requires
  185. device disassembly and/or soldering. As the SD card can't be used
  186. at the same time, the system can be only booted in the FEL mode.
  187. Only enable this if you really know what you are doing.
  188. config OLD_SUNXI_KERNEL_COMPAT
  189. boolean "Enable workarounds for booting old kernels"
  190. default n
  191. ---help---
  192. Set this to enable various workarounds for old kernels, this results in
  193. sub-optimal settings for newer kernels, only enable if needed.
  194. config MMC0_CD_PIN
  195. string "Card detect pin for mmc0"
  196. default ""
  197. ---help---
  198. Set the card detect pin for mmc0, leave empty to not use cd. This
  199. takes a string in the format understood by sunxi_name_to_gpio, e.g.
  200. PH1 for pin 1 of port H.
  201. config MMC1_CD_PIN
  202. string "Card detect pin for mmc1"
  203. default ""
  204. ---help---
  205. See MMC0_CD_PIN help text.
  206. config MMC2_CD_PIN
  207. string "Card detect pin for mmc2"
  208. default ""
  209. ---help---
  210. See MMC0_CD_PIN help text.
  211. config MMC3_CD_PIN
  212. string "Card detect pin for mmc3"
  213. default ""
  214. ---help---
  215. See MMC0_CD_PIN help text.
  216. config MMC1_PINS
  217. string "Pins for mmc1"
  218. default ""
  219. ---help---
  220. Set the pins used for mmc1, when applicable. This takes a string in the
  221. format understood by sunxi_name_to_gpio_bank, e.g. PH for port H.
  222. config MMC2_PINS
  223. string "Pins for mmc2"
  224. default ""
  225. ---help---
  226. See MMC1_PINS help text.
  227. config MMC3_PINS
  228. string "Pins for mmc3"
  229. default ""
  230. ---help---
  231. See MMC1_PINS help text.
  232. config MMC_SUNXI_SLOT_EXTRA
  233. int "mmc extra slot number"
  234. default -1
  235. ---help---
  236. sunxi builds always enable mmc0, some boards also have a second sdcard
  237. slot or emmc on mmc1 - mmc3. Setting this to 1, 2 or 3 will enable
  238. support for this.
  239. config SPL_NAND_SUPPORT
  240. bool "SPL/NAND mode support"
  241. depends on SPL
  242. default n
  243. ---help---
  244. This enables support for booting from NAND internal
  245. memory. U-Boot SPL doesn't detect where is it load from,
  246. therefore this option is needed to properly load image from
  247. flash. Option also disables MMC functionality on U-Boot due to
  248. initialization errors encountered, when both controllers are
  249. enabled.
  250. config USB0_VBUS_PIN
  251. string "Vbus enable pin for usb0 (otg)"
  252. default ""
  253. ---help---
  254. Set the Vbus enable pin for usb0 (otg). This takes a string in the
  255. format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
  256. config USB0_VBUS_DET
  257. string "Vbus detect pin for usb0 (otg)"
  258. default ""
  259. ---help---
  260. Set the Vbus detect pin for usb0 (otg). This takes a string in the
  261. format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
  262. config USB1_VBUS_PIN
  263. string "Vbus enable pin for usb1 (ehci0)"
  264. default "PH6" if MACH_SUN4I || MACH_SUN7I
  265. default "PH27" if MACH_SUN6I
  266. ---help---
  267. Set the Vbus enable pin for usb1 (ehci0, usb0 is the otg). This takes
  268. a string in the format understood by sunxi_name_to_gpio, e.g.
  269. PH1 for pin 1 of port H.
  270. config USB2_VBUS_PIN
  271. string "Vbus enable pin for usb2 (ehci1)"
  272. default "PH3" if MACH_SUN4I || MACH_SUN7I
  273. default "PH24" if MACH_SUN6I
  274. ---help---
  275. See USB1_VBUS_PIN help text.
  276. config I2C0_ENABLE
  277. bool "Enable I2C/TWI controller 0"
  278. default y if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
  279. default n if MACH_SUN6I || MACH_SUN8I
  280. ---help---
  281. This allows enabling I2C/TWI controller 0 by muxing its pins, enabling
  282. its clock and setting up the bus. This is especially useful on devices
  283. with slaves connected to the bus or with pins exposed through e.g. an
  284. expansion port/header.
  285. config I2C1_ENABLE
  286. bool "Enable I2C/TWI controller 1"
  287. default n
  288. ---help---
  289. See I2C0_ENABLE help text.
  290. config I2C2_ENABLE
  291. bool "Enable I2C/TWI controller 2"
  292. default n
  293. ---help---
  294. See I2C0_ENABLE help text.
  295. if MACH_SUN6I || MACH_SUN7I
  296. config I2C3_ENABLE
  297. bool "Enable I2C/TWI controller 3"
  298. default n
  299. ---help---
  300. See I2C0_ENABLE help text.
  301. endif
  302. if MACH_SUN7I
  303. config I2C4_ENABLE
  304. bool "Enable I2C/TWI controller 4"
  305. default n
  306. ---help---
  307. See I2C0_ENABLE help text.
  308. endif
  309. config AXP_GPIO
  310. boolean "Enable support for gpio-s on axp PMICs"
  311. default n
  312. ---help---
  313. Say Y here to enable support for the gpio pins of the axp PMIC ICs.
  314. config VIDEO
  315. boolean "Enable graphical uboot console on HDMI, LCD or VGA"
  316. default y
  317. ---help---
  318. Say Y here to add support for using a cfb console on the HDMI, LCD
  319. or VGA output found on most sunxi devices. See doc/README.video for
  320. info on how to select the video output and mode.
  321. config VIDEO_HDMI
  322. boolean "HDMI output support"
  323. depends on VIDEO && !MACH_SUN8I
  324. default y
  325. ---help---
  326. Say Y here to add support for outputting video over HDMI.
  327. config VIDEO_VGA
  328. boolean "VGA output support"
  329. depends on VIDEO && (MACH_SUN4I || MACH_SUN7I)
  330. default n
  331. ---help---
  332. Say Y here to add support for outputting video over VGA.
  333. config VIDEO_VGA_VIA_LCD
  334. boolean "VGA via LCD controller support"
  335. depends on VIDEO && (MACH_SUN5I || MACH_SUN6I || MACH_SUN8I)
  336. default n
  337. ---help---
  338. Say Y here to add support for external DACs connected to the parallel
  339. LCD interface driving a VGA connector, such as found on the
  340. Olimex A13 boards.
  341. config VIDEO_VGA_VIA_LCD_FORCE_SYNC_ACTIVE_HIGH
  342. boolean "Force sync active high for VGA via LCD controller support"
  343. depends on VIDEO_VGA_VIA_LCD
  344. default n
  345. ---help---
  346. Say Y here if you've a board which uses opendrain drivers for the vga
  347. hsync and vsync signals. Opendrain drivers cannot generate steep enough
  348. positive edges for a stable video output, so on boards with opendrain
  349. drivers the sync signals must always be active high.
  350. config VIDEO_VGA_EXTERNAL_DAC_EN
  351. string "LCD panel power enable pin"
  352. depends on VIDEO_VGA_VIA_LCD
  353. default ""
  354. ---help---
  355. Set the enable pin for the external VGA DAC. This takes a string in the
  356. format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
  357. config VIDEO_LCD_MODE
  358. string "LCD panel timing details"
  359. depends on VIDEO
  360. default ""
  361. ---help---
  362. LCD panel timing details string, leave empty if there is no LCD panel.
  363. This is in drivers/video/videomodes.c: video_get_params() format, e.g.
  364. x:800,y:480,depth:18,pclk_khz:33000,le:16,ri:209,up:22,lo:22,hs:30,vs:1,sync:0,vmode:0
  365. config VIDEO_LCD_DCLK_PHASE
  366. int "LCD panel display clock phase"
  367. depends on VIDEO
  368. default 1
  369. ---help---
  370. Select LCD panel display clock phase shift, range 0-3.
  371. config VIDEO_LCD_POWER
  372. string "LCD panel power enable pin"
  373. depends on VIDEO
  374. default ""
  375. ---help---
  376. Set the power enable pin for the LCD panel. This takes a string in the
  377. format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
  378. config VIDEO_LCD_RESET
  379. string "LCD panel reset pin"
  380. depends on VIDEO
  381. default ""
  382. ---help---
  383. Set the reset pin for the LCD panel. This takes a string in the format
  384. understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
  385. config VIDEO_LCD_BL_EN
  386. string "LCD panel backlight enable pin"
  387. depends on VIDEO
  388. default ""
  389. ---help---
  390. Set the backlight enable pin for the LCD panel. This takes a string in the
  391. the format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of
  392. port H.
  393. config VIDEO_LCD_BL_PWM
  394. string "LCD panel backlight pwm pin"
  395. depends on VIDEO
  396. default ""
  397. ---help---
  398. Set the backlight pwm pin for the LCD panel. This takes a string in the
  399. format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
  400. config VIDEO_LCD_BL_PWM_ACTIVE_LOW
  401. bool "LCD panel backlight pwm is inverted"
  402. depends on VIDEO
  403. default y
  404. ---help---
  405. Set this if the backlight pwm output is active low.
  406. config VIDEO_LCD_PANEL_I2C
  407. bool "LCD panel needs to be configured via i2c"
  408. depends on VIDEO
  409. default n
  410. ---help---
  411. Say y here if the LCD panel needs to be configured via i2c. This
  412. will add a bitbang i2c controller using gpios to talk to the LCD.
  413. config VIDEO_LCD_PANEL_I2C_SDA
  414. string "LCD panel i2c interface SDA pin"
  415. depends on VIDEO_LCD_PANEL_I2C
  416. default "PG12"
  417. ---help---
  418. Set the SDA pin for the LCD i2c interface. This takes a string in the
  419. format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
  420. config VIDEO_LCD_PANEL_I2C_SCL
  421. string "LCD panel i2c interface SCL pin"
  422. depends on VIDEO_LCD_PANEL_I2C
  423. default "PG10"
  424. ---help---
  425. Set the SCL pin for the LCD i2c interface. This takes a string in the
  426. format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
  427. # Note only one of these may be selected at a time! But hidden choices are
  428. # not supported by Kconfig
  429. config VIDEO_LCD_IF_PARALLEL
  430. bool
  431. config VIDEO_LCD_IF_LVDS
  432. bool
  433. choice
  434. prompt "LCD panel support"
  435. depends on VIDEO
  436. ---help---
  437. Select which type of LCD panel to support.
  438. config VIDEO_LCD_PANEL_PARALLEL
  439. bool "Generic parallel interface LCD panel"
  440. select VIDEO_LCD_IF_PARALLEL
  441. config VIDEO_LCD_PANEL_LVDS
  442. bool "Generic lvds interface LCD panel"
  443. select VIDEO_LCD_IF_LVDS
  444. config VIDEO_LCD_PANEL_MIPI_4_LANE_513_MBPS_VIA_SSD2828
  445. bool "MIPI 4-lane, 513Mbps LCD panel via SSD2828 bridge chip"
  446. select VIDEO_LCD_SSD2828
  447. select VIDEO_LCD_IF_PARALLEL
  448. ---help---
  449. 7.85" 768x1024 LCD panels, such as LG LP079X01 or AUO B079XAN01.0
  450. config VIDEO_LCD_PANEL_HITACHI_TX18D42VM
  451. bool "Hitachi tx18d42vm LCD panel"
  452. select VIDEO_LCD_HITACHI_TX18D42VM
  453. select VIDEO_LCD_IF_LVDS
  454. ---help---
  455. 7.85" 1024x768 Hitachi tx18d42vm LCD panel support
  456. config VIDEO_LCD_TL059WV5C0
  457. bool "tl059wv5c0 LCD panel"
  458. select VIDEO_LCD_PANEL_I2C
  459. select VIDEO_LCD_IF_PARALLEL
  460. ---help---
  461. 6" 480x800 tl059wv5c0 panel support, as used on the Utoo P66 and
  462. Aigo M60/M608/M606 tablets.
  463. endchoice
  464. config USB_MUSB_SUNXI
  465. bool "Enable sunxi OTG / DRC USB controller in host mode"
  466. default n
  467. ---help---
  468. Say y here to enable support for the sunxi OTG / DRC USB controller
  469. used on almost all sunxi boards. Note currently u-boot can only have
  470. one usb host controller enabled at a time, so enabling this on boards
  471. which also use the ehci host controller will result in build errors.
  472. config USB_KEYBOARD
  473. boolean "Enable USB keyboard support"
  474. default y
  475. ---help---
  476. Say Y here to add support for using a USB keyboard (typically used
  477. in combination with a graphical console).
  478. config GMAC_TX_DELAY
  479. int "GMAC Transmit Clock Delay Chain"
  480. default 0
  481. ---help---
  482. Set the GMAC Transmit Clock Delay Chain value.
  483. config SYS_MALLOC_CLEAR_ON_INIT
  484. default n
  485. config NETDEVICES
  486. default y
  487. config DM_ETH
  488. default y
  489. config DM_SERIAL
  490. default y
  491. config DM_USB
  492. default y if !USB_MUSB_SUNXI
  493. config CMD_SETEXPR
  494. default y
  495. config CMD_NET
  496. default y
  497. endif