blob: 7655d5aa9a054e8ee0a092bb82d7890f70a46f96 [file] [log] [blame]
Alexandru Gagniuc7e86cd42015-10-06 10:33:49 -07001ifeq ($(CONFIG_SOC_INTEL_APOLLOLAKE),y)
2
Michael Niewöhner7736bfc2019-10-22 23:05:06 +02003subdirs-y += ../../../cpu/intel/common
Alexandru Gagniuc7e86cd42015-10-06 10:33:49 -07004subdirs-y += ../../../cpu/intel/microcode
5subdirs-y += ../../../cpu/intel/turbo
6subdirs-y += ../../../cpu/x86/lapic
7subdirs-y += ../../../cpu/x86/mtrr
8subdirs-y += ../../../cpu/x86/smm
9subdirs-y += ../../../cpu/x86/tsc
Ravi Sarawadi9d903a12016-03-04 21:33:04 -080010subdirs-y += ../../../cpu/x86/cache
Alexandru Gagniuc7e86cd42015-10-06 10:33:49 -070011
Alexandru Gagniucdfc2b312015-10-06 17:16:41 -070012bootblock-y += bootblock/bootblock.c
Praveen hodagatta praneshb66757f2018-10-23 02:43:05 +080013bootblock-$(CONFIG_FSP_CAR) += fspcar.c
Aaron Durbin595688a2016-03-31 11:38:13 -050014bootblock-y += car.c
Andrey Petrovfcd51ff2016-07-14 17:16:35 -070015bootblock-y += heci.c
Ravi Sarawadi3669a062018-02-27 13:23:42 -080016bootblock-y += gspi.c
Rizwan Qureshiae6a4b62017-04-26 21:06:35 +053017bootblock-y += i2c.c
Ravi Sarawadiefa606b2017-08-04 16:26:09 -070018bootblock-y += lpc.c
Andrey Petrov5672dcd2016-02-12 15:12:43 -080019bootblock-y += mmap_boot.c
Andrey Petrov3dbea292016-06-14 22:20:28 -070020bootblock-y += pmutil.c
Furquan Shaikh6ac226d2016-06-15 17:13:20 -070021bootblock-y += spi.c
Nico Hubera96e66a2018-11-11 02:51:14 +010022bootblock-y += uart.c
Brenton Dongc9b39812016-10-18 13:57:54 -070023
Aaron Durbin595688a2016-03-31 11:38:13 -050024romstage-y += car.c
Subrata Banik17990112019-08-27 11:01:33 +053025romstage-y += ../../../cpu/intel/car/romstage.c
Michael Niewöhnerb17f3d32019-10-24 00:19:45 +020026romstage-y += romstage.c
Ravi Sarawadi3669a062018-02-27 13:23:42 -080027romstage-y += gspi.c
Andrey Petrovfcd51ff2016-07-14 17:16:35 -070028romstage-y += heci.c
Rizwan Qureshiae6a4b62017-04-26 21:06:35 +053029romstage-y += i2c.c
Nico Hubera96e66a2018-11-11 02:51:14 +010030romstage-y += uart.c
Andrey Petrov491c0162016-03-02 15:09:27 -080031romstage-y += memmap.c
Aaron Durbinfc2e7412016-05-12 12:43:37 -050032romstage-y += meminit.c
Ravi Sarawadi09195ac2017-07-20 15:11:19 -070033ifeq ($(CONFIG_SOC_INTEL_GLK),y)
34romstage-y += meminit_util_glk.c
35else
36romstage-y += meminit_util_apl.c
37endif
Andrey Petrov5672dcd2016-02-12 15:12:43 -080038romstage-y += mmap_boot.c
Hannah Williams01bc8972016-02-04 20:13:34 -080039romstage-y += pmutil.c
Andrey Petrov0f593c22016-06-17 15:30:13 -070040romstage-y += reset.c
Furquan Shaikhbae63832016-06-17 15:50:24 -070041romstage-y += spi.c
Andrey Petrov87fb1a62016-02-10 17:47:03 -080042
Aaron Durbinb3f54182016-05-26 14:22:34 -050043smm-y += mmap_boot.c
Nico Huber2fe596e2019-01-31 14:31:35 +010044smm-y += pmc.c
Hannah Williams01bc8972016-02-04 20:13:34 -080045smm-y += pmutil.c
Hannah Williamsd9c84ca2016-05-13 00:47:14 -070046smm-y += smihandler.c
Aaron Durbinb3f54182016-05-26 14:22:34 -050047smm-y += spi.c
Nico Hubera96e66a2018-11-11 02:51:14 +010048smm-y += uart.c
Furquan Shaikhc83e70e2018-06-25 14:29:48 -070049smm-y += elog.c
Karthikeyan Ramasubramanian0f718312019-07-03 13:02:37 -060050smm-y += xhci.c
Lance Zhaof51b1272015-11-09 17:06:34 -080051
52ramstage-$(CONFIG_HAVE_ACPI_TABLES) += acpi.c
Ravi Sarawadi9d903a12016-03-04 21:33:04 -080053ramstage-y += cpu.c
Andrey Petrov70efecd2016-03-04 21:41:13 -080054ramstage-y += chip.c
Aaron Durbin7d14af82017-02-07 11:33:56 -060055ramstage-y += cse.c
Brandon Breitenstein3b0e7612016-07-18 15:14:12 -070056ramstage-y += elog.c
Alexandru Gagniucc3640192015-12-15 16:06:15 -080057ramstage-y += graphics.c
Ravi Sarawadi3669a062018-02-27 13:23:42 -080058ramstage-y += gspi.c
Andrey Petrovfcd51ff2016-07-14 17:16:35 -070059ramstage-y += heci.c
Duncan Laurieff8bce02016-06-27 10:57:13 -070060ramstage-y += i2c.c
Lance Zhaoa7ff9c52015-11-12 18:19:41 -080061ramstage-y += lpc.c
Andrey Petrov491c0162016-03-02 15:09:27 -080062ramstage-y += memmap.c
Andrey Petrov5672dcd2016-02-12 15:12:43 -080063ramstage-y += mmap_boot.c
Nico Hubera96e66a2018-11-11 02:51:14 +010064ramstage-y += uart.c
Saurabh Satija734aa872016-06-21 14:22:16 -070065ramstage-y += nhlt.c
Alexandru Gagniuc0581a672016-02-24 15:08:23 -080066ramstage-y += spi.c
Subrata Banik15129b42017-11-07 17:50:48 +053067ramstage-y += systemagent.c
Hannah Williams01bc8972016-02-04 20:13:34 -080068ramstage-y += pmutil.c
Divya Chellap0b15b702017-11-29 18:53:03 +053069ramstage-y += pnpconfig.c
Hannah Williams733b39a2016-02-11 13:46:28 -080070ramstage-y += pmc.c
Andrey Petrov0f593c22016-06-17 15:30:13 -070071ramstage-y += reset.c
Andrey Petrov79fc33a2017-01-24 21:56:36 -080072ramstage-y += xdci.c
Venkateswarlu Vinjamuri6dd7b402017-02-24 15:37:30 -080073ramstage-y += sd.c
Karthikeyan Ramasubramanian0f718312019-07-03 13:02:37 -060074ramstage-y += xhci.c
Alexandru Gagniuc7e86cd42015-10-06 10:33:49 -070075
Aaron Durbineebe0e02016-03-18 11:19:38 -050076postcar-y += memmap.c
77postcar-y += mmap_boot.c
Furquan Shaikh0be3da52016-06-19 23:20:43 -070078postcar-y += spi.c
Philipp Deppenwiese545ed7a2018-02-14 16:47:12 +010079postcar-y += i2c.c
Patrick Georgie7864ce2018-10-22 14:54:48 +020080postcar-$(CONFIG_RESET_ON_INVALID_RAMSTAGE_CACHE) += heci.c
81postcar-$(CONFIG_RESET_ON_INVALID_RAMSTAGE_CACHE) += reset.c
Nico Hubera96e66a2018-11-11 02:51:14 +010082postcar-y += uart.c
Philipp Deppenwiese2af17af2018-11-26 15:04:46 +010083postcar-$(CONFIG_VBOOT_MEASURED_BOOT) += gspi.c
Aaron Durbineebe0e02016-03-18 11:19:38 -050084
Furquan Shaikhb54a2d12016-06-01 01:55:43 -070085verstage-y += car.c
Rizwan Qureshiae6a4b62017-04-26 21:06:35 +053086verstage-y += i2c.c
Ravi Sarawadi3669a062018-02-27 13:23:42 -080087verstage-y += gspi.c
Andrey Petrovfcd51ff2016-07-14 17:16:35 -070088verstage-y += heci.c
Aaron Durbinbef75e72016-05-26 11:00:44 -050089verstage-y += memmap.c
90verstage-y += mmap_boot.c
Nico Hubera96e66a2018-11-11 02:51:14 +010091verstage-y += uart.c
Aaron Durbinbef75e72016-05-26 11:00:44 -050092verstage-y += pmutil.c
Andrey Petrov0f593c22016-06-17 15:30:13 -070093verstage-y += reset.c
Furquan Shaikh0be3da52016-06-19 23:20:43 -070094verstage-y += spi.c
Aaron Durbinbef75e72016-05-26 11:00:44 -050095
Hannah Williams3ff14a02017-05-05 16:30:22 -070096ifeq ($(CONFIG_SOC_INTEL_GLK),y)
97bootblock-y += gpio_glk.c
98romstage-y += gpio_glk.c
99smm-y += gpio_glk.c
100ramstage-y += gpio_glk.c
101else
102bootblock-y += gpio_apl.c
103romstage-y += gpio_apl.c
104smm-y += gpio_apl.c
105ramstage-y += gpio_apl.c
106endif
107
Alexandru Gagniucdfc2b312015-10-06 17:16:41 -0700108CPPFLAGS_common += -I$(src)/soc/intel/apollolake/include
109
Andrey Petrov79091db72016-05-17 00:03:27 -0700110# Since FSP-M runs in CAR we need to relocate it to a specific address
111$(CONFIG_FSP_M_CBFS)-options := -b $(CONFIG_FSP_M_ADDR)
112
Aaron Durbin5c9df702018-04-18 01:05:25 -0600113# Handle GLK paging requirements
114ifeq ($(CONFIG_PAGING_IN_CACHE_AS_RAM),y)
115cbfs-files-y += pt
116pt-file := pt.c:struct
117pt-type := raw
118cbfs-files-y += pdpt
119pdpt-file := pdpt.c:struct
120pdpt-type := raw
121endif
122
Aaron Durbin9f444c32016-05-20 10:48:44 -0500123ifeq ($(CONFIG_NEED_LBP2),y)
124files_added::
125 $(CBFSTOOL) $(obj)/coreboot.rom write -r $(CONFIG_LBP2_FMAP_NAME) -f $(CONFIG_LBP2_FILE_NAME) --fill-upward
126endif
127
Furquan Shaikh7043bf32016-05-28 12:57:05 -0700128# Bootblock on Apollolake platform lies in the IFWI region. In order to place
129# the bootblock at the right location in IFWI image -
130# a. Using ifwitool:
131# 1. Create IFWI image (ifwi.bin.tmp) from input image
132# (CONFIG_IFWI_FILE_NAME).
133# 2. Delete OBBP sub-partition, if present.
134# 3. Replace IBBL directory entry in IBBP sub-partition with currently
135# generated bootblock.bin.
136# b. Using cbfstool:
137# 1. Write ifwi.bin.tmp to coreboot.rom using CONFIG_IFWI_FMAP_NAME.
138ifeq ($(CONFIG_NEED_IFWI),y)
139files_added:: $(IFWITOOL)
140 $(IFWITOOL) $(CONFIG_IFWI_FILE_NAME) create -f $(objcbfs)/ifwi.bin.tmp
141 $(IFWITOOL) $(objcbfs)/ifwi.bin.tmp delete -n OBBP
142 $(IFWITOOL) $(objcbfs)/ifwi.bin.tmp replace -n IBBP -f $(objcbfs)/bootblock.bin -d -e IBBL
143 $(CBFSTOOL) $(obj)/coreboot.rom write -r $(CONFIG_IFWI_FMAP_NAME) -f $(objcbfs)/ifwi.bin.tmp --fill-upward
144endif
145
Saurabh Satija734aa872016-06-21 14:22:16 -0700146# DSP firmware settings files.
Hannah Williams96939ae2017-11-01 11:01:20 -0700147ifeq ($(CONFIG_SOC_INTEL_GLK),y)
148NHLT_BLOB_PATH = 3rdparty/blobs/soc/intel/glk/nhlt-blobs
149else
Saurabh Satija734aa872016-06-21 14:22:16 -0700150NHLT_BLOB_PATH = 3rdparty/blobs/soc/intel/apollolake/nhlt-blobs
Hannah Williams96939ae2017-11-01 11:01:20 -0700151endif
Sathyanarayana Nujella3e0a3fb2016-10-26 17:31:36 -0700152DMIC_1CH_48KHZ_16B = dmic-1ch-48khz-16b.bin
Saurabh Satija734aa872016-06-21 14:22:16 -0700153DMIC_2CH_48KHZ_16B = dmic-2ch-48khz-16b.bin
Sathyanarayana Nujella3e0a3fb2016-10-26 17:31:36 -0700154DMIC_4CH_48KHZ_16B = dmic-4ch-48khz-16b.bin
Saurabh Satija734aa872016-06-21 14:22:16 -0700155MAX98357_RENDER = max98357-render-2ch-48khz-24b.bin
156DA7219_RENDER_CAPTURE = dialog-2ch-48khz-24b.bin
Naveen Manohar532b8d52018-04-27 15:24:45 +0530157RT5682_RENDER_CAPTURE = rt5682-2ch-48khz-24b.bin
Saurabh Satija734aa872016-06-21 14:22:16 -0700158
Sathyanarayana Nujella3e0a3fb2016-10-26 17:31:36 -0700159cbfs-files-$(CONFIG_NHLT_DMIC_1CH_16B) += $(DMIC_1CH_48KHZ_16B)
160$(DMIC_1CH_48KHZ_16B)-file := $(NHLT_BLOB_PATH)/$(DMIC_1CH_48KHZ_16B)
161$(DMIC_1CH_48KHZ_16B)-type := raw
162
Saurabh Satija6f233742016-08-18 14:08:37 -0700163cbfs-files-$(CONFIG_NHLT_DMIC_2CH_16B) += $(DMIC_2CH_48KHZ_16B)
Saurabh Satija734aa872016-06-21 14:22:16 -0700164$(DMIC_2CH_48KHZ_16B)-file := $(NHLT_BLOB_PATH)/$(DMIC_2CH_48KHZ_16B)
165$(DMIC_2CH_48KHZ_16B)-type := raw
166
Sathyanarayana Nujella3e0a3fb2016-10-26 17:31:36 -0700167cbfs-files-$(CONFIG_NHLT_DMIC_4CH_16B) += $(DMIC_4CH_48KHZ_16B)
168$(DMIC_4CH_48KHZ_16B)-file := $(NHLT_BLOB_PATH)/$(DMIC_4CH_48KHZ_16B)
169$(DMIC_4CH_48KHZ_16B)-type := raw
170
Saurabh Satija734aa872016-06-21 14:22:16 -0700171cbfs-files-$(CONFIG_NHLT_MAX98357) += $(MAX98357_RENDER)
172$(MAX98357_RENDER)-file := $(NHLT_BLOB_PATH)/$(MAX98357_RENDER)
173$(MAX98357_RENDER)-type := raw
174
175cbfs-files-$(CONFIG_NHLT_DA7219) += $(DA7219_RENDER_CAPTURE)
176$(DA7219_RENDER_CAPTURE)-file := $(NHLT_BLOB_PATH)/$(DA7219_RENDER_CAPTURE)
177$(DA7219_RENDER_CAPTURE)-type := raw
178
Naveen Manohar532b8d52018-04-27 15:24:45 +0530179cbfs-files-$(CONFIG_NHLT_RT5682) += $(RT5682_RENDER_CAPTURE)
180$(RT5682_RENDER_CAPTURE)-file := $(NHLT_BLOB_PATH)/$(RT5682_RENDER_CAPTURE)
181$(RT5682_RENDER_CAPTURE)-type := raw
182
Nico Huberbae03a52018-11-14 17:46:14 +0100183ifeq ($(CONFIG_SOC_INTEL_GLK),y)
184# Gemini Lake B0 (706a1) only atm.
Arthur Heymansa4492902019-06-17 10:50:47 +0200185cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-7a-*)
Nico Huberbae03a52018-11-14 17:46:14 +0100186else
187# Apollo Lake 506c2, B0 (506c9) and E0 (506ca) only atm.
Arthur Heymansa4492902019-06-17 10:50:47 +0200188cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-5c-*)
Alexandru Gagniuc7e86cd42015-10-06 10:33:49 -0700189endif
Nico Huberbae03a52018-11-14 17:46:14 +0100190
191endif # if CONFIG_SOC_INTEL_APOLLOLAKE