[coreboot-gerrit] Change in ...coreboot[master]: mb/intel/icelake_rvp: Add camera acpi support
Aamir Bohra (Code Review)
gerrit at coreboot.org
Wed Nov 28 12:27:12 CET 2018
Aamir Bohra has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/29883
Change subject: mb/intel/icelake_rvp: Add camera acpi support
......................................................................
mb/intel/icelake_rvp: Add camera acpi support
This implementation adds acpi camera support for below sensors:
1. SONY319A: User facing camera interfaced to SOC over i2c2
2. SONY355A: World facing camera interfaced to SOC over i2c3
Change-Id: Ic70cc944ebbbe7784550a643f115d39ecbf989e9
Signed-off-by: Aamir Bohra <aamir.bohra at intel.com>
---
M src/mainboard/intel/icelake_rvp/Kconfig
A src/mainboard/intel/icelake_rvp/acpi/cam0.asl
A src/mainboard/intel/icelake_rvp/acpi/cam1.asl
A src/mainboard/intel/icelake_rvp/acpi/camera.asl
M src/mainboard/intel/icelake_rvp/acpi/mainboard.asl
M src/mainboard/intel/icelake_rvp/dsdt.asl
6 files changed, 243 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/83/29883/1
diff --git a/src/mainboard/intel/icelake_rvp/Kconfig b/src/mainboard/intel/icelake_rvp/Kconfig
index 0741bf8..bf7f855 100644
--- a/src/mainboard/intel/icelake_rvp/Kconfig
+++ b/src/mainboard/intel/icelake_rvp/Kconfig
@@ -7,6 +7,7 @@
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
select MAINBOARD_HAS_CHROMEOS
+ select MAINBOARD_HAS_CAMERA_ACPI
select GENERIC_SPD_BIN
select DRIVERS_I2C_HID
select DRIVERS_I2C_GENERIC
@@ -35,6 +36,12 @@
string
default "Intel_icelake_rvp"
+config MAINBOARD_HAS_CAMERA_ACPI
+ bool
+ default n
+ help
+ Select this option to enable camera ACPI support.
+
config MAX_CPUS
int
default 8
diff --git a/src/mainboard/intel/icelake_rvp/acpi/cam0.asl b/src/mainboard/intel/icelake_rvp/acpi/cam0.asl
new file mode 100644
index 0000000..ba0c16e
--- /dev/null
+++ b/src/mainboard/intel/icelake_rvp/acpi/cam0.asl
@@ -0,0 +1,120 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 Intel Corp.
+ *
+ * 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, "SONY355A") /* _HID: Hardware ID */
+ Name (_UID, Zero) /* _UID: Unique ID */
+ Name (_DDN, "SONY IMX355A Camera") /* _DDN: DOS Device Name */
+
+ Method (_STA, 0, NotSerialized) /* _STA: Status */
+ {
+ Return (0x0F)
+ }
+
+ Name (_CRS, ResourceTemplate ()
+ {
+ I2cSerialBus (0x001A, ControllerInitiated, 0x00061A80,
+ AddressingMode7Bit, "\\_SB.PCI0.I2C3",
+ 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 }
+ }
+ })
+
+ 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 }
+ },
+ }
+ })
+
+ 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, "PRP0001") /* _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.I2C3",
+ 0x00, ResourceConsumer, ,
+ )
+ })
+
+ Name (_DSD, Package () {
+ ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package () {
+ Package () { "compatible", "asahi-kasei,ak7375" },
+ }
+ })
+ }
+}
\ No newline at end of file
diff --git a/src/mainboard/intel/icelake_rvp/acpi/cam1.asl b/src/mainboard/intel/icelake_rvp/acpi/cam1.asl
new file mode 100644
index 0000000..d67cec9
--- /dev/null
+++ b/src/mainboard/intel/icelake_rvp/acpi/cam1.asl
@@ -0,0 +1,94 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 Intel Corp.
+ *
+ * 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.I2C2)
+{
+ 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.I2C2",
+ 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 }
+ },
+ }
+ })
+
+ 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
+ })
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/mainboard/intel/icelake_rvp/acpi/camera.asl b/src/mainboard/intel/icelake_rvp/acpi/camera.asl
new file mode 100644
index 0000000..81d54f8
--- /dev/null
+++ b/src/mainboard/intel/icelake_rvp/acpi/camera.asl
@@ -0,0 +1,17 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 Intel Corp.
+ *
+ * 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 "cam0.asl"
+#include "cam1.asl"
diff --git a/src/mainboard/intel/icelake_rvp/acpi/mainboard.asl b/src/mainboard/intel/icelake_rvp/acpi/mainboard.asl
index 49ae2e6..80064b3 100644
--- a/src/mainboard/intel/icelake_rvp/acpi/mainboard.asl
+++ b/src/mainboard/intel/icelake_rvp/acpi/mainboard.asl
@@ -22,3 +22,7 @@
}
}
#endif
+
+#if IS_ENABLED(CONFIG_MAINBOARD_HAS_CAMERA_ACPI)
+ #include "camera.asl"
+#endif
\ No newline at end of file
diff --git a/src/mainboard/intel/icelake_rvp/dsdt.asl b/src/mainboard/intel/icelake_rvp/dsdt.asl
index c15f80c..85efe4d 100644
--- a/src/mainboard/intel/icelake_rvp/dsdt.asl
+++ b/src/mainboard/intel/icelake_rvp/dsdt.asl
@@ -40,6 +40,7 @@
{
#include <soc/intel/icelake/acpi/northbridge.asl>
#include <soc/intel/icelake/acpi/southbridge.asl>
+ #include <soc/intel/icelake/acpi/ipu.asl>
}
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/29883
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ic70cc944ebbbe7784550a643f115d39ecbf989e9
Gerrit-Change-Number: 29883
Gerrit-PatchSet: 1
Gerrit-Owner: Aamir Bohra <aamir.bohra at intel.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181128/7e8890d3/attachment-0001.html>
More information about the coreboot-gerrit
mailing list