[coreboot-gerrit] Change in coreboot[master]: [WIP]mainboard/google/nocturne: Enable camera sensors

Lijian Zhao (Code Review) gerrit at coreboot.org
Tue May 15 08:01:12 CEST 2018


Lijian Zhao has uploaded this change for review. ( https://review.coreboot.org/26283


Change subject: [WIP]mainboard/google/nocturne: Enable camera sensors
......................................................................

[WIP]mainboard/google/nocturne: Enable camera sensors

Initial changes about camera sensors on noncturne platform.

Change-Id: I37c877df8062d5c79e25ed27775ab58e977555db
Signed-off-by: Lijian Zhao <lijian.zhao at intel.com>
---
M src/mainboard/google/poppy/Kconfig
A src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam0.asl
A src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam1.asl
A src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/camera.asl
A src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/ipu_endpoints.asl
A src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/ipu_mainboard.asl
6 files changed, 336 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/83/26283/1

diff --git a/src/mainboard/google/poppy/Kconfig b/src/mainboard/google/poppy/Kconfig
index be5e3ca..89250dd 100644
--- a/src/mainboard/google/poppy/Kconfig
+++ b/src/mainboard/google/poppy/Kconfig
@@ -190,6 +190,7 @@
 	select DRIVERS_I2C_DA7219
 	select DRIVERS_SPI_ACPI
 	select EXCLUDE_NATIVE_SD_INTERFACE
+	select VARIANT_HAS_CAMERA_ACPI
 	select VARIANT_HAS_SPI_TPM if !VBOOT_MOCK_SECDATA
 
 config VARIANT_SPECIFIC_OPTIONS_SORAKA
diff --git a/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam0.asl b/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam0.asl
new file mode 100644
index 0000000..df1dcee
--- /dev/null
+++ b/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam0.asl
@@ -0,0 +1,127 @@
+/*
+ * 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.I2C5)
+{
+
+	Device (CAM0)
+	{
+		Name (_HID, "SONY335A")  /* _HID: Hardware ID */
+		Name (_UID, Zero)  /* _UID: Unique ID */
+		Name (_DDN, "SONY IMX335 Camera") /* _DDN: DOS Device Name */
+
+		Method (_STA, 0, NotSerialized)  /* _STA: Status */
+		{
+			Return (0x0F)
+		}
+
+		Name (_CRS, ResourceTemplate ()
+		{
+			I2cSerialBus (0x001A, ControllerInitiated, 0x00061A80,
+				AddressingMode7Bit, "\\_SB.PCI0.I2C5",
+				0x00, ResourceConsumer, ,
+				)
+		})
+
+		/* Port0 of CAM0 is connected to port0 of CIO2 device */
+		Name (_DSD, Package () {
+			ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
+			Package () {
+				Package () { "port0", "PRT0" },
+			},
+			ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+			Package () {
+				Package () { "clock-frequency", 19200000 },
+				Package () { "lens-focus",
+					Package () { \_SB.PCI0.I2C5.VCM0 }
+				}
+			}
+		})
+
+		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, 3, 4 }
+				},
+				Package () { "link-frequencies",
+					Package() { 1190400000, 640000000 }
+				},
+				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
+			})
+		}
+	}
+
+	Device (VCM0)
+	{
+		Name (_HID, "AKM7375")  /* _HID: Hardware ID */
+		Name (_UID, Zero)  /* _UID: Unique ID */
+		Name (_DDN, "AKM AF DAC") /* _DDN: DOS Device Name */
+
+		Method (_STA, 0, NotSerialized)  /* _STA: Status */
+		{
+			Return (0x0F)
+		}
+
+		Name (_CRS, ResourceTemplate ()
+		{
+			I2cSerialBus (0x000C, ControllerInitiated, 0x00061A80,
+				AddressingMode7Bit, "\\_SB.PCI0.I2C5",
+				0x00, ResourceConsumer, ,
+				)
+		})
+
+		Name (_DSD, Package () {
+			ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+			Package () {
+				Package () { "compatible", "akm,ak7375" },
+			}
+		})
+	}
+}
diff --git a/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam1.asl b/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam1.asl
new file mode 100644
index 0000000..c60f66f
--- /dev/null
+++ b/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam1.asl
@@ -0,0 +1,97 @@
+/*
+ * 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 (CAM1)
+	{
+		Name (_HID, "SONY319A") /* _HID: Hardware ID */
+		Name (_UID, Zero)  /* _UID: Unique ID */
+		Name (_DDN, "Sony IMX319 Camera")  /* _DDN: DOS Device Name */
+
+		Method (_STA, 0, NotSerialized)  /* _STA: Status */
+		{
+			Return (0x0F)
+		}
+
+		Name (_CRS, ResourceTemplate ()
+		{
+			I2cSerialBus (0x0010, ControllerInitiated, 0x00061A80,
+			AddressingMode7Bit, "\\_SB.PCI0.I2C3",
+			0x00, ResourceConsumer, ,
+			)
+		})
+
+
+		/* Port0 of CAM1 is connected to port1 of CIO2 device */
+		Name (_DSD, Package () {
+			ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
+			Package () {
+				Package () { "port0", "PRT0" },
+			},
+			ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+			Package () {
+				Package () { "clock-frequency", 19200000 },
+			}
+		})
+
+		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, 3, 4 }
+				},
+				Package () { "link-frequencies",
+					Package() { 844800000 }
+				},
+				Package () { "remote-endpoint",
+					Package() { \_SB.PCI0.CIO2, 1, 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, 0x01, 0x02, 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/nocturne/include/variant/acpi/camera.asl b/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/camera.asl
new file mode 100644
index 0000000..7e63340
--- /dev/null
+++ b/src/mainboard/google/poppy/variants/nocturne/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 "cam0.asl"
+#include "cam1.asl"
diff --git a/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/ipu_endpoints.asl b/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/ipu_endpoints.asl
new file mode 100644
index 0000000..86686ee
--- /dev/null
+++ b/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/ipu_endpoints.asl
@@ -0,0 +1,41 @@
+/*
+ * 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, 3, 4 } },
+			Package () { "remote-endpoint",
+				Package() { \_SB.PCI0.I2C5.CAM0, 0, 0 }
+			},
+		}
+	})
+
+	Name (EP10, Package() {
+		ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+		Package () {
+			Package () { "endpoint", 0 },
+			Package () { "clock-lanes", 0 },
+			Package () { "data-lanes", Package () { 1, 2, 3, 4 } },
+			Package () { "remote-endpoint",
+				Package() { \_SB.PCI0.I2C3.CAM1, 0, 0 }
+			},
+		}
+	})
+}
diff --git a/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/ipu_mainboard.asl b/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/ipu_mainboard.asl
new file mode 100644
index 0000000..ec5347d
--- /dev/null
+++ b/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/ipu_mainboard.asl
@@ -0,0 +1,51 @@
+/*
+ * 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)
+{
+	/* Define two ports for CIO2 device where endpoint of port0
+	is connected to CAM0 and endpoint of port1 is connected to CAM1 */
+
+	Name (_DSD, Package () {
+		ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
+		Package () {
+			Package () { "port0", "PRT0" },
+			Package () { "port1", "PRT1" },
+		}
+	})
+
+	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" },
+		}
+	})
+
+	Name (PRT1, Package () {
+		ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+		Package () {
+			Package () { "port", 1 }, /* csi 1 */
+		},
+		ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
+		Package () {
+			Package () { "endpoint0", "EP10" },
+		}
+	})
+
+}

-- 
To view, visit https://review.coreboot.org/26283
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: I37c877df8062d5c79e25ed27775ab58e977555db
Gerrit-Change-Number: 26283
Gerrit-PatchSet: 1
Gerrit-Owner: Lijian Zhao <lijian.zhao at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180515/8ab87a0f/attachment-0001.html>


More information about the coreboot-gerrit mailing list