diff options
Diffstat (limited to 'src/mainboard/google')
-rw-r--r-- | src/mainboard/google/herobrine/mainboard.c | 10 | ||||
-rw-r--r-- | src/mainboard/google/mistral/mainboard.c | 9 | ||||
-rw-r--r-- | src/mainboard/google/trogdor/mainboard.c | 11 |
3 files changed, 30 insertions, 0 deletions
diff --git a/src/mainboard/google/herobrine/mainboard.c b/src/mainboard/google/herobrine/mainboard.c index dc60e6e2c4..6f8d19d8d1 100644 --- a/src/mainboard/google/herobrine/mainboard.c +++ b/src/mainboard/google/herobrine/mainboard.c @@ -6,15 +6,25 @@ #include <soc/clock.h> #include <console/console.h> #include <device/device.h> +#include <device/mmio.h> #include <bootblock_common.h> #include <soc/clock.h> +static void configure_sdhci(void) +{ + /* Program eMMC drive strength to 16/10/10 mA */ + write32((void *)SDC1_TLMM_CFG_ADDR, 0x9FE4); + /* Program SD card drive strength to 16/10/10 mA */ + write32((void *)SDC2_TLMM_CFG_ADDR, 0x1FE4); +} + static void mainboard_init(struct device *dev) { /* Configure clock for eMMC */ clock_configure_sdcc(1, 384 * MHz); /* Configure clock for SD card */ clock_configure_sdcc(2, 50 * MHz); + configure_sdhci(); } static void mainboard_enable(struct device *dev) diff --git a/src/mainboard/google/mistral/mainboard.c b/src/mainboard/google/mistral/mainboard.c index 804afb4135..e45ff8fef6 100644 --- a/src/mainboard/google/mistral/mainboard.c +++ b/src/mainboard/google/mistral/mainboard.c @@ -1,8 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include <device/device.h> +#include <device/mmio.h> #include <vendorcode/google/chromeos/chromeos.h> #include <soc/usb.h> +#include <soc/addressmap.h> static struct usb_board_data usb1_board_data = { .parameter_override_x0 = 0x63, @@ -17,6 +19,12 @@ static void setup_usb(void) setup_usb_host(HSUSB_HS_PORT_1, &usb1_board_data); } +static void configure_sdhci(void) +{ + /* Program eMMC drive strength to 16/10/10 mA */ + write32((void *)SDC1_TLMM_CFG_ADDR, 0x9FE4); +} + static void mainboard_init(struct device *dev) { /* Copy WIFI calibration data into CBMEM. */ @@ -24,6 +32,7 @@ static void mainboard_init(struct device *dev) cbmem_add_vpd_calibration_data(); setup_usb(); + configure_sdhci(); } static void mainboard_enable(struct device *dev) diff --git a/src/mainboard/google/trogdor/mainboard.c b/src/mainboard/google/trogdor/mainboard.c index 41bef2b3e7..982c1c1dae 100644 --- a/src/mainboard/google/trogdor/mainboard.c +++ b/src/mainboard/google/trogdor/mainboard.c @@ -6,6 +6,7 @@ #include <delay.h> #include <device/device.h> #include <device/i2c_simple.h> +#include <device/mmio.h> #include <mipi/panel.h> #include <drivers/ti/sn65dsi86bridge/sn65dsi86bridge.h> #include <edid.h> @@ -19,6 +20,7 @@ #include <types.h> #include "board.h" +#include <soc/addressmap.h> #define BRIDGE_BUS 0x2 #define BRIDGE_CHIP 0x2d @@ -202,6 +204,14 @@ static void display_startup(void) } } +static void configure_sdhci(void) +{ + /* Program eMMC drive strength to 16/16/16 mA */ + write32((void *)SDC1_TLMM_CFG_ADDR, 0x9FFF); + /* Program SD card drive strength to 16/10/10 mA */ + write32((void *)SDC2_TLMM_CFG_ADDR, 0x1FE4); +} + static void mainboard_init(struct device *dev) { /* Take FPMCU out of reset. Power was already applied @@ -213,6 +223,7 @@ static void mainboard_init(struct device *dev) qi2s_configure_gpios(); load_qup_fw(); display_startup(); + configure_sdhci(); } static void mainboard_enable(struct device *dev) |