[coreboot-gerrit] Change in coreboot[master]: mainboard/google/poppy: Add ACPI objects for NVMEM device GT24C16S an...

V Sowmya (Code Review) gerrit at coreboot.org
Thu Jul 27 11:07:19 CEST 2017


V Sowmya has uploaded this change for review. ( https://review.coreboot.org/20495


Change subject: mainboard/google/poppy: Add ACPI objects for NVMEM device GT24C16S and CAT24C16
......................................................................

mainboardb/google/poppy: Add ACPI objects for NVMEM device GT24C16S

The GT24C16S is an industrial standard electrically erasable
programmable read only memory (EEPROM) and this patch adds ACPI
objects and power resources for NVMEM device.

BUG=b:38326541
BRANCH=none
TEST=Build and boot soraka. Dump and verify that the generated DSDT table
has the required entries. Read the NVMEM content via sysfs interface.

Change-Id: If49ed33b7e1de1eabf317b31ceed8568dfca0aae
Signed-off-by: V Sowmya <v.sowmya at intel.com>
---
M src/mainboard/google/poppy/acpi/mipi_camera.asl
1 file changed, 65 insertions(+), 2 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/95/20495/1

diff --git a/src/mainboard/google/poppy/acpi/mipi_camera.asl b/src/mainboard/google/poppy/acpi/mipi_camera.asl
index d32e7a3..b414040 100644
--- a/src/mainboard/google/poppy/acpi/mipi_camera.asl
+++ b/src/mainboard/google/poppy/acpi/mipi_camera.asl
@@ -278,8 +278,8 @@
 						}
 					}
 				} ElseIf (LEqual (Arg0, 1)) {
-					/* Increment only if VSIC < 3 */
-					If (LLess (VSIC, 3)) {
+					/* Increment only if VSIC < 4 */
+					If (LLess (VSIC, 4)) {
 						/* Turn on VSIO */
 						If (LEqual (VSIC, Zero)) {
 							VSIO = 3
@@ -480,6 +480,47 @@
 				Return (STA)
 			}
 		}
+
+		/* Power resource methods for NVM */
+		PowerResource (NVMP, 0, 0) {
+			Name (STA, 0)
+			Method (_ON, 0, Serialized) {
+				If (LEqual (AVBL, 1)) {
+					If (LEqual (STA, 0)) {
+						/* Enable VSIO regulator +
+						daisy chain */
+						DOVD(1)
+						if (LNotEqual (IOVA, 52)) {
+							/* Set VSIO value as
+							1.8006 V */
+							IOVA = 52
+						}
+						if (LNotEqual (SIOV, 52)) {
+							/* Set VSIO value as
+							1.8006 V */
+							SIOV = 52
+						}
+						Sleep(3)
+
+						STA = 1
+					}
+				}
+			}
+
+			Method (_OFF, 0, Serialized) {
+				If (LEqual (AVBL, 1)) {
+					If (LEqual (STA, 1)) {
+						DOVD(0) /* Disable regulator */
+						Sleep(1)
+						STA = 0
+					}
+				}
+			}
+
+			Method (_STA, 0, NotSerialized) {
+				Return (STA)
+			}
+		}
 	}
 
 	Device (CAM0)
@@ -612,6 +653,28 @@
 		Name (_PR0, Package () { ^PMIC.VCMP })
 		Name (_PR3, Package () { ^PMIC.VCMP })
 	}
+
+	Device (NVM0)
+	{
+		Name (_HID, "GIAN0001")  /* _HID: Hardware ID */
+		Name (_UID, Zero)  /* _UID: Unique ID */
+		Name (_DDN, "Giantec GT24C16S")  /* _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 })
+	}
 }
 
 Scope (\_SB.PCI0.I2C4)

-- 
To view, visit https://review.coreboot.org/20495
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If49ed33b7e1de1eabf317b31ceed8568dfca0aae
Gerrit-Change-Number: 20495
Gerrit-PatchSet: 1
Gerrit-Owner: V Sowmya <v.sowmya at intel.com>
Gerrit-Reviewer: Balaji Manigandan <balaji.manigandan at intel.com>
Gerrit-Reviewer: Divagar Mohandass <divagar.mohandass at intel.corp-partner.google.com>
Gerrit-Reviewer: Rajmohan Mani <rajmohan.mani at intel.com>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170727/f85c867d/attachment.html>


More information about the coreboot-gerrit mailing list