1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2011 The ChromiumOS Authors.  All rights reserved.
4 */
5
6#ifdef CONFIG_CHROMEOS
7
8#define CONFIG_VBOOT_VBNV_OFFSET 0x26
9
10#include <asm/acpi/vbnv_layout.h>
11
12/* GPIO package generated at run time. */
13External (OIPG)
14
15Device (CRHW)
16{
17	Name(_HID, EISAID("GGL0001"))
18
19	Method(_STA, 0, Serialized)
20	{
21		Return (0xb)
22	}
23
24	Method(CHSW, 0, Serialized)
25	{
26		Name (WSHC, Package() { VBT3 })
27		Return (WSHC)
28	}
29
30	Method(FWID, 0, Serialized)
31	{
32		Name (DIW1, "")
33		ToString(VBT5, 63, DIW1)
34		Name (DIWF, Package() { DIW1 })
35		Return(DIWF)
36	}
37
38	Method(FRID, 0, Serialized)
39	{
40		Name (DIR1, "")
41		ToString(VBT6, 63, DIR1)
42		Name (DIRF, Package() { DIR1 })
43		Return (DIRF)
44	}
45
46	Method(HWID, 0, Serialized)
47	{
48		Name (DIW0, "")
49		ToString(VBT4, 255, DIW0)
50		Name (DIWH, Package() { DIW0 })
51		Return (DIWH)
52	}
53
54	Method(BINF, 0, Serialized)
55	{
56		Name (FNIB, Package() { VBT0, VBT1, VBT2, VBT7, VBT8 })
57		Return (FNIB)
58	}
59
60	Method(GPIO, 0, Serialized)
61	{
62		Return (OIPG)
63
64	}
65
66	Method(VBNV, 0, Serialized)
67	{
68		Name(VNBV, Package() {
69			// See src/vendorcode/google/chromeos/Kconfig
70			// for the definition of these:
71			CONFIG_VBOOT_VBNV_OFFSET,
72			VBOOT_VBNV_BLOCK_SIZE
73		})
74		Return(VNBV)
75	}
76
77	Method(VDAT, 0, Serialized)
78	{
79		Name(TAD0,"")
80		ToBuffer(CHVD, TAD0)
81		Name (TADV, Package() { TAD0 })
82		Return (TADV)
83	}
84
85	Method(FMAP, 0, Serialized)
86	{
87		Name(PAMF, Package() { VBT9 })
88		Return(PAMF)
89	}
90
91	Method(MECK, 0, Serialized)
92	{
93		Name(HASH, Package() { MEHH })
94		Return(HASH)
95	}
96
97	Method(MLST, 0, Serialized)
98	{
99		Name(TSLM, Package() { "CHSW", "FWID", "HWID", "FRID", "BINF",
100			   "GPIO", "VBNV", "VDAT", "FMAP", "MECK"
101		})
102		Return (TSLM)
103	}
104}
105
106#include "ramoops.asl"
107
108#endif
109