aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/amd/bilby/emmc_gpio.c
diff options
context:
space:
mode:
authorRitul Guru <ritul.bits@gmail.com>2021-02-05 23:53:28 +0530
committerFelix Held <felix-coreboot@felixheld.de>2021-02-17 20:00:41 +0000
commit286c2f6d4a72473b919ea580786d5497f7ef2dec (patch)
tree1c08513c2ec451aeaff40b16e14417c134ce5394 /src/mainboard/amd/bilby/emmc_gpio.c
parent65819cd3644e96f191de04eae8219cab4bc86fb8 (diff)
mainboard/amd/bilby: Add Bilby CRB board
Bilby is the reference board for AMD Raven, Raven2 and Picasso APUs. Bilby mainboard code is taken from mandolin variant Cereme. These new files are a renamed copy and subsequent patches will be applied to create a working bilby implementation. Change-Id: I426966d782e259a971ec36bac2498bc62b4ce7e2 Signed-off-by: Ritul Guru <ritul.bits@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50315 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'src/mainboard/amd/bilby/emmc_gpio.c')
-rw-r--r--src/mainboard/amd/bilby/emmc_gpio.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/mainboard/amd/bilby/emmc_gpio.c b/src/mainboard/amd/bilby/emmc_gpio.c
new file mode 100644
index 0000000000..a88a5c59b2
--- /dev/null
+++ b/src/mainboard/amd/bilby/emmc_gpio.c
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <soc/gpio.h>
+#include "gpio.h"
+
+/* eMMC controller driving either an SD card or eMMC device. */
+static const struct soc_amd_gpio emmc_gpios[] = {
+ PAD_NF(GPIO_21, EMMC_CMD, PULL_UP),
+ PAD_NF(GPIO_22, EMMC_PWR_CTRL, PULL_UP),
+ PAD_NF(GPIO_68, EMMC_CD, PULL_UP),
+ PAD_NF(GPIO_70, EMMC_CLK, PULL_NONE),
+ PAD_NF(GPIO_104, EMMC_DATA0, PULL_UP),
+ PAD_NF(GPIO_105, EMMC_DATA1, PULL_UP),
+ PAD_NF(GPIO_106, EMMC_DATA2, PULL_UP),
+ PAD_NF(GPIO_107, EMMC_DATA3, PULL_NONE),
+ PAD_NF(GPIO_74, EMMC_DATA4, PULL_UP),
+ PAD_NF(GPIO_75, EMMC_DATA6, PULL_UP),
+ PAD_NF(GPIO_87, EMMC_DATA7, PULL_UP),
+ PAD_NF(GPIO_88, EMMC_DATA5, PULL_UP),
+ PAD_NF(GPIO_109, EMMC_DS, PULL_UP),
+};
+
+/* Don't call this if the board uses the LPC bus. */
+void mainboard_program_emmc_gpios(void)
+{
+ program_gpios(emmc_gpios, ARRAY_SIZE(emmc_gpios));
+}