Device(EC)

Device(EC)
        {
                Name(_HID,EISAID("PNP0C09"))
                Name(_GPE,0x01)
                Name(ECOK, 0x00)

                Method(_REG, 2)
                {

                   if (LEqual(Arg0, 0x03))
                      { 
                        Store(Arg1, ECOK)
                      }

                     \REAB() 
                     Store(1,\FWA3)
                }

                Name(_CRS,ResourceTemplate()                   // Current Resource Settings
                {
                        IO(Decode16,0x62,0x62,0x1,0x1)         // Fixed IO
                        IO(Decode16,0x66,0x66,0x1,0x1)         // Fixed IO
                })

                OperationRegion(ERAM,EmbeddedControl,0x0,0xFF)
                  Field(ERAM,ByteAcc,NoLock,Preserve)
                  {
                          Offset(0x04),
                          CMCM,8,
                          CMD1,8,
                          CMD2,8,
                          CMD3,8,
                          Offset(SMBOffset),
                          SMPR, 8,                      // SMBus protocol register
                          SMST, 8,                      // SMBus status register
                          SMAD, 8,                      // SMBus address register
                          SMCM, 8,                      // SMBus command register
                          SMD0, 0x108,                  // SMBus data registers (32)
                                                        // + SMBus block count
                          SMAA, 8,                      // SMBus Alarm Address
                          Offset(0x4E),         
                          ,5,
                          P55,1,
                          Offset(0x78),
                          P60,1,
                           ,1,
                          P62,1,
                           ,1,
                          P64,1,
                           ,1,
                          P66,1,
                          P67,1,
                          // BatteryMark issue
                          Offset(0x81),
                          SP81,8,
                          Offset(0x83),
                          SP83,8,
                          // BatteryMark issue
                          Offset(0x89),
                          SP89,8,
                          Offset(0x8B),
                          SP8B,8,
                          Offset(0x90),                 // Thermal monitor 0 [AC080200]
                          T1SP,8,                       // Spec -0x90
                          T1AD,8,                       // Slave address -0x91
                          T1CM,8,                       // Command -0x92
                          T1VL,8,                       // Value -0x93
                          T1LW,8,                       // Low -0x94
                          T1HG,8,                       // High -0x95
                          TSK1,8,                       // -0x96
                          T1CR,8,                       // Critical -0x97
                          Offset(0x98),                 // Thermal monitor 1
                          T2SP,8,                       // Spec  -0x98
                          T2AD,8,                       // Slave address -0x99
                          T2CM,8,                       // Command -0x9a
                          T2VL,8,                       // Value -0x9b
                          T2LW,8,                       // Low -0x9c
                          T2HG,8                        // High -0x9d
                  }

                  Field(ERAM,ByteAcc,NoLock,Preserve)
                  {
                          Offset(P5xOffset),
                          P54S, 8,                      // P54 SPEC protocol register
                          P55S, 8,                      // P55 SPEC protocol register
                          P54T, 8,                      // P54 Task protocol register
                          P55T, 8,                      // P55 Task protocol register
                          temp1 ,16,
                          temp2  , 5,


                Offset(P60_67IOPortOffset),
                P60S, 8,                        // P60 SPEC protocol register
                P61S, 8,                        // P61 SPEC protocol register
                P62S, 8,                        // P62 SPEC protocol register
                P63S, 8,                        // P63 SPEC protocol register
                P64S, 8,                        // P64 SPEC protocol register
                P65S, 8,                        // P65 SPEC protocol register
                P66S, 8,                        // P66 SPEC protocol register
                P67S, 8,                        // P67 SPEC protocol register

                P60T, 8,                        // P60 Task protocol register
                P61T, 8,                        // P61 Task protocol register
                P62T, 8,                        // P62 Task protocol register
                P63T, 8,                        // P63 Task protocol register
                P64T, 8,                        // P64 Task protocol register
                P65T, 8,                        // P65 Task protocol register
                P66T, 8,                        // P66 Task protocol register
                P67T, 8,                        // P67 Task protocol register
                  }


        Field(ERAM, ByteAcc, NoLock, Preserve)
        {
                Offset(SMB_Data),
                SMW0, 16,                       // SMBus data word field
        }
        Field(ERAM, ByteAcc, NoLock, Preserve)
        {
                Offset(SMB_Data),
                SMB0, 8,                        // SMBus data byte field
        }