From 95b9ef2dfc3348861ca971d3f3f7e44d451ad439 Mon Sep 17 00:00:00 2001 From: "Pandya, Varshit B" Date: Fri, 8 May 2020 12:21:32 +0530 Subject: mb/google/dedede: Add VCM and NVM entry for OV8856 sensor Add DW9768 VCM device and add its entry in the OV8856's _DSD to allow the V4L2 driver to use the VCM functionality. Also add ACPI entries for AT24 NVM device, this will enumerated as a generic NVM device and not part of the V4L2 framework. BUG=b:155285666 BRANCH=None TEST=Build and able to see DW9768 and AT24 getting listed I2C3 lanes and able to capture image using world facing camera. Change-Id: I19e4a4107c5bc9d96f718d654df50e2705b98c03 Signed-off-by: Pandya, Varshit B Reviewed-on: https://review.coreboot.org/c/coreboot/+/41173 Tested-by: build bot (Jenkins) Reviewed-by: Karthik Ramasubramanian Reviewed-by: Maulik V Vaghela Reviewed-by: Aamir Bohra Reviewed-by: Paul Menzel --- .../baseboard/include/baseboard/acpi/cam1.asl | 135 ++++++++++++++++++++- 1 file changed, 134 insertions(+), 1 deletion(-) (limited to 'src/mainboard/google') diff --git a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/acpi/cam1.asl b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/acpi/cam1.asl index 642502c6c6..ef2a2a0f2c 100644 --- a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/acpi/cam1.asl +++ b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/acpi/cam1.asl @@ -87,12 +87,21 @@ Scope (\_SB.PCI0.I2C3) }, ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), - Package (0x01) + Package (0x02) { Package (0x02) { "clock-frequency", 0x0124F800 + }, + + Package (0x02) + { + "lens-focus", + Package (0x01) + { + VCM0 + } } } }) @@ -172,4 +181,128 @@ Scope (\_SB.PCI0.I2C3) } }) } + + Device(VCM0) + { + Name (_HID, "PRP0001") /* _HID: Hardware ID */ + + Name (_UID, 0x00) /* _UID: Unique ID */ + + Name (_DDN, "DW9768 VCM") /* _DDN: DOS Device Name */ + + Method (_STA, 0, NotSerialized) /* _STA: Status */ + { + Return (0x0F) + } + + Name (_CRS, ResourceTemplate () /* _CRS: Current Resource Settings */ + { + I2cSerialBusV2 (0x000C, ControllerInitiated, 0x00061A80, + AddressingMode7Bit, "\\_SB.PCI0.I2C3", + 0x00, ResourceConsumer, , Exclusive, + ) + }) + + Name (_DEP, Package (0x01) /* _DEP: Dependencies */ + { + CAM1 + }) + + Name (_PR0, Package (0x01) /* _PR0: Power Resources for D0 */ + { + RCPR + }) + + Name (_PR3, Package (0x01) /* _PR3: Power Resources for D3hot */ + { + RCPR + }) + + Name (_DSD, Package (0x02) /* _DSD: Device-Specific Data */ + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */ + Package (0x01) + { + Package (0x02) + { + "compatible", + "dongwoon,dw9768" + } + } + }) + } + + Device (NVM0) + { + Name (_HID, "PRP0001") /* _HID: Hardware ID */ + + Name (_UID, 0x01) /* _UID: Unique ID */ + + Name (_DDN, "AT24 EEPROM") /* _DDN: DOS Device Name */ + + Method (_STA, 0, NotSerialized) /* _STA: Status*/ + { + Return (0x0F) + } + + Name (_CRS, ResourceTemplate () /* _CRS: Current Resource Settings */ + { + I2cSerialBusV2 (0x0058, ControllerInitiated, 0x00061A80, + AddressingMode7Bit, "\\_SB.PCI0.I2C3", + 0x00, ResourceConsumer, , Exclusive, + ) + }) + + Name (_DEP, Package (0x01) /* _DEP: Dependencies */ + { + CAM1 + }) + + Name (_PR0, Package (0x01) /* _PR0: Power Resources for D0 */ + { + RCPR + }) + + Name (_PR3, Package (0x01) /* _PR3: Power Resources for D3hot */ + { + RCPR + }) + + Name (_DSD, Package (0x02) /* _DSD: Device-Specific Data */ + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */ + Package (0x05) + { + Package (0x02) + { + "size", + 0x2800 + }, + + Package (0x02) + { + "pagesize", + One + }, + + Package (0x02) + { + "read-only", + One + }, + + Package (0x02) + { + "address-width", + 0x0E + }, + + Package (0x02) + { + "compatible", + "atmel,24c1024" + } + } + }) + } } -- cgit v1.2.3