Varshit B Pandya has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42205 )
Change subject: mb/google/dedede: Add ACPI support for camera in WDee ......................................................................
Patch Set 19:
(5 comments)
https://review.coreboot.org/c/coreboot/+/42205/15//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/42205/15//COMMIT_MSG@2 PS15, Line 2: Pandya, Varshit B
I’d be great if you put your first name first, so no comma is used.
Done
https://review.coreboot.org/c/coreboot/+/42205/15//COMMIT_MSG@9 PS15, Line 9: overridedevice
overridetree
Done
https://review.coreboot.org/c/coreboot/+/42205/15//COMMIT_MSG@14 PS15, Line 14:
Tested how?
Still testing this patch, will update the details.
https://review.coreboot.org/c/coreboot/+/42205/9/src/mainboard/google/dedede... File src/mainboard/google/dedede/variants/waddledee/include/variant/acpi/cam0.asl:
https://review.coreboot.org/c/coreboot/+/42205/9/src/mainboard/google/dedede... PS9, Line 36: Sleep(5) /* 5 us */
So all of the comments in here for the Sleeps say `us` implying microseconds, but the ASL Sleep op s […]
Ack
https://review.coreboot.org/c/coreboot/+/42205/19/src/mainboard/google/deded... File src/mainboard/google/dedede/variants/waddledee/overridetree.cb:
https://review.coreboot.org/c/coreboot/+/42205/19/src/mainboard/google/deded... PS19, Line 197: register "pr0" = ""\_SB.PCI0.I2C3.CAM1.PRIC""
In general we shouldn't need to power on the sensor to access the EEPROM. […]
Attaching the SSDT CAM related entries from WDoo, I donot have the WDee board right now
Scope (_SB.PCI0.I2C3) { Device (CAM1) { PowerResource (PRIC, 0x00, 0x0000) { Name (STA, Zero) Method (_STA, 0, NotSerialized) // _STA: Status { Return (STA) /* _SB_.PCI0.I2C3.CAM1.PRIC.STA_ */ }
Method (_ON, 0, Serialized) // _ON_: Power On { If ((STA == Zero)) { ENB0 () ENB1 () Sleep (0x05) ENB2 () Sleep (0x05) DSB3 () Sleep (0x05) ENB3 () Sleep (0x05) STA = One } }
Method (_OFF, 0, Serialized) // _OFF: Power Off { If ((STA == One)) { DSB0 () DSB3 () DSB2 () DSB1 () STA = Zero } } }
Name (_ADR, Zero) // _ADR: Address Name (_HID, "OVTI8856") // _HID: Hardware ID Name (_UID, Zero) // _UID: Unique ID Name (_DDN, "Ov 8856 Camera") // _DDN: DOS Device Name Method (_STA, 0, NotSerialized) // _STA: Status { Return (0x0F) }
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { I2cSerialBusV2 (0x0010, ControllerInitiated, 0x00061A80, AddressingMode7Bit, "\_SB.PCI0.I2C3", 0x00, ResourceConsumer, , Exclusive, ) }) Name (CAMD, 0x02) Name (_PR0, Package (0x01) // _PR0: Power Resources for D0 { PRIC }) Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method { ToBuffer (Arg0, Local0) If ((Local0 == ToUUID ("822ace8f-2814-4174-a56b-5f029fe079ee"))) { Return ("UNKNOWN") }
If ((Local0 == ToUUID ("26257549-9271-4ca4-bb43-c4899d5a4881"))) { ToInteger (Arg2, Local1) If ((Local1 == One)) { Return (0x02) }
If ((Local1 == 0x02)) { Return (0x05001000) }
If ((Local1 == 0x03)) { Return (0x05000001) } }
Return (Buffer (One) { 0x00 // . }) }
Name (_DSD, Package (0x04) // _DSD: Device-Specific Data { ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */, Package (0x02) { Package (0x02) { "clock-frequency", 0x0124F800 },
Package (0x02) { "lens-focus", Package (0x01) { VCM0 } } },
ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), Package (0x01) { Package (0x02) { "port0", "PRT0" } } }) Name (PRT0, Package (0x04) { ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */, Package (0x01) { Package (0x02) { "port", Zero } },
ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), Package (0x01) { Package (0x02) { "endpoint0", "EP00" } } }) Name (EP00, Package (0x02) { ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */, Package (0x05) { Package (0x02) { "endpoint", Zero },
Package (0x02) { "clock-lanes", Zero },
Package (0x02) { "data-lanes", Package (0x04) { One, 0x02, 0x03, 0x04 } },
Package (0x02) { "link-frequencies", Package (0x02) { 0x15752A00, 0x0ABA9500 } },
Package (0x02) { "remote-endpoint", Package (0x03) { IPU0, One, Zero } } } }) Method (SSDB, 0, Serialized) { Return (Buffer (0x70) { /* 0000 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ /* 0010 */ 0x00, 0x00, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x01, 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, 0x00, 0x0C, // ........ /* 0050 */ 0x09, 0x00, 0x02, 0x01, 0x00, 0x01, 0x00, 0xF8, // ........ /* 0058 */ 0x24, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // $....... /* 0060 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ /* 0068 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // ........ }) } } }
Scope (_SB.PCI0.I2C3) { Device (VCM0) { Name (_HID, "PRP0001") // _HID: Hardware ID Name (_UID, 0x02) // _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 (CAMD, 0x03) Name (_PR0, Package (0x01) // _PR0: Power Resources for D0 { _SB.PCI0.I2C3.CAM1.PRIC }) 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" } } }) } }
Scope (_SB.PCI0.I2C3) { Device (NVM0) { Name (_HID, "PRP0001") // _HID: Hardware ID Name (_UID, One) // _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 (_PR0, Package (0x01) // _PR0: Power Resources for D0 { _SB.PCI0.I2C3.CAM1.PRIC }) 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" } } }) } }