Matt Delco has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31168
Change subject: poppy: switch to mipi_camera driver ......................................................................
poppy: switch to mipi_camera driver
Replaced asl files with use of devicetree configuration that utilizes the mipi_camera driver.
BUG=None BRANCH=None TEST=Verified still compiles.
Change-Id: I48ce695bab43b2ae50a8a52e4dad0ddc0171c7c2 Signed-off-by: Matt Delco delco@chromium.org --- M src/mainboard/google/poppy/Kconfig M src/mainboard/google/poppy/variants/baseboard/devicetree.cb D src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/cam0.asl D src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/cam1.asl M src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/camera.asl D src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/ipu_endpoints.asl D src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/ipu_mainboard.asl 7 files changed, 66 insertions(+), 373 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/31168/1
diff --git a/src/mainboard/google/poppy/Kconfig b/src/mainboard/google/poppy/Kconfig index d57fa38..ff6929b 100644 --- a/src/mainboard/google/poppy/Kconfig +++ b/src/mainboard/google/poppy/Kconfig @@ -161,6 +161,7 @@ select DRIVERS_I2C_MAX98927 select NO_FADT_8042 select VARIANT_HAS_CAMERA_ACPI + select VARIANT_HAS_CAMERA_ACPI select MAINBOARD_HAS_I2C_TPM_CR50
config VARIANT_SPECIFIC_OPTIONS_NAMI diff --git a/src/mainboard/google/poppy/variants/baseboard/devicetree.cb b/src/mainboard/google/poppy/variants/baseboard/devicetree.cb index ad1e628..2aee70b 100644 --- a/src/mainboard/google/poppy/variants/baseboard/devicetree.cb +++ b/src/mainboard/google/poppy/variants/baseboard/devicetree.cb @@ -282,9 +282,22 @@ device domain 0 on device pci 00.0 on end # Host Bridge device pci 02.0 on end # Integrated Graphics Device + chip drivers/intel/mipi_camera + register "device_type" = "INTEL_ACPI_CAMERA_IMGU" + device pci 05.0 on end + end device pci 14.0 on end # USB xHCI device pci 14.1 on end # USB xDCI (OTG) device pci 14.2 on end # Thermal Subsystem + chip drivers/intel/mipi_camera + register "device_type" = "INTEL_ACPI_CAMERA_CIO2" + register "cio2_num_ports" = "2" + register "cio2_lanes_used[0]" = "4" + register "cio2_lane_endpoint[0]" = ""\_SB.PCI0.I2C2.CAM0"" + register "cio2_lanes_used[1]" = "2" + register "cio2_lane_endpoint[1]" = ""\_SB.PCI0.I2C4.CAM1"" + device pci 14.3 on end + end device pci 15.0 on chip drivers/i2c/generic register "hid" = ""ELAN0001"" @@ -317,7 +330,43 @@ device i2c 50 on end end end # I2C #1 - device pci 15.2 on end # I2C #2 + device pci 15.2 on + chip drivers/intel/mipi_camera + register "device_type" = "INTEL_ACPI_CAMERA_SENSOR" + register "acpi_hid" = ""OVTID858"" + register "chip_name" = ""OV 13858 Camera"" + register "dep" = ""\_SB.PCI0.I2C2.PMIC"" + register "pr0" = ""\_SB.PCI0.I2C2.PMIC.OVTH"" + register "pr3" = ""\_SB.PCI0.I2C2.PMIC.OVTH"" + register "vcm_address" = "0x0C" + register "rom_address" = "0x50" # original doesn't specify + register "ssdb.sensor_card_sku" = "0x50" # original doesn't specify + register "ssdb.rom_type" = "11" # 24c16, original uses 8 + register "ssdb.vcm_type" = "2" # dw9714, original uses 3 + register "num_freq_entries" = "2" + register "link_freq[0]" = "540000000" + register "link_freq[1]" = "270000000" + device i2c 0x10 on end + end + chip drivers/intel/mipi_camera + register "device_type" = "INTEL_ACPI_CAMERA_NVM" + register "chip_name" = ""GT24C16S/CAT24C16"" + register "dep" = ""\_SB.PCI0.I2C2.PMIC"" # use CAM0? + register "pr0" = ""\_SB.PCI0.I2C2.PMIC.NVMP"" + register "pr3" = ""\_SB.PCI0.I2C2.PMIC.NVMP"" + register "nvm_size" = "2048" + device i2c 0x50 on end + end + chip drivers/intel/mipi_camera + register "device_type" = "INTEL_ACPI_CAMERA_VCM" + register "chip_name" = ""Dongwoon AF DAC"" + register "dep" = ""\_SB.PCI0.I2C2.PMIC"" # use CAM0? + register "pr0" = ""\_SB.PCI0.I2C2.PMIC.VCMP"" + register "pr3" = ""\_SB.PCI0.I2C2.PMIC.VCMP"" + register "vcm_compat" = ""dongwoon,dw9714"" + device i2c 0xc on end + end + end # I2C #2 device pci 15.3 on chip drivers/i2c/hid register "generic.hid" = ""WCOM50C1"" @@ -372,7 +421,21 @@ device i2c 13 on end end end # I2C #5 - device pci 19.2 on end # I2C #4 + device pci 19.2 on + chip drivers/intel/mipi_camera + register "device_type" = "INTEL_ACPI_CAMERA_SENSOR" + register "acpi_hid" = ""INT3479"" + register "chip_name" = ""OV 5670 Camera"" + register "dep" = ""\_SB.PCI0.I2C2.PMIC"" + register "pr0" = ""\_SB.PCI0.I2C2.PMIC.OVFI"" + register "pr3" = ""\_SB.PCI0.I2C2.PMIC.OVFI"" + register "ssdb.sensor_card_sku" = "0x50" + register "ssdb.link_used" = "1" + register "num_freq_entries" = "1" + register "link_freq[0]" = "422400000" + device i2c 0x36 on end + end + end # I2C #4 device pci 1c.0 on chip drivers/intel/wifi register "wake" = "GPE0_DW0_00" diff --git a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/cam0.asl b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/cam0.asl deleted file mode 100644 index 5bb8df5..0000000 --- a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/cam0.asl +++ /dev/null @@ -1,169 +0,0 @@ -/* - * 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, "OVTID858") /* _HID: Hardware ID */ - Name (_UID, Zero) /* _UID: Unique ID */ - Name (_DDN, "OV 13858 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 (0x0010, 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,dw9714" }, - } - }) - - Name (_PR0, Package () { ^PMIC.VCMP }) - Name (_PR3, Package () { ^PMIC.VCMP }) - } - - Device (NVM0) - { - Name (_HID, "INT3499") /* _HID: Hardware ID */ - Name (_UID, Zero) /* _UID: Unique ID */ - Name (_DDN, "GT24C16S/CAT24C16") /* _DDN: DOS Device Name */ - - Method (_STA, 0, NotSerialized) /* _STA: Status */ - { - Return (0x0F) - } - - Name (_DEP, Package() { _SB.PCI0.I2C2.PMIC }) - Name (_CRS, ResourceTemplate () - { - I2cSerialBus (0x0050, ControllerInitiated, 0x00061A80, - AddressingMode7Bit, "\_SB.PCI0.I2C2", - 0x00, ResourceConsumer, ,) - }) - - Name (_PR0, Package () { ^PMIC.NVMP }) - Name (_PR3, Package () { ^PMIC.NVMP }) - - Name (_DSD, Package () - { - ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), - Package () { - Package () { "size", 2048 }, - Package () { "pagesize", 1 }, - Package () { "read-only", 1 }, - } - }) - } -} diff --git a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/cam1.asl b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/cam1.asl deleted file mode 100644 index d7640b2..0000000 --- a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/cam1.asl +++ /dev/null @@ -1,101 +0,0 @@ -/* - * 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.I2C4) -{ - Device (CAM1) - { - Name (_HID, "INT3479") /* _HID: Hardware ID */ - Name (_UID, Zero) /* _UID: Unique ID */ - Name (_DDN, "OV 5670 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 (0x0036, ControllerInitiated, 0x00061A80, - AddressingMode7Bit, "\_SB.PCI0.I2C4", - 0x00, ResourceConsumer, , - ) - }) - - Name (_PR0, Package () { ^^I2C2.PMIC.OVFI }) - Name (_PR3, Package () { ^^I2C2.PMIC.OVFI }) - - /* 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 } - }, - Package () { "link-frequencies", - Package() { 422400000 } - }, - 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/baseboard/include/baseboard/acpi/camera.asl b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/camera.asl index 5e34ba4..8bde813 100644 --- a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/camera.asl +++ b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/camera.asl @@ -13,8 +13,4 @@ * GNU General Public License for more details. */
-#include "ipu_mainboard.asl" -#include "ipu_endpoints.asl" #include "camera_pmic.asl" -#include "cam0.asl" -#include "cam1.asl" diff --git a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/ipu_endpoints.asl b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/ipu_endpoints.asl deleted file mode 100644 index 9d6de60..0000000 --- a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/ipu_endpoints.asl +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 endpoints for CIO2 device where endpoint of port0 - is connected to CAM0 and endpoint of port1 is connected to CAM1. - variant of this poppy baseboard can define their own endpoints (max 2) - with custom remote-endpoint */ - - 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 } - }, - } - }) - - Name (EP10, 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.I2C4.CAM1, 0, 0 } - }, - } - }) -} diff --git a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/ipu_mainboard.asl b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/ipu_mainboard.asl deleted file mode 100644 index 6f4a87b..0000000 --- a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/ipu_mainboard.asl +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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" }, - 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" }, - } - }) -}