summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorTao Xia <xiatao5@huaqin.corp-partner.google.com>2021-02-20 16:53:42 +0800
committerPatrick Georgi <pgeorgi@google.com>2021-02-24 11:28:59 +0000
commite64513c767f3a623345058a5831e41986b1944b8 (patch)
treecc0ce238adcc0709394a2e52ac5ef62671260e04 /src/mainboard
parent4742f537705e1b3a97dd737bb8a1fc13fc89f7f7 (diff)
mb/google/dedede/var/sasukette: Adding camera support in devicetree
and associated GPIO configuration Adding camera support in devicetree and associated GPIO configuration. BUG=b:177351873 BRANCH=dedede TEST=camera function is OK Signed-off-by: Tao Xia <xiatao5@huaqin.corp-partner.google.com> Change-Id: I539e969e180c8c71d4b54b50519d2e1ff25415f8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/50982 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/dedede/variants/sasukette/Makefile.inc3
-rw-r--r--src/mainboard/google/dedede/variants/sasukette/gpio.c16
-rw-r--r--src/mainboard/google/dedede/variants/sasukette/overridetree.cb17
3 files changed, 36 insertions, 0 deletions
diff --git a/src/mainboard/google/dedede/variants/sasukette/Makefile.inc b/src/mainboard/google/dedede/variants/sasukette/Makefile.inc
new file mode 100644
index 0000000000..eb2c9bc021
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/sasukette/Makefile.inc
@@ -0,0 +1,3 @@
+## SPDX-License-Identifier: GPL-2.0-or-later
+
+ramstage-y += gpio.c
diff --git a/src/mainboard/google/dedede/variants/sasukette/gpio.c b/src/mainboard/google/dedede/variants/sasukette/gpio.c
new file mode 100644
index 0000000000..0f5b6d292b
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/sasukette/gpio.c
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <baseboard/gpio.h>
+#include <baseboard/variants.h>
+
+/* Pad configuration in ramstage*/
+static const struct pad_config gpio_table[] = {
+ /* D15 : EN_PP3300_CAMERA */
+ PAD_CFG_GPO(GPP_D15, 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/sasukette/overridetree.cb b/src/mainboard/google/dedede/variants/sasukette/overridetree.cb
index 404024b1d6..d3b1872f91 100644
--- a/src/mainboard/google/dedede/variants/sasukette/overridetree.cb
+++ b/src/mainboard/google/dedede/variants/sasukette/overridetree.cb
@@ -36,7 +36,24 @@ chip soc/intel/jasperlake
},
}"
+ # USB Port Configuration
+ register "usb2_ports[5]" = "USB2_PORT_MID(OC_SKIP)" # 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 "has_power_resource" = "1"
+ register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D15)"
+ register "enable_delay_ms" = "20"
+ device usb 2.5 on end
+ end
+ end
+ end
+ end # USB xHCI
device pci 15.0 on end
end
end