diff options
author | Mario Scheithauer <mario.scheithauer@siemens.com> | 2022-04-26 13:50:52 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-05-16 13:22:49 +0000 |
commit | eda66c313b5c5491738a0a5e884caba14c07731f (patch) | |
tree | 8e4060c464694516de54555517cf76b7600bfb70 /src/soc | |
parent | bd192821bb3784014743c9ea280e032e292ac3c0 (diff) |
soc/intel/elkhartlake: Implement TSN GbE driver
To be able to make EHL Ethernet GbE-TSN Controller configurable, a
driver is required. Functionality comes in following patches.
Change-Id: I7522914c56b74486bb088280d2686acf7027d1d3
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63861
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/intel/elkhartlake/Kconfig | 7 | ||||
-rw-r--r-- | src/soc/intel/elkhartlake/Makefile.inc | 1 | ||||
-rw-r--r-- | src/soc/intel/elkhartlake/include/soc/tsn_gbe.h | 6 | ||||
-rw-r--r-- | src/soc/intel/elkhartlake/tsn_gbe.c | 20 |
4 files changed, 34 insertions, 0 deletions
diff --git a/src/soc/intel/elkhartlake/Kconfig b/src/soc/intel/elkhartlake/Kconfig index 26b8fe3162..467662946d 100644 --- a/src/soc/intel/elkhartlake/Kconfig +++ b/src/soc/intel/elkhartlake/Kconfig @@ -236,6 +236,13 @@ config PSE_CONFIG_BUFFER_SIZE_KIB data (FSP will append PSE config data to memory region right after PSE FW memory region). +config EHL_TSN_DRIVER + bool + default n + help + Enable TSN GbE driver to provide board specific settings in the GBE MAC. + As an example of a possible change, the MAC address could be adjusted. + config SOC_INTEL_ELKHARTLAKE_DEBUG_CONSENT int "Debug Consent for EHL" # USB DBC is more common for developers so make this default to 3 if diff --git a/src/soc/intel/elkhartlake/Makefile.inc b/src/soc/intel/elkhartlake/Makefile.inc index ce93e46e79..2c613e0168 100644 --- a/src/soc/intel/elkhartlake/Makefile.inc +++ b/src/soc/intel/elkhartlake/Makefile.inc @@ -36,6 +36,7 @@ ramstage-y += pmc.c ramstage-y += reset.c ramstage-y += systemagent.c ramstage-y += sd.c +ramstage-$(CONFIG_EHL_TSN_DRIVER) += tsn_gbe.c ramstage-y += me.c smm-y += gpio.c diff --git a/src/soc/intel/elkhartlake/include/soc/tsn_gbe.h b/src/soc/intel/elkhartlake/include/soc/tsn_gbe.h new file mode 100644 index 0000000000..d006ef252b --- /dev/null +++ b/src/soc/intel/elkhartlake/include/soc/tsn_gbe.h @@ -0,0 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef _SOC_ELKHARTLAKE_TSN_GBE_H_ +#define _SOC_ELKHARTLAKE_TSN_GBE_H_ + +#endif /* _SOC_ELKHARTLAKE_TSN_GBE_H_ */ diff --git a/src/soc/intel/elkhartlake/tsn_gbe.c b/src/soc/intel/elkhartlake/tsn_gbe.c new file mode 100644 index 0000000000..c96e88b972 --- /dev/null +++ b/src/soc/intel/elkhartlake/tsn_gbe.c @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <console/console.h> +#include <device/pci.h> +#include <device/pci_ids.h> +#include <soc/tsn_gbe.h> + +static struct device_operations gbe_tsn_ops = { + .read_resources = pci_dev_read_resources, + .set_resources = pci_dev_set_resources, + .enable_resources = pci_dev_enable_resources, +}; + +static const unsigned short gbe_tsn_device_ids[] = { 0x4b32, 0x4ba0, 0x4bb0, 0 }; + +static const struct pci_driver gbe_tsn_driver __pci_driver = { + .ops = &gbe_tsn_ops, + .vendor = PCI_VID_INTEL, + .devices = gbe_tsn_device_ids, +}; |