summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.header
blob: da57ad24b72962ce2a69895e531907b63c80e1b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

config PLATFORM_EC_RO_HEADER
	bool "RO section includes a header"
	default y
	depends on CROS_EC_RO
	depends on SOC_FAMILY_NPCX
	help
	  The RO image residing on flash memory has a header section. The header
	  is used on some chips (such as the npcx) to load the image correctly
	  from flash. The values for offset and size are used by the linker
	  scripts to generate the header. See core/cortex-m/ec.lds.S for
	  reference.

config PLATFORM_EC_RO_HEADER_OFFSET
	hex "Offset in memory for the location of the header"
	default 0x0
	help
	  The offset (in bytes) of the header relative to the start address of
	  the RO image.

config PLATFORM_EC_RO_HEADER_SIZE
	hex "Size of the RO header"
	default 0x40
	help
	  The size of the RO header in bytes. This values should come from the
	  datasheet of the chip being used.

config PLATFORM_EC_RO_HEADER_ENABLE_HEADER_CRC
	bool "Enable header crc check"
	help
	  When enabled, the header will be verified at boot using a crc
	  checksum.

config PLATFORM_EC_RO_HEADER_ENABLE_FIRMWARE_CRC
	bool "Enable firmware image crc check"
	help
	  When enabled, the firmware image will be verified at boot using a
	  crc checksum.

choice "SPI flash max clock rate"
	prompt "Clock rate to use for SPI flash"
	help
	  This selects the max clock rate (one of 20, 25, 33, 40, or 50 MHz)
	  that will be used for the SPI flash.

config PLATFORM_EC_RO_HEADER_SPI_MAX_CLOCK_20
	bool "SPI flash max clock rate of 20 MHz"

config PLATFORM_EC_RO_HEADER_SPI_MAX_CLOCK_25
	bool "SPI flash max clock rate of 25 MHz"

config PLATFORM_EC_RO_HEADER_SPI_MAX_CLOCK_33
	bool "SPI flash max clock rate of 33 MHz"

config PLATFORM_EC_RO_HEADER_SPI_MAX_CLOCK_40
	bool "SPI flash max clock rate of 40 MHz"

config PLATFORM_EC_RO_HEADER_SPI_MAX_CLOCK_50
	bool "SPI flash max clock rate of 50 MHz"

endchoice # SPI flash max clock rate

choice "SPI flash reading mode"
	prompt "Reading mode used by the SPI flash"
	help
	  This will set the reading mode that can be used by the SPI flash.
	  Reading modes supported are normal, fast, dual, and quad.

config PLATFORM_EC_RO_HEADER_SPI_READ_MODE_NORMAL
	bool "SPI flash will operate with normal reading mode"

config PLATFORM_EC_RO_HEADER_SPI_READ_MODE_FAST
	bool "SPI flash will operate with fast reading mode"

config PLATFORM_EC_RO_HEADER_SPI_READ_MODE_DUAL
	bool "SPI flash will operate with dual reading mode"

config PLATFORM_EC_RO_HEADER_SPI_READ_MODE_QUAD
	bool "SPI flash will operate with quad reading mode"

endchoice # SPI flash reading mode