1 # SPDX-License-Identifier: GPL-2.0+
2 # Copyright (c) 2016 Toradex, Inc.
4 menuconfig TDX_CFG_BLOCK
5 bool "Enable Toradex config block support"
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.
13 # Helper config to determine the correct default location of the cfg block
23 config TDX_HAVE_EEPROM
26 config TDX_HAVE_EEPROM_EXTRA
31 config TDX_CFG_BLOCK_IS_IN_MMC
33 depends on TDX_HAVE_MMC
36 config TDX_CFG_BLOCK_IS_IN_NAND
38 depends on TDX_HAVE_NAND
41 config TDX_CFG_BLOCK_IS_IN_NOR
43 depends on TDX_HAVE_NOR
46 config TDX_CFG_BLOCK_IS_IN_EEPROM
48 depends on TDX_HAVE_EEPROM
51 config TDX_CFG_BLOCK_DEV
52 int "Toradex config block eMMC device ID"
53 depends on TDX_CFG_BLOCK_IS_IN_MMC
55 config TDX_CFG_BLOCK_PART
56 int "Toradex config block eMMC partition ID"
57 depends on TDX_CFG_BLOCK_IS_IN_MMC
59 config TDX_CFG_BLOCK_OFFSET
60 int "Toradex config block offset"
62 Specify the byte offset of the Toradex config block within the flash
63 device the config block is stored on.
65 config TDX_CFG_BLOCK_OFFSET2
66 int "Toradex config block offset, second instance"
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.
73 config TDX_CFG_BLOCK_2ND_ETHADDR
74 bool "Set the second Ethernet address"
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).
80 config TDX_CFG_BLOCK_EXTRA
81 bool "Support for additional EEPROMs (carrier board, display adapter)"
82 depends on TDX_HAVE_EEPROM_EXTRA
84 Enables fetching auxilary config blocks from carrier board/display
87 config TDX_CFG_BLOCK_USB_GADGET_PID
88 bool "Use config block product ID as USB product ID"
89 depends on USB_GADGET_DOWNLOAD
92 Use the Toradex product ID learned from the config block as USB
93 product ID. An offset of 0x4000 is added to the product ID since
94 inside the Toradex vendor ID (0x1b67) the range starting from
95 offset 0x4000 is reserved for Colibri/Apalis modules.