diff options
author | Jimmy Zhang <jimmzhang@nvidia.com> | 2014-10-31 18:26:11 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-04-10 12:01:01 +0200 |
commit | ae272297aaeb3e383eb1cd67f104e563a06d957a (patch) | |
tree | b6f3fbce12ef039c73092f194eb8cdc997aac907 /src/mainboard/google/rush_ryu/romstage.c | |
parent | 58901b6b660783a47c308c1e66acfa84ee62d7e5 (diff) | |
download | coreboot-ae272297aaeb3e383eb1cd67f104e563a06d957a.tar.xz |
ryu: Enhance pmic access functions
1. Add page address, an i2c address, into register address table
2. Add pmic read function
3. Add more registers and setting values.
BRANCH=none
BUG=chrome-os-partner:31936
TEST=build and test on ryu
Signed-off-by: Jimmy Zhang <jimmzhang@nvidia.com>
Change-Id: Ieef0737205b20add3ff8990f62dd8585a4e8c557
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 6dcf42c299e25023991be331b724acd0fd9f32c2
Original-Change-Id: I227b3e9390e6fc020707d4730c19945760df6ca2
Original-Reviewed-on: https://chromium-review.googlesource.com/226902
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Commit-Queue: Jimmy Zhang <jimmzhang@nvidia.com>
Original-Tested-by: Jimmy Zhang <jimmzhang@nvidia.com>
Reviewed-on: http://review.coreboot.org/9420
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/mainboard/google/rush_ryu/romstage.c')
-rw-r--r-- | src/mainboard/google/rush_ryu/romstage.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mainboard/google/rush_ryu/romstage.c b/src/mainboard/google/rush_ryu/romstage.c index 4a13b898c4..a54a5cac2f 100644 --- a/src/mainboard/google/rush_ryu/romstage.c +++ b/src/mainboard/google/rush_ryu/romstage.c @@ -19,6 +19,7 @@ #include <delay.h> #include <soc/addressmap.h> +#include <device/i2c.h> #include <soc/clock.h> #include <soc/funitcfg.h> #include <soc/nvidia/tegra/i2c.h> @@ -67,6 +68,7 @@ static const struct funit_cfg funits[] = { static void lte_modem_init(void) { int mdm_det; + uint8_t data; /* A LTE modem is present if MDM_DET is pulled down by the modem */ mdm_det = gpio_get(MDM_DET); @@ -76,8 +78,11 @@ static void lte_modem_init(void) printk(BIOS_DEBUG, "Found LTE modem\n"); /* Enable PMIC CLK32KGAUDIO to drive CLK_MDM_32K */ - pmic_write_reg(I2CPWR_BUS, TI65913_PRIMARY_SECONDARY_PAD2, 0x02, 0); - pmic_write_reg(I2CPWR_BUS, TI65913_CLK32KGAUDIO_CTRL, 0x01, 0); + pmic_read_reg(I2CPWR_BUS, TI65913_PAD2, &data); + pmic_write_reg(I2CPWR_BUS, TI65913_PAD2, + PAD2_GPIO_5_SEC_CLK32KGAUDIO(data), 0); + pmic_write_reg(I2CPWR_BUS, TI65913_CLK32KGAUDIO_CTRL, + TI65913_MODE_ACTIVE_ON, 0); /* FULL_CARD_POWER_OFF# (A44: MODEM_PWR_ON) and RESET# * (A44: MODEM_RESET) of the LTE modem are actively low and initially |