blob: 36068d2e3bada1c4aaf81c2259014ddf549deda2 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001# SPDX-License-Identifier: GPL-2.0+
Marcel Ziswiler7a28dfc2016-11-16 17:49:22 +01002# Copyright (c) 2016 Toradex, Inc.
Marcel Ziswiler7a28dfc2016-11-16 17:49:22 +01003
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
Igor Opaniuk67c9bfc2020-07-15 13:30:55 +030023config TDX_HAVE_EEPROM
24 bool
25
26config TDX_HAVE_EEPROM_EXTRA
27 bool
28
Marcel Ziswiler7a28dfc2016-11-16 17:49:22 +010029if TDX_CFG_BLOCK
30
31config TDX_CFG_BLOCK_IS_IN_MMC
32 bool
33 depends on TDX_HAVE_MMC
34 default y
35
36config TDX_CFG_BLOCK_IS_IN_NAND
37 bool
38 depends on TDX_HAVE_NAND
39 default y
40
41config TDX_CFG_BLOCK_IS_IN_NOR
42 bool
43 depends on TDX_HAVE_NOR
44 default y
45
Igor Opaniuk67c9bfc2020-07-15 13:30:55 +030046config TDX_CFG_BLOCK_IS_IN_EEPROM
47 bool
48 depends on TDX_HAVE_EEPROM
49 default y
50
Marcel Ziswiler7a28dfc2016-11-16 17:49:22 +010051config TDX_CFG_BLOCK_DEV
52 int "Toradex config block eMMC device ID"
53 depends on TDX_CFG_BLOCK_IS_IN_MMC
54
55config TDX_CFG_BLOCK_PART
56 int "Toradex config block eMMC partition ID"
57 depends on TDX_CFG_BLOCK_IS_IN_MMC
58
59config TDX_CFG_BLOCK_OFFSET
60 int "Toradex config block offset"
61 help
62 Specify the byte offset of the Toradex config block within the flash
63 device the config block is stored on.
64
65config TDX_CFG_BLOCK_OFFSET2
66 int "Toradex config block offset, second instance"
67 default 0
68 help
69 Specify the byte offset of the 2nd instance of the Toradex config block
70 within the flash device the config block is stored on.
71 Set to 0 on modules which have no 2nd instance.
72
73config TDX_CFG_BLOCK_2ND_ETHADDR
74 bool "Set the second Ethernet address"
75 help
76 For each serial number two Ethernet addresses are available for dual
77 Ethernet carrier boards. This options enables the code to set the
78 second Ethernet address as environment variable (eth1addr).
79
Igor Opaniuk67c9bfc2020-07-15 13:30:55 +030080config TDX_CFG_BLOCK_EXTRA
81 bool "Support for additional EEPROMs (carrier board, display adapter)"
82 depends on TDX_HAVE_EEPROM_EXTRA
83 help
84 Enables fetching auxilary config blocks from carrier board/display
85 adapter EEPROMs.
86
Marcel Ziswiler7a28dfc2016-11-16 17:49:22 +010087endif