blob: 7b38e83c2d7ee18be263d9990124c97ff86884d4 [file] [log] [blame]
Ian Campbelld8e69e02014-10-24 21:20:44 +01001if ARCH_SUNXI
2
Siva Durga Prasad Paladugu809438d2016-07-29 15:31:47 +05303config IDENT_STRING
4 default " Allwinner Technology"
5
Jagan Teki3994b1e2018-01-10 16:03:34 +05306config DRAM_SUN4I
7 bool
8 help
9 Select this dram controller driver for Sun4/5/7i platforms,
10 like A10/A13/A20.
11
Jagan Teki68d0f5f2018-03-17 00:16:36 +053012config DRAM_SUN6I
13 bool
14 help
15 Select this dram controller driver for Sun6i platforms,
16 like A31/A31s.
17
Jagan Teki318e4e52018-01-10 16:15:14 +053018config DRAM_SUN8I_A23
19 bool
20 help
21 Select this dram controller driver for Sun8i platforms,
22 for A23 SOC.
23
Jagan Tekie624d4c2018-01-10 16:17:39 +053024config DRAM_SUN8I_A33
25 bool
26 help
27 Select this dram controller driver for Sun8i platforms,
28 for A33 SOC.
29
Jagan Teki270a6f62018-01-10 16:20:26 +053030config DRAM_SUN8I_A83T
31 bool
32 help
33 Select this dram controller driver for Sun8i platforms,
34 for A83T SOC.
35
Jagan Teki6aa7f712018-03-17 00:18:01 +053036config DRAM_SUN9I
37 bool
38 help
39 Select this dram controller driver for Sun9i platforms,
40 like A80.
41
Icenowy Zheng4e287f62018-07-23 06:13:34 +080042config DRAM_SUN50I_H6
43 bool
44 help
45 Select this dram controller driver for some sun50i platforms,
46 like H6.
47
Jernej Skrabece4aa24b2021-01-11 21:11:43 +010048config DRAM_SUN50I_H616
49 bool
50 help
51 Select this dram controller driver for some sun50i platforms,
52 like H616.
53
54if DRAM_SUN50I_H616
Jernej Skrabecdd533da2023-04-10 10:21:12 +020055config DRAM_SUN50I_H616_DX_ODT
56 hex "H616 DRAM DX ODT parameter"
57 help
58 DX ODT value from vendor DRAM settings.
59
60config DRAM_SUN50I_H616_DX_DRI
61 hex "H616 DRAM DX DRI parameter"
62 help
63 DX DRI value from vendor DRAM settings.
64
65config DRAM_SUN50I_H616_CA_DRI
66 hex "H616 DRAM CA DRI parameter"
67 help
68 CA DRI value from vendor DRAM settings.
Jernej Skrabec6a6fe862023-04-10 10:21:13 +020069
Jernej Skrabec63ab9552023-04-10 10:21:16 +020070config DRAM_SUN50I_H616_ODT_EN
71 hex "H616 DRAM ODT EN parameter"
72 default 0x1
73 help
74 ODT EN value from vendor DRAM settings.
75
Jernej Skrabec6a6fe862023-04-10 10:21:13 +020076config DRAM_SUN50I_H616_TPR10
77 hex "H616 DRAM TPR10 parameter"
78 help
79 TPR10 value from vendor DRAM settings. It tells which features
80 should be configured, like write leveling, read calibration, etc.
Jernej Skrabec63ab9552023-04-10 10:21:16 +020081
82config DRAM_SUN50I_H616_TPR11
83 hex "H616 DRAM TPR11 parameter"
84 default 0x0
85 help
86 TPR11 value from vendor DRAM settings.
87
88config DRAM_SUN50I_H616_TPR12
89 hex "H616 DRAM TPR12 parameter"
90 default 0x0
91 help
92 TPR12 value from vendor DRAM settings.
Jernej Skrabece4aa24b2021-01-11 21:11:43 +010093endif
94
Jagan Teki932f5e02018-01-11 13:21:15 +053095config SUN6I_PRCM
96 bool
97 help
98 Support for the PRCM (Power/Reset/Clock Management) unit available
99 in A31 SoC.
100
Jagan Tekifeb29272018-02-14 22:28:30 +0530101config AXP_PMIC_BUS
Samuel Holland623b8042021-10-08 00:17:19 -0500102 bool
Samuel Holland388fe642021-10-08 00:17:23 -0500103 select DM_PMIC if DM_I2C
104 select PMIC_AXP if DM_I2C
Jagan Tekifeb29272018-02-14 22:28:30 +0530105 help
106 Select this PMIC bus access helpers for Sunxi platform PRCM or other
107 AXP family PMIC devices.
108
Icenowy Zheng5e6dd272018-07-21 16:20:20 +0800109config SUNXI_SRAM_ADDRESS
110 hex
111 default 0x10000 if MACH_SUN9I || MACH_SUN50I || MACH_SUN50I_H5
Jernej Skrabecda8ae612021-01-11 21:11:34 +0100112 default 0x20000 if SUN50I_GEN_H6
Icenowy Zheng5e6dd272018-07-21 16:20:20 +0800113 default 0x0
Andre Przywarade454ec2017-02-16 01:20:23 +0000114 ---help---
115 Older Allwinner SoCs have their mask boot ROM mapped just below 4GB,
116 with the first SRAM region being located at address 0.
117 Some newer SoCs map the boot ROM at address 0 instead and move the
Icenowy Zheng5e6dd272018-07-21 16:20:20 +0800118 SRAM to a different address.
Andre Przywarade454ec2017-02-16 01:20:23 +0000119
Andre Przywarad1de0bb2018-06-27 01:42:53 +0100120config SUNXI_A64_TIMER_ERRATUM
121 bool
122
Hans de Goedef07872b2015-04-06 20:33:34 +0200123# Note only one of these may be selected at a time! But hidden choices are
124# not supported by Kconfig
125config SUNXI_GEN_SUN4I
126 bool
127 ---help---
128 Select this for sunxi SoCs which have resets and clocks set up
129 as the original A10 (mach-sun4i).
130
131config SUNXI_GEN_SUN6I
132 bool
133 ---help---
134 Select this for sunxi SoCs which have sun6i like periphery, like
135 separate ahb reset control registers, custom pmic bus, new style
136 watchdog, etc.
137
Jernej Skrabecda8ae612021-01-11 21:11:34 +0100138config SUN50I_GEN_H6
139 bool
140 select FIT
141 select SPL_LOAD_FIT
Andre Przywarab8816f02021-05-05 10:04:41 +0100142 select MMC_SUNXI_HAS_NEW_MODE
Jernej Skrabecda8ae612021-01-11 21:11:34 +0100143 select SUPPORT_SPL
144 ---help---
145 Select this for sunxi SoCs which have H6 like peripherals, clocks
146 and memory map.
147
Icenowy Zhengca0bc022017-06-03 17:10:14 +0800148config SUNXI_DRAM_DW
149 bool
150 ---help---
151 Select this for sunxi SoCs which uses a DRAM controller like the
152 DesignWare controller used in H3, mainly SoCs after H3, which do
153 not have official open-source DRAM initialization code, but can
154 use modified H3 DRAM initialization code.
Hans de Goedef07872b2015-04-06 20:33:34 +0200155
Icenowy Zhengb2607512017-06-03 17:10:16 +0800156if SUNXI_DRAM_DW
157config SUNXI_DRAM_DW_16BIT
158 bool
159 ---help---
160 Select this for sunxi SoCs with DesignWare DRAM controller and
161 have only 16-bit memory buswidth.
162
163config SUNXI_DRAM_DW_32BIT
164 bool
165 ---help---
166 Select this for sunxi SoCs with DesignWare DRAM controller with
167 32-bit memory buswidth.
168endif
169
Andre Przywara5fb97432017-02-16 01:20:27 +0000170config MACH_SUNXI_H3_H5
171 bool
Jagan Teki137fc752018-05-07 13:03:38 +0530172 select PHY_SUN4I_USB
Jernej Skrabec9b4ca922017-03-27 19:22:31 +0200173 select SUNXI_DE2
Icenowy Zhengca0bc022017-06-03 17:10:14 +0800174 select SUNXI_DRAM_DW
Icenowy Zhengb2607512017-06-03 17:10:16 +0800175 select SUNXI_DRAM_DW_32BIT
Andre Przywara5fb97432017-02-16 01:20:27 +0000176 select SUNXI_GEN_SUN6I
177 select SUPPORT_SPL
178
Icenowy Zheng14170a42018-10-25 17:23:06 +0800179# TODO: try out A80's 8GiB DRAM space
180config SUNXI_DRAM_MAX_SIZE
181 hex
Andre Przywarac0387f12021-04-28 21:29:55 +0100182 default 0x100000000 if MACH_SUN50I_H616
183 default 0xC0000000 if MACH_SUN50I || MACH_SUN50I_H5 || MACH_SUN50I_H6
Icenowy Zheng14170a42018-10-25 17:23:06 +0800184 default 0x80000000
185
Ian Campbelld8e69e02014-10-24 21:20:44 +0100186choice
187 prompt "Sunxi SoC Variant"
Hans de Goedeb05a6482016-06-12 11:57:07 +0200188 optional
Ian Campbelld8e69e02014-10-24 21:20:44 +0100189
Icenowy Zheng8f2d1c02022-01-29 10:23:07 -0500190config MACH_SUNIV
191 bool "suniv (Allwinner F1C100s/F1C200s/F1C600/R6)"
192 select CPU_ARM926EJS
193 select SUNXI_GEN_SUN6I
194 select SUPPORT_SPL
Andre Przywaracfacdfa2022-10-05 23:19:28 +0100195 select SKIP_LOWLEVEL_INIT_ONLY
196 select SPL_SKIP_LOWLEVEL_INIT_ONLY
Icenowy Zheng8f2d1c02022-01-29 10:23:07 -0500197
Ian Campbell4a24a1c2014-10-24 21:20:45 +0100198config MACH_SUN4I
Ian Campbelld8e69e02014-10-24 21:20:44 +0100199 bool "sun4i (Allwinner A10)"
Lokesh Vutla81b1a672018-04-26 18:21:26 +0530200 select CPU_V7A
Jagan Teki137fc752018-05-07 13:03:38 +0530201 select PHY_SUN4I_USB
Jagan Teki3994b1e2018-01-10 16:03:34 +0530202 select DRAM_SUN4I
Hans de Goedef07872b2015-04-06 20:33:34 +0200203 select SUNXI_GEN_SUN4I
Ian Campbelld8e69e02014-10-24 21:20:44 +0100204 select SUPPORT_SPL
Tom Rini52b2e262021-08-18 23:12:24 -0400205 imply SPL_SYS_I2C_LEGACY
206 imply SYS_I2C_LEGACY
Ian Campbelld8e69e02014-10-24 21:20:44 +0100207
Ian Campbell4a24a1c2014-10-24 21:20:45 +0100208config MACH_SUN5I
Ian Campbelld8e69e02014-10-24 21:20:44 +0100209 bool "sun5i (Allwinner A13)"
Lokesh Vutla81b1a672018-04-26 18:21:26 +0530210 select CPU_V7A
Jagan Teki3994b1e2018-01-10 16:03:34 +0530211 select DRAM_SUN4I
Jagan Teki137fc752018-05-07 13:03:38 +0530212 select PHY_SUN4I_USB
Hans de Goedef07872b2015-04-06 20:33:34 +0200213 select SUNXI_GEN_SUN4I
Ian Campbelld8e69e02014-10-24 21:20:44 +0100214 select SUPPORT_SPL
Tom Rini52b2e262021-08-18 23:12:24 -0400215 imply SPL_SYS_I2C_LEGACY
216 imply SYS_I2C_LEGACY
Ian Campbelld8e69e02014-10-24 21:20:44 +0100217
Ian Campbell4a24a1c2014-10-24 21:20:45 +0100218config MACH_SUN6I
Ian Campbelld8e69e02014-10-24 21:20:44 +0100219 bool "sun6i (Allwinner A31)"
Lokesh Vutla81b1a672018-04-26 18:21:26 +0530220 select CPU_V7A
Chen-Yu Tsaif31017c2015-05-28 21:25:32 +0800221 select CPU_V7_HAS_NONSEC
222 select CPU_V7_HAS_VIRT
Masahiro Yamadad5415b22016-08-30 16:22:22 +0900223 select ARCH_SUPPORT_PSCI
Andre Przywara5fc25562022-01-23 00:27:19 +0000224 select SPL_ARMV7_SET_CORTEX_SMPEN
Jagan Teki68d0f5f2018-03-17 00:16:36 +0530225 select DRAM_SUN6I
Jagan Teki137fc752018-05-07 13:03:38 +0530226 select PHY_SUN4I_USB
Samuel Holland60d49282021-10-08 00:17:20 -0500227 select SPL_I2C
Jagan Teki932f5e02018-01-11 13:21:15 +0530228 select SUN6I_PRCM
Hans de Goedef07872b2015-04-06 20:33:34 +0200229 select SUNXI_GEN_SUN6I
Hans de Goedea5403b92014-10-25 20:18:10 +0200230 select SUPPORT_SPL
Samuel Holland60d49282021-10-08 00:17:20 -0500231 select SYS_I2C_SUN6I_P2WI
Chen-Yu Tsaif31017c2015-05-28 21:25:32 +0800232 select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
Ian Campbelld8e69e02014-10-24 21:20:44 +0100233
Ian Campbell4a24a1c2014-10-24 21:20:45 +0100234config MACH_SUN7I
Ian Campbelld8e69e02014-10-24 21:20:44 +0100235 bool "sun7i (Allwinner A20)"
Lokesh Vutla81b1a672018-04-26 18:21:26 +0530236 select CPU_V7A
Hans de Goede85437352014-11-14 09:34:30 +0100237 select CPU_V7_HAS_NONSEC
238 select CPU_V7_HAS_VIRT
Masahiro Yamadad5415b22016-08-30 16:22:22 +0900239 select ARCH_SUPPORT_PSCI
Andre Przywara5fc25562022-01-23 00:27:19 +0000240 select SPL_ARMV7_SET_CORTEX_SMPEN
Jagan Teki3994b1e2018-01-10 16:03:34 +0530241 select DRAM_SUN4I
Jagan Teki137fc752018-05-07 13:03:38 +0530242 select PHY_SUN4I_USB
Hans de Goedef07872b2015-04-06 20:33:34 +0200243 select SUNXI_GEN_SUN4I
Ian Campbelld8e69e02014-10-24 21:20:44 +0100244 select SUPPORT_SPL
Hans de Goedea5636382014-10-24 20:12:04 +0200245 select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
Tom Rini52b2e262021-08-18 23:12:24 -0400246 imply SPL_SYS_I2C_LEGACY
247 imply SYS_I2C_LEGACY
Ian Campbelld8e69e02014-10-24 21:20:44 +0100248
Hans de Goedef055ed62015-04-06 20:55:39 +0200249config MACH_SUN8I_A23
Ian Campbelld8e69e02014-10-24 21:20:44 +0100250 bool "sun8i (Allwinner A23)"
Lokesh Vutla81b1a672018-04-26 18:21:26 +0530251 select CPU_V7A
Chen-Yu Tsai5acec7c2015-05-28 21:25:34 +0800252 select CPU_V7_HAS_NONSEC
253 select CPU_V7_HAS_VIRT
Masahiro Yamadad5415b22016-08-30 16:22:22 +0900254 select ARCH_SUPPORT_PSCI
Jagan Teki318e4e52018-01-10 16:15:14 +0530255 select DRAM_SUN8I_A23
Jagan Teki137fc752018-05-07 13:03:38 +0530256 select PHY_SUN4I_USB
Samuel Hollandb348efb2021-10-08 00:17:21 -0500257 select SPL_I2C
Hans de Goedef07872b2015-04-06 20:33:34 +0200258 select SUNXI_GEN_SUN6I
Hans de Goede966d2392014-12-07 14:34:27 +0100259 select SUPPORT_SPL
Samuel Hollandb348efb2021-10-08 00:17:21 -0500260 select SYS_I2C_SUN8I_RSB
Chen-Yu Tsai5acec7c2015-05-28 21:25:34 +0800261 select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
Ian Campbelld8e69e02014-10-24 21:20:44 +0100262
Vishnu Patekar3702f142015-03-01 23:47:48 +0530263config MACH_SUN8I_A33
264 bool "sun8i (Allwinner A33)"
Lokesh Vutla81b1a672018-04-26 18:21:26 +0530265 select CPU_V7A
Chen-Yu Tsai5acec7c2015-05-28 21:25:34 +0800266 select CPU_V7_HAS_NONSEC
267 select CPU_V7_HAS_VIRT
Masahiro Yamadad5415b22016-08-30 16:22:22 +0900268 select ARCH_SUPPORT_PSCI
Jagan Tekie624d4c2018-01-10 16:17:39 +0530269 select DRAM_SUN8I_A33
Jagan Teki137fc752018-05-07 13:03:38 +0530270 select PHY_SUN4I_USB
Samuel Hollandb348efb2021-10-08 00:17:21 -0500271 select SPL_I2C
Vishnu Patekar3702f142015-03-01 23:47:48 +0530272 select SUNXI_GEN_SUN6I
273 select SUPPORT_SPL
Samuel Hollandb348efb2021-10-08 00:17:21 -0500274 select SYS_I2C_SUN8I_RSB
Chen-Yu Tsai5acec7c2015-05-28 21:25:34 +0800275 select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
Vishnu Patekar3702f142015-03-01 23:47:48 +0530276
Chen-Yu Tsai1fcaea02016-05-02 10:28:07 +0800277config MACH_SUN8I_A83T
278 bool "sun8i (Allwinner A83T)"
Lokesh Vutla81b1a672018-04-26 18:21:26 +0530279 select CPU_V7A
Jagan Teki270a6f62018-01-10 16:20:26 +0530280 select DRAM_SUN8I_A83T
Jagan Teki137fc752018-05-07 13:03:38 +0530281 select PHY_SUN4I_USB
Samuel Hollandb348efb2021-10-08 00:17:21 -0500282 select SPL_I2C
Chen-Yu Tsai1fcaea02016-05-02 10:28:07 +0800283 select SUNXI_GEN_SUN6I
Maxime Ripard4799a1a2017-08-23 12:03:42 +0200284 select MMC_SUNXI_HAS_NEW_MODE
Vasily Khoruzhickb198e2c2018-11-09 20:41:44 -0800285 select MMC_SUNXI_HAS_MODE_SWITCH
Chen-Yu Tsai1fcaea02016-05-02 10:28:07 +0800286 select SUPPORT_SPL
Samuel Hollandb348efb2021-10-08 00:17:21 -0500287 select SYS_I2C_SUN8I_RSB
Chen-Yu Tsai1fcaea02016-05-02 10:28:07 +0800288
Jens Kuskef9770722015-11-17 15:12:58 +0100289config MACH_SUN8I_H3
290 bool "sun8i (Allwinner H3)"
Lokesh Vutla81b1a672018-04-26 18:21:26 +0530291 select CPU_V7A
Chen-Yu Tsaiaa9ab0e2016-01-06 15:13:09 +0800292 select CPU_V7_HAS_NONSEC
293 select CPU_V7_HAS_VIRT
Masahiro Yamadad5415b22016-08-30 16:22:22 +0900294 select ARCH_SUPPORT_PSCI
Andre Przywara5fb97432017-02-16 01:20:27 +0000295 select MACH_SUNXI_H3_H5
Chen-Yu Tsaiaa9ab0e2016-01-06 15:13:09 +0800296 select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
Jens Kuskef9770722015-11-17 15:12:58 +0100297
Chen-Yu Tsaicc2605e2016-11-30 14:57:32 +0800298config MACH_SUN8I_R40
299 bool "sun8i (Allwinner R40)"
Lokesh Vutla81b1a672018-04-26 18:21:26 +0530300 select CPU_V7A
Chen-Yu Tsaib1a1fda2017-03-01 11:03:15 +0800301 select CPU_V7_HAS_NONSEC
302 select CPU_V7_HAS_VIRT
303 select ARCH_SUPPORT_PSCI
Chen-Yu Tsaicc2605e2016-11-30 14:57:32 +0800304 select SUNXI_GEN_SUN6I
Andre Przywarab8816f02021-05-05 10:04:41 +0100305 select MMC_SUNXI_HAS_NEW_MODE
Chen-Yu Tsai2d5826c2016-12-02 16:09:49 +0800306 select SUPPORT_SPL
Icenowy Zhengca0bc022017-06-03 17:10:14 +0800307 select SUNXI_DRAM_DW
Icenowy Zhengb2607512017-06-03 17:10:16 +0800308 select SUNXI_DRAM_DW_32BIT
Andre Przywara47d49972020-01-01 23:44:48 +0000309 select PHY_SUN4I_USB
Tom Rini52b2e262021-08-18 23:12:24 -0400310 imply SPL_SYS_I2C_LEGACY
Chen-Yu Tsaicc2605e2016-11-30 14:57:32 +0800311
Icenowy Zheng52e61882017-04-08 15:30:12 +0800312config MACH_SUN8I_V3S
Icenowy Zheng7df99102020-10-26 22:15:59 +0800313 bool "sun8i (Allwinner V3/V3s/S3/S3L)"
Lokesh Vutla81b1a672018-04-26 18:21:26 +0530314 select CPU_V7A
Icenowy Zheng52e61882017-04-08 15:30:12 +0800315 select CPU_V7_HAS_NONSEC
316 select CPU_V7_HAS_VIRT
317 select ARCH_SUPPORT_PSCI
318 select SUNXI_GEN_SUN6I
Icenowy Zhengb54209f2017-06-03 17:10:22 +0800319 select SUNXI_DRAM_DW
320 select SUNXI_DRAM_DW_16BIT
321 select SUPPORT_SPL
Icenowy Zheng52e61882017-04-08 15:30:12 +0800322 select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
323
Hans de Goede7bfe2bb2015-01-13 19:25:06 +0100324config MACH_SUN9I
325 bool "sun9i (Allwinner A80)"
Lokesh Vutla81b1a672018-04-26 18:21:26 +0530326 select CPU_V7A
Andre Przywara5fc25562022-01-23 00:27:19 +0000327 select SPL_ARMV7_SET_CORTEX_SMPEN
Jagan Teki6aa7f712018-03-17 00:18:01 +0530328 select DRAM_SUN9I
Samuel Hollandb348efb2021-10-08 00:17:21 -0500329 select SPL_I2C
Jagan Teki11f33e12018-01-11 13:23:02 +0530330 select SUN6I_PRCM
Hans de Goede7bfe2bb2015-01-13 19:25:06 +0100331 select SUNXI_GEN_SUN6I
Philipp Tomsich470626e2016-10-28 18:21:32 +0800332 select SUPPORT_SPL
Hans de Goede7bfe2bb2015-01-13 19:25:06 +0100333
Chen-Yu Tsai1fcaea02016-05-02 10:28:07 +0800334config MACH_SUN50I
335 bool "sun50i (Allwinner A64)"
336 select ARM64
Jagan Teki137fc752018-05-07 13:03:38 +0530337 select PHY_SUN4I_USB
Vasily Khoruzhick6f4c3442018-11-05 20:24:30 -0800338 select SUN6I_PRCM
Jernej Skrabec9b4ca922017-03-27 19:22:31 +0200339 select SUNXI_DE2
Chen-Yu Tsai1fcaea02016-05-02 10:28:07 +0800340 select SUNXI_GEN_SUN6I
Vasily Khoruzhicka4e8dd92018-11-09 20:41:46 -0800341 select MMC_SUNXI_HAS_NEW_MODE
Andre Przywaraa563adc2017-01-02 11:48:45 +0000342 select SUPPORT_SPL
Icenowy Zhengca0bc022017-06-03 17:10:14 +0800343 select SUNXI_DRAM_DW
Icenowy Zhengb2607512017-06-03 17:10:16 +0800344 select SUNXI_DRAM_DW_32BIT
Andre Przywarad8362162017-04-26 01:32:48 +0100345 select FIT
346 select SPL_LOAD_FIT
Andre Przywarad1de0bb2018-06-27 01:42:53 +0100347 select SUNXI_A64_TIMER_ERRATUM
Chen-Yu Tsai1fcaea02016-05-02 10:28:07 +0800348
Andre Przywara5611a2d2017-02-16 01:20:28 +0000349config MACH_SUN50I_H5
350 bool "sun50i (Allwinner H5)"
351 select ARM64
352 select MACH_SUNXI_H3_H5
Andre Przywarab8816f02021-05-05 10:04:41 +0100353 select MMC_SUNXI_HAS_NEW_MODE
Andre Przywarad8362162017-04-26 01:32:48 +0100354 select FIT
355 select SPL_LOAD_FIT
Andre Przywara5611a2d2017-02-16 01:20:28 +0000356
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800357config MACH_SUN50I_H6
358 bool "sun50i (Allwinner H6)"
359 select ARM64
Andre Przywara213c2972019-06-23 15:09:50 +0100360 select PHY_SUN4I_USB
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800361 select DRAM_SUN50I_H6
Jernej Skrabecda8ae612021-01-11 21:11:34 +0100362 select SUN50I_GEN_H6
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800363
Jernej Skrabece638e052021-01-11 21:11:46 +0100364config MACH_SUN50I_H616
365 bool "sun50i (Allwinner H616)"
366 select ARM64
367 select DRAM_SUN50I_H616
368 select SUN50I_GEN_H6
369
Ian Campbelld8e69e02014-10-24 21:20:44 +0100370endchoice
Maxime Ripard2c519412014-10-03 20:16:29 +0800371
Hans de Goedef055ed62015-04-06 20:55:39 +0200372# The sun8i SoCs share a lot, this helps to avoid a lot of "if A23 || A33"
373config MACH_SUN8I
374 bool
Andre Przywara5fc25562022-01-23 00:27:19 +0000375 select SPL_ARMV7_SET_CORTEX_SMPEN if !ARM64
Jagan Teki11f33e12018-01-11 13:23:02 +0530376 select SUN6I_PRCM
Chen-Yu Tsaifa337462017-03-02 16:03:06 +0800377 default y if MACH_SUN8I_A23
378 default y if MACH_SUN8I_A33
379 default y if MACH_SUN8I_A83T
380 default y if MACH_SUNXI_H3_H5
Chen-Yu Tsaicc2605e2016-11-30 14:57:32 +0800381 default y if MACH_SUN8I_R40
Icenowy Zheng52e61882017-04-08 15:30:12 +0800382 default y if MACH_SUN8I_V3S
Hans de Goedef055ed62015-04-06 20:55:39 +0200383
Andre Przywara06893b62017-01-02 11:48:35 +0000384config RESERVE_ALLWINNER_BOOT0_HEADER
385 bool "reserve space for Allwinner boot0 header"
386 select ENABLE_ARM_SOC_BOOT0_HOOK
387 ---help---
388 Prepend a 1536 byte (empty) header to the U-Boot image file, to be
389 filled with magic values post build. The Allwinner provided boot0
390 blob relies on this information to load and execute U-Boot.
391 Only needed on 64-bit Allwinner boards so far when using boot0.
392
Andre Przywara46c3d992017-01-02 11:48:36 +0000393config ARM_BOOT_HOOK_RMR
394 bool
395 depends on ARM64
396 default y
397 select ENABLE_ARM_SOC_BOOT0_HOOK
398 ---help---
399 Insert some ARM32 code at the very beginning of the U-Boot binary
400 which uses an RMR register write to bring the core into AArch64 mode.
401 The very first instruction acts as a switch, since it's carefully
402 chosen to be a NOP in one mode and a branch in the other, so the
403 code would only be executed if not already in AArch64.
404 This allows both the SPL and the U-Boot proper to be entered in
405 either mode and switch to AArch64 if needed.
406
Andre Przywara1c7a7512019-07-15 02:27:06 +0100407if SUNXI_DRAM_DW || DRAM_SUN50I_H6
Icenowy Zhengf09b48e2017-06-03 17:10:18 +0800408config SUNXI_DRAM_DDR3
409 bool
410
Icenowy Zhenge270a582017-06-03 17:10:20 +0800411config SUNXI_DRAM_DDR2
412 bool
413
Icenowy Zheng3c1b9f12017-06-03 17:10:23 +0800414config SUNXI_DRAM_LPDDR3
415 bool
416
Icenowy Zhengf09b48e2017-06-03 17:10:18 +0800417choice
418 prompt "DRAM Type and Timing"
Icenowy Zhengfe052172017-06-03 17:10:21 +0800419 default SUNXI_DRAM_DDR3_1333 if !MACH_SUN8I_V3S
420 default SUNXI_DRAM_DDR2_V3S if MACH_SUN8I_V3S
Icenowy Zhengf09b48e2017-06-03 17:10:18 +0800421
422config SUNXI_DRAM_DDR3_1333
423 bool "DDR3 1333"
424 select SUNXI_DRAM_DDR3
425 ---help---
426 This option is the original only supported memory type, which suits
427 many H3/H5/A64 boards available now.
428
Icenowy Zhengeb4766e2017-06-03 17:10:24 +0800429config SUNXI_DRAM_LPDDR3_STOCK
430 bool "LPDDR3 with Allwinner stock configuration"
431 select SUNXI_DRAM_LPDDR3
432 ---help---
433 This option is the LPDDR3 timing used by the stock boot0 by
434 Allwinner.
435
Andre Przywara1c7a7512019-07-15 02:27:06 +0100436config SUNXI_DRAM_H6_LPDDR3
437 bool "LPDDR3 DRAM chips on the H6 DRAM controller"
438 select SUNXI_DRAM_LPDDR3
439 depends on DRAM_SUN50I_H6
440 ---help---
441 This option is the LPDDR3 timing used by the stock boot0 by
442 Allwinner.
443
Andre Przywara75d38d02019-07-15 02:27:08 +0100444config SUNXI_DRAM_H6_DDR3_1333
445 bool "DDR3-1333 boot0 timings on the H6 DRAM controller"
446 select SUNXI_DRAM_DDR3
447 depends on DRAM_SUN50I_H6
448 ---help---
449 This option is the DDR3 timing used by the boot0 on H6 TV boxes
450 which use a DDR3-1333 timing.
451
Icenowy Zhenge270a582017-06-03 17:10:20 +0800452config SUNXI_DRAM_DDR2_V3S
453 bool "DDR2 found in V3s chip"
454 select SUNXI_DRAM_DDR2
Icenowy Zhengfe052172017-06-03 17:10:21 +0800455 depends on MACH_SUN8I_V3S
Icenowy Zhenge270a582017-06-03 17:10:20 +0800456 ---help---
457 This option is only for the DDR2 memory chip which is co-packaged in
458 Allwinner V3s SoC.
459
Icenowy Zhengf09b48e2017-06-03 17:10:18 +0800460endchoice
461endif
462
Vishnu Patekarc49936f2016-01-12 01:20:58 +0800463config DRAM_TYPE
464 int "sunxi dram type"
465 depends on MACH_SUN8I_A83T
466 default 3
467 ---help---
468 Set the dram type, 3: DDR3, 7: LPDDR3
Hans de Goedef055ed62015-04-06 20:55:39 +0200469
Hans de Goede3aeaa282014-11-15 19:46:39 +0100470config DRAM_CLK
Hans de Goede59d9fc72015-01-17 14:24:55 +0100471 int "sunxi dram clock speed"
Philipp Tomsichd36af1c2016-10-28 18:21:28 +0800472 default 792 if MACH_SUN9I
Chen-Yu Tsaif361d562016-11-30 16:58:35 +0800473 default 648 if MACH_SUN8I_R40
Hans de Goede59d9fc72015-01-17 14:24:55 +0100474 default 312 if MACH_SUN6I || MACH_SUN8I
Icenowy Zhengb54209f2017-06-03 17:10:22 +0800475 default 360 if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || \
476 MACH_SUN8I_V3S
Andre Przywaraafd68702017-01-02 11:48:37 +0000477 default 672 if MACH_SUN50I
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800478 default 744 if MACH_SUN50I_H6
Jernej Skrabece4aa24b2021-01-11 21:11:43 +0100479 default 720 if MACH_SUN50I_H616
Hans de Goede3aeaa282014-11-15 19:46:39 +0100480 ---help---
Philipp Tomsichd36af1c2016-10-28 18:21:28 +0800481 Set the dram clock speed, valid range 240 - 480 (prior to sun9i),
482 must be a multiple of 24. For the sun9i (A80), the tested values
483 (for DDR3-1600) are 312 to 792.
Hans de Goede3aeaa282014-11-15 19:46:39 +0100484
Siarhei Siamashka47359bb2015-02-01 00:27:06 +0200485if MACH_SUN5I || MACH_SUN7I
486config DRAM_MBUS_CLK
487 int "sunxi mbus clock speed"
488 default 300
489 ---help---
490 Set the mbus clock speed. The maximum on sun5i hardware is 300MHz.
491
492endif
493
Hans de Goede3aeaa282014-11-15 19:46:39 +0100494config DRAM_ZQ
Hans de Goede59d9fc72015-01-17 14:24:55 +0100495 int "sunxi dram zq value"
Jernej Skrabece4aa24b2021-01-11 21:11:43 +0100496 depends on !MACH_SUN50I_H616
Paul Kocialkowski70373ca2019-03-14 11:36:14 +0100497 default 123 if MACH_SUN4I || MACH_SUN5I || MACH_SUN6I || \
Paul Kocialkowski4d492a32019-03-14 11:36:15 +0100498 MACH_SUN8I_A23 || MACH_SUN8I_A33 || MACH_SUN8I_A83T
Hans de Goede59d9fc72015-01-17 14:24:55 +0100499 default 127 if MACH_SUN7I
Icenowy Zhengb54209f2017-06-03 17:10:22 +0800500 default 14779 if MACH_SUN8I_V3S
Paul Kocialkowski4d492a32019-03-14 11:36:15 +0100501 default 3881979 if MACH_SUNXI_H3_H5 || MACH_SUN8I_R40 || MACH_SUN50I_H6
Chen-Yu Tsai47bb3062016-10-28 18:21:36 +0800502 default 4145117 if MACH_SUN9I
Andre Przywaraafd68702017-01-02 11:48:37 +0000503 default 3881915 if MACH_SUN50I
Hans de Goede3aeaa282014-11-15 19:46:39 +0100504 ---help---
Hans de Goede06ddc452015-01-25 11:29:27 +0100505 Set the dram zq value.
Hans de Goede3aeaa282014-11-15 19:46:39 +0100506
Hans de Goedeffdc05c2015-05-13 15:00:46 +0200507config DRAM_ODT_EN
508 bool "sunxi dram odt enable"
Jernej Skrabec64712da2023-04-10 10:21:14 +0200509 depends on !MACH_SUN50I_H616
Hans de Goedeffdc05c2015-05-13 15:00:46 +0200510 default y if MACH_SUN8I_A23
Paul Kocialkowskid6c5cfc2019-03-14 11:36:16 +0100511 default y if MACH_SUNXI_H3_H5
Chen-Yu Tsaif361d562016-11-30 16:58:35 +0800512 default y if MACH_SUN8I_R40
Andre Przywaraa563adc2017-01-02 11:48:45 +0000513 default y if MACH_SUN50I
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800514 default y if MACH_SUN50I_H6
Hans de Goedeffdc05c2015-05-13 15:00:46 +0200515 ---help---
516 Select this to enable dram odt (on die termination).
517
Hans de Goede59d9fc72015-01-17 14:24:55 +0100518if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
519config DRAM_EMR1
520 int "sunxi dram emr1 value"
521 default 0 if MACH_SUN4I
522 default 4 if MACH_SUN5I || MACH_SUN7I
523 ---help---
Hans de Goede06ddc452015-01-25 11:29:27 +0100524 Set the dram controller emr1 value.
Siarhei Siamashka9900db12015-02-01 00:27:05 +0200525
Siarhei Siamashka47359bb2015-02-01 00:27:06 +0200526config DRAM_TPR3
527 hex "sunxi dram tpr3 value"
528 default 0
529 ---help---
530 Set the dram controller tpr3 parameter. This parameter configures
531 the delay on the command lane and also phase shifts, which are
532 applied for sampling incoming read data. The default value 0
533 means that no phase/delay adjustments are necessary. Properly
534 configuring this parameter increases reliability at high DRAM
535 clock speeds.
536
537config DRAM_DQS_GATING_DELAY
538 hex "sunxi dram dqs_gating_delay value"
539 default 0
540 ---help---
541 Set the dram controller dqs_gating_delay parmeter. Each byte
542 encodes the DQS gating delay for each byte lane. The delay
543 granularity is 1/4 cycle. For example, the value 0x05060606
544 means that the delay is 5 quarter-cycles for one lane (1.25
545 cycles) and 6 quarter-cycles (1.5 cycles) for 3 other lanes.
546 The default value 0 means autodetection. The results of hardware
547 autodetection are not very reliable and depend on the chip
548 temperature (sometimes producing different results on cold start
549 and warm reboot). But the accuracy of hardware autodetection
550 is usually good enough, unless running at really high DRAM
551 clocks speeds (up to 600MHz). If unsure, keep as 0.
552
Siarhei Siamashka9900db12015-02-01 00:27:05 +0200553choice
554 prompt "sunxi dram timings"
555 default DRAM_TIMINGS_VENDOR_MAGIC
556 ---help---
557 Select the timings of the DDR3 chips.
558
559config DRAM_TIMINGS_VENDOR_MAGIC
560 bool "Magic vendor timings from Android"
561 ---help---
562 The same DRAM timings as in the Allwinner boot0 bootloader.
563
564config DRAM_TIMINGS_DDR3_1066F_1333H
565 bool "JEDEC DDR3-1333H with down binning to DDR3-1066F"
566 ---help---
567 Use the timings of the standard JEDEC DDR3-1066F speed bin for
568 DRAM_CLK <= 533MHz and the timings of the DDR3-1333H speed bin
569 for DRAM_CLK > 533MHz. This covers the majority of DDR3 chips
570 used in Allwinner A10/A13/A20 devices. In the case of DDR3-1333
571 or DDR3-1600 chips, be sure to check the DRAM datasheet to confirm
572 that down binning to DDR3-1066F is supported (because DDR3-1066F
573 uses a bit faster timings than DDR3-1333H).
574
575config DRAM_TIMINGS_DDR3_800E_1066G_1333J
576 bool "JEDEC DDR3-800E / DDR3-1066G / DDR3-1333J"
577 ---help---
578 Use the timings of the slowest possible JEDEC speed bin for the
579 selected DRAM_CLK. Depending on the DRAM_CLK value, it may be
580 DDR3-800E, DDR3-1066G or DDR3-1333J.
581
582endchoice
583
Hans de Goede3aeaa282014-11-15 19:46:39 +0100584endif
585
Hans de Goedeffdc05c2015-05-13 15:00:46 +0200586if MACH_SUN8I_A23
587config DRAM_ODT_CORRECTION
588 int "sunxi dram odt correction value"
589 default 0
590 ---help---
591 Set the dram odt correction value (range -255 - 255). In allwinner
592 fex files, this option is found in bits 8-15 of the u32 odt_en variable
593 in the [dram] section. When bit 31 of the odt_en variable is set
594 then the correction is negative. Usually the value for this is 0.
595endif
596
Iain Paton630df142015-03-28 10:26:38 +0000597config SYS_CLK_FREQ
Icenowy Zheng8f2d1c02022-01-29 10:23:07 -0500598 default 408000000 if MACH_SUNIV
Chen-Yu Tsaifa337462017-03-02 16:03:06 +0800599 default 1008000000 if MACH_SUN4I
600 default 1008000000 if MACH_SUN5I
601 default 1008000000 if MACH_SUN6I
Iain Paton630df142015-03-28 10:26:38 +0000602 default 912000000 if MACH_SUN7I
Icenowy Zheng2e915b42017-10-31 07:36:28 +0800603 default 816000000 if MACH_SUN50I || MACH_SUN50I_H5
Chen-Yu Tsaifa337462017-03-02 16:03:06 +0800604 default 1008000000 if MACH_SUN8I
605 default 1008000000 if MACH_SUN9I
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800606 default 888000000 if MACH_SUN50I_H6
Jernej Skrabece638e052021-01-11 21:11:46 +0100607 default 1008000000 if MACH_SUN50I_H616
Iain Paton630df142015-03-28 10:26:38 +0000608
Maxime Ripard2c519412014-10-03 20:16:29 +0800609config SYS_CONFIG_NAME
Icenowy Zheng8f2d1c02022-01-29 10:23:07 -0500610 default "suniv" if MACH_SUNIV
Ian Campbell4a24a1c2014-10-24 21:20:45 +0100611 default "sun4i" if MACH_SUN4I
612 default "sun5i" if MACH_SUN5I
613 default "sun6i" if MACH_SUN6I
614 default "sun7i" if MACH_SUN7I
615 default "sun8i" if MACH_SUN8I
Hans de Goede7bfe2bb2015-01-13 19:25:06 +0100616 default "sun9i" if MACH_SUN9I
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200617 default "sun50i" if MACH_SUN50I
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800618 default "sun50i" if MACH_SUN50I_H6
Jernej Skrabece638e052021-01-11 21:11:46 +0100619 default "sun50i" if MACH_SUN50I_H616
Masahiro Yamadad3ae6782014-07-30 14:08:14 +0900620
Masahiro Yamadad3ae6782014-07-30 14:08:14 +0900621config SYS_BOARD
Masahiro Yamadad3ae6782014-07-30 14:08:14 +0900622 default "sunxi"
623
624config SYS_SOC
Masahiro Yamadad3ae6782014-07-30 14:08:14 +0900625 default "sunxi"
626
Andre Przywaraa2860fb2022-07-03 00:47:20 +0100627config SUNXI_MINIMUM_DRAM_MB
628 int "minimum DRAM size"
629 default 32 if MACH_SUNIV
630 default 64 if MACH_SUN8I_V3S
631 default 256
632 ---help---
633 Minimum DRAM size expected on the board. Traditionally we assumed
634 256 MB, so that U-Boot would load at 160MB. With co-packaged DRAM
635 we have smaller sizes, though, so that U-Boot's own load address and
636 the default payload addresses must be shifted down.
637 This is expected to be fixed by the SoC selection.
638
Siarhei Siamashka121161f2014-12-25 02:34:47 +0200639config UART0_PORT_F
640 bool "UART0 on MicroSD breakout board"
Siarhei Siamashka121161f2014-12-25 02:34:47 +0200641 ---help---
642 Repurpose the SD card slot for getting access to the UART0 serial
643 console. Primarily useful only for low level u-boot debugging on
644 tablets, where normal UART0 is difficult to access and requires
645 device disassembly and/or soldering. As the SD card can't be used
646 at the same time, the system can be only booted in the FEL mode.
647 Only enable this if you really know what you are doing.
648
Hans de Goede05e5bcb2014-10-22 14:56:36 +0200649config OLD_SUNXI_KERNEL_COMPAT
Masahiro Yamada78cd22a2016-08-12 10:26:50 +0900650 bool "Enable workarounds for booting old kernels"
Hans de Goede05e5bcb2014-10-22 14:56:36 +0200651 ---help---
652 Set this to enable various workarounds for old kernels, this results in
653 sub-optimal settings for newer kernels, only enable if needed.
654
Mylène Josserand147c6062017-04-02 12:59:10 +0200655config MACPWR
656 string "MAC power pin"
657 default ""
658 help
659 Set the pin used to power the MAC. This takes a string in the format
660 understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
661
Samuel Holland51951052021-09-12 10:28:35 -0500662config MMC1_PINS_PH
663 bool "Pins for mmc1 are on Port H"
664 depends on MACH_SUN4I || MACH_SUN7I || MACH_SUN8I_R40
Paul Kocialkowskid390d8c2015-03-22 18:12:23 +0100665 ---help---
Samuel Holland51951052021-09-12 10:28:35 -0500666 Select this option for boards where mmc1 uses the Port H pinmux.
Paul Kocialkowskid390d8c2015-03-22 18:12:23 +0100667
Hans de Goedeaf593e42014-10-02 20:43:50 +0200668config MMC_SUNXI_SLOT_EXTRA
669 int "mmc extra slot number"
670 default -1
671 ---help---
672 sunxi builds always enable mmc0, some boards also have a second sdcard
673 slot or emmc on mmc1 - mmc3. Setting this to 1, 2 or 3 will enable
674 support for this.
675
Hans de Goedee7b852a2015-01-07 15:26:06 +0100676config USB0_VBUS_PIN
677 string "Vbus enable pin for usb0 (otg)"
678 default ""
679 ---help---
680 Set the Vbus enable pin for usb0 (otg). This takes a string in the
681 format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
682
Hans de Goedeeaa0d702015-02-16 22:13:43 +0100683config USB0_VBUS_DET
684 string "Vbus detect pin for usb0 (otg)"
Hans de Goedeeaa0d702015-02-16 22:13:43 +0100685 default ""
686 ---help---
687 Set the Vbus detect pin for usb0 (otg). This takes a string in the
688 format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
689
Hans de Goedeaadd97f2015-06-14 17:29:53 +0200690config USB0_ID_DET
691 string "ID detect pin for usb0 (otg)"
692 default ""
693 ---help---
694 Set the ID detect pin for usb0 (otg). This takes a string in the
695 format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
696
Hans de Goedeaf4273b2014-11-07 16:09:00 +0100697config USB1_VBUS_PIN
698 string "Vbus enable pin for usb1 (ehci0)"
699 default "PH6" if MACH_SUN4I || MACH_SUN7I
Hans de Goedeb5ab8ce2014-11-07 14:51:12 +0100700 default "PH27" if MACH_SUN6I
Hans de Goedeaf4273b2014-11-07 16:09:00 +0100701 ---help---
702 Set the Vbus enable pin for usb1 (ehci0, usb0 is the otg). This takes
703 a string in the format understood by sunxi_name_to_gpio, e.g.
704 PH1 for pin 1 of port H.
705
706config USB2_VBUS_PIN
707 string "Vbus enable pin for usb2 (ehci1)"
708 default "PH3" if MACH_SUN4I || MACH_SUN7I
Hans de Goedeb5ab8ce2014-11-07 14:51:12 +0100709 default "PH24" if MACH_SUN6I
Hans de Goedeaf4273b2014-11-07 16:09:00 +0100710 ---help---
711 See USB1_VBUS_PIN help text.
712
Hans de Goedea60c3fc2016-03-18 08:42:01 +0100713config USB3_VBUS_PIN
714 string "Vbus enable pin for usb3 (ehci2)"
715 default ""
716 ---help---
717 See USB1_VBUS_PIN help text.
718
Paul Kocialkowski0a3ec0a2015-04-10 23:09:52 +0200719config I2C0_ENABLE
720 bool "Enable I2C/TWI controller 0"
Chen-Yu Tsai478a3c52016-11-30 15:30:30 +0800721 default y if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUN8I_R40
Paul Kocialkowski0a3ec0a2015-04-10 23:09:52 +0200722 default n if MACH_SUN6I || MACH_SUN8I
Hans de Goede2c526402016-05-15 13:51:58 +0200723 select CMD_I2C
Paul Kocialkowski0a3ec0a2015-04-10 23:09:52 +0200724 ---help---
725 This allows enabling I2C/TWI controller 0 by muxing its pins, enabling
726 its clock and setting up the bus. This is especially useful on devices
727 with slaves connected to the bus or with pins exposed through e.g. an
728 expansion port/header.
729
730config I2C1_ENABLE
731 bool "Enable I2C/TWI controller 1"
Hans de Goede2c526402016-05-15 13:51:58 +0200732 select CMD_I2C
Paul Kocialkowski0a3ec0a2015-04-10 23:09:52 +0200733 ---help---
734 See I2C0_ENABLE help text.
735
Jernej Skrabec55a30a22021-01-11 21:11:38 +0100736if SUNXI_GEN_SUN6I || SUN50I_GEN_H6
Jelle van der Waa8d3d7c12016-01-14 14:06:26 +0100737config R_I2C_ENABLE
738 bool "Enable the PRCM I2C/TWI controller"
Jelle van der Waa3f3a3092016-02-23 18:47:19 +0100739 # This is used for the pmic on H3
740 default y if SY8106A_POWER
Hans de Goede2c526402016-05-15 13:51:58 +0200741 select CMD_I2C
Jelle van der Waa8d3d7c12016-01-14 14:06:26 +0100742 ---help---
743 Set this to y to enable the I2C controller which is part of the PRCM.
Jelle van der Waa3f3a3092016-02-23 18:47:19 +0100744endif
Jelle van der Waa8d3d7c12016-01-14 14:06:26 +0100745
Hans de Goede3ae1d132015-04-25 17:25:14 +0200746config AXP_GPIO
Masahiro Yamada78cd22a2016-08-12 10:26:50 +0900747 bool "Enable support for gpio-s on axp PMICs"
Samuel Holland623b8042021-10-08 00:17:19 -0500748 depends on AXP_PMIC_BUS
Hans de Goede3ae1d132015-04-25 17:25:14 +0200749 ---help---
750 Say Y here to enable support for the gpio pins of the axp PMIC ICs.
751
Chris Morgan2ff2a1d2022-01-21 13:37:32 +0000752config AXP_DISABLE_BOOT_ON_POWERON
753 bool "Disable device boot on power plug-in"
754 depends on AXP209_POWER || AXP221_POWER || AXP809_POWER || AXP818_POWER
755 default n
756 ---help---
757 Say Y here to prevent the device from booting up because of a plug-in
758 event. When set, the device will boot into the SPL briefly to
759 determine why it was powered on, and if it was determined because of
760 a plug-in event instead of a button press event it will shut back off.
761
Icenowy Zheng1fa956f2017-10-26 11:14:44 +0800762config VIDEO_SUNXI
Masahiro Yamada78cd22a2016-08-12 10:26:50 +0900763 bool "Enable graphical uboot console on HDMI, LCD or VGA"
Chen-Yu Tsaifa337462017-03-02 16:03:06 +0800764 depends on !MACH_SUN8I_A83T
765 depends on !MACH_SUNXI_H3_H5
Chen-Yu Tsaicc2605e2016-11-30 14:57:32 +0800766 depends on !MACH_SUN8I_R40
Icenowy Zheng52e61882017-04-08 15:30:12 +0800767 depends on !MACH_SUN8I_V3S
Chen-Yu Tsaifa337462017-03-02 16:03:06 +0800768 depends on !MACH_SUN9I
769 depends on !MACH_SUN50I
Jernej Skrabecda8ae612021-01-11 21:11:34 +0100770 depends on !SUN50I_GEN_H6
Simon Glass52cb5042022-10-18 07:46:31 -0600771 select VIDEO
Jagan Teki5bc34cb2021-02-22 00:12:34 +0000772 select DISPLAY
Icenowy Zheng60e4b8f2017-10-26 11:14:46 +0800773 imply VIDEO_DT_SIMPLEFB
Luc Verhaegenb01df1e2014-08-13 07:55:06 +0200774 default y
775 ---help---
Jagan Teki5bc34cb2021-02-22 00:12:34 +0000776 Say Y here to add support for using a graphical console on the HDMI,
777 LCD or VGA output found on older sunxi devices. This will also provide
778 a simple_framebuffer device for Linux.
Hans de Goede7e68a1b2014-12-21 16:28:32 +0100779
Hans de Goedee9544592014-12-23 23:04:35 +0100780config VIDEO_HDMI
Masahiro Yamada78cd22a2016-08-12 10:26:50 +0900781 bool "HDMI output support"
Icenowy Zheng8f2d1c02022-01-29 10:23:07 -0500782 depends on VIDEO_SUNXI && !MACH_SUN8I && !MACH_SUNIV
Hans de Goedee9544592014-12-23 23:04:35 +0100783 default y
784 ---help---
785 Say Y here to add support for outputting video over HDMI.
786
Hans de Goede260f5202014-12-25 13:58:06 +0100787config VIDEO_VGA
Masahiro Yamada78cd22a2016-08-12 10:26:50 +0900788 bool "VGA output support"
Icenowy Zheng1fa956f2017-10-26 11:14:44 +0800789 depends on VIDEO_SUNXI && (MACH_SUN4I || MACH_SUN7I)
Hans de Goede260f5202014-12-25 13:58:06 +0100790 ---help---
791 Say Y here to add support for outputting video over VGA.
792
Hans de Goedeac1633c2014-12-24 12:17:07 +0100793config VIDEO_VGA_VIA_LCD
Masahiro Yamada78cd22a2016-08-12 10:26:50 +0900794 bool "VGA via LCD controller support"
Icenowy Zheng1fa956f2017-10-26 11:14:44 +0800795 depends on VIDEO_SUNXI && (MACH_SUN5I || MACH_SUN6I || MACH_SUN8I)
Hans de Goedeac1633c2014-12-24 12:17:07 +0100796 ---help---
797 Say Y here to add support for external DACs connected to the parallel
798 LCD interface driving a VGA connector, such as found on the
799 Olimex A13 boards.
800
Hans de Goede18366f72015-01-25 15:33:07 +0100801config VIDEO_VGA_VIA_LCD_FORCE_SYNC_ACTIVE_HIGH
Masahiro Yamada78cd22a2016-08-12 10:26:50 +0900802 bool "Force sync active high for VGA via LCD controller support"
Hans de Goede18366f72015-01-25 15:33:07 +0100803 depends on VIDEO_VGA_VIA_LCD
Hans de Goede18366f72015-01-25 15:33:07 +0100804 ---help---
805 Say Y here if you've a board which uses opendrain drivers for the vga
806 hsync and vsync signals. Opendrain drivers cannot generate steep enough
807 positive edges for a stable video output, so on boards with opendrain
808 drivers the sync signals must always be active high.
809
Chen-Yu Tsai9ed19522015-01-12 18:02:11 +0800810config VIDEO_VGA_EXTERNAL_DAC_EN
811 string "LCD panel power enable pin"
812 depends on VIDEO_VGA_VIA_LCD
813 default ""
814 ---help---
815 Set the enable pin for the external VGA DAC. This takes a string in the
816 format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
817
Hans de Goedec06e00e2015-08-03 19:20:26 +0200818config VIDEO_COMPOSITE
Masahiro Yamada78cd22a2016-08-12 10:26:50 +0900819 bool "Composite video output support"
Icenowy Zheng1fa956f2017-10-26 11:14:44 +0800820 depends on VIDEO_SUNXI && (MACH_SUN4I || MACH_SUN5I || MACH_SUN7I)
Hans de Goedec06e00e2015-08-03 19:20:26 +0200821 ---help---
822 Say Y here to add support for outputting composite video.
823
Hans de Goede7e68a1b2014-12-21 16:28:32 +0100824config VIDEO_LCD_MODE
825 string "LCD panel timing details"
Icenowy Zheng1fa956f2017-10-26 11:14:44 +0800826 depends on VIDEO_SUNXI
Hans de Goede7e68a1b2014-12-21 16:28:32 +0100827 default ""
828 ---help---
829 LCD panel timing details string, leave empty if there is no LCD panel.
830 This is in drivers/video/videomodes.c: video_get_params() format, e.g.
831 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
Hans de Goede924c8932015-08-16 11:23:42 +0200832 Also see: http://linux-sunxi.org/LCD
Hans de Goede7e68a1b2014-12-21 16:28:32 +0100833
Hans de Goede481b6642015-01-13 13:21:46 +0100834config VIDEO_LCD_DCLK_PHASE
835 int "LCD panel display clock phase"
Simon Glass52cb5042022-10-18 07:46:31 -0600836 depends on VIDEO_SUNXI || VIDEO
Hans de Goede481b6642015-01-13 13:21:46 +0100837 default 1
Michal Suchanek5cbc3f22022-07-03 20:49:24 +0200838 range 0 3
Hans de Goede481b6642015-01-13 13:21:46 +0100839 ---help---
Michal Suchanek5cbc3f22022-07-03 20:49:24 +0200840 Select LCD panel display clock phase shift
Hans de Goede481b6642015-01-13 13:21:46 +0100841
Hans de Goede7e68a1b2014-12-21 16:28:32 +0100842config VIDEO_LCD_POWER
843 string "LCD panel power enable pin"
Icenowy Zheng1fa956f2017-10-26 11:14:44 +0800844 depends on VIDEO_SUNXI
Hans de Goede7e68a1b2014-12-21 16:28:32 +0100845 default ""
846 ---help---
847 Set the power enable pin for the LCD panel. This takes a string in the
848 format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
849
Hans de Goedece9e3322015-02-16 17:26:41 +0100850config VIDEO_LCD_RESET
851 string "LCD panel reset pin"
Icenowy Zheng1fa956f2017-10-26 11:14:44 +0800852 depends on VIDEO_SUNXI
Hans de Goedece9e3322015-02-16 17:26:41 +0100853 default ""
854 ---help---
855 Set the reset pin for the LCD panel. This takes a string in the format
856 understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
857
Hans de Goede7e68a1b2014-12-21 16:28:32 +0100858config VIDEO_LCD_BL_EN
859 string "LCD panel backlight enable pin"
Icenowy Zheng1fa956f2017-10-26 11:14:44 +0800860 depends on VIDEO_SUNXI
Hans de Goede7e68a1b2014-12-21 16:28:32 +0100861 default ""
862 ---help---
863 Set the backlight enable pin for the LCD panel. This takes a string in the
864 the format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of
865 port H.
866
867config VIDEO_LCD_BL_PWM
868 string "LCD panel backlight pwm pin"
Icenowy Zheng1fa956f2017-10-26 11:14:44 +0800869 depends on VIDEO_SUNXI
Hans de Goede7e68a1b2014-12-21 16:28:32 +0100870 default ""
871 ---help---
872 Set the backlight pwm pin for the LCD panel. This takes a string in the
873 format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
Luc Verhaegenb01df1e2014-08-13 07:55:06 +0200874
Hans de Goede2d5d3022015-01-22 21:02:42 +0100875config VIDEO_LCD_BL_PWM_ACTIVE_LOW
876 bool "LCD panel backlight pwm is inverted"
Icenowy Zheng1fa956f2017-10-26 11:14:44 +0800877 depends on VIDEO_SUNXI
Hans de Goede2d5d3022015-01-22 21:02:42 +0100878 default y
879 ---help---
880 Set this if the backlight pwm output is active low.
881
Hans de Goedea5b4cfe2015-02-16 17:23:25 +0100882config VIDEO_LCD_PANEL_I2C
883 bool "LCD panel needs to be configured via i2c"
Icenowy Zheng1fa956f2017-10-26 11:14:44 +0800884 depends on VIDEO_SUNXI
Samuel Holland75fe0f42021-10-08 00:17:24 -0500885 select DM_I2C_GPIO
Hans de Goedea5b4cfe2015-02-16 17:23:25 +0100886 ---help---
887 Say y here if the LCD panel needs to be configured via i2c. This
888 will add a bitbang i2c controller using gpios to talk to the LCD.
889
Samuel Holland75fe0f42021-10-08 00:17:24 -0500890config VIDEO_LCD_PANEL_I2C_NAME
891 string "LCD panel i2c interface node name"
Hans de Goedea5b4cfe2015-02-16 17:23:25 +0100892 depends on VIDEO_LCD_PANEL_I2C
Samuel Holland8d6fe612022-04-27 15:31:24 -0500893 default "i2c"
Hans de Goedea5b4cfe2015-02-16 17:23:25 +0100894 ---help---
Samuel Holland75fe0f42021-10-08 00:17:24 -0500895 Set the device tree node name for the LCD i2c interface.
Hans de Goede797a0f52015-01-01 22:04:34 +0100896
897# Note only one of these may be selected at a time! But hidden choices are
898# not supported by Kconfig
899config VIDEO_LCD_IF_PARALLEL
900 bool
901
902config VIDEO_LCD_IF_LVDS
903 bool
904
Jernej Skrabec9b4ca922017-03-27 19:22:31 +0200905config SUNXI_DE2
906 bool
Jernej Skrabec9b4ca922017-03-27 19:22:31 +0200907
Jernej Skrabec8d91b462017-03-27 19:22:32 +0200908config VIDEO_DE2
909 bool "Display Engine 2 video driver"
910 depends on SUNXI_DE2
Simon Glass52cb5042022-10-18 07:46:31 -0600911 select VIDEO
Jernej Skrabec8d91b462017-03-27 19:22:32 +0200912 select DISPLAY
Jernej Skrabecc2a50b12021-03-06 20:54:19 +0100913 select VIDEO_DW_HDMI
Icenowy Zheng82576de2017-10-26 11:14:47 +0800914 imply VIDEO_DT_SIMPLEFB
Jernej Skrabec8d91b462017-03-27 19:22:32 +0200915 default y
916 ---help---
917 Say y here if you want to build DE2 video driver which is present on
918 newer SoCs. Currently only HDMI output is supported.
919
Hans de Goede797a0f52015-01-01 22:04:34 +0100920
921choice
922 prompt "LCD panel support"
Icenowy Zheng1fa956f2017-10-26 11:14:44 +0800923 depends on VIDEO_SUNXI
Hans de Goede797a0f52015-01-01 22:04:34 +0100924 ---help---
925 Select which type of LCD panel to support.
926
927config VIDEO_LCD_PANEL_PARALLEL
928 bool "Generic parallel interface LCD panel"
929 select VIDEO_LCD_IF_PARALLEL
930
931config VIDEO_LCD_PANEL_LVDS
932 bool "Generic lvds interface LCD panel"
933 select VIDEO_LCD_IF_LVDS
934
Siarhei Siamashkac02f0522015-01-19 05:23:33 +0200935config VIDEO_LCD_PANEL_MIPI_4_LANE_513_MBPS_VIA_SSD2828
936 bool "MIPI 4-lane, 513Mbps LCD panel via SSD2828 bridge chip"
937 select VIDEO_LCD_SSD2828
938 select VIDEO_LCD_IF_PARALLEL
939 ---help---
Hans de Goede91f1b822015-08-08 16:13:53 +0200940 7.85" 768x1024 LCD panels, such as LG LP079X01 or AUO B079XAN01.0
941
942config VIDEO_LCD_PANEL_EDP_4_LANE_1620M_VIA_ANX9804
943 bool "eDP 4-lane, 1.62G LCD panel via ANX9804 bridge chip"
944 select VIDEO_LCD_ANX9804
945 select VIDEO_LCD_IF_PARALLEL
946 select VIDEO_LCD_PANEL_I2C
947 ---help---
948 Select this for eDP LCD panels with 4 lanes running at 1.62G,
949 connected via an ANX9804 bridge chip.
Siarhei Siamashkac02f0522015-01-19 05:23:33 +0200950
Hans de Goede743fb9552015-01-20 09:23:36 +0100951config VIDEO_LCD_PANEL_HITACHI_TX18D42VM
952 bool "Hitachi tx18d42vm LCD panel"
953 select VIDEO_LCD_HITACHI_TX18D42VM
954 select VIDEO_LCD_IF_LVDS
955 ---help---
956 7.85" 1024x768 Hitachi tx18d42vm LCD panel support
957
Hans de Goede613dade2015-02-16 17:49:47 +0100958config VIDEO_LCD_TL059WV5C0
959 bool "tl059wv5c0 LCD panel"
960 select VIDEO_LCD_PANEL_I2C
961 select VIDEO_LCD_IF_PARALLEL
962 ---help---
963 6" 480x800 tl059wv5c0 panel support, as used on the Utoo P66 and
964 Aigo M60/M608/M606 tablets.
965
Hans de Goede797a0f52015-01-01 22:04:34 +0100966endchoice
967
Mylène Josserand628426a2017-04-02 12:59:09 +0200968config SATAPWR
969 string "SATA power pin"
970 default ""
971 help
972 Set the pins used to power the SATA. This takes a string in the
973 format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of
974 port H.
Hans de Goede797a0f52015-01-01 22:04:34 +0100975
Hans de Goedebf880fe2015-01-25 12:10:48 +0100976config GMAC_TX_DELAY
977 int "GMAC Transmit Clock Delay Chain"
978 default 0
979 ---help---
980 Set the GMAC Transmit Clock Delay Chain value.
981
Hans de Goede66ab79d2015-09-13 13:02:48 +0200982config SPL_STACK_R_ADDR
Icenowy Zheng8f2d1c02022-01-29 10:23:07 -0500983 default 0x81e00000 if MACH_SUNIV
Chen-Yu Tsaifa337462017-03-02 16:03:06 +0800984 default 0x4fe00000 if MACH_SUN4I
985 default 0x4fe00000 if MACH_SUN5I
986 default 0x4fe00000 if MACH_SUN6I
987 default 0x4fe00000 if MACH_SUN7I
988 default 0x4fe00000 if MACH_SUN8I
Hans de Goede66ab79d2015-09-13 13:02:48 +0200989 default 0x2fe00000 if MACH_SUN9I
Chen-Yu Tsaifa337462017-03-02 16:03:06 +0800990 default 0x4fe00000 if MACH_SUN50I
Jernej Skrabecda8ae612021-01-11 21:11:34 +0100991 default 0x4fe00000 if SUN50I_GEN_H6
Hans de Goede66ab79d2015-09-13 13:02:48 +0200992
Jagan Teki4e159f82018-02-06 22:42:56 +0530993config SPL_SPI_SUNXI
994 bool "Support for SPI Flash on Allwinner SoCs in SPL"
Andre Przywarab2b4ff22020-12-13 20:19:43 +0000995 depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUNXI_H3_H5 || MACH_SUN50I || MACH_SUN8I_R40 || SUN50I_GEN_H6 || MACH_SUNIV
Jagan Teki4e159f82018-02-06 22:42:56 +0530996 help
997 Enable support for SPI Flash. This option allows SPL to read from
998 sunxi SPI Flash. It uses the same method as the boot ROM, so does
999 not need any extra configuration.
1000
Icenowy Zheng2a269d32018-10-25 17:23:02 +08001001config PINE64_DT_SELECTION
1002 bool "Enable Pine64 device tree selection code"
1003 depends on MACH_SUN50I
1004 help
1005 The original Pine A64 and Pine A64+ are similar but different
1006 boards and can be differed by the DRAM size. Pine A64 has
1007 512MiB DRAM, and Pine A64+ has 1GiB or 2GiB. By selecting this
1008 option, the device tree selection code specific to Pine64 which
1009 utilizes the DRAM size will be enabled.
1010
Samuel Holland9c7cefc2020-10-24 10:21:52 -05001011config PINEPHONE_DT_SELECTION
1012 bool "Enable PinePhone device tree selection code"
1013 depends on MACH_SUN50I
1014 help
1015 Enable this option to automatically select the device tree for the
1016 correct PinePhone hardware revision during boot.
1017
Andre Heiderbf8c8102021-10-01 19:29:00 +01001018config BLUETOOTH_DT_DEVICE_FIXUP
1019 string "Fixup the Bluetooth controller address"
1020 default ""
1021 help
1022 This option specifies the DT compatible name of the Bluetooth
1023 controller for which to set the "local-bd-address" property.
1024 Set this option if your device ships with the Bluetooth controller
1025 default address.
1026 The used address is "bdaddr" if set, and "ethaddr" with the LSB
1027 flipped elsewise.
1028
Samuel Holland7591a042022-03-18 00:00:45 -05001029source "board/sunxi/Kconfig"
1030
Masahiro Yamadad3ae6782014-07-30 14:08:14 +09001031endif
Kory Maincentfe4c1552021-05-04 19:31:27 +02001032
1033config CHIP_DIP_SCAN
1034 bool "Enable DIPs detection for CHIP board"
1035 select SUPPORT_EXTENSION_SCAN
1036 select W1
1037 select W1_GPIO
1038 select W1_EEPROM
1039 select W1_EEPROM_DS24XXX
1040 select CMD_EXTENSION