summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYogesh Lal <ylal@codeaurora.org>2014-07-14 09:12:23 (GMT)
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-08-12 05:11:12 (GMT)
commitede3fcec7dd52fccf5ddc6f2f4fbd36e22bf7f9f (patch)
tree1a7a578e6a5056c3730a47f911258e380cedb9b3
parentf6cce2ff84caaaa0cb068f9bf77ea624e9cacefd (diff)
downloaddepthcharge-stabilize-6146.B.tar.gz
depthcharge-stabilize-6146.B.tar.xz
board/storm : Add support for MMC GPIOs.stabilize-6146.B
Pin assignment matches storm Proto0 schematics, drive strength was discussed with the HW team and is appropriate for the current board layout. BUG=chrome-os-partner:27947 TEST=Tested MMC register reads and data reads, for example requesting for OCR, CID register, and switching the mode of operation. Change-Id: Idea33fde3ca44a248716fb2aafcbd0db66f5ab5e Signed-off-by: Yogesh Lal <ylal@codeaurora.org> Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/208987 Reviewed-by: Trevor Bourget <tbourget@codeaurora.org>
-rw-r--r--src/board/storm/board.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/board/storm/board.c b/src/board/storm/board.c
index 5331971..2c44996 100644
--- a/src/board/storm/board.c
+++ b/src/board/storm/board.c
@@ -34,6 +34,41 @@
#include "drivers/tpm/slb9635_i2c.h"
#include "drivers/tpm/tpm.h"
#include "vboot/util/flag.h"
+#include "drivers/gpio/ipq806x.h"
+#include "drivers/storage/ipq806x_mmc.h"
+
+#define GPIO_SDCC_FUNC_VAL 2
+
+/* MMC bus GPIO assignments. */
+enum storm_emmc_gpio {
+ SDC1_DATA7 = 38,
+ SDC1_DATA6 = 39,
+ SDC1_DATA3 = 40,
+ SDC1_DATA2 = 41,
+ SDC1_CLK = 42,
+ SDC1_DATA1 = 43,
+ SDC1_DATA0 = 44,
+ SDC1_CMD = 45,
+ SDC1_DATA5 = 46,
+ SDC1_DATA4 = 47,
+};
+
+void board_mmc_gpio_config(void)
+{
+ unsigned i;
+ unsigned char gpio_config_arr[] = {
+ SDC1_DATA7, SDC1_DATA6, SDC1_DATA3,
+ SDC1_DATA2, SDC1_DATA1, SDC1_DATA0,
+ SDC1_CMD, SDC1_DATA5, SDC1_DATA4};
+
+ gpio_tlmm_config_set(SDC1_CLK, GPIO_SDCC_FUNC_VAL,
+ GPIO_PULL_DOWN, GPIO_16MA, 1);
+
+ for (i = 0; i < ARRAY_SIZE(gpio_config_arr); i++) {
+ gpio_tlmm_config_set(gpio_config_arr[i],
+ GPIO_SDCC_FUNC_VAL, GPIO_PULL_UP, GPIO_10MA, 1);
+ }
+}
static int board_setup(void)
{