summaryrefslogtreecommitdiff
path: root/Board/EM/Platform/AcpiAslWrap/PlatformEC.asl
blob: 38233683735b288552fde1b0e2de67e1f1de5e4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
/**************************************************************************;
;*                                                                        *;
;*    Intel Confidential                                                  *;
;*                                                                        *;
;*    Intel Corporation - ACPI Reference Code for the Sandy Bridge        *;
;*    Family of Customer Reference Boards.                                *;
;*                                                                        *;
;*                                                                        *;
;*    Copyright (c)  1999 - 2010 Intel Corporation. All rights reserved   *;
;*    This software and associated documentation (if any) is furnished    *;
;*    under a license and may only be used or copied in accordance        *;
;*    with the terms of the license. Except as permitted by such          *;
;*    license, no part of this software or documentation may be           *;
;*    reproduced, stored in a retrieval system, or transmitted in any     *;
;*    form or by any means without the express written consent of         *;
;*    Intel Corporation.                                                  *;
;*                                                                        *;
;*                                                                        *;
;**************************************************************************/
/*++
  This file contains a 'Sample Driver' and is licensed as such  
  under the terms of your license agreement with Intel or your  
  vendor.  This file may be modified by the user, subject to    
  the additional terms of the license agreement                 
--*/

Scope(\_SB.PCI0.LPCB)
{

Device(H_EC)  // Hitachi Embedded Controller
{
  Name(_HID, EISAID("PNP0C09"))

  Name(_UID,1)

  Method(_STA)
  {
    Store(3, \_SB.PCI0.GFX0.CLID)
    Return(0x00) //Hide device
  }

  Name(B1CC, 0)
  Name(B1ST, 0)
  Name(B2CC, 0)
  Name(B2ST, 0)
  Name(CFAN, 0)
  Name(CMDR, 0)
  Name(DOCK, 0)
  Name(EJET, 0)
  Name(MCAP, 0)
  Name(PLMX, 0)
  Name(PECH, 0)
  Name(PECL, 0)
  Name(PENV, 0)
  Name(PINV, 0)
  Name(PPSH, 0)
  Name(PPSL, 0)
  Name(PSTP, 0)
  Name(RPWR, 0)
  Name(LIDS, 0)
  Name(LSTE, 0)
  Name(SLPC, 0)
  Name(VPWR, 0)
  Name(WTMS, 0)
  Name(AWT2, 0)
  Name(AWT1, 0)
  Name(AWT0, 0)
  Name(DLED, 0)
  Name(IBT1, 0)
  Name(ECAV, Zero)   // OS Bug Checks if EC OpRegion accessed before Embedded Controller Driver loaded
  Name(SPT2, 0)
  Name(PB10, 0)

  // ECRD (Embedded Read Method)
  //
  // Handle all commands sent to EC by BIOS
  //
  //  Arguments: (1)
  //    Arg0 - Object to Read
  //  Return Value:
  //    Read Value
  //    
  Method(ECRD,1,Serialized, 0, IntObj, FieldUnitObj)
  {
    Return(DeRefOf(Arg0))
  }

  // ECWT (Embedded Write Method)
  //
  // Handle all commands sent to EC by BIOS
  //
  //  Arguments: (2)
  //    Arg0 - Value to Write
  //    Arg1 - Object to Write to
  //    
  Method(ECWT,2,Serialized,,,{IntObj, FieldUnitObj})
  {
    Store(Arg0,Arg1)
  }


  Method(ECMD,1,Serialized)  // Handle all commands sent to EC by BIOS
  {
   If (\ECON)
    {
     While(\_SB.PCI0.LPCB.H_EC.CMDR){Stall(20)}
     Store(Arg0, \_SB.PCI0.LPCB.H_EC.CMDR)
    }
  }

    Device(BAT0)
    {
	Name(_HID,EISAID("PNP0C0A"))

	Name(_UID,0)

	Method(_STA,0)
	{
	    Return(0)		// Hide device 
	}
    }

  // Real battery code
  //
    Scope(\)
    {
      // these fields come from the Global NVS area
      Field(GNVS,AnyAcc,Lock,Preserve)
      {
	    Offset(30),	// Battery Support Registers:
            BNUM, 8,	//   (30) Battery Number Present
	    Offset(32),
	    B1SC, 8,	//   (32) Battery 1 Stored Capacity
	    Offset(35),
	    B1SS, 8,	//   (35) Battery 1 Stored Status
      }
    } // end  Scope(\)

    Device(BAT1)
    {
	 Name(_HID,EISAID("PNP0C0A"))

	Name(_UID,1)

	Method(_STA,0)
	{
	    Return(0)		// Hide device 
	}
    }

    Scope(\)
    {
      // these fields come from the Global NVS area
      Field(GNVS,AnyAcc,Lock,Preserve)
      {
    	    Offset(33),
	    B2SC, 8,	//   (33) Battery 2 Stored Capacity
	    Offset(36),
	    B2SS, 8	//   (36) Battery 2 Stored Status
      }
    } // end Scope(\)
    Device(BAT2)
    {
	 Name(_HID,EISAID("PNP0C0A"))

	Name(_UID,2)

	Method(_STA,0)
	{
	    Return(0)		// Hide device 
	}
    }

  }
}// end scope Scope(\_SB.PCI0.LPCB)
  // System Bus

Device (\_SB.PCI0.DOCK)
{
	Name(_HID, "ABCD0000")
	Name(_CID, EISAID("PNP0C15"))
	Name(_UID,2)
    Method(_STA)
    {
      Return(0x00)
    }

}
Scope(\_SB)
{

  // Define a Lid Switch.

  Device(LID0)
  {
    Name(_HID,EISAID("PNP0C0D"))

    Method(_STA)
    {
      Return(0x00)
    }

  }
}//end scope _SB