summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/elkhartlake/Kconfig7
-rw-r--r--src/soc/intel/elkhartlake/Makefile.inc1
-rw-r--r--src/soc/intel/elkhartlake/include/soc/tsn_gbe.h6
-rw-r--r--src/soc/intel/elkhartlake/tsn_gbe.c20
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,
+};