[coreboot-gerrit] Change in coreboot[master]: mb/google/atlas: [WIP] Add camera ASL files

Rizwan Qureshi (Code Review) gerrit at coreboot.org
Thu Apr 5 14:54:58 CEST 2018


Rizwan Qureshi has uploaded this change for review. ( https://review.coreboot.org/25536


Change subject: mb/google/atlas: [WIP] Add camera ASL files
......................................................................

mb/google/atlas: [WIP] Add camera ASL files

Atlas has one sensor, create a single endpoint to CIO2.
create power resource for enabling/disabling camera.

BUG=None
Branch=None
TEST=NA

Change-Id: If4e8d20b4b059b072fd7c20f3b6b3cf8e9c67d63
Signed-off-by: Rizwan Qureshi <rizwan.qureshi at intel.com>
---
A src/mainboard/google/poppy/variants/atlas/include/variant/acpi/cam0.asl
A src/mainboard/google/poppy/variants/atlas/include/variant/acpi/camera.asl
A src/mainboard/google/poppy/variants/atlas/include/variant/acpi/ipu_endpoints.asl
A src/mainboard/google/poppy/variants/atlas/include/variant/acpi/ipu_mainboard.asl
4 files changed, 202 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/36/25536/1

diff --git a/src/mainboard/google/poppy/variants/atlas/include/variant/acpi/cam0.asl b/src/mainboard/google/poppy/variants/atlas/include/variant/acpi/cam0.asl
new file mode 100644
index 0000000..2589da9
--- /dev/null
+++ b/src/mainboard/google/poppy/variants/atlas/include/variant/acpi/cam0.asl
@@ -0,0 +1,115 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+Scope (\_SB.PCI0.I2C3)
+{
+	Device (CAM0)
+	{
+		Name (_HID, "SONY258A")  /* _HID: Hardware ID */
+		Name (_UID, Zero)  /* _UID: Unique ID */
+		Name (_DDN, "SONY IMX258 Camera") /* _DDN: DOS Device Name */
+		Name (CAMD, 0x02)
+
+		Method (_STA, 0, NotSerialized)  /* _STA: Status */
+		{
+			Return (0x0F)
+		}
+
+		Name (_DEP, Package() { \_SB.PCI0.I2C2.PMIC })
+		Name (_CRS, ResourceTemplate ()
+		{
+			I2cSerialBus (0x001A, ControllerInitiated, 0x00061A80,
+				AddressingMode7Bit, "\\_SB.PCI0.I2C2",
+				0x00, ResourceConsumer, ,
+				)
+		})
+
+		/* Power resource methods for CAM0 */
+		PowerResource (OVTH, 0, 0) {
+			Name (STA, 0)
+			Method (_ON, 0, Serialized) {
+				/* Enable power GPP_D8 */
+				/* Enable Clock GPP_D18 */
+				STA = 1
+			}
+
+			Method (_OFF, 0, Serialized) {
+				/* Disable power GPP_D8 */
+				/* Disable Clock GPP_D18 */
+				STA = 0
+			}
+			Method (_STA, 0, NotSerialized) {
+				Return (STA)
+			}
+		}
+		Name (_PR0, Package () { ^^I2C3.CAM0.OVTH })
+		Name (_PR3, Package () { ^^I2C3.CAM0.OVTH })
+
+		/* Port0 of CAM0 is connected to port0 of CIO2 device */
+		Name (_DSD, Package () {
+			ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
+			Package () {
+				Package () { "port0", "PRT0" },
+			},
+		})
+
+		Name (PRT0, Package() {
+			ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+			Package () {
+				Package () { "port", 0 },
+			},
+			ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
+			Package () {
+				Package () { "endpoint0", "EP00" },
+			}
+		})
+
+		Name (EP00, Package() {
+			ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+			Package () {
+				Package () { "endpoint", 0 },
+				Package () { "clock-lanes", 0 },
+				Package () { "data-lanes",
+					Package () { 1, 2 }
+				},
+				Package () { "link-frequencies",
+					Package() { 633600000, 320000000 }
+				},
+				Package () { "remote-endpoint",
+					Package() { \_SB.PCI0.CIO2, 0, 0 }
+				},
+			}
+		})
+
+		Method (SSDB, 0, Serialized)
+		{
+			Return (Buffer (0x5E)
+			{
+				/* 0000 */   0x00, 0x50, 0x00, 0x00, 0x00, 0x00,0x00, 0x00,
+				/* 0008 */   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+				/* 0010 */   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+				/* 0018 */   0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
+				/* 0020 */   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+				/* 0028 */   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+				/* 0030 */   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+				/* 0038 */   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+				/* 0040 */   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+				/* 0048 */   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x03,
+				/* 0050 */   0x09, 0x00, 0x02, 0x01, 0x00, 0x01, 0x00, 0x36,
+				/* 0058 */   0x6E, 0x01, 0x00, 0x00, 0x00, 0x00
+			})
+		}
+	}
+}
diff --git a/src/mainboard/google/poppy/variants/atlas/include/variant/acpi/camera.asl b/src/mainboard/google/poppy/variants/atlas/include/variant/acpi/camera.asl
new file mode 100644
index 0000000..7993a66
--- /dev/null
+++ b/src/mainboard/google/poppy/variants/atlas/include/variant/acpi/camera.asl
@@ -0,0 +1,19 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include "ipu_mainboard.asl"
+#include "ipu_endpoints.asl"
+#include <baseboard/acpi/camera_pmic.asl>
+#include "cam0.asl"
diff --git a/src/mainboard/google/poppy/variants/atlas/include/variant/acpi/ipu_endpoints.asl b/src/mainboard/google/poppy/variants/atlas/include/variant/acpi/ipu_endpoints.asl
new file mode 100644
index 0000000..5dc747b
--- /dev/null
+++ b/src/mainboard/google/poppy/variants/atlas/include/variant/acpi/ipu_endpoints.asl
@@ -0,0 +1,29 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+Scope (\_SB.PCI0.CIO2)
+{
+	Name (EP00, Package() {
+		ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+		Package () {
+			Package () { "endpoint", 0 },
+			Package () { "clock-lanes", 0 },
+			Package () { "data-lanes", Package () { 1, 2 } },
+			Package () { "remote-endpoint",
+				Package() { \_SB.PCI0.I2C3.CAM0, 0, 0 }
+			},
+		}
+	})
+}
diff --git a/src/mainboard/google/poppy/variants/atlas/include/variant/acpi/ipu_mainboard.asl b/src/mainboard/google/poppy/variants/atlas/include/variant/acpi/ipu_mainboard.asl
new file mode 100644
index 0000000..b21cdcf
--- /dev/null
+++ b/src/mainboard/google/poppy/variants/atlas/include/variant/acpi/ipu_mainboard.asl
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2017 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+Scope (\_SB.PCI0.CIO2)
+{
+        /* Define two ports for CIO2 device where endpoint of port0
+	is connected to CAM0 and endpoint of port1 is connected to CAM1
+	Endpoints can be customized by the variants of the based board */
+
+	Name (_DSD, Package () {
+		ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
+		Package () {
+			Package () { "port0", "PRT0" },
+		}
+	})
+
+	Name (PRT0, Package () {
+		ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+		Package () {
+			Package () { "port", 0 }, /* csi 0 */
+		},
+		ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
+		Package () {
+			Package () { "endpoint0", "EP00" },
+		}
+	})
+}

-- 
To view, visit https://review.coreboot.org/25536
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If4e8d20b4b059b072fd7c20f3b6b3cf8e9c67d63
Gerrit-Change-Number: 25536
Gerrit-PatchSet: 1
Gerrit-Owner: Rizwan Qureshi <rizwan.qureshi at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180405/aa1c5ae9/attachment-0001.html>


More information about the coreboot-gerrit mailing list