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 |
| 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 |
| 14 | config TDX_HAVE_MMC |
| 15 | bool |
| 16 | |
| 17 | config TDX_HAVE_NAND |
| 18 | bool |
| 19 | |
| 20 | config TDX_HAVE_NOR |
| 21 | bool |
| 22 | |
Igor Opaniuk | 67c9bfc | 2020-07-15 13:30:55 +0300 | [diff] [blame] | 23 | config TDX_HAVE_EEPROM |
| 24 | bool |
| 25 | |
| 26 | config TDX_HAVE_EEPROM_EXTRA |
| 27 | bool |
| 28 | |
Marcel Ziswiler | 7a28dfc | 2016-11-16 17:49:22 +0100 | [diff] [blame] | 29 | if TDX_CFG_BLOCK |
| 30 | |
| 31 | config TDX_CFG_BLOCK_IS_IN_MMC |
| 32 | bool |
| 33 | depends on TDX_HAVE_MMC |
| 34 | default y |
| 35 | |
| 36 | config TDX_CFG_BLOCK_IS_IN_NAND |
| 37 | bool |
| 38 | depends on TDX_HAVE_NAND |
| 39 | default y |
| 40 | |
| 41 | config TDX_CFG_BLOCK_IS_IN_NOR |
| 42 | bool |
| 43 | depends on TDX_HAVE_NOR |
| 44 | default y |
| 45 | |
Igor Opaniuk | 67c9bfc | 2020-07-15 13:30:55 +0300 | [diff] [blame] | 46 | config TDX_CFG_BLOCK_IS_IN_EEPROM |
| 47 | bool |
| 48 | depends on TDX_HAVE_EEPROM |
| 49 | default y |
| 50 | |
Marcel Ziswiler | 7a28dfc | 2016-11-16 17:49:22 +0100 | [diff] [blame] | 51 | config TDX_CFG_BLOCK_DEV |
| 52 | int "Toradex config block eMMC device ID" |
| 53 | depends on TDX_CFG_BLOCK_IS_IN_MMC |
| 54 | |
| 55 | config TDX_CFG_BLOCK_PART |
| 56 | int "Toradex config block eMMC partition ID" |
| 57 | depends on TDX_CFG_BLOCK_IS_IN_MMC |
| 58 | |
| 59 | config 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 | |
| 65 | config 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 | |
| 73 | config 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 Opaniuk | 67c9bfc | 2020-07-15 13:30:55 +0300 | [diff] [blame] | 80 | config 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 | |
Stefan Agner | 57985bd | 2021-07-23 09:39:46 +0300 | [diff] [blame] | 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 |
| 90 | default y |
| 91 | help |
| 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. |
| 96 | |
Marcel Ziswiler | 7a28dfc | 2016-11-16 17:49:22 +0100 | [diff] [blame] | 97 | endif |