blob: b85893ab44e4efebaa922a338ab78e899cb659f9 [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
Emanuele Ghidoli26b5cba2024-02-23 10:11:41 +01007 select SYSINFO
Marcel Ziswiler7a28dfc2016-11-16 17:49:22 +01008 help
9 The Toradex config block stored production data on the on-module
10 flash device (NAND, NOR or eMMC). The area is normally preserved by
11 software and contains the serial number (out of which the MAC
12 address is generated) and the exact module type.
13
14# Helper config to determine the correct default location of the cfg block
15config TDX_HAVE_MMC
16 bool
17
18config TDX_HAVE_NAND
19 bool
20
21config TDX_HAVE_NOR
22 bool
23
Igor Opaniuk67c9bfc2020-07-15 13:30:55 +030024config TDX_HAVE_EEPROM
25 bool
26
27config TDX_HAVE_EEPROM_EXTRA
28 bool
29
Marcel Ziswiler7a28dfc2016-11-16 17:49:22 +010030if TDX_CFG_BLOCK
31
32config TDX_CFG_BLOCK_IS_IN_MMC
33 bool
34 depends on TDX_HAVE_MMC
35 default y
36
37config TDX_CFG_BLOCK_IS_IN_NAND
38 bool
39 depends on TDX_HAVE_NAND
40 default y
41
42config TDX_CFG_BLOCK_IS_IN_NOR
43 bool
44 depends on TDX_HAVE_NOR
45 default y
46
Igor Opaniuk67c9bfc2020-07-15 13:30:55 +030047config TDX_CFG_BLOCK_IS_IN_EEPROM
48 bool
49 depends on TDX_HAVE_EEPROM
50 default y
51
Marcel Ziswiler7a28dfc2016-11-16 17:49:22 +010052config TDX_CFG_BLOCK_DEV
53 int "Toradex config block eMMC device ID"
54 depends on TDX_CFG_BLOCK_IS_IN_MMC
55
56config TDX_CFG_BLOCK_PART
57 int "Toradex config block eMMC partition ID"
58 depends on TDX_CFG_BLOCK_IS_IN_MMC
59
60config TDX_CFG_BLOCK_OFFSET
61 int "Toradex config block offset"
62 help
63 Specify the byte offset of the Toradex config block within the flash
64 device the config block is stored on.
65
66config TDX_CFG_BLOCK_OFFSET2
67 int "Toradex config block offset, second instance"
68 default 0
69 help
70 Specify the byte offset of the 2nd instance of the Toradex config block
71 within the flash device the config block is stored on.
72 Set to 0 on modules which have no 2nd instance.
73
74config TDX_CFG_BLOCK_2ND_ETHADDR
75 bool "Set the second Ethernet address"
76 help
77 For each serial number two Ethernet addresses are available for dual
78 Ethernet carrier boards. This options enables the code to set the
79 second Ethernet address as environment variable (eth1addr).
80
Igor Opaniuk67c9bfc2020-07-15 13:30:55 +030081config TDX_CFG_BLOCK_EXTRA
82 bool "Support for additional EEPROMs (carrier board, display adapter)"
83 depends on TDX_HAVE_EEPROM_EXTRA
84 help
85 Enables fetching auxilary config blocks from carrier board/display
86 adapter EEPROMs.
87
Stefan Agner57985bd2021-07-23 09:39:46 +030088config TDX_CFG_BLOCK_USB_GADGET_PID
89 bool "Use config block product ID as USB product ID"
90 depends on USB_GADGET_DOWNLOAD
91 default y
92 help
93 Use the Toradex product ID learned from the config block as USB
94 product ID. An offset of 0x4000 is added to the product ID since
95 inside the Toradex vendor ID (0x1b67) the range starting from
96 offset 0x4000 is reserved for Colibri/Apalis modules.
97
Marcel Ziswiler7a28dfc2016-11-16 17:49:22 +010098endif