summaryrefslogtreecommitdiff
path: root/src/mainboard/google/dedede
diff options
context:
space:
mode:
authorZanxi Chen <chenzanxi@huaqin.corp-partner.google.com>2021-03-09 21:34:08 +0800
committerPatrick Georgi <pgeorgi@google.com>2021-03-16 11:17:59 +0000
commitb2641792a38a2ae282c96ff7e8951a0bc80781c5 (patch)
tree770babf7078aae6d353bd93b4e698cc3d7436bc1 /src/mainboard/google/dedede
parentaa2b614cb65621a09083e083912149f2f00d4bbd (diff)
mb/google/dedede/var/blipper: Add camera support
Add camera support in devicetree and associated GPIO configuration. BUG=b:181729304 BRANCH=dedede TEST=built blipper firmware and verified camera function is OK Change-Id: I806ec207a454d4383aca093159553b7e618e16b2 Signed-off-by: Zanxi Chen <chenzanxi@huaqin.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/51380 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Diffstat (limited to 'src/mainboard/google/dedede')
-rw-r--r--src/mainboard/google/dedede/variants/blipper/Makefile.inc3
-rw-r--r--src/mainboard/google/dedede/variants/blipper/gpio.c18
-rw-r--r--src/mainboard/google/dedede/variants/blipper/overridetree.cb15
3 files changed, 36 insertions, 0 deletions
diff --git a/src/mainboard/google/dedede/variants/blipper/Makefile.inc b/src/mainboard/google/dedede/variants/blipper/Makefile.inc
new file mode 100644
index 0000000000..a3527099b9
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/blipper/Makefile.inc
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+ramstage-y += gpio.c
diff --git a/src/mainboard/google/dedede/variants/blipper/gpio.c b/src/mainboard/google/dedede/variants/blipper/gpio.c
new file mode 100644
index 0000000000..8c13c76a89
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/blipper/gpio.c
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <baseboard/gpio.h>
+#include <baseboard/variants.h>
+#include <commonlib/helpers.h>
+#include <vendorcode/google/chromeos/chromeos.h>
+
+/* Pad configuration in ramstage*/
+static const struct pad_config gpio_table[] = {
+ /* D13 : EN_PP2800_CAMERA */
+ PAD_CFG_GPO(GPP_D13, 1, PLTRST),
+};
+
+const struct pad_config *variant_override_gpio_table(size_t *num)
+{
+ *num = ARRAY_SIZE(gpio_table);
+ return gpio_table;
+}
diff --git a/src/mainboard/google/dedede/variants/blipper/overridetree.cb b/src/mainboard/google/dedede/variants/blipper/overridetree.cb
index 45d3418286..b20dcbc2f2 100644
--- a/src/mainboard/google/dedede/variants/blipper/overridetree.cb
+++ b/src/mainboard/google/dedede/variants/blipper/overridetree.cb
@@ -36,7 +36,22 @@ chip soc/intel/jasperlake
},
}"
+ # USB Port Configuration
+ register "usb2_ports[5]" = "USB2_PORT_MID(OC_SKIP)" # UF Camera
+
device domain 0 on
+ device pci 14.0 on
+ chip drivers/usb/acpi
+ device usb 0.0 on
+ chip drivers/usb/acpi
+ register "desc" = ""UFCamera""
+ register "type" = "UPC_TYPE_INTERNAL"
+ register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D13)"
+ device usb 2.5 on end
+ end
+ end
+ end
+ end # USB xHCI
device pci 15.0 on
chip drivers/i2c/generic
register "hid" = ""ELAN0000""