diff options
author | Andy Yeh <andy.yeh@intel.com> | 2017-12-14 13:14:35 +0800 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2018-01-17 16:42:43 +0000 |
commit | bc81b67c9df18d194f13a15198b16b3015074523 (patch) | |
tree | 233c46c8c1c34d5c93493a89dd83b80ebadd0b79 /src/mainboard/google/poppy/variants | |
parent | bc356ee693b0ad483535714e4161f7f78a8c455a (diff) |
mb/google/nautilus: Add MIPI camera asl files for IMX258 and DW9807
* Add IMX258 sensor entity
* Add DW9807 VCM control entity
* Enable CIO2 and IMGu in devicetree.cb
TEST: Verified the MIPI camera function on DUT board
Change-Id: Iebd41ac3631829bbb0b008761eb67c3db3e94638
Signed-off-by: Andy Yeh <andy.yeh@intel.com>
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/23056
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Diffstat (limited to 'src/mainboard/google/poppy/variants')
5 files changed, 225 insertions, 2 deletions
diff --git a/src/mainboard/google/poppy/variants/nautilus/devicetree.cb b/src/mainboard/google/poppy/variants/nautilus/devicetree.cb index d74588df60..d408688d39 100644 --- a/src/mainboard/google/poppy/variants/nautilus/devicetree.cb +++ b/src/mainboard/google/poppy/variants/nautilus/devicetree.cb @@ -38,8 +38,8 @@ chip soc/intel/skylake register "XdciEnable" = "0" register "SsicPortEnable" = "0" register "SmbusEnable" = "1" - register "Cio2Enable" = "0" - register "SaImguEnable" = "0" + register "Cio2Enable" = "1" + register "SaImguEnable" = "1" register "ScsEmmcEnabled" = "1" register "ScsEmmcHs400Enabled" = "1" register "ScsSdCardEnabled" = "2" diff --git a/src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/cam0.asl b/src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/cam0.asl new file mode 100644 index 0000000000..ee1c811fb3 --- /dev/null +++ b/src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/cam0.asl @@ -0,0 +1,136 @@ +/* + * 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.I2C2) +{ + 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, , + ) + }) + + Name (_PR0, Package () { ^^I2C2.PMIC.OVTH }) + Name (_PR3, Package () { ^^I2C2.PMIC.OVTH }) + + /* 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.I2C2.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() { 540000000, 270000000 } + }, + 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, "PRP0001") /* _HID: Hardware ID */ + Name (_UID, Zero) /* _UID: Unique ID */ + Name (_DDN, "Dongwoon AF DAC") /* _DDN: DOS Device Name */ + Name (CAMD, 0x03) + + Method (_STA, 0, NotSerialized) /* _STA: Status */ + { + Return (0x0F) + } + + Name (_DEP, Package() { \_SB.PCI0.I2C2.PMIC }) + Name (_CRS, ResourceTemplate () + { + I2cSerialBus (0x000C, ControllerInitiated, 0x00061A80, + AddressingMode7Bit, "\\_SB.PCI0.I2C2", + 0x00, ResourceConsumer, , + ) + }) + + Name (_DSD, Package () { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () { "compatible", "dongwoon,dw9807" }, + } + }) + + Name (_PR0, Package () { ^PMIC.VCMP }) + Name (_PR3, Package () { ^PMIC.VCMP }) + } +} diff --git a/src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/camera.asl b/src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/camera.asl new file mode 100644 index 0000000000..7993a66fde --- /dev/null +++ b/src/mainboard/google/poppy/variants/nautilus/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/nautilus/include/variant/acpi/ipu_endpoints.asl b/src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/ipu_endpoints.asl new file mode 100644 index 0000000000..933a831a69 --- /dev/null +++ b/src/mainboard/google/poppy/variants/nautilus/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, 3, 4 } }, + Package () { "remote-endpoint", + Package() { \_SB.PCI0.I2C2.CAM0, 0, 0 } + }, + } + }) +} diff --git a/src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/ipu_mainboard.asl b/src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/ipu_mainboard.asl new file mode 100644 index 0000000000..b21cdcfa90 --- /dev/null +++ b/src/mainboard/google/poppy/variants/nautilus/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" }, + } + }) +} |