summaryrefslogtreecommitdiff
path: root/src/soc/nvidia/tegra132
diff options
context:
space:
mode:
authorTom Warren <twarren@nvidia.com>2014-11-13 12:51:01 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-04-10 12:02:24 +0200
commitbc7e387a0f0cafc53456af5d038da8394d7a6f66 (patch)
tree5f4391f4df680554f829ec312afe8beb3121fb54 /src/soc/nvidia/tegra132
parent73ef61072b555570f35af47bc040352a6c9b6e04 (diff)
tegra132: Add I2C1 support to funit
I2C1 was missing in the funit/i2c/addressmap tables/code. BUG=none BRANCH=none TEST=Built Rush and Ryu. Built Rush w/code in mainboard.c to enable I2C1 for the MAX98090 audio codec - codec could be configured. Change-Id: I0c678d21546eedb7404a1d3d4329da777430fc97 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 4b623097a2adc4464c17bceed96ec3838beda985 Original-Change-Id: Ibe4f012fa2d427b95cd4672687132b47576b6a9a Original-Signed-off-by: Tom Warren <twarren@nvidia.com> Original-Reviewed-on: https://chromium-review.googlesource.com/229574 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Original-Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: http://review.coreboot.org/9427 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/soc/nvidia/tegra132')
-rw-r--r--src/soc/nvidia/tegra132/funitcfg.c1
-rw-r--r--src/soc/nvidia/tegra132/i2c.c2
-rw-r--r--src/soc/nvidia/tegra132/include/soc/addressmap.h2
-rw-r--r--src/soc/nvidia/tegra132/include/soc/clock.h1
-rw-r--r--src/soc/nvidia/tegra132/include/soc/funitcfg.h2
5 files changed, 6 insertions, 2 deletions
diff --git a/src/soc/nvidia/tegra132/funitcfg.c b/src/soc/nvidia/tegra132/funitcfg.c
index 1054f5ce7e..2aeafdea47 100644
--- a/src/soc/nvidia/tegra132/funitcfg.c
+++ b/src/soc/nvidia/tegra132/funitcfg.c
@@ -82,6 +82,7 @@ static const struct clk_dev_control clk_data_arr[] = {
static const struct funit_cfg_data funit_data[] = {
FUNIT_DATA(SBC1, sbc1, H),
FUNIT_DATA(SBC4, sbc4, U),
+ FUNIT_DATA(I2C1, i2c1, L),
FUNIT_DATA(I2C2, i2c2, H),
FUNIT_DATA(I2C3, i2c3, U),
FUNIT_DATA(I2C5, i2c5, H),
diff --git a/src/soc/nvidia/tegra132/i2c.c b/src/soc/nvidia/tegra132/i2c.c
index eada743914..dc85806967 100644
--- a/src/soc/nvidia/tegra132/i2c.c
+++ b/src/soc/nvidia/tegra132/i2c.c
@@ -23,7 +23,7 @@
struct tegra_i2c_bus_info tegra_i2c_info[] = {
{
- .base = (void *)TEGRA_I2C_BASE,
+ .base = (void *)TEGRA_I2C1_BASE,
.reset_bit = CLK_L_I2C1,
.reset_func = &clock_reset_l
},
diff --git a/src/soc/nvidia/tegra132/include/soc/addressmap.h b/src/soc/nvidia/tegra132/include/soc/addressmap.h
index dc8ba61557..79135217a0 100644
--- a/src/soc/nvidia/tegra132/include/soc/addressmap.h
+++ b/src/soc/nvidia/tegra132/include/soc/addressmap.h
@@ -55,7 +55,7 @@ enum {
TEGRA_APB_UARTE_BASE = TEGRA_APB_MISC_BASE + 0x6400,
TEGRA_NAND_BASE = TEGRA_APB_MISC_BASE + 0x8000,
TEGRA_PWM_BASE = TEGRA_APB_MISC_BASE + 0xA000,
- TEGRA_I2C_BASE = TEGRA_APB_MISC_BASE + 0xC000,
+ TEGRA_I2C1_BASE = TEGRA_APB_MISC_BASE + 0xC000,
TEGRA_SPI_BASE = TEGRA_APB_MISC_BASE + 0xC380,
TEGRA_I2C2_BASE = TEGRA_APB_MISC_BASE + 0xC400,
TEGRA_I2C3_BASE = TEGRA_APB_MISC_BASE + 0xC500,
diff --git a/src/soc/nvidia/tegra132/include/soc/clock.h b/src/soc/nvidia/tegra132/include/soc/clock.h
index 2c7664c1ff..0f01182734 100644
--- a/src/soc/nvidia/tegra132/include/soc/clock.h
+++ b/src/soc/nvidia/tegra132/include/soc/clock.h
@@ -210,6 +210,7 @@ enum {
enum {
CLK_SRC_DEVICE(host1x, PLLM, PLLC2, PLLC, PLLC3, PLLP, UNUSED, PLLA),
+ CLK_SRC_DEVICE(I2C1, PLLP, PLLC2, PLLC, PLLC3, PLLM, UNUSED, CLK_M),
CLK_SRC_DEVICE(I2C2, PLLP, PLLC2, PLLC, PLLC3, PLLM, UNUSED, CLK_M),
CLK_SRC_DEVICE(I2C3, PLLP, PLLC2, PLLC, PLLC3, PLLM, UNUSED, CLK_M),
CLK_SRC_DEVICE(I2C5, PLLP, PLLC2, PLLC, PLLC3, PLLM, UNUSED, CLK_M),
diff --git a/src/soc/nvidia/tegra132/include/soc/funitcfg.h b/src/soc/nvidia/tegra132/include/soc/funitcfg.h
index 2c680fe374..df276101af 100644
--- a/src/soc/nvidia/tegra132/include/soc/funitcfg.h
+++ b/src/soc/nvidia/tegra132/include/soc/funitcfg.h
@@ -30,6 +30,7 @@
enum {
FUNIT_INDEX(SBC1),
FUNIT_INDEX(SBC4),
+ FUNIT_INDEX(I2C1),
FUNIT_INDEX(I2C2),
FUNIT_INDEX(I2C3),
FUNIT_INDEX(I2C5),
@@ -48,6 +49,7 @@ enum {
*/
enum {
+ I2C1_BUS = 0,
I2C2_BUS = 1,
I2C3_BUS = 2,
I2C5_BUS = 4,