summaryrefslogtreecommitdiff
path: root/src/soc/intel/xeon_sp
diff options
context:
space:
mode:
authorMichael Niewöhner <foss@mniewoehner.de>2020-12-11 22:13:44 +0100
committerMichael Niewöhner <foss@mniewoehner.de>2020-12-30 00:30:04 +0000
commit8913b783b9d3ffea2eda7cfd1c9e7319ae889246 (patch)
treedf102d125f0465a007689df4e07e6772b53723c3 /src/soc/intel/xeon_sp
parent979a071b0e3b5a3e578a25f1553a3a32f618d4b2 (diff)
soc/intel: hook up new gpio device in the soc chips
This change adds the required gpio operations struct to soc/common gpio code and hooks them up in all socs currently using the gpio block code, except DNV-NS, which is handled in a separate change. Also, add the gpio device to existing chipset devicetrees. Successfully tested on Supermicro X11SSM-F with CB:48097, X11SSH-TF with CB:48711 and OCP DeltaLake with CB:48672. Change-Id: I81dbbf5397b28ffa7537465c53332779245b39f6 Tested-by: Johnny Lin <Johnny_Lin@wiwynn.com> Tested-by: Michael Niewöhner <foss@mniewoehner.de> Tested-by: Patrick Rudolph <siro@das-labor.org> Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/48583 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/xeon_sp')
-rw-r--r--src/soc/intel/xeon_sp/cpx/chip.c3
-rw-r--r--src/soc/intel/xeon_sp/cpx/chip.h1
-rw-r--r--src/soc/intel/xeon_sp/skx/chip.c3
-rw-r--r--src/soc/intel/xeon_sp/skx/chip.h1
4 files changed, 8 insertions, 0 deletions
diff --git a/src/soc/intel/xeon_sp/cpx/chip.c b/src/soc/intel/xeon_sp/cpx/chip.c
index a3076a8035..778d277a0c 100644
--- a/src/soc/intel/xeon_sp/cpx/chip.c
+++ b/src/soc/intel/xeon_sp/cpx/chip.c
@@ -5,6 +5,7 @@
#include <console/debug.h>
#include <cpu/x86/lapic.h>
#include <device/pci.h>
+#include <intelblocks/gpio.h>
#include <intelblocks/lpc_lib.h>
#include <intelblocks/p2sb.h>
#include <soc/acpi.h>
@@ -61,6 +62,8 @@ static void chip_enable_dev(struct device *dev)
attach_iio_stacks(dev);
} else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) {
dev->ops = &cpu_bus_ops;
+ } else if (dev->path.type == DEVICE_PATH_GPIO) {
+ block_gpio_enable(dev);
}
}
diff --git a/src/soc/intel/xeon_sp/cpx/chip.h b/src/soc/intel/xeon_sp/cpx/chip.h
index 434b343bb2..630bc8e979 100644
--- a/src/soc/intel/xeon_sp/cpx/chip.h
+++ b/src/soc/intel/xeon_sp/cpx/chip.h
@@ -4,6 +4,7 @@
#define _SOC_CHIP_H_
#include <intelblocks/cfg.h>
+#include <soc/gpio.h>
#include <soc/irq.h>
#include <stdint.h>
diff --git a/src/soc/intel/xeon_sp/skx/chip.c b/src/soc/intel/xeon_sp/skx/chip.c
index f101973864..8b08326fb6 100644
--- a/src/soc/intel/xeon_sp/skx/chip.c
+++ b/src/soc/intel/xeon_sp/skx/chip.c
@@ -3,6 +3,7 @@
#include <cbfs.h>
#include <console/console.h>
#include <device/pci.h>
+#include <intelblocks/gpio.h>
#include <soc/acpi.h>
#include <soc/chip_common.h>
#include <soc/pch.h>
@@ -37,6 +38,8 @@ static void soc_enable_dev(struct device *dev)
attach_iio_stacks(dev);
} else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) {
dev->ops = &cpu_bus_ops;
+ } else if (dev->path.type == DEVICE_PATH_GPIO) {
+ block_gpio_enable(dev);
}
}
diff --git a/src/soc/intel/xeon_sp/skx/chip.h b/src/soc/intel/xeon_sp/skx/chip.h
index 08608997b3..4ee1ac0a0d 100644
--- a/src/soc/intel/xeon_sp/skx/chip.h
+++ b/src/soc/intel/xeon_sp/skx/chip.h
@@ -5,6 +5,7 @@
#include <stdint.h>
#include <intelblocks/cfg.h>
+#include <soc/gpio.h>
#include <soc/irq.h>
struct soc_intel_xeon_sp_skx_config {