xref: /openbmc/u-boot/board/toradex/common/Kconfig (revision fbe502e9)
1# SPDX-License-Identifier: GPL-2.0+
2# Copyright (c) 2016 Toradex, Inc.
3
4menuconfig TDX_CFG_BLOCK
5	bool "Enable Toradex config block support"
6	select OF_BOARD_SETUP
7	help
8	  The Toradex config block stored production data on the on-module
9	  flash device (NAND, NOR or eMMC). The area is normally preserved by
10	  software and contains the serial number (out of which the MAC
11	  address is generated) and the exact module type.
12
13# Helper config to determine the correct default location of the cfg block
14config TDX_HAVE_MMC
15	bool
16
17config TDX_HAVE_NAND
18	bool
19
20config TDX_HAVE_NOR
21	bool
22
23if TDX_CFG_BLOCK
24
25config TDX_CFG_BLOCK_IS_IN_MMC
26	bool
27	depends on TDX_HAVE_MMC
28	default y
29
30config TDX_CFG_BLOCK_IS_IN_NAND
31	bool
32	depends on TDX_HAVE_NAND
33	default y
34
35config TDX_CFG_BLOCK_IS_IN_NOR
36	bool
37	depends on TDX_HAVE_NOR
38	default y
39
40config TDX_CFG_BLOCK_DEV
41	int "Toradex config block eMMC device ID"
42	depends on TDX_CFG_BLOCK_IS_IN_MMC
43
44config TDX_CFG_BLOCK_PART
45	int "Toradex config block eMMC partition ID"
46	depends on TDX_CFG_BLOCK_IS_IN_MMC
47
48config TDX_CFG_BLOCK_OFFSET
49	int "Toradex config block offset"
50	help
51	  Specify the byte offset of the Toradex config block within the flash
52	  device the config block is stored on.
53
54config TDX_CFG_BLOCK_OFFSET2
55	int "Toradex config block offset, second instance"
56	default 0
57	help
58	  Specify the byte offset of the 2nd instance of the Toradex config block
59	  within the flash device the config block is stored on.
60	  Set to 0 on modules which have no 2nd instance.
61
62config TDX_CFG_BLOCK_2ND_ETHADDR
63	bool "Set the second Ethernet address"
64	help
65	  For each serial number two Ethernet addresses are available for dual
66	  Ethernet carrier boards. This options enables the code to set the
67	  second Ethernet address as environment variable (eth1addr).
68
69endif
70