Matt Delco has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31165
Change subject: nautilus: switch to mipi_camera driver ......................................................................
nautilus: 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: I01d382c7d87ea2f6967b03f86a91dce12b3c1f96 Signed-off-by: Matt Delco delco@chromium.org --- M src/mainboard/google/poppy/Kconfig M src/mainboard/google/poppy/variants/nautilus/devicetree.cb D src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/cam0.asl M src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/camera.asl D src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/ipu_endpoints.asl D src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/ipu_mainboard.asl 6 files changed, 48 insertions(+), 221 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/65/31165/1
diff --git a/src/mainboard/google/poppy/Kconfig b/src/mainboard/google/poppy/Kconfig index aa3f6e6..77a1b8e 100644 --- a/src/mainboard/google/poppy/Kconfig +++ b/src/mainboard/google/poppy/Kconfig @@ -178,6 +178,7 @@ select DRIVERS_GENERIC_MAX98357A select DRIVERS_I2C_DA7219 select VARIANT_HAS_CAMERA_ACPI + select DRIVERS_INTEL_MIPI_CAMERA select MAINBOARD_HAS_I2C_TPM_CR50
config VARIANT_SPECIFIC_OPTIONS_NOCTURNE diff --git a/src/mainboard/google/poppy/variants/nautilus/devicetree.cb b/src/mainboard/google/poppy/variants/nautilus/devicetree.cb index 37edd8a..20ac8bc 100644 --- a/src/mainboard/google/poppy/variants/nautilus/devicetree.cb +++ b/src/mainboard/google/poppy/variants/nautilus/devicetree.cb @@ -303,9 +303,20 @@ 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" = "1" + register "cio2_lanes_used[0]" = "4" + register "cio2_lane_endpoint[0]" = ""\_SB.PCI0.I2C2.CAM0"" + device pci 14.3 on end + end device pci 15.0 on chip drivers/i2c/hid register "generic.hid" = ""SYTS7813"" @@ -336,6 +347,42 @@ register "device_present_gpio" = "GPP_B20" device i2c 28 on end end + chip drivers/intel/mipi_camera + register "device_type" = "INTEL_ACPI_CAMERA_SENSOR" + register "acpi_hid" = ""SONY258A"" + register "chip_name" = ""SONY IMX258 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" = "0x58" + register "ssdb.rom_type" = "10" # just a guess, needs non-zero + register "ssdb.vcm_type" = "6" # dw9807, just a guess, needs non-zero + register "ssdb.degree" = "1" # 180 rotation + register "num_freq_entries" = "2" + register "link_freq[0]" = "633600000" + register "link_freq[1]" = "320000000" + device i2c 0x1a on end + end + chip drivers/intel/mipi_camera + register "device_type" = "INTEL_ACPI_CAMERA_NVM" + register "chip_name" = ""Dongwoon NVM"" + register "dep" = ""\_SB.PCI0.I2C2.PMIC"" # instead use CAM0 that depends on PMIC? + register "pr0" = ""\_SB.PCI0.I2C2.PMIC.VCMP"" + register "pr3" = ""\_SB.PCI0.I2C2.PMIC.VCMP"" + register "nvm_size" = "8192" + register "nvm_width" = "16" + device i2c 0x58 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"" # instead use CAM0 that depends on PMIC? + register "pr0" = ""\_SB.PCI0.I2C2.PMIC.VCMP"" + register "pr3" = ""\_SB.PCI0.I2C2.PMIC.VCMP"" + register "vcm_compat" = ""dongwoon,dw9807"" + device i2c 0xc on end + end end # I2C #2 device pci 15.3 on chip drivers/i2c/hid 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 deleted file mode 100644 index 92612cd..0000000 --- a/src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/cam0.asl +++ /dev/null @@ -1,150 +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, "SONY258A") /* _HID: Hardware ID */ - Name (_UID, Zero) /* _UID: Unique ID */ - Name (_DDN, "SONY IMX258 Camera") /* _DDN: DOS Device Name */ - - 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 () { "rotation", 180 }, - 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() { 633600000, 320000000 } - }, - Package () { "remote-endpoint", - Package() { _SB.PCI0.CIO2, 0, 0 } - }, - } - }) - } - - Device (VCM0) - { - Name (_HID, "PRP0001") /* _HID: Hardware ID */ - Name (_UID, Zero) /* _UID: Unique ID */ - Name (_DDN, "Dongwoon AF DAC") /* _DDN: DOS Device Name */ - - 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 }) - } - - Device (NVM0) - { - Name (_HID, "INT3499") /* _HID: Hardware ID */ - Name (_UID, Zero) /* _UID: Unique ID */ - Name (_DDN, "Dongwoon NVM") /* _DDN: DOS Device Name */ - - Method (_STA, 0, NotSerialized) /* _STA: Status */ - { - Return (0x0F) - } - - Name (_DEP, Package() { _SB.PCI0.I2C2.PMIC }) - Name (_CRS, ResourceTemplate () - { - I2cSerialBus (0x0058, ControllerInitiated, 0x00061A80, - AddressingMode7Bit, "\_SB.PCI0.I2C2", - 0x00, ResourceConsumer, ,) - }) - - Name (_PR0, Package () { ^PMIC.VCMP }) - Name (_PR3, Package () { ^PMIC.VCMP }) - - 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/nautilus/include/variant/acpi/camera.asl b/src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/camera.asl index 7993a66..ff9c428 100644 --- a/src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/camera.asl +++ b/src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/camera.asl @@ -13,7 +13,4 @@ * 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 deleted file mode 100644 index 933a831..0000000 --- a/src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/ipu_endpoints.asl +++ /dev/null @@ -1,29 +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) -{ - 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 deleted file mode 100644 index b21cdcf..0000000 --- a/src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/ipu_mainboard.asl +++ /dev/null @@ -1,39 +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" }, - } - }) - - 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" }, - } - }) -}