Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0+ |
Marcel Ziswiler | 7a28dfc | 2016-11-16 17:49:22 +0100 | [diff] [blame] | 2 | # Copyright (c) 2016 Toradex, Inc. |
Marcel Ziswiler | 7a28dfc | 2016-11-16 17:49:22 +0100 | [diff] [blame] | 3 | |
| 4 | menuconfig TDX_CFG_BLOCK |
| 5 | bool "Enable Toradex config block support" |
| 6 | select OF_BOARD_SETUP |
Emanuele Ghidoli | 26b5cba | 2024-02-23 10:11:41 +0100 | [diff] [blame] | 7 | select SYSINFO |
Marcel Ziswiler | 7a28dfc | 2016-11-16 17:49:22 +0100 | [diff] [blame] | 8 | 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 |
| 15 | config TDX_HAVE_MMC |
| 16 | bool |
| 17 | |
| 18 | config TDX_HAVE_NAND |
| 19 | bool |
| 20 | |
| 21 | config TDX_HAVE_NOR |
| 22 | bool |
| 23 | |
Igor Opaniuk | 67c9bfc | 2020-07-15 13:30:55 +0300 | [diff] [blame] | 24 | config TDX_HAVE_EEPROM |
| 25 | bool |
| 26 | |
| 27 | config TDX_HAVE_EEPROM_EXTRA |
| 28 | bool |
| 29 | |
Marcel Ziswiler | 7a28dfc | 2016-11-16 17:49:22 +0100 | [diff] [blame] | 30 | if TDX_CFG_BLOCK |
| 31 | |
| 32 | config TDX_CFG_BLOCK_IS_IN_MMC |
| 33 | bool |
| 34 | depends on TDX_HAVE_MMC |
| 35 | default y |
| 36 | |
| 37 | config TDX_CFG_BLOCK_IS_IN_NAND |
| 38 | bool |
| 39 | depends on TDX_HAVE_NAND |
| 40 | default y |
| 41 | |
| 42 | config TDX_CFG_BLOCK_IS_IN_NOR |
| 43 | bool |
| 44 | depends on TDX_HAVE_NOR |
| 45 | default y |
| 46 | |
Igor Opaniuk | 67c9bfc | 2020-07-15 13:30:55 +0300 | [diff] [blame] | 47 | config TDX_CFG_BLOCK_IS_IN_EEPROM |
| 48 | bool |
| 49 | depends on TDX_HAVE_EEPROM |
| 50 | default y |
| 51 | |
Marcel Ziswiler | 7a28dfc | 2016-11-16 17:49:22 +0100 | [diff] [blame] | 52 | config TDX_CFG_BLOCK_DEV |
| 53 | int "Toradex config block eMMC device ID" |
| 54 | depends on TDX_CFG_BLOCK_IS_IN_MMC |
| 55 | |
| 56 | config TDX_CFG_BLOCK_PART |
| 57 | int "Toradex config block eMMC partition ID" |
| 58 | depends on TDX_CFG_BLOCK_IS_IN_MMC |
| 59 | |
| 60 | config 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 | |
| 66 | config 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 | |
| 74 | config 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 Opaniuk | 67c9bfc | 2020-07-15 13:30:55 +0300 | [diff] [blame] | 81 | config 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 Agner | 57985bd | 2021-07-23 09:39:46 +0300 | [diff] [blame] | 88 | config 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 Ziswiler | 7a28dfc | 2016-11-16 17:49:22 +0100 | [diff] [blame] | 98 | endif |