summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
authorLijian Zhao <lijian.zhao@intel.com>2018-05-14 22:53:25 -0700
committerPatrick Georgi <pgeorgi@google.com>2018-07-02 07:27:02 +0000
commitd0a5deb46a86d1979d3956a1d835fb00d7d3cb97 (patch)
tree3c5371d7025aa105f044c13ca2fe7eec796a1122 /src/mainboard/google
parente1416fd58f6266b5c7d9f976f6b386765018636d (diff)
mainboard/google/nocturne: Enable camera sensors
Sensors and CSI2 receiver configuration for Nocturne platform. IMX355 module has VCM, NVM and is on the second port of receiver. IMX319 module has NVM and is on the first port of receiver. Change-Id: I37c877df8062d5c79e25ed27775ab58e977555db Signed-off-by: Lijian Zhao <lijian.zhao@intel.com> Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com> Signed-off-by: Chiranjeevi Rapolu <chiranjeevi.rapolu@intel.com> Signed-off-by: Rajmohan Mani <rajmohan.mani@intel.com> Signed-off-by: Tomasz Figa <tfiga@chromium.org> Reviewed-on: https://review.coreboot.org/26283 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/poppy/Kconfig1
-rw-r--r--src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam0.asl107
-rw-r--r--src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam1.asl138
-rw-r--r--src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/camera.asl19
-rw-r--r--src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/ipu_endpoints.asl41
-rw-r--r--src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/ipu_mainboard.asl51
6 files changed, 357 insertions, 0 deletions
diff --git a/src/mainboard/google/poppy/Kconfig b/src/mainboard/google/poppy/Kconfig
index c9a181227f..b94c73032d 100644
--- a/src/mainboard/google/poppy/Kconfig
+++ b/src/mainboard/google/poppy/Kconfig
@@ -178,6 +178,7 @@ config VARIANT_SPECIFIC_OPTIONS_NOCTURNE
select DRIVERS_SPI_ACPI
select EXCLUDE_NATIVE_SD_INTERFACE
select MAINBOARD_HAS_SPI_TPM_CR50
+ select VARIANT_HAS_CAMERA_ACPI
config VARIANT_SPECIFIC_OPTIONS_SORAKA
def_bool n
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 0000000000..1d72a863d4
--- /dev/null
+++ b/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam0.asl
@@ -0,0 +1,107 @@
+/*
+ * 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, "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 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() { 360000000 }
+ },
+ Package () { "remote-endpoint",
+ Package() { \_SB.PCI0.CIO2, 0, 0 }
+ },
+ }
+ })
+ }
+
+ Device (NVM0)
+ {
+ Name (_HID, "INT3499") /* _HID: Hardware ID */
+ Name (_UID, Zero) /* _UID: Unique ID */
+ Name (_DDN, "M24C64S") /* _DDN: DOS Device Name */
+
+ Method (_STA, 0, NotSerialized) /* _STA: Status */
+ {
+ Return (0x0F)
+ }
+
+ Name (_CRS, ResourceTemplate ()
+ {
+ I2cSerialBus (0x0050, ControllerInitiated, 0x00061A80,
+ AddressingMode7Bit, "\\_SB.PCI0.I2C3",
+ 0x00, ResourceConsumer, ,)
+ })
+
+ Name (_DSD, Package ()
+ {
+ ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package () {
+ Package () { "size", 8192 },
+ Package () { "pagesize", 1 },
+ Package () { "read-only", 1 },
+ Package () { "address-width", 16 },
+ }
+ })
+ }
+}
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 0000000000..bba761066d
--- /dev/null
+++ b/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam1.asl
@@ -0,0 +1,138 @@
+/*
+ * 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 (CAM1)
+ {
+ 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.I2C5",
+ 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 },
+ Package () { "lens-focus",
+ Package () { \_SB.PCI0.I2C5.VCM1 }
+ }
+ }
+ })
+
+ 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() { 360000000 }
+ },
+ Package () { "remote-endpoint",
+ Package() { \_SB.PCI0.CIO2, 1, 0 }
+ },
+ }
+ })
+ }
+
+ Device (VCM1)
+ {
+ 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.I2C5",
+ 0x00, ResourceConsumer, ,
+ )
+ })
+
+ Name (_DSD, Package () {
+ ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package () {
+ Package () { "compatible", "asahi-kasei,ak7375" },
+ }
+ })
+ }
+
+ Device (NVM1)
+ {
+ Name (_HID, "INT3499") /* _HID: Hardware ID */
+ Name (_UID, Zero) /* _UID: Unique ID */
+ Name (_DDN, "M24C64S") /* _DDN: DOS Device Name */
+
+ Method (_STA, 0, NotSerialized) /* _STA: Status */
+ {
+ Return (0x0F)
+ }
+
+ Name (_CRS, ResourceTemplate ()
+ {
+ I2cSerialBus (0x0051, ControllerInitiated, 0x00061A80,
+ AddressingMode7Bit, "\\_SB.PCI0.I2C5",
+ 0x00, ResourceConsumer, ,)
+ })
+
+ Name (_DSD, Package ()
+ {
+ ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package () {
+ Package () { "size", 8192 },
+ Package () { "pagesize", 1 },
+ Package () { "read-only", 1 },
+ Package () { "address-width", 16 },
+ }
+ })
+ }
+}
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 0000000000..7e63340bb6
--- /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 0000000000..7f6a4efa9c
--- /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.I2C3.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.I2C5.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 0000000000..ec5347d320
--- /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" },
+ }
+ })
+
+}