summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajesh Patil <rajpat@codeaurora.org>2021-06-16 14:13:00 +0530
committerShelley Chen <shchen@google.com>2021-09-21 19:37:46 +0000
commit555c2d67a4e70146286c319cf182c6ee4f92ad2e (patch)
tree22639dc127f5f075a8e842520b690911040ec2ae
parentf33d2e4b1dee0164ad25ed7c194d623a3559959e (diff)
soc/qualcomm/common/i2c: Add support for I2C common driver
copy existing I2C driver from /soc/qualcomm/sc7180 to common folder. This implements i2c driver for qualcomm chipsets BUG=b:182963902 TEST=Validated on qualcomm sc7180 and sc7280 development board Signed-off-by: Rajesh Patil <rajpat@codeaurora.org> Change-Id: I16e6fc2c1c24b9814d1803bffd5cfbb657201cfb Reviewed-on: https://review.coreboot.org/c/coreboot/+/55952 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Shelley Chen <shchen@google.com>
-rw-r--r--src/mainboard/google/trogdor/mainboard.c3
-rw-r--r--src/soc/qualcomm/common/include/soc/qupv3_i2c_common.h (renamed from src/soc/qualcomm/sc7180/include/soc/qupv3_i2c.h)0
-rw-r--r--src/soc/qualcomm/common/qupv3_i2c.c (renamed from src/soc/qualcomm/sc7180/qupv3_i2c.c)4
-rw-r--r--src/soc/qualcomm/sc7180/Makefile.inc2
4 files changed, 5 insertions, 4 deletions
diff --git a/src/mainboard/google/trogdor/mainboard.c b/src/mainboard/google/trogdor/mainboard.c
index 982c1c1dae..48949d5a9c 100644
--- a/src/mainboard/google/trogdor/mainboard.c
+++ b/src/mainboard/google/trogdor/mainboard.c
@@ -15,7 +15,8 @@
#include <soc/display/mdssreg.h>
#include <soc/qupv3_config_common.h>
#include <soc/qup_se_handlers_common.h>
-#include <soc/qupv3_i2c.h>
+#include <soc/qupv3_i2c_common.h>
+#include <soc/qcom_qup_se.h>
#include <soc/usb.h>
#include <types.h>
diff --git a/src/soc/qualcomm/sc7180/include/soc/qupv3_i2c.h b/src/soc/qualcomm/common/include/soc/qupv3_i2c_common.h
index 71cea0a639..71cea0a639 100644
--- a/src/soc/qualcomm/sc7180/include/soc/qupv3_i2c.h
+++ b/src/soc/qualcomm/common/include/soc/qupv3_i2c_common.h
diff --git a/src/soc/qualcomm/sc7180/qupv3_i2c.c b/src/soc/qualcomm/common/qupv3_i2c.c
index 704a0bc0fb..606b3bf935 100644
--- a/src/soc/qualcomm/sc7180/qupv3_i2c.c
+++ b/src/soc/qualcomm/common/qupv3_i2c.c
@@ -8,9 +8,9 @@
#include <lib.h>
#include <soc/clock.h>
#include <soc/qcom_qup_se.h>
-#include <soc/qupv3_config_common.h>
#include <soc/qup_se_handlers_common.h>
-#include <soc/qupv3_i2c.h>
+#include <soc/qupv3_config_common.h>
+#include <soc/qupv3_i2c_common.h>
#include <stdint.h>
static void i2c_clk_configure(unsigned int bus, enum i2c_speed speed)
diff --git a/src/soc/qualcomm/sc7180/Makefile.inc b/src/soc/qualcomm/sc7180/Makefile.inc
index 149d63f4be..0d7e4d62bd 100644
--- a/src/soc/qualcomm/sc7180/Makefile.inc
+++ b/src/soc/qualcomm/sc7180/Makefile.inc
@@ -8,7 +8,7 @@ all-y += ../common/timer.c
all-y += ../common/gpio.c
all-y += ../common/spi.c
all-$(CONFIG_SC7180_QSPI) += ../common/qspi.c
-all-y += qupv3_i2c.c
+all-y += ../common/qupv3_i2c.c
all-y += qupv3_spi.c
all-y += clock.c
all-y += ../common/clock.c