mb/system76/cml-u/dt: Make use of chipset devicetree
[coreboot.git] / src / soc / intel / alderlake / spi.c
blob114942510145845f96f6ea3b127d5ec4c090d336
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 /*
4 * This file is created based on Intel Alder Lake Processor PCH Datasheet
5 * Document number: 621483
6 * Chapter number: 7
7 */
9 #include <intelblocks/fast_spi.h>
10 #include <intelblocks/spi.h>
11 #include <soc/pci_devs.h>
13 #define PSF_SPI_DESTINATION_ID 0x23a8
15 int spi_soc_devfn_to_bus(unsigned int devfn)
17 switch (devfn) {
18 case PCH_DEVFN_GSPI0:
19 return 1;
20 case PCH_DEVFN_GSPI1:
21 return 2;
22 case PCH_DEVFN_GSPI2:
23 return 3;
24 case PCH_DEVFN_GSPI3:
25 return 4;
27 return -1;
30 uint32_t soc_get_spi_psf_destination_id(void)
32 return PSF_SPI_DESTINATION_ID;