Add –TD4362 panel forSmartisan R1

This commit is contained in:
silime 2021-09-02 21:56:45 +08:00
parent ef67273a70
commit 29504fca7a
9 changed files with 63910 additions and 0 deletions

BIN
smartisan/DSDT.aml Normal file

Binary file not shown.

60536
smartisan/DSDT.dsl Normal file

File diff suppressed because it is too large Load Diff

707
smartisan/adc.asl Normal file
View File

@ -0,0 +1,707 @@
/*============================================================================
FILE: adc.asl
OVERVIEW: This file contains the board-specific configuration info for
ADC1 - qcadc analog-to-digital converter (ADC): ACPI device
definitions, common settings, etc.
DEPENDENCIES: None
============================================================================*/
/*----------------------------------------------------------------------------
* QCADC
* -------------------------------------------------------------------------*/
Device(ADC1)
{
/*----------------------------------------------------------------------------
* Dependencies
* -------------------------------------------------------------------------*/
Name(_DEP, Package(0x2)
{
\_SB_.SPMI,
\_SB_.PMIC
})
/*----------------------------------------------------------------------------
* HID
* -------------------------------------------------------------------------*/
Name(_HID, "QCOM0221")
Alias(\_SB.PSUB, _SUB)
Name(_UID, 0)
/*----------------------------------------------------------------------------
* ADC Resources
* -------------------------------------------------------------------------*/
Method(_CRS)
{
/*
* Interrupts
*/
Name (INTB, ResourceTemplate()
{
// VAdc - EOC
// ID = {slave id}{perph id}{int} = {0}{0011 0001}{000} = 0x188
GpioInt(Edge, ActiveHigh, ExclusiveAndWake, PullUp, 0, "\\_SB.PM01", , , , RawDataBuffer(){0x2}) {32} // 0x188 - PM_INT__VADC_HC1_USR__EOC
// VAdc TM - All interrupts
// ID = {slave id}{perph id}{int} = {0}{0011 0100}{000} = 0x1A0
GpioInt(Edge, ActiveHigh, ExclusiveAndWake, PullUp, 0, "\\_SB.PM01", , , , RawDataBuffer(){0x2}) {40} // 0x1A0 - PM_INT__VADC_HC7_BTM__THR
// FgAdc - All interrupts
// ID = {slave id}{perph id}{int} = {10}{0100 0101}{000} = 0x1228
GpioInt(Edge, ActiveHigh, ExclusiveAndWake, PullUp, 0, "\\_SB.PM01", , , , RawDataBuffer(){0x2}) {360} // 0x1228 - PM_INT__FG_ADC__BT_ID
})
/*
* SPMI peripherals
*/
Name(NAM, Buffer() {"\\_SB.SPMI"})
// VAdc
Name(VUSR, Buffer()
{
0x8E, // SPB Descriptor
0x13, 0x00, // Length including NAM above
0x01, // +0x00 SPB Descriptor Revision
0x00, // +0x01 Resource Source Index
0xC1, // +0x02 Bus type - vendor defined values are in the range 0xc0-0xff
0x02, // +0x03 Consumer + controller initiated
0x00, 0x31, // +0x04 Type specific flags . Slave id, Upper8 bit address
0x01, // +0x06 Type specific revision
0x00, 0x00 // +0x07 type specific data length
// +0x09 - 0xd bytes for NULL-terminated NAM
// Length = 0x13
})
// VAdc TM
Name(VBTM, Buffer()
{
0x8E, // SPB Descriptor
0x13, 0x00, // Length including NAM above
0x01, // +0x00 SPB Descriptor Revision
0x00, // +0x01 Resource Source Index
0xC1, // +0x02 Bus type - vendor defined values are in the range 0xc0-0xff
0x02, // +0x03 Consumer + controller initiated
0x00, 0x34, // +0x04 Type specific flags . Slave id, Upper8 bit address
0x01, // +0x06 Type specific revision
0x00, 0x00 // +0x07 type specific data length
// +0x09 - 0xd bytes for NULL-terminated NAM
// Length = 0x13
})
// FgAdc
Name(FGRR, Buffer()
{
0x8E, // SPB Descriptor
0x13, 0x00, // Length including NAM above
0x01, // +0x00 SPB Descriptor Revision
0x00, // +0x01 Resource Source Index
0xC1, // +0x02 Bus type - vendor defined values are in the range 0xc0-0xff
0x02, // +0x03 Consumer + controller initiated
0x02, 0x45, // +0x04 Type specific flags . Slave id, Upper8 bit address
0x01, // +0x06 Type specific revision
0x00, 0x00 // +0x07 type specific data length
// +0x09 - 0xd bytes for NULL-terminated NAM
// Length = 0x13
})
// Name(END, Buffer() {0x79, 0x00})
// {VUSR, NAM, VBTM, NAM, FGRR, NAM, INTB}
// {Local1, Local2, Local3, INTB}
// {Local4, Local5}
// {Local0}
Concatenate(VUSR, NAM, Local1)
Concatenate(VBTM, NAM, Local2)
Concatenate(FGRR, NAM, Local3)
Concatenate(Local1, Local2, Local4)
Concatenate(Local3, INTB, Local5)
Concatenate(Local4, Local5, Local0)
Return(Local0)
}
/*----------------------------------------------------------------------------
* Device configuration
* -------------------------------------------------------------------------*/
/*
* General ADC properties
*
* bHasVAdc:
* Whether or not TM is supported.
* 0 - Not supported
* 1 - Supported
*
* bHasTM:
* Whether or not TM is supported.
* 0 - Not supported
* 1 - Supported
*
* bHasFgAdc:
* Whether or not FGADC is supported.
* 0 - Not supported
* 1 - Supported
*
*/
Method (ADDV)
{
Return (Package()
{
/* .bHasVAdc = */ 1,
/* .bHasTM = */ 1,
/* .bHasFgAdc = */ 1,
})
}
/*----------------------------------------------------------------------------
* Voltage ADC (VADC) Configuration
* -------------------------------------------------------------------------*/
/*
* General VADC properties
*
* bUsesInterrupts:
* End-of-conversion interrupt mode.
* 0 - Polling mode
* 1 - Interrupt mode
*
* uFullScale_code:
* Full-scale ADC code.
*
* uFullScale_uV:
* Full-scale ADC voltage in uV.
*
* uReadTimeout_us:
* Timeout for reading ADC channels in us.
*
* uLDOSettlingTime_us:
* LDO settling time in us.
*
* ucMasterID:
* Master ID to send the interrupt to.
*
* ucPmicDevice:
* PMIC which has the VAdc.
*
* usMinDigRev:
* Minimum digital version <major> <minor>
*
* usMinAnaRev:
* Minimum analog version <major> <minor>
*
* ucPerphType:
* ADC peripheral type.
*
*/
Method (GENP)
{
Return (Package()
{
/* .bUsesInterrupts = */ 0,
/* .uFullScale_code = */ 0x4000,
/* .uFullScale_uV = */ 1875000,
/* .uReadTimeout_us = */ 500000,
/* .uLDOSettlingTime_us = */ 17,
/* .ucMasterID = */ 0,
/* .ucPmicDevice = */ 0,
/* .usMinDigRev = */ 0x300,
/* .usMinAnaRev = */ 0x100,
/* .ucPerphType = */ 0x8,
})
}
/*===========================================================================
FUNCTION PTCF
DESCRIPTION Scales the ADC result from millivolts to 0.001 degrees
Celsius using the PMIC thermistor conversion equation.
DEPENDENCIES None
PARAMETERS Arg0 [in] ADC result data (uMicroVolts)
RETURN VALUE Scaled result in mDegC
SIDE EFFECTS None
===========================================================================*/
Method (PTCF, 1)
{
/*
* Divide by two to convert from microvolt reading to micro-Kelvin.
*
* Subtract 273160 to convert the temperature from Kelvin to
* 0.001 degrees Celsius.
*/
ShiftRight (Arg0, 1, Local0)
Subtract (Local0, 273160, Local0)
Return (Local0)
}
/*===========================================================================
FUNCTION PTCI
DESCRIPTION Inverse of PTCF - scaled PMIC temperature to microvolts.
DEPENDENCIES None
PARAMETERS Arg0 [in] temperature in mDegC
RETURN VALUE ADC result data (uMicroVolts)
SIDE EFFECTS None
===========================================================================*/
Method (PTCI, 1)
{
Add (Arg0, 273160, Local0)
ShiftLeft (Local0, 1, Local0)
Return (Local0)
}
/*
* VADC channel to GPIO mapping
*
*/
Method (VGIO)
{
Return (Package()
{
Package()
{
/* .GPIO = */ 8,
/* .aucChannels = */ Buffer(){0x12, 0x32, 0x52, 0x72},
},
Package()
{
/* .GPIO = */ 9,
/* .aucChannels = */ Buffer(){0x13, 0x33, 0x53, 0x73},
},
Package()
{
/* .GPIO = */ 10,
/* .aucChannels = */ Buffer(){0x14, 0x34, 0x54, 0x74},
},
Package()
{
/* .GPIO = */ 11,
/* .aucChannels = */ Buffer(){0x15, 0x35, 0x55, 0x75},
},
Package()
{
/* .GPIO = */ 12,
/* .aucChannels = */ Buffer(){0x16, 0x36, 0x56, 0x76},
},
Package()
{
/* .GPIO = */ 21,
/* .aucChannels = */ Buffer(){0x17, 0x37, 0x57, 0x77, 0x97},
},
Package()
{
/* .GPIO = */ 22,
/* .aucChannels = */ Buffer(){0x18, 0x38, 0x58, 0x78, 0x98},
},
Package()
{
/* .GPIO = */ 23,
/* .aucChannels = */ Buffer(){0x19, 0x39, 0x59, 0x79, 0x99},
},
})
}
/*----------------------------------------------------------------------------
* Voltage ADC Threshold Monitor (VADCTM) Configuration
* -------------------------------------------------------------------------*/
/*
* General VADCTM properties
*
* eAverageMode:
* Obtains N ADC readings and averages them together.
* 0 - VADCTM_AVERAGE_1_SAMPLE
* 1 - VADCTM_AVERAGE_2_SAMPLES
* 2 - VADCTM_AVERAGE_4_SAMPLES
* 3 - VADCTM_AVERAGE_8_SAMPLES
* 4 - VADCTM_AVERAGE_16_SAMPLES
*
* eDecimationRatio:
* The decimation ratio.
* 0 - VADCTM_DECIMATION_RATIO_256
* 1 - VADCTM_DECIMATION_RATIO_512
* 2 - VADCTM_DECIMATION_RATIO_1024
*
* uFullScale_code:
* Full-scale ADC code.
*
* uFullScale_uV:
* Full-scale ADC voltage in uV.
*
* ucMasterID:
* Master ID to send the interrupt to.
*
* ucPmicDevice:
* PMIC which has the VAdc.
*
* usMinDigRev:
* Minimum digital version <major> <minor>
*
* usMinAnaRev:
* Minimum analog version <major> <minor>
*
* ucPerphType:
* ADC peripheral type.
*
*/
Method (VTGN)
{
Return (Package()
{
/* .eAverageMode = */ 2,
/* .eDecimationRatio = */ 2,
/* .uFullScale_code = */ 0x4000,
/* .uFullScale_uV = */ 1875000,
/* .ucMasterID = */ 0,
/* .ucPmicDevice = */ 0,
/* .usMinDigRev = */ 0x300,
/* .usMinAnaRev = */ 0x100,
/* .ucPerphType = */ 0x8,
})
}
/*----------------------------------------------------------------------------
* Fuel Gauge ADC (FGADC) Configuration
* -------------------------------------------------------------------------*/
/*
* General FGADC properties
*
* skinTempThreshRange:
* Range for skin temperature thresholds
*
* chgTempThreshRange:
* Range for charger temperature thresholds
*
* uFullScale_code:
* Full scale ADC value in code.
*
* uFullScale_uV:
* Full scale ADC value in microvolts.
*
* uMicroVoltsPerMilliAmps:
* Microvolts per milliamp scaling factor.
*
* uCodePerKelvin:
* Code per Kelvin scaling factor.
*
* uBattIdClipThresh:
* Max code for a BATT ID channel.
*
* uMaxWaitTimeus:
* Maximum time to wait for a reading to complete in microseconds.
*
* uSlaveId:
* PMIC slave ID.
*
* ucPmicDevice:
* PMIC which has the VAdc.
*
* ucPerphType:
* ADC peripheral type.
*
*/
Method (GENF)
{
Return (Package()
{
/* .skinTempThreshRange.nMin = */ 0xFFFFFFE2, // -30
/* .skinTempThreshRange.nMax = */ 97,
/* .chgTempThreshRange.nMin = */ 0xFFFFFFCE, // -50
/* .chgTempThreshRange.nMax = */ 160,
/* .uFullScale_code = */ 0x3ff,
/* .uFullScale_uV = */ 2500000,
/* .uMicroVoltsPerMilliAmps = */ 500,
/* .uCodePerKelvin = */ 4,
/* .uBattIdClipThresh = */ 820,
/* .uMaxWaitTimeUs = */ 5000000,
/* .uSlaveId = */ 2,
/* .ucPmicDevice = */ 1,
/* .ucPerphType = */ 0xD,
})
}
/*
* FGADC Channel Configuration Table
*
* The following table is the list of channels the FGADC can read. Below is
* a description of each field:
*
* sName:
* Appropriate string name for the channel from AdcInputs.h.
*
* eChannel:
* Which channel.
* 0 - FGADC_CHAN_SKIN_TEMP
* 1 - FGADC_CHAN_BATT_ID
* 2 - FGADC_CHAN_BATT_ID_FRESH
* 3 - FGADC_CHAN_BATT_ID_5
* 4 - FGADC_CHAN_BATT_ID_15
* 5 - FGADC_CHAN_BATT_ID_150
* 6 - FGADC_CHAN_BATT_THERM
* 7 - FGADC_CHAN_AUX_THERM
* 8 - FGADC_CHAN_USB_IN_V
* 9 - FGADC_CHAN_USB_IN_I
* 10 - FGADC_CHAN_DC_IN_V
* 11 - FGADC_CHAN_DC_IN_I
* 12 - FGADC_CHAN_DIE_TEMP
* 13 - FGADC_CHAN_CHARGER_TEMP
* 14 - FGADC_CHAN_GPIO
*
* eEnable:
* Whether or not to enable the channel.
* 0 - FGADC_DISABLE
* 1 - FGADC_ENABLE
*
* ucTriggers:
* Mask of triggers. Use 0x0 for default trigger configuration.
*
* scalingFactor.num:
* Numerator of the channel scaling
*
* scalingFactor.den:
* Denominator of the channel scaling
*
* eScaling:
* The scaling method to use.
* 0 - FGADC_SCALE_TO_MILLIVOLTS
* 1 - FGADC_SCALE_BATT_ID_TO_OHMS
* 2 - FGADC_SCALE_INTERPOLATE_FROM_MILLIVOLTS (requires uInterpolationTableName)
* 3 - FGADC_SCALE_THERMISTOR
* 4 - FGADC_SCALE_CURRENT_TO_MILLIAMPS
*
* uInterpolationTableName:
* The name of the lookup table in ACPI that will be interpolated to obtain
* a physical value. Note that the physical value (which has default units
* of millivolts unless custom scaling function is used) is passed as the
* input. This value corresponds to the first column of the table. The
* scaled output appears in the physical adc result.
* 0 - No interpolation table
* WXYZ - Where 'WXYZ' is the interpolation table name
*
*/
Method (FCHN)
{
Return (Package()
{
/* BATT_ID_OHMS (BATT_ID pin) */
Package()
{
/* .sName = */ "BATT_ID_OHMS",
/* .eChannel = */ 1,
/* .eEnable = */ 1,
/* .ucTriggers = */ 0x0,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScaling = */ 1,
/* .uInterpolationTableName = */ 0,
},
/* BATT_ID_OHMS_FRESH (BATT_ID pin) */
Package()
{
/* .sName = */ "BATT_ID_OHMS_FRESH",
/* .eChannel = */ 2,
/* .eEnable = */ 1,
/* .ucTriggers = */ 0x0,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScaling = */ 1,
/* .uInterpolationTableName = */ 0,
},
/* BATT_THERM (BATT_THERM pin) */
Package()
{
/* .sName = */ "BATT_THERM",
/* .eChannel = */ 6,
/* .eEnable = */ 1,
/* .ucTriggers = */ 0x0,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScaling = */ 3,
/* .uInterpolationTableName = */ 0,
},
/* AUX_THERM (AUX_THERM pin) */
Package()
{
/* .sName = */ "AUX_THERM",
/* .eChannel = */ 7,
/* .eEnable = */ 1,
/* .ucTriggers = */ 0x0,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScaling = */ 3,
/* .uInterpolationTableName = */ 0,
},
/* SKIN_THERM (AUX_THERM pin) */
Package()
{
/* .sName = */ "SKIN_THERM",
/* .eChannel = */ 0,
/* .eEnable = */ 1,
/* .ucTriggers = */ 0x0,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScaling = */ 3,
/* .uInterpolationTableName = */ 0,
},
/* PMIC_TEMP2 (internal sensor) */
Package()
{
/* .sName = */ "PMIC_TEMP2",
/* .eChannel = */ 12,
/* .eEnable = */ 1,
/* .ucTriggers = */ 0x0,
/* .scalingFactor.num = */ 3,
/* .scalingFactor.den = */ 2,
/* .eScaling = */ 2,
/* .uInterpolationTableName = */ FGDT,
},
/* CHG_TEMP (internal sensor) */
Package()
{
/* .sName = */ "CHG_TEMP",
/* .eChannel = */ 13,
/* .eEnable = */ 1,
/* .ucTriggers = */ 0x0,
/* .scalingFactor.num = */ 3,
/* .scalingFactor.den = */ 2,
/* .eScaling = */ 2,
/* .uInterpolationTableName = */ FGCT,
},
/* USB_IN (USB_IN pin) */
Package()
{
/* .sName = */ "USB_IN",
/* .eChannel = */ 8,
/* .eEnable = */ 1,
/* .ucTriggers = */ 0x0,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 8,
/* .eScaling = */ 0,
/* .uInterpolationTableName = */ 0,
},
/* USB_IN_I (USB_IN pin) */
Package()
{
/* .sName = */ "USB_IN_I",
/* .eChannel = */ 9,
/* .eEnable = */ 1,
/* .ucTriggers = */ 0x0,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScaling = */ 4,
/* .uInterpolationTableName = */ 0,
},
/* DC_IN (DC_IN pin) */
Package()
{
/* .sName = */ "DC_IN",
/* .eChannel = */ 10,
/* .eEnable = */ 1,
/* .ucTriggers = */ 0x0,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 8,
/* .eScaling = */ 0,
/* .uInterpolationTableName = */ 0,
},
/* DC_IN_I (DC_IN pin) */
Package()
{
/* .sName = */ "DC_IN_I",
/* .eChannel = */ 11,
/* .eEnable = */ 1,
/* .ucTriggers = */ 0x0,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScaling = */ 4,
/* .uInterpolationTableName = */ 0,
},
/* FG_GPIO */
Package()
{
/* .sName = */ "FG_GPIO",
/* .eChannel = */ 14,
/* .eEnable = */ 0,
/* .ucTriggers = */ 0x0,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 2,
/* .eScaling = */ 0,
/* .uInterpolationTableName = */ 0,
},
})
}
/*
* Die temperature sensor scaling table
*
* The first column in the table is sensor voltage in millivolts and the
* second column is the temperature in milli degrees C.
*
* Scaling equation:
*
* milliDegC = (uV - 600000) / 2 + 25000
*
*/
Method (FGDT)
{
Return (Package()
{
Package(){ 450, 0xFFFF3CB0}, // -50000
Package(){ 870, 160000}
})
}
/*
* NOTE: CHG_TEMP on PMI8998 uses fab-dependent scaling in the driver.
* This is the default scaling if no fab-dependent scaling is found.
* It corresponds to GF.
*/
/*
* Charger temperature sensor scaling table
*
* The first column in the table is sensor voltage in millivolts and the
* second column is the temperature in milli degrees C.
*
* Scaling equation:
*
* milliDegC = (1303168 - uV) / 3.784 + 25000
*
*/
Method (FGCT)
{
Return (Package()
{
Package(){ 1587, 0xFFFF3CB0}, // -50000
Package(){ 792, 160000}
})
}
}
Include("cust_adc.asl")

898
smartisan/cust_adc.asl Normal file
View File

@ -0,0 +1,898 @@
/*============================================================================
FILE: cust_adc.asl
OVERVIEW: This file contains the board-specific configuration info for
ADC1 - qcadc analog-to-digital converter (ADC): channel
configurations, scaling functions, look-up tables, etc.
DEPENDENCIES: None
============================================================================*/
/*----------------------------------------------------------------------------
* QCADC
* -------------------------------------------------------------------------*/
Scope(\_SB.ADC1)
{
/*----------------------------------------------------------------------------
* Voltage ADC (VADC) Configuration
* -------------------------------------------------------------------------*/
/*
* VADC Channel Configuration Table
*
* The following table is the list of channels the ADC can read. Channels may
* be added or removed. Below is a description of each field:
*
* sName:
* Appropriate string name for the channel from AdcInputs.h.
*
* uAdcHardwareChannel:
* AMUX channel.
*
* eSettlingDelay:
* Holdoff time to allow the voltage to settle before reading the channel.
* 0 - VADC_SETTLING_DELAY_0_US
* 1 - VADC_SETTLING_DELAY_100_US
* 2 - VADC_SETTLING_DELAY_200_US
* 3 - VADC_SETTLING_DELAY_300_US
* 4 - VADC_SETTLING_DELAY_400_US
* 5 - VADC_SETTLING_DELAY_500_US
* 6 - VADC_SETTLING_DELAY_600_US
* 7 - VADC_SETTLING_DELAY_700_US
* 8 - VADC_SETTLING_DELAY_800_US
* 9 - VADC_SETTLING_DELAY_900_US
* 10 - VADC_SETTLING_DELAY_1_MS
* 11 - VADC_SETTLING_DELAY_2_MS
* 12 - VADC_SETTLING_DELAY_4_MS
* 13 - VADC_SETTLING_DELAY_6_MS
* 14 - VADC_SETTLING_DELAY_8_MS
* 15 - VADC_SETTLING_DELAY_10_MS
*
* eAverageMode:
* Obtains N ADC readings and averages them together.
* 0 - VADC_AVERAGE_1_SAMPLE
* 1 - VADC_AVERAGE_2_SAMPLES
* 2 - VADC_AVERAGE_4_SAMPLES
* 3 - VADC_AVERAGE_8_SAMPLES
* 4 - VADC_AVERAGE_16_SAMPLES
*
* eDecimationRatio:
* The decimation ratio.
* 0 - VADC_DECIMATION_RATIO_256
* 1 - VADC_DECIMATION_RATIO_512
* 2 - VADC_DECIMATION_RATIO_1024
*
* eCalMethod:
* Calibration method.
* 0 - VADC_CAL_METHOD_NO_CAL
* 1 - VADC_CAL_METHOD_RATIOMETRIC
* 2 - VADC_CAL_METHOD_ABSOLUTE
*
* scalingFactor.num:
* Numerator of the channel scaling
*
* scalingFactor.den:
* Denominator of the channel scaling
*
* eScalingMethod:
* The scaling method to use.
* 0 - VADC_SCALE_TO_MILLIVOLTS
* 1 - VADC_SCALE_INTERPOLATE_FROM_MILLIVOLTS (requires uInterpolationTableName)
* 2 - VADC_SCALE_THERMISTOR (requires uPullUp and uInterpolationTableName)
*
* uPullUp:
* The pull up resistor value. Use with eScalingMethod == VADC_SCALE_THERMISTOR,
* otherwise, 0.
*
* uInterpolationTableName:
* The name of the lookup table in ACPI that will be interpolated to obtain
* a physical value. Note that the physical value (which has default units
* of millivolts unless custom scaling function is used) is passed as the
* input. This value corresponds to the first column of the table. The
* scaled output appears in the physical adc result.
* 0 - No interpolation table
* WXYZ - Where 'WXYZ' is the interpolation table name
*
* uScalingFunctionName:
* The name of the function to call in the ACPI table to perform custom
* scaling. The input to the custom scaling function is defined by
* eScalingFunctionInput. The output of the custom scaling function is
* the physical value.
* 0 - No scaling function
* WXYZ - Where 'WXYZ' is the scaling function name
*
* Note: if both a custon scaling function & interpolation table are used
* the custom scaling function is called first.
*
* eScalingFunctionInput:
* Defines which ADC result is passed to the custom scaling function.
* 0 - VADC_SCALING_FUNCTION_INPUT_PHYSICAL
* 1 - VADC_SCALING_FUNCTION_INPUT_PERCENT
* 2 - VADC_SCALING_FUNCTION_INPUT_MICROVOLTS
* 3 - VADC_SCALING_FUNCTION_INPUT_CODE
*
*/
Method (CHAN)
{
Return (Package()
{
/* VPH_PWR (VPH_PWR_SNS pin) */
Package()
{
/* .sName = */ "VPH_PWR",
/* .uAdcHardwareChannel = */ 0x83,
/* .eSettlingDelay = */ 0,
/* .eAverageMode = */ 0,
/* .eDecimationRatio = */ 2,
/* .eCalMethod = */ 2,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 3,
/* .eScalingMethod = */ 0,
/* .uPullUp = */ 0,
/* .uInterpolationTableName = */ 0,
/* .uScalingFunctionName = */ 0,
/* .eScalingFunctionInput = */ 0,
},
/* VCOIN (VCOIN pin) */
Package()
{
/* .sName = */ "VCOIN",
/* .uAdcHardwareChannel = */ 0x85,
/* .eSettlingDelay = */ 0,
/* .eAverageMode = */ 0,
/* .eDecimationRatio = */ 2,
/* .eCalMethod = */ 2,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 3,
/* .eScalingMethod = */ 0,
/* .uPullUp = */ 0,
/* .uInterpolationTableName = */ 0,
/* .uScalingFunctionName = */ 0,
/* .eScalingFunctionInput = */ 0,
},
/* PMIC_TEMP1 (internal sensor) */
Package()
{
/* .sName = */ "PMIC_THERM",
/* .uAdcHardwareChannel = */ 0x6,
/* .eSettlingDelay = */ 0,
/* .eAverageMode = */ 0,
/* .eDecimationRatio = */ 2,
/* .eCalMethod = */ 2,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScalingMethod = */ 0,
/* .uPullUp = */ 0,
/* .uInterpolationTableName = */ 0,
/* .uScalingFunctionName = */ PTCF,
/* .eScalingFunctionInput = */ 2,
},
/* XO_THERM (XO_THERM pin) */
Package()
{
/* .sName = */ "XO_THERM",
/* .uAdcHardwareChannel = */ 0x4c,
/* .eSettlingDelay = */ 8,
/* .eAverageMode = */ 0,
/* .eDecimationRatio = */ 2,
/* .eCalMethod = */ 1,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScalingMethod = */ 2,
/* .uPullUp = */ 100000,
/* .uInterpolationTableName = */ XTTB,
/* .uScalingFunctionName = */ 0,
/* .eScalingFunctionInput = */ 0,
},
/* XO_THERM_GPS (XO_THERM pin) */
Package()
{
/* .sName = */ "XO_THERM_GPS",
/* .uAdcHardwareChannel = */ 0x4c,
/* .eSettlingDelay = */ 8,
/* .eAverageMode = */ 2,
/* .eDecimationRatio = */ 2,
/* .eCalMethod = */ 1,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScalingMethod = */ 2,
/* .uPullUp = */ 100000,
/* .uInterpolationTableName = */ XTTB,
/* .uScalingFunctionName = */ 0,
/* .eScalingFunctionInput = */ 0,
},
/* SYS_THERM1 (AMUX_1 pin) */
Package()
{
/* .sName = */ "SYS_THERM1",
/* .uAdcHardwareChannel = */ 0x4d,
/* .eSettlingDelay = */ 1,
/* .eAverageMode = */ 0,
/* .eDecimationRatio = */ 2,
/* .eCalMethod = */ 1,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScalingMethod = */ 2,
/* .uPullUp = */ 100000,
/* .uInterpolationTableName = */ SYTB,
/* .uScalingFunctionName = */ 0,
/* .eScalingFunctionInput = */ 0,
},
/* SYS_THERM2 (AMUX_2 pin) */
Package()
{
/* .sName = */ "SYS_THERM2",
/* .uAdcHardwareChannel = */ 0x4e,
/* .eSettlingDelay = */ 1,
/* .eAverageMode = */ 0,
/* .eDecimationRatio = */ 2,
/* .eCalMethod = */ 1,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScalingMethod = */ 2,
/* .uPullUp = */ 100000,
/* .uInterpolationTableName = */ SYTB,
/* .uScalingFunctionName = */ 0,
/* .eScalingFunctionInput = */ 0,
},
/* PA_THERM (AMUX_3 pin) */
Package()
{
/* .sName = */ "PA_THERM",
/* .uAdcHardwareChannel = */ 0x4f,
/* .eSettlingDelay = */ 1,
/* .eAverageMode = */ 0,
/* .eDecimationRatio = */ 2,
/* .eCalMethod = */ 1,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScalingMethod = */ 2,
/* .uPullUp = */ 100000,
/* .uInterpolationTableName = */ SYTB,
/* .uScalingFunctionName = */ 0,
/* .eScalingFunctionInput = */ 0,
},
/* PA_THERM1 (AMUX_4 pin) */
Package()
{
/* .sName = */ "PA_THERM1",
/* .uAdcHardwareChannel = */ 0x50,
/* .eSettlingDelay = */ 1,
/* .eAverageMode = */ 0,
/* .eDecimationRatio = */ 2,
/* .eCalMethod = */ 1,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScalingMethod = */ 2,
/* .uPullUp = */ 100000,
/* .uInterpolationTableName = */ SYTB,
/* .uScalingFunctionName = */ 0,
/* .eScalingFunctionInput = */ 0,
},
/* SYS_THERM3 (AMUX_5 pin) */
Package()
{
/* .sName = */ "SYS_THERM3",
/* .uAdcHardwareChannel = */ 0x51,
/* .eSettlingDelay = */ 1,
/* .eAverageMode = */ 0,
/* .eDecimationRatio = */ 2,
/* .eCalMethod = */ 1,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScalingMethod = */ 2,
/* .uPullUp = */ 100000,
/* .uInterpolationTableName = */ SYTB,
/* .uScalingFunctionName = */ 0,
/* .eScalingFunctionInput = */ 0,
},
})
}
/*
* System Thermistor Table
*
* The first column in the table is thermistor resistance R_T in ohms
* and the second column is the temperature in degrees C.
*
* VDD ___
* |
* >
* P_PU <
* >
* |
* |
* |- - - V_T
* |
* >
* R_T < 100 kOhms (NTCG104EF104FB)
* >
* |
* |
* Gnd
*
*/
Method (SYTB)
{
Return (Package()
{
Package(){4251000, 0xFFFFFFD8}, // -40
Package(){3004900, 0xFFFFFFDD}, // -35
Package(){2148900, 0xFFFFFFE2}, // -30
Package(){1553800, 0xFFFFFFE7}, // -25
Package(){1135300, 0xFFFFFFEC}, // -20
Package(){ 837800, 0xFFFFFFF1}, // -15
Package(){ 624100, 0xFFFFFFF6}, // -10
Package(){ 469100, 0xFFFFFFFB}, // -5
Package(){ 355600, 0},
Package(){ 271800, 5},
Package(){ 209400, 10},
Package(){ 162500, 15},
Package(){ 127000, 20},
Package(){ 100000, 25},
Package(){ 79200, 30},
Package(){ 63200, 35},
Package(){ 50700, 40},
Package(){ 40900, 45},
Package(){ 33200, 50},
Package(){ 27100, 55},
Package(){ 22200, 60},
Package(){ 18300, 65},
Package(){ 15200, 70},
Package(){ 12600, 75},
Package(){ 10600, 80},
Package(){ 8890, 85},
Package(){ 7500, 90},
Package(){ 6360, 95},
Package(){ 5410, 100},
Package(){ 4620, 105},
Package(){ 3970, 110},
Package(){ 3420, 115},
Package(){ 2950, 120},
Package(){ 2560, 125}
})
}
/*
* XO Thermistor Table
*
* This lookup table is used to convert the XO thermistor reading to temperature
* in degrees C multiplied by a factor of 1024.
*
* The first column in the table is thermistor resistance R_T in ohms
*
* The second column is the temperature in degrees Celsius multiplied by a factor
* of 1024.
*
* VDD ___
* |
* >
* P_PU < 100 kOhms
* >
* |
* |
* |- - - V_T
* |
* >
* R_T < 100 kOhms (NTCG104EF104FB)
* >
* |
* |
* Gnd
*
*/
Method (XTTB)
{
Return (Package()
{
Package(){4250657, 0xFFFF6000}, // -40960
Package(){3962085, 0xFFFF6400}, // -39936
Package(){3694875, 0xFFFF6800}, // -38912
Package(){3447322, 0xFFFF6C00}, // -37888
Package(){3217867, 0xFFFF7000}, // -36864
Package(){3005082, 0xFFFF7400}, // -35840
Package(){2807660, 0xFFFF7800}, // -34816
Package(){2624405, 0xFFFF7C00}, // -33792
Package(){2454218, 0xFFFF8000}, // -32768
Package(){2296094, 0xFFFF8400}, // -31744
Package(){2149108, 0xFFFF8800}, // -30720
Package(){2012414, 0xFFFF8C00}, // -29696
Package(){1885232, 0xFFFF9000}, // -28672
Package(){1766846, 0xFFFF9400}, // -27648
Package(){1656598, 0xFFFF9800}, // -26624
Package(){1553884, 0xFFFF9C00}, // -25600
Package(){1458147, 0xFFFFA000}, // -24576
Package(){1368873, 0xFFFFA400}, // -23552
Package(){1285590, 0xFFFFA800}, // -22528
Package(){1207863, 0xFFFFAC00}, // -21504
Package(){1135290, 0xFFFFB000}, // -20480
Package(){1067501, 0xFFFFB400}, // -19456
Package(){1004155, 0xFFFFB800}, // -18432
Package(){ 944935, 0xFFFFBC00}, // -17408
Package(){ 889550, 0xFFFFC000}, // -16384
Package(){ 837731, 0xFFFFC400}, // -15360
Package(){ 789229, 0xFFFFC800}, // -14336
Package(){ 743813, 0xFFFFCC00}, // -13312
Package(){ 701271, 0xFFFFD000}, // -12288
Package(){ 661405, 0xFFFFD400}, // -11264
Package(){ 624032, 0xFFFFD800}, // -10240
Package(){ 588982, 0xFFFFDC00}, // -9216
Package(){ 556100, 0xFFFFE000}, // -8192
Package(){ 525239, 0xFFFFE400}, // -7168
Package(){ 496264, 0xFFFFE800}, // -6144
Package(){ 469050, 0xFFFFEC00}, // -5120
Package(){ 443480, 0xFFFFF000}, // -4096
Package(){ 419448, 0xFFFFF400}, // -3072
Package(){ 396851, 0xFFFFF800}, // -2048
Package(){ 375597, 0xFFFFFC00}, // -1024
Package(){ 355598, 0},
Package(){ 336775, 1024},
Package(){ 319052, 2048},
Package(){ 302359, 3072},
Package(){ 286630, 4096},
Package(){ 271806, 5120},
Package(){ 257829, 6144},
Package(){ 244646, 7168},
Package(){ 232209, 8192},
Package(){ 220471, 9216},
Package(){ 209390, 10240},
Package(){ 198926, 11264},
Package(){ 189040, 12288},
Package(){ 179698, 13312},
Package(){ 170868, 14336},
Package(){ 162519, 15360},
Package(){ 154622, 16384},
Package(){ 147150, 17408},
Package(){ 140079, 18432},
Package(){ 133385, 19456},
Package(){ 127046, 20480},
Package(){ 121042, 21504},
Package(){ 115352, 22528},
Package(){ 109960, 23552},
Package(){ 104848, 24576},
Package(){ 100000, 25600},
Package(){ 95402, 26624},
Package(){ 91038, 27648},
Package(){ 86897, 28672},
Package(){ 82965, 29696},
Package(){ 79232, 30720},
Package(){ 75686, 31744},
Package(){ 72316, 32768},
Package(){ 69114, 33792},
Package(){ 66070, 34816},
Package(){ 63176, 35840},
Package(){ 60423, 36864},
Package(){ 57804, 37888},
Package(){ 55312, 38912},
Package(){ 52940, 39936},
Package(){ 50681, 40960},
Package(){ 48531, 41984},
Package(){ 46482, 43008},
Package(){ 44530, 44032},
Package(){ 42670, 45056},
Package(){ 40897, 46080},
Package(){ 39207, 47104},
Package(){ 37595, 48128},
Package(){ 36057, 49152},
Package(){ 34590, 50176},
Package(){ 33190, 51200},
Package(){ 31853, 52224},
Package(){ 30577, 53248},
Package(){ 29358, 54272},
Package(){ 28194, 55296},
Package(){ 27082, 56320},
Package(){ 26020, 57344},
Package(){ 25004, 58368},
Package(){ 24033, 59392},
Package(){ 23104, 60416},
Package(){ 22216, 61440},
Package(){ 21367, 62464},
Package(){ 20554, 63488},
Package(){ 19776, 64512},
Package(){ 19031, 65536},
Package(){ 18318, 66560},
Package(){ 17636, 67584},
Package(){ 16982, 68608},
Package(){ 16355, 69632},
Package(){ 15755, 70656},
Package(){ 15180, 71680},
Package(){ 14628, 72704},
Package(){ 14099, 73728},
Package(){ 13592, 74752},
Package(){ 13106, 75776},
Package(){ 12640, 76800},
Package(){ 12192, 77824},
Package(){ 11762, 78848},
Package(){ 11350, 79872},
Package(){ 10954, 80896},
Package(){ 10574, 81920},
Package(){ 10209, 82944},
Package(){ 9858, 83968},
Package(){ 9521, 84992},
Package(){ 9197, 86016},
Package(){ 8886, 87040},
Package(){ 8587, 88064},
Package(){ 8299, 89088},
Package(){ 8023, 90112},
Package(){ 7757, 91136},
Package(){ 7501, 92160},
Package(){ 7254, 93184},
Package(){ 7017, 94208},
Package(){ 6789, 95232},
Package(){ 6570, 96256},
Package(){ 6358, 97280},
Package(){ 6155, 98304},
Package(){ 5959, 99328},
Package(){ 5770, 100352},
Package(){ 5588, 101376},
Package(){ 5412, 102400},
Package(){ 5243, 103424},
Package(){ 5080, 104448},
Package(){ 4923, 105472},
Package(){ 4771, 106496},
Package(){ 4625, 107520},
Package(){ 4484, 108544},
Package(){ 4348, 109568},
Package(){ 4217, 110592},
Package(){ 4090, 111616},
Package(){ 3968, 112640},
Package(){ 3850, 113664},
Package(){ 3736, 114688},
Package(){ 3626, 115712},
Package(){ 3519, 116736},
Package(){ 3417, 117760},
Package(){ 3317, 118784},
Package(){ 3221, 119808},
Package(){ 3129, 120832},
Package(){ 3039, 121856},
Package(){ 2952, 122880},
Package(){ 2868, 123904},
Package(){ 2787, 124928},
Package(){ 2709, 125952},
Package(){ 2633, 126976},
Package(){ 2560, 128000},
Package(){ 2489, 129024},
Package(){ 2420, 130048}
})
}
/*----------------------------------------------------------------------------
* Voltage ADC Threshold Monitor (VADCTM) Configuration
* -------------------------------------------------------------------------*/
/*
* VADCTM Measurement Configuration Table
*
* The following is a list of periodic measurements that the VADCTM
* can periodically monitor. Thresholds for these measurements are set
* in software.
*
* sName:
* Appropriate string name for the channel from AdcInputs.h.
*
* uAdcHardwareChannel:
* AMUX channel.
*
* eSettlingDelay:
* Holdoff time to allow the voltage to settle before reading the channel.
* 0 - VADCTM_SETTLING_DELAY_0_US
* 1 - VADCTM_SETTLING_DELAY_100_US
* 2 - VADCTM_SETTLING_DELAY_200_US
* 3 - VADCTM_SETTLING_DELAY_300_US
* 4 - VADCTM_SETTLING_DELAY_400_US
* 5 - VADCTM_SETTLING_DELAY_500_US
* 6 - VADCTM_SETTLING_DELAY_600_US
* 7 - VADCTM_SETTLING_DELAY_700_US
* 8 - VADCTM_SETTLING_DELAY_800_US
* 9 - VADCTM_SETTLING_DELAY_900_US
* 10 - VADCTM_SETTLING_DELAY_1_MS
* 11 - VADCTM_SETTLING_DELAY_2_MS
* 12 - VADCTM_SETTLING_DELAY_4_MS
* 13 - VADCTM_SETTLING_DELAY_6_MS
* 14 - VADCTM_SETTLING_DELAY_8_MS
* 15 - VADCTM_SETTLING_DELAY_10_MS
*
* eMeasIntervalTimeSelect:
* The interval timer to use for the measurement period.
* 0 - VADCTM_MEAS_INTERVAL_TIME1
* 1 - VADCTM_MEAS_INTERVAL_TIME2
* 2 - VADCTM_MEAS_INTERVAL_TIME3
*
* bAlwaysOn:
* Keep the measurement always sampling even if no thresholds are set.
* 0 - FALSE
* 1 - TRUE
*
* eCalMethod:
* Calibration method.
* 0 - VADC_CAL_METHOD_NO_CAL
* 1 - VADC_CAL_METHOD_RATIOMETRIC
* 2 - VADC_CAL_METHOD_ABSOLUTE
*
* scalingFactor.num:
* Numerator of the channel scaling
*
* scalingFactor.den:
* Denominator of the channel scaling
*
* eScalingMethod:
* The scaling method to use.
* 0 - VADC_SCALE_TO_MILLIVOLTS
* 1 - VADC_SCALE_INTERPOLATE_FROM_MILLIVOLTS (requires uInterpolationTableName)
* 2 - VADC_SCALE_THERMISTOR (requires uPullUp and uInterpolationTableName)
*
* uPullUp:
* The pull up resistor value. Use with eScalingMethod == VADC_SCALE_THERMISTOR,
* otherwise, 0.
*
* uInterpolationTableName:
* The name of the lookup table in ACPI that will be interpolated to obtain
* a physical value. Note that the physical value (which has default units
* of millivolts unless custom scaling function is used) is passed as the
* input. This value corresponds to the first column of the table. The
* scaled output appears in the physical adc result.
* 0 - No interpolation table
* WXYZ - Where 'WXYZ' is the interpolation table name
*
* uScalingFunctionName:
* The name of the function to call in the ACPI table to perform custom
* scaling. The input to the custom scaling function is defined by
* eScalingFunctionInput. The output of the custom scaling function is
* the physical value.
* 0 - No scaling function
* WXYZ - Where 'WXYZ' is the scaling function name
*
* Note: if both a custon scaling function & interpolation table are used
* the custom scaling function is called first.
*
* uInverseFunctionName:
* The name of the inverse scaling for uScalingFunctionName.
* 0 - No scaling function
* WXYZ - Where 'WXYZ' is the scaling function name
*
* eScalingFunctionInput:
* Defines which ADC result is passed to the custom scaling function.
* 0 - VADC_SCALING_FUNCTION_INPUT_PHYSICAL
* 1 - VADC_SCALING_FUNCTION_INPUT_PERCENT
* 2 - VADC_SCALING_FUNCTION_INPUT_MICROVOLTS
* 3 - VADC_SCALING_FUNCTION_INPUT_CODE
*
* nPhysicalMin:
* Minimum threshold value in physical units.
*
* nPhysicalMax:
* Maximum threshold value in physical units.
*
*/
Method (VTCH)
{
Return (Package()
{
/* VPH_PWR (VPH_PWR_SNS pin) */
Package()
{
/* .sName = */ "VPH_PWR",
/* .uAdcHardwareChannel = */ 0x83,
/* .eSettlingDelay = */ 0,
/* .eMeasIntervalTimeSelect = */ 1,
/* .bAlwaysOn = */ 0,
/* .eCalMethod = */ 2,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 3,
/* .eScalingMethod = */ 0,
/* .uPullUp = */ 0,
/* .uInterpolationTableName = */ 0,
/* .uScalingFunctionName = */ 0,
/* .uInverseFunctionName = */ 0,
/* .eScalingFunctionInput = */ 0,
/* .nPhysicalMin = */ 0,
/* .nPhysicalMax = */ 5625,
},
/* PMIC_TEMP1 (internal sensor) */
Package()
{
/* .sName = */ "PMIC_THERM",
/* .uAdcHardwareChannel = */ 0x6,
/* .eSettlingDelay = */ 0,
/* .eMeasIntervalTimeSelect = */ 0,
/* .bAlwaysOn = */ 0,
/* .eCalMethod = */ 2,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScalingMethod = */ 0,
/* .uPullUp = */ 0,
/* .uInterpolationTableName = */ 0,
/* .uScalingFunctionName = */ PTCF,
/* .uInverseFunctionName = */ PTCI,
/* .eScalingFunctionInput = */ 2,
/* .nPhysicalMin = */ 0xFFFF3CB0, // -50000
/* .nPhysicalMax = */ 150000,
},
/* SYS_THERM1 (AMUX_1 pin) */
Package()
{
/* .sName = */ "SYS_THERM1",
/* .uAdcHardwareChannel = */ 0x4d,
/* .eSettlingDelay = */ 1,
/* .eMeasIntervalTimeSelect = */ 0,
/* .bAlwaysOn = */ 0,
/* .eCalMethod = */ 1,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScalingMethod = */ 2,
/* .uPullUp = */ 100000,
/* .uInterpolationTableName = */ SYTB,
/* .uScalingFunctionName = */ 0,
/* .uInverseFunctionName = */ 0,
/* .eScalingFunctionInput = */ 0,
/* .nPhysicalMin = */ 0xFFFFFFD8, // -40
/* .nPhysicalMax = */ 125,
},
/* SYS_THERM2 (AMUX_2 pin) */
Package()
{
/* .sName = */ "SYS_THERM2",
/* .uAdcHardwareChannel = */ 0x4e,
/* .eSettlingDelay = */ 1,
/* .eMeasIntervalTimeSelect = */ 0,
/* .bAlwaysOn = */ 0,
/* .eCalMethod = */ 1,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScalingMethod = */ 2,
/* .uPullUp = */ 100000,
/* .uInterpolationTableName = */ SYTB,
/* .uScalingFunctionName = */ 0,
/* .uInverseFunctionName = */ 0,
/* .eScalingFunctionInput = */ 0,
/* .nPhysicalMin = */ 0xFFFFFFD8, // -40
/* .nPhysicalMax = */ 125,
},
/* PA_THERM (AMUX_3 pin) */
Package()
{
/* .sName = */ "PA_THERM",
/* .uAdcHardwareChannel = */ 0x4f,
/* .eSettlingDelay = */ 1,
/* .eMeasIntervalTimeSelect = */ 0,
/* .bAlwaysOn = */ 0,
/* .eCalMethod = */ 1,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScalingMethod = */ 2,
/* .uPullUp = */ 100000,
/* .uInterpolationTableName = */ SYTB,
/* .uScalingFunctionName = */ 0,
/* .uInverseFunctionName = */ 0,
/* .eScalingFunctionInput = */ 0,
/* .nPhysicalMin = */ 0xFFFFFFD8, // -40
/* .nPhysicalMax = */ 125,
},
/* PA_THERM1 (AMUX_4 pin) */
Package()
{
/* .sName = */ "PA_THERM1",
/* .uAdcHardwareChannel = */ 0x50,
/* .eSettlingDelay = */ 1,
/* .eMeasIntervalTimeSelect = */ 0,
/* .bAlwaysOn = */ 0,
/* .eCalMethod = */ 1,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScalingMethod = */ 2,
/* .uPullUp = */ 100000,
/* .uInterpolationTableName = */ SYTB,
/* .uScalingFunctionName = */ 0,
/* .uInverseFunctionName = */ 0,
/* .eScalingFunctionInput = */ 0,
/* .nPhysicalMin = */ 0xFFFFFFD8, // -40
/* .nPhysicalMax = */ 125,
},
/* SYS_THERM3 (AMUX_5 pin) */
Package()
{
/* .sName = */ "SYS_THERM3",
/* .uAdcHardwareChannel = */ 0x51,
/* .eSettlingDelay = */ 1,
/* .eMeasIntervalTimeSelect = */ 0,
/* .bAlwaysOn = */ 0,
/* .eCalMethod = */ 1,
/* .scalingFactor.num = */ 1,
/* .scalingFactor.den = */ 1,
/* .eScalingMethod = */ 2,
/* .uPullUp = */ 100000,
/* .uInterpolationTableName = */ SYTB,
/* .uScalingFunctionName = */ 0,
/* .uInverseFunctionName = */ 0,
/* .eScalingFunctionInput = */ 0,
/* .nPhysicalMin = */ 0xFFFFFFD8, // -40
/* .nPhysicalMax = */ 125,
},
})
}
/*
* General VADCTM measurement timer properties
*
* eMeasIntervalTime1:
* Interval timer 1 periodic value.
* 0 - VADCTM_MEAS_INTERVAL_TIME1_0_MS
* 1 - VADCTM_MEAS_INTERVAL_TIME1_1P0_MS
* 2 - VADCTM_MEAS_INTERVAL_TIME1_2P0_MS
* 3 - VADCTM_MEAS_INTERVAL_TIME1_3P9_MS
* 4 - VADCTM_MEAS_INTERVAL_TIME1_7P8_MS
* 5 - VADCTM_MEAS_INTERVAL_TIME1_15P6_MS
* 6 - VADCTM_MEAS_INTERVAL_TIME1_31P1_MS
* 7 - VADCTM_MEAS_INTERVAL_TIME1_62P5_MS
* 8 - VADCTM_MEAS_INTERVAL_TIME1_125_MS
* 9 - VADCTM_MEAS_INTERVAL_TIME1_250_MS
* 10 - VADCTM_MEAS_INTERVAL_TIME1_500_MS
* 11 - VADCTM_MEAS_INTERVAL_TIME1_1000_MS
* 12 - VADCTM_MEAS_INTERVAL_TIME1_2000_MS
* 13 - VADCTM_MEAS_INTERVAL_TIME1_4000_MS
* 14 - VADCTM_MEAS_INTERVAL_TIME1_8000_MS
* 15 - VADCTM_MEAS_INTERVAL_TIME1_16000_MS
*
* eMeasIntervalTime2:
* Interval timer 2 periodic value.
* 0 - VADCTM_MEAS_INTERVAL_TIME2_0_MS
* 1 - VADCTM_MEAS_INTERVAL_TIME2_100_MS
* 2 - VADCTM_MEAS_INTERVAL_TIME2_200_MS
* 3 - VADCTM_MEAS_INTERVAL_TIME2_300_MS
* 4 - VADCTM_MEAS_INTERVAL_TIME2_400_MS
* 5 - VADCTM_MEAS_INTERVAL_TIME2_500_MS
* 6 - VADCTM_MEAS_INTERVAL_TIME2_600_MS
* 7 - VADCTM_MEAS_INTERVAL_TIME2_700_MS
* 8 - VADCTM_MEAS_INTERVAL_TIME2_800_MS
* 9 - VADCTM_MEAS_INTERVAL_TIME2_900_MS
* 10 - VADCTM_MEAS_INTERVAL_TIME2_1000_MS
* 11 - VADCTM_MEAS_INTERVAL_TIME2_1100_MS
* 12 - VADCTM_MEAS_INTERVAL_TIME2_1200_MS
* 13 - VADCTM_MEAS_INTERVAL_TIME2_1300_MS
* 14 - VADCTM_MEAS_INTERVAL_TIME2_1400_MS
* 15 - VADCTM_MEAS_INTERVAL_TIME2_1500_MS
*
* eMeasIntervalTime3:
* Interval timer 3 periodic value.
* 0 - VADCTM_MEAS_INTERVAL_TIME3_0_S
* 1 - VADCTM_MEAS_INTERVAL_TIME3_1_S
* 2 - VADCTM_MEAS_INTERVAL_TIME3_2_S
* 3 - VADCTM_MEAS_INTERVAL_TIME3_3_S
* 4 - VADCTM_MEAS_INTERVAL_TIME3_4_S
* 5 - VADCTM_MEAS_INTERVAL_TIME3_5_S
* 6 - VADCTM_MEAS_INTERVAL_TIME3_6_S
* 7 - VADCTM_MEAS_INTERVAL_TIME3_7_S
* 8 - VADCTM_MEAS_INTERVAL_TIME3_8_S
* 9 - VADCTM_MEAS_INTERVAL_TIME3_9_S
* 10 - VADCTM_MEAS_INTERVAL_TIME3_10_S
* 11 - VADCTM_MEAS_INTERVAL_TIME3_11_S
* 12 - VADCTM_MEAS_INTERVAL_TIME3_12_S
* 13 - VADCTM_MEAS_INTERVAL_TIME3_13_S
* 14 - VADCTM_MEAS_INTERVAL_TIME3_14_S
* 15 - VADCTM_MEAS_INTERVAL_TIME3_15_S
*
*/
Method (VTMT)
{
Return (Package()
{
/* .eMeasIntervalTime1 = */ 11, // 1000 ms
/* .eMeasIntervalTime2 = */ 1, // 100 ms
/* .eMeasIntervalTime3 = */ 5, // 5000 ms
})
}
}

View File

@ -0,0 +1,50 @@
// This file contains the Power Management IC (PMIC)
// customer-modifiable ACPI configurations.
//
//******************************************
//Configs for Battery Manager Device: PMBT
//******************************************
//--------------------
//PMBT: Method(BBAT)
//--------------------
Name(BFCC, 13890) //* (mWh), Full Charge Capacity
Name(PCT1, 5) //* (% of FCC), Default Alert 1
Name(PCT2, 9) //* (% of FCC), Default Alert 2
//--------------------
//PMBT: Method(BMNR)
//--------------------
Name(CUST, "850_MTP") //* cust file identifier
//--------------------
//PMBT: Method(BPLT)
//--------------------
Name(VNOM, 3800) //* (mV), Nominal Battery Voltage
Name(VLOW, 3300) //* (mV), Low Battery Voltage
Name(EMPT, 3200) //* (mV), VCutOff
Name(DCMA, 900) //* (mA), DC Current
Name(BOCP, 4500) //* (mA), OCP current used in BCL
Name(BVLO, 3000) //* (mV), BCL low Vbatt
Name(BLOP, 20) //* (%), BCL Low batt percent notification
Name(BNOP, 22) //* (%), BCL normal batt percent notification
Name(IFGD, 50) //* (mA), FG Iterm delta; (iterm + this value) determines when FG report 100%
Name(VFGD, 50) //* (mV), CC to CV Vdelta; (Vfloat - this value) determine when FG report 100%
//--------------------------------
//PMBT: Method(BJTA)/Method(BAT1)
//--------------------------------
Name(VDD1, 4350) //* (mV), Battery-1: Float Voltage (Standard Zone)
Name(FCC1, 2100) //* (mA), Battery-1: Full Charge Current (Standard Zone)
Name(HCLI, 0) //* (degree C), hard-cold temperature limit
Name(SCLI, 10) //* (degree C), soft-cold temperature limit
Name(SHLI, 45) //* (degree C), soft-hot temperature limit
Name(HHLI, 55) //* (degree C), hard-hot temperature limit
Name(FVC1, 105) //* (mV), Float voltage compensation, when battery in JEITA soft-limit
Name(CCC1, 1000) //* (mA), Charge current compensation, when battery in JEITA soft-limit
//--------------------
//PMBT: Method(CTMC)
//--------------------
Name(RID2, 15000) //* (Ohm), min RID for NORMAL category: 15K
Name(RID3, 140000) //* (Ohm), max RID for NORMAL category: 140K

View File

@ -0,0 +1,570 @@
//
//CPU Aggregator Device -- Required for Thermal Parking
Device(AGR0)
{
Name(_HID, "ACPI000C")
Name(_PUR, Package() {1, 0})
Method(_OST, 0x3, NotSerialized)
{
Store(Arg2, \_SB_.PEP0.ROST)
}
}
//---------------------------------------------------------------------
//
// Thermal Zones for QC reference hardware
//
//TZ0 - TZ39 are thermal zones developed by QC for reference hardware
//and can be modified by the OEMs.
//---------------------------------------------------------------------
//---------------------------------------------------------------------
// Thermal Zones(0-19) for CPU sensors
//24AD - Little CPU virtual sensor
//24AE - Big CPU virtual sensor
// This thermal zone is only used for temperature logging for little CPUs
// as you may notice that _PSV, _TC1, _TC2, _TSP params are removed.
// This is the passive cooling mechanism by dialing down frequency is now
// done actively by hardware.
//---------------------------------------------------------------------
ThermalZone (TZ0) {
Name (_HID, "QCOM02B0")
Name (_UID, 0)
Name(_TZD, Package (){\_SB.SYSM.CLUS.CPU0, \_SB.SYSM.CLUS.CPU1, \_SB.SYSM.CLUS.CPU2, \_SB.SYSM.CLUS.CPU3})
Method(_DEP) {
Return (Package() {\_SB.PEP0})
}
} // end of TZ0
//Regular Thermal Zone for Little CPU TSENS to Park cores at 110C
ThermalZone (TZ1) {
Name (_HID, "QCOM02B0")
Name (_UID, 1)
Name(_TZD, Package (){\_SB.PEP0})
Name(TPSV, 3830)
Method(_PSV) { Return (\_SB.TZ1.TPSV) }
Name(_MTL, 20) // minimum throttle limit
//Control how aggressively the thermal manager applies thermal
//throttling performance against temperature change.
Name(TTC1, 0)
Method(_TC1) { Return (\_SB.TZ1.TTC1) }
// _TC2 Controls how aggressively the thermal manager applies thermal
// throttling performance against temperature delta between the
// current temperature and _PSV.
// once the temp goes above _PSV, we like to have aggressive
// throttling based on how far above the temp is above the threshold.
// Since that is controlled via _TC2, we like it to be high.
// please refer to the ACPI spec 6.0 to understand the significance of
// _TC2 or take a look at the explanation at the top of this file.
Name(TTC2, 1)
Method(_TC2) { Return (\_SB.TZ1.TTC2) }
// Appropriate temperature sampling interval for the zone in tenths
// of a second. The thermal manager uses this interval to determine
// how often it should evaluate the thermal throttling performance.
// Must be greater than zero. For more information, see Thermal
// throttling algorithm on msdn page
// https://msdn.microsoft.com/en-us/library/windows/hardware/mt643928(v=vs.85).aspx
Name(TTSP, 50)
Method(_TSP) { Return (\_SB.TZ1.TTSP) }
// This optional object evaluates to a recommended polling frequency
// (in tenths of seconds) for this thermal zone. A value of zero indicates
// that OSPM does not need to poll the temperature of this thermal zone in
// order to detect temperature changes (the hardware is capable of
// generating asynchronous notifications).
// TZP should be marked 0 for all thermal zones as our TSENS sensors
// generate interrupts to complete thermal IOCTL read call.
Name(_TZP, 0)
Method(_DEP) {
Return (Package() {\_SB.PEP0})
}
} // end of TZ1
// This thermal zone is only used for temperature logging for Big CPUs
// as you may notice that _PSV, _TC1, _TC2, _TSP params are removed.
// This is the passive cooling mechanism by dialing down frequency is now
// done actively by hardware.
ThermalZone (TZ2) {
Name (_HID, "QCOM02B1")
Name (_UID, 0)
Name(_TZD, Package (){\_SB.SYSM.CLUS.CPU4, \_SB.SYSM.CLUS.CPU5, \_SB.SYSM.CLUS.CPU6, \_SB.SYSM.CLUS.CPU7})
Method(_DEP) {
Return (Package() {\_SB.PEP0})
}
} // end of TZ2
//Regular Thermal Zone for BigCPU TSENS to Park cores at 110C
ThermalZone (TZ3) {
Name (_HID, "QCOM02B1")
Name (_UID, 1)
Name(_TZD, Package (){\_SB.PEP0})
Name(TPSV, 3830)
Method(_PSV) { Return (\_SB.TZ3.TPSV) }
Name(TTC1, 0)
Method(_TC1) { Return (\_SB.TZ3.TTC1) }
Name(TTC2, 1)
Method(_TC2) { Return (\_SB.TZ3.TTC2) }
Name(TTSP, 1)
Method(_TSP) { Return (\_SB.TZ3.TTSP) }
Name(_MTL, 20) // minimum throttle limit
Name(_TZP, 0)
Method(_DEP) {
Return (Package() {\_SB.PEP0})
}
} // end of TZ3
//---------------------------------------------------------------------
// Thermal Zones(20-21) for GPU TSENS
//
// \_SB.GPU0 should be used for GPU thermal mitigation, and
// \_SB.GPU0.AVS0 should be used for MDSS/Video thermal mitigation.
// Currently there is no handling for Video thermal mitigation.
// When needed, Video will be added to GPU0.AVS0 interface.
//---------------------------------------------------------------------
//Thermal zone for TSENS11 dial back GPUs at 95C
ThermalZone (TZ20) {
Name (_HID, "QCOM02AB")
Name (_UID, 0)
Name(_TZD, Package (){\_SB.GPU0})
Name(TPSV, 3680)
Method(_PSV) { Return (\_SB.TZ20.TPSV) }
Name(TTC1, 1)
Method(_TC1) { Return (\_SB.TZ20.TTC1) }
// For non-cpu devices, tc2 should be atleast 5, please refer to the
// explanation at the top of the file or msdn link for thermal guide.
Name(TTC2, 2)
Method(_TC2) { Return (\_SB.TZ20.TTC2) }
// For non-cpu devices, _tsp should be 20 or 30
Name(TTSP, 2)
Method(_TSP) { Return (\_SB.TZ20.TTSP) }
Name(_TZP, 0)
Method(_DEP) {
Return (Package() {\_SB.PEP0})
}
} // end of TZ20
//Thermal zone for TSENS12 to dial back GPUs at 95C
ThermalZone (TZ21) {
Name (_HID, "QCOM02AC")
Name (_UID, 0)
Name(_TZD, Package (){\_SB.GPU0})
Name(TPSV, 3680)
Method(_PSV) { Return (\_SB.TZ21.TPSV) }
Name(TTC1, 1)
Method(_TC1) { Return (\_SB.TZ21.TTC1) }
Name(TTC2, 2)
Method(_TC2) { Return (\_SB.TZ21.TTC2) }
Name(TTSP, 2)
Method(_TSP) { Return (\_SB.TZ21.TTSP) }
Name(_TZP, 0)
Method(_DEP) {
Return (Package() {\_SB.PEP0})
}
} // end of TZ21
//---------------------------------------------------------------------
// Thermal Zones for QDSP TSENS
//4/16/15: TODO waiting to get a new HID assigned for TSENS17
//---------------------------------------------------------------------
//Thermall zone for TSENS14 dial back MSM at 95C
//ThermalZone (TZ31) {
//Name (_HID, "QCOM02AE")
//Name (_UID, 0)
//Name(_TZD, Package (){
//\_SB.SYSM.CLUS.CPU0, \_SB.SYSM.CLUS.CPU1, \_SB.SYSM.CLUS.CPU2, \_SB.SYSM.CLUS.CPU3,
//\_SB.PEP0, \_SB.GPU0.MON0, \_SB.GPU0})
//Method(_PSV) { Return (3680) }
//Name(_TC1, 1)
//Name(_TC2, 2)
//Name(_TSP, 10)
//Name(_TZP, 0)
//Method(_DEP) {
// Return (Package() {\_SB.PEP0})
//}
//} // end of TZ31
//---------------------------------------------------------------------
// Thermal Zones for Camera TSENS
//---------------------------------------------------------------------
//Thermal zone for TSENS17 to dial back MSM at 95C
// ThermalZone (TZ32) {
// Name (_HID, "QCOM02C9")
// Name (_UID, 0)
// Name(_TZD, Package (){\_SB.GPU0.AVS0})
// Name(TPSV, 3680)
// Method(_PSV) { Return (\_SB.TZ32.TPSV) }
// Name(TTC1, 1)
// Method(_TC1) { Return (\_SB.TZ32.TTC1) }
// // For non-cpu devices, tc2 should be atleast 5, please refer to the
// // explanation at the top of the file or msdn link for thermal guide.
// Name(TTC2, 2)
// Method(_TC2) { Return (\_SB.TZ32.TTC2) }
// // For non-cpu devices, _tsp should be 20 or 30
// Name(TTSP, 10)
// Method(_TSP) { Return (\_SB.TZ32.TTSP) }
// Name(_TZP, 0)
// Method(_DEP) {
// Return (Package() {\_SB.PEP0})
// }
// } // end of TZ32
ThermalZone (TZ33) {
Name (_HID, "QCOM02CB")
Name (_UID, 1)
Name(_TZD, Package (){\_SB.AMSS})
Name(TPSV, 3680)
Method(_PSV) { Return (\_SB.TZ33.TPSV) }
Name(TTC1, 1)
Method(_TC1) { Return (\_SB.TZ33.TTC1) }
Name(TTC2, 2)
Method(_TC2) { Return (\_SB.TZ33.TTC2) }
Name(TTSP, 10)
Method(_TSP) { Return (\_SB.TZ33.TTSP) }
Name(_TZP, 0)
Method(_DEP) {
Return (Package() {\_SB.PEP0})
}
}
//---------------------------------------------------------------------
// Thermal Zones for MDSS TENS (Display Subsystem)
// Only the MDP Blt engine and Rotator engines on the MDSS are cooled
// using this interface. Display cooling is not supported currently.
//---------------------------------------------------------------------
//Thermal zone for TSENS18 to dial back MSM at 95C
//ThermalZone (TZ34) {
//Name (_HID, "QCOM02CA")
//Name (_UID, 0)
//Name(_TZD, Package (){\_SB.GPU0.AVS0})
//Method(_PSV) { Return (3680) }
//Name(_TC1, 1)
//Name(_TC2, 2)
//Name(_TSP, 10)
//Name(_TZP, 0)
//Method(_DEP) {
// Return (Package() {\_SB.PEP0})
//}
//} // end of TZ34
//---------------------------------------------------------------------
// Thermal Zones for ADC Channels
//---------------------------------------------------------------------
//Thermal zone for PMIC_THERM
ThermalZone (TZ36) {
Name (_HID, "QCOM029E")
Name (_UID, 0)
Name(_TZD, Package (){
\_SB.SYSM.CLUS.CPU0, \_SB.SYSM.CLUS.CPU1, \_SB.SYSM.CLUS.CPU2, \_SB.SYSM.CLUS.CPU3,
\_SB.SYSM.CLUS.CPU4, \_SB.SYSM.CLUS.CPU5, \_SB.SYSM.CLUS.CPU6, \_SB.SYSM.CLUS.CPU7,
\_SB.PMBM})
Name(TPSV, 3780)
Method(_PSV) { Return (\_SB.TZ36.TPSV) }
Name(TTC1, 4)
Method(_TC1) { Return (\_SB.TZ36.TTC1) }
Name(TTC2, 3)
Method(_TC2) { Return (\_SB.TZ36.TTC2) }
Name(TTSP, 50)
Method(_TSP) { Return (\_SB.TZ36.TTSP) }
Name(_TZP, 0)
Method(_DEP) {
Return (Package() {\_SB.PEP0, \_SB.ADC1})
}
} // end of TZ36
//Thermal zone for PMIC_THERM
ThermalZone (TZ37) {
Name (_HID, "QCOM029E")
Name (_UID, 1)
Name(_TZD, Package (){
\_SB.PEP0, \_SB.PMBM})
Name(TPSV, 3980)
Method(_PSV) { Return (\_SB.TZ37.TPSV) }
Name(TCRT, 4180)
Method(_CRT) { Return (\_SB.TZ37.TCRT) }
Name(TTC1, 4)
Method(_TC1) { Return (\_SB.TZ37.TTC1) }
Name(TTC2, 3)
Method(_TC2) { Return (\_SB.TZ37.TTC2) }
Name(TTSP, 50)
Method(_TSP) { Return (\_SB.TZ37.TTSP) }
Name(_TZP, 0)
Method(_DEP) {
Return (Package() {\_SB.PEP0, \_SB.ADC1})
}
} // end of TZ37
//Example: Inverse Thermal zone for PMIC_THERM
ThermalZone (TZ38) {
Name (_HID, "QCOM029E")
Name (_UID, 2) //Update UID on addition of new thermal zone with same HID
Name(_TZD, Package (){
\_SB.PEP0})
Method(INVT) { Return (1) }
Method(_MTL) { Return (60) }
Name(TPSV, 2830)
Method(_PSV) { Return (\_SB.TZ38.TPSV) }
Name(TTC1, 4)
Method(_TC1) { Return (\_SB.TZ38.TTC1) }
Name(TTC2, 3)
Method(_TC2) { Return (\_SB.TZ38.TTC2) }
Name(TTSP, 10)
Method(_TSP) { Return (\_SB.TZ38.TTSP) }
Name(_TZP, 0)
Method(_DEP) {
Return (Package() {\_SB.PEP0, \_SB.ADC1})
}
} // end of TZ38
//------------------------------------------------------------------------
// Thermal Zones for Wlan
//------------------------------------------------------------------------
//Thermal zone for iHelium, Wlan MAC&PHY on SOC
ThermalZone (TZ40) {
Name (_HID, "QCOM02AF")
Name (_UID, 0)
Name(_TZD, Package (){\_SB.COEX})
Name(TPSV, 3580)
Method(_PSV) { Return (\_SB.TZ40.TPSV) }
Name(TTC1, 1)
Method(_TC1) { Return (\_SB.TZ40.TTC1) }
Name(TTC2, 5) // For non-cpu devices, tc2 should be atleast 5
Method(_TC2) { Return (\_SB.TZ40.TTC2) }
Name(TTSP, 30) // For non-cpu devices, _tsp should be 20 or 30
Method(_TSP) { Return (\_SB.TZ40.TTSP) }
Name(_TZP, 0)
Method(_DEP) {
Return (Package() {\_SB.PEP0})
}
} // end of TZ40
//Thermal zone for Cherokee, Wlan radio on WCN3990
ThermalZone (TZ41) {
Name (_HID, "QCOM0295")//virtual sensor by wlan WMI thermal interface
Name (_UID, 1)
//Name(_TZD, Package (){\_SB.COEX}) // Temperature report only
//Method(_PSV) { Return (4030) }
//Name(_TC1, 4)
//Name(_TC2, 3)
Name(_TSP, 50)
Name(_TZP, 0)
} // end of TZ41
//------------------------------------------------------------------------
// Thermal Zones for DDR/POP
//------------------------------------------------------------------------
//Thermal zone for DDR
//Thermal zone for TSENS20 to dial back Big CPU's at 95C
ThermalZone (TZ44) {
Name (_HID, "QCOM02CC")
Name (_UID, 0)
Name(_TZD, Package (){\_SB.SYSM.CLUS.CPU4, \_SB.SYSM.CLUS.CPU5, \_SB.SYSM.CLUS.CPU6, \_SB.SYSM.CLUS.CPU7})
Name(TPSV, 3680)
Method(_PSV) { Return (\_SB.TZ44.TPSV) }
Name(TTC1, 0)
Method(_TC1) { Return (\_SB.TZ44.TTC1) }
Name(TTC2, 1)
Method(_TC2) { Return (\_SB.TZ44.TTC2) }
Name(TTSP, 1)
Method(_TSP) { Return (\_SB.TZ44.TTSP) }
Name(_TZP, 0)
Method(_DEP) {
Return (Package() {\_SB.PEP0})
}
} // end of TZ44
//---------------------------------------------------------------------
//
// QC Recommended thermal limits starts
//
//TZ80 - TZ98 represent the thermal zones corresponding to QC
//recommended thermal limits. These thermal zones must not be removed
//or tampered with.
//---------------------------------------------------------------------
//Thermal zone for TSENS2 at 70C to match the LA thermal limits
//ThermalZone (TZ80) {
//Name (_HID, "QCOM2472")
//Name (_UID, 0)
//Name(_TZD, Package (){
// \_SB.SYSM.CLUS.CPU0, \_SB.SYSM.CLUS.CPU1, \_SB.SYSM.CLUS.CPU2, \_SB.SYSM.CLUS.CPU3,
//Method(_PSV) { Return (3430) }
//Name(_TC1, 1)
//Name(_TC2, 2)
//Name(_TSP, 10)
//Name(_TZP, 0)
//Method(_DEP) {
// Return (Package() {\_SB.PEP0})
//}
//} // end of TZ80
//Thermal zone near for TSENS2 to shutdown the system at 85C to match LA
//thermal limits
//ThermalZone (TZ81) {
//Name (_HID, "QCOM2472")
//Name (_UID, 1)
//Name(_TZD, Package (){
// \_SB.SYSM.CLUS.CPU0, \_SB.SYSM.CLUS.CPU1, \_SB.SYSM.CLUS.CPU2, \_SB.SYSM.CLUS.CPU3,
// \_SB.PEP0})
//Method(_PSV) { Return (3530) }
//Method(_CRT) { Return (3580) }
//Name(_TC1, 1)
//Name(_TC2, 2)
//Name(_TSP, 10)
//Name(_TZP, 0)
//Method(_DEP) {
// Return (Package() {\_SB.PEP0})
//}
//} // end of TZ81
//Entry for BCL thermal zone
ThermalZone (TZ98) {
Name (_HID, "QCOM0294")
Name (_UID, 0)
Name(_TZD, Package (){
\_SB.GPU0.MON0, \_SB.GPU0})
Name(TPSV, 3630)
Method(_PSV) { Return (\_SB.TZ98.TPSV) }
Name(TTC1, 1)
Method(_TC1) { Return (\_SB.TZ98.TTC1) }
//Method(_CRT) { Return (5630) }
Name(TTC2, 5)
Method(_TC2) { Return (\_SB.TZ98.TTC2) }
Name(TTSP, 20)
Method(_TSP) { Return (\_SB.TZ98.TTSP) }
Name(_TZP, 0)
Method(_DEP) {
Return (Package(0x2) {\_SB.PEP0,\_SB_.BCL1})
}
} // end of TZ98
//---------------------------------------------------------------------
// Critical Thermal Zones for ALL TSENS
//This sensor aggregates all the on chip TSENS into a single sensor
//for ACPI thermal manager. By having a critical thermal zone on this
//"virtual sensor" we don't have to add a critical thermal zone on every
//sensor and hence reduce the number of thermal zones.
//---------------------------------------------------------------------
//Critical Thermal zone on MSM virtual sensor to shutdown entire system
//at 110C.
ThermalZone (TZ99) {
Name (_HID, "QCOM02B2")
Name (_UID, 100)
Name(TCRT, 3830)
Method(_CRT) { Return (\_SB.TZ99.TCRT) }
Name(TTC1, 4)
Method(_TC1) { Return (\_SB.TZ99.TTC1) }
Name(TTC2, 3)
Method(_TC2) { Return (\_SB.TZ99.TTC2) }
Name(TTSP, 10)
Method(_TSP) { Return (\_SB.TZ99.TTSP) }
Name(_TZP, 0)
Method(_DEP) {
Return (Package() {\_SB.PEP0})
}
} // end of TZ99
//---------------------------------------------------------------------
// QC Recommended thermal limits ends
//---------------------------------------------------------------------
//---------------------------------------------------------------------
//
// Sample Thermal Zones for OEMs TZ40 - TZ79
//
//Sample TSENS thermal zone that can be added on any TSENS
//---------------------------------------------------------------------
//ThermalZone (TZ40) {
//Name (_HID, "QCOM2470")
//Name (_UID, 0)
//Name(_TZD, Package (){
//\_SB.SYSM.CLUS.CPU0, \_SB.SYSM.CLUS.CPU1, \_SB.SYSM.CLUS.CPU2, \_SB.SYSM.CLUS.CPU3,\_SB.SYSM.CLUS.CPU4, \_SB.SYSM.CLUS.CPU5,
//\_SB.PEP0, <Your cooling device>})
//Method(_PSV) { Return (3730) }
//Method(_CRT) { Return (3780) }
//Name(_TC1, 1)
//Name(_TC2, 2)
//Name(_TSP, 10) //Sampling rate of 1sec
//Name(_TZP, 0)
//Method(_DEP) {
// Return (Package() {\_SB.PEP0})
//}
//} // end of TZ40
//ThermalZone (TZ41) {
//Name (_HID, "QCOM2470")
//Name (_UID, 0)
//Name(_TZD, Package (){
//\_SB.SYSM.CLUS.CPU0, \_SB.SYSM.CLUS.CPU1, \_SB.SYSM.CLUS.CPU2, \_SB.SYSM.CLUS.CPU3,\_SB.SYSM.CLUS.CPU4, \_SB.SYSM.CLUS.CPU5,
//\_SB.PEP0, <Your cooling device>})
//Method(_PSV) { Return (3730) }
//Method(_CRT) { Return (3780) }
//Name(_TC1, 1)
//Name(_TC2, 2)
//Name(_TSP, 50) //Sampling rate of 5sec
//Name(_TZP, 0)
//Method(_DEP) {
// Return (Package() {\_SB.PEP0})
//}
//} // end of TZ41
//--------------------------------------------------------------------------//
//
// Sample VADC Thermal zones for OEMs
//
//Following are sample thermal zones that use the off chip ADC thermistors
//they are all currently using CPUs as a cooling device for a lack of better
//option. The OEMs should change this.
//--------------------------------------------------------------------------//
//Thermal zone for SYS_THERM2
// ThermalZone (TZ51) {
// Name (_HID, "QCOM248D")
// Name (_UID, 0)
// Name(_TZD, Package (){
//\_SB.SYSM.CLUS.CPU0, \_SB.SYSM.CLUS.CPU1, \_SB.SYSM.CLUS.CPU2, \_SB.SYSM.CLUS.CPU3,\_SB.SYSM.CLUS.CPU4, \_SB.SYSM.CLUS.CPU5,})
// Method(_PSV) { Return (3830) }
//Name(_TC1, 4)
//Name(_TC2, 3)
// Name(_TSP, 50)
//Name(_TZP, 0)
//Method(_DEP) {
// Return (Package() {\_SB.PEP0})
//}
// } // end of TZ51
//Thermal zone for PA_THERM1
// ThermalZone (TZ52) {
// Name (_HID, "QCOM248E")
// Name (_UID, 0)
// Name(_TZD, Package (){\_SB.SYSM.CLUS.CPU0, \_SB.SYSM.CLUS.CPU1, \_SB.SYSM.CLUS.CPU2, \_SB.SYSM.CLUS.CPU3})
// Method(_PSV) { Return (3430) }
// Name(_TC1, 4)
// Name(_TC2, 3)
// Name(_TSP, 50)
// Name(_TZP, 0)
//Method(_DEP) {
// Return (Package() {\_SB.PEP0})
//}
// } // end of TZ52

71
smartisan/panelcfg.asl Normal file
View File

@ -0,0 +1,71 @@
Name (PCFG, Buffer(){"
<?xml version='1.0' encoding='utf-8'?>
<PanelName>TD4362-E</PanelName>
<PanelDescription>TD4362 Single DSI Cmd Mode Panel(1080*2160 24bpp)</PanelDescription>
<Group id='Active Timing'>
<HorizontalActive>1080</HorizontalActive>
<HorizontalFrontPorch>44</HorizontalFrontPorch>
<HorizontalBackPorch>60</HorizontalBackPorch>
<HorizontalSyncPulse>2</HorizontalSyncPulse>
<VerticalActive>2242</VerticalActive>
<VerticalFrontPorch>8</VerticalFrontPorch>
<VerticalBackPorch>100</VerticalBackPorch>
<VerticalSyncPulse>2</VerticalSyncPulse>
<InvertDataPolarity>False</InvertDataPolarity>
<InvertVsyncPolairty>False</InvertVsyncPolairty>
<InvertHsyncPolarity>False</InvertHsyncPolarity>
<BorderColor>0x0</BorderColor>
</Group>
<Group id='Display Interface'>
<InterfaceType>9</InterfaceType>
<InterfaceColorFormat>3</InterfaceColorFormat>
</Group>
<Group id='DSI Interface'>
<DSIChannelId>2</DSIChannelId>
<DSIVirtualId>0</DSIVirtualId>
<DSIColorFormat>36</DSIColorFormat>
<DSITrafficMode>2</DSITrafficMode>
<DSILanes>4</DSILanes>
<DSIRefreshRate>0x3C0000</DSIRefreshRate>
<DSICmdSwapInterface>False</DSICmdSwapInterface>
<DSICmdUsingTrigger>False</DSICmdUsingTrigger>
<DSIEnableAutoRefresh>True</DSIEnableAutoRefresh>
<DSITECheckEnable>True</DSITECheckEnable>
<DSITEUsingDedicatedTEPin>True</DSITEUsingDedicatedTEPin>
<DSITEvSyncStartPos>2242</DSITEvSyncStartPos>
<DSITEvSyncInitVal>2242</DSITEvSyncInitVal>
<DSIControllerMapping>
00
</DSIControllerMapping>
</Group>
<DSIInitSequence> 39 51 ff
39 53 24
39 55 82
39 35 00
39 2a 00 00 04 37
39 2b 00 00 08 c1
39 44 07 fa
05 11 00
ff 78
05 29 00
ff 20
29 B0 04
29 B9 9B 51 07 E6 00 10 00
29 BA BB 2F 1D BE 00 10 04
29 CE 5D 40 60 78 87 94 9E AB B8 C4 CD D6 DE E5 EC F3 FD FF 04 28 04 04 42 00 69 5A 40 01 F4 00 00 04 FA 00
29 CA 1D FC FC FC 00 07 07 00 00 00 EB E7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
29 F9 64
29 B0 03
</DSIInitSequence>
<DSITermSequence> 05 28
ff ff
05 10
ff ff
</DSITermSequence>
<TLMMGPIODefaultHigh>34</TLMMGPIODefaultHigh>
<Group id='Backlight Configuration'>
<BacklightType>1</BacklightType>
<BacklightPmicControlType>2</BacklightPmicControlType>
<DisplayResetInfo>0 5000 5000 1000 0</DisplayResetInfo>
</Group>
"})

521
smartisan/pmic_batt.asl Normal file
View File

@ -0,0 +1,521 @@
Include("cust_pmic_batt.asl")
//
// PMIC Battery Manger Driver
//
Device (PMBT) {
Name (_HID, "QCOM0264")
Alias(\_SB.PSUB, _SUB)
Name (_DEP, Package(0x2) {
\_SB_.PMIC,
\_SB_.ADC1,
//\_SB_.PEIC
})
Method (_STA) {
Return (0xB) // Device is installable, functional & should not be visible in OSPM/Device Manager
}
Method (_CRS, 0x0, NotSerialized) {
Name (RBUF, ResourceTemplate ()
{
//GpioInt(Edge, ActiveBoth, Shared, PullUp, 0, "\\_SB.PM01",,,,) {208} // 0x80 - PM_INT__SCHG_CHGR__CHGR_ERROR_RT_STS - Charger Error Interrupt
//GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {336} // 0x210 - PM_INT__FG_BCL__IBT_HI - IBAT greater than threshold Interrupt.
//GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {337} // 0x211 - PM_INT__FG_BCL__IBT_THI - VBatt less than threshold Interrupt
//GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {352} // 0x220 - PM_INT__FG_MEM_IF__IMA_RDY - MEMIF access Interrupt
//GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {215} // 0x87 - PM_INT__SCHG_CHGR__CHGR_7 - Termination Current Interrupt
//GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {209} // 0x81 - PM_INT__SCHG_CHGR__CHARGING_STATE_CHANGE - Charger Inhibit Interrupt
GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {329} // 0x209 - PM_INT__FG_BATT_INFO__VBT_LOW - VBAT_LOW Interrupt
//GpioInt(Edge, ActiveBoth, Shared, PullUp, 0, "\\_SB.PM01",,,,) {240} // 0xA0 - PM_INT__SCHG_DC__DCIN_COLLAPSE - Qi Wireless Charger Interrupt
GpioInt(Edge, ActiveHigh, Exclusive, PullUp, 0, "\\_SB.PM01",,,,) {331} // 0x20B - PM_INT__FG_BATT_INFO__BT_MISS - BATT_MISSING Interrupt
GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {237} // 0x9D - PM_INT__SCHG_USB__USBIN_SOURCE_CHANGE - AICL_DONE IRQ (Rising Only)
//GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {232} // 0x98 - PM_INT__SCHG_USB__USBIN_COLLAPSE - USB_UV IRQ (Rising Only)
//GpioInt(Edge, ActiveHigh, Exclusive, PullUp, 0, "\\_SB.PM01",,,,) {322} // 0x202 - PM_INT__FG_BATT_SOC__BSOC_DELTA - FULL_SOC Interrupt
//GpioInt(Edge, ActiveHigh, Exclusive, PullUp, 0, "\\_SB.PM01",,,,) {323} // 0x203 - PM_INT__FG_BATT_SOC__MSOC_DELTA - EMPTY_SOC Interrupt
// GpioInt(Edge, ActiveHigh, Exclusive, PullUp, 0, "\\_SB.PM01",,,,) {213} // 0x85 - PM_INT__SCHG_CHGR__FG_FVCAL_QUALIFIED - FVCAL_QUALIFIED IRQ
GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {224} // 0x90 - PM_INT__SCHG_BATIF__BAT_TEMP - Jeita limit interrupt
})
Return (RBUF)
}
//ACPI methods for Battery Manager Device
Method (BMNR) {
Name (CFG0,
Package(){
1, //* 0: Select Platform: 0- No HW, 1- SMChg+FGGge, 2- SMB3pChg+SMB3pGge, 3- LBChg+VMBMS
0, //* 1: Error State Handling: 0- Dont Shutdown, 1- Shutdown
1, //* 2: Listen to BatteryClass: 0- No 1- Yes
0, //* 3: Test Mode Power Flag: 0- Discharging, 1- PowerOnline+Charging
"CUST_PMIC" //* 4: cust_pmic config identifier
})
Store(CUST, Index(CFG0, 4))
Return (CFG0)
}
//ACPI methods for Timer
Method (BTIM) {
Name (CFG0,
Package(){
30000, // Charging Heartbeat Timer
10000, // Charging Tolerable Delay
300000, // Discharging Heartbeat Timer
120000, // Discharging Tolerable Delay
0, // Poll Timer , 0=Timer not used.
0, // Poll Tolerable Delay
28080000, //Charging Timeout (TDone) Timer
0, //Charging Timeout(TDone) Tolerable Delay
})
Return (CFG0)
}
//ACPI methods for Battery Info
Method (BBAT) {
Name (CFG0,
Package(){
1, //* 0: Battery Technology
0x4C494F4E, //* 1: Battery Chemistry: hex(LION)
0xFFFFFFFF, //* 2: BFCC: (mWh), Design Capacity
0xFFFFFFFF, //* 3: BFCC: (mWh), Full Charge Capacity
0xFFFFFFFF, //* 4: PCT1: (% of FCC), Default Alert 1
0xFFFFFFFF, //* 5: PCT2: (% of FCC), Default Alert 2
"QCOMBATT01", //* 6: Device Name
"Qualcomm", //* 7: Manufacture Name
"QCOMBAT01_07012011", //* 8: Battery Unique ID
"07012011", //* 9: Battery Serial Number
19, //* 10: Battery Manufacture Date
04, //* 11: Battery Manufacture Month
2014 //* 12: Battery Manufacture Year
})
//Local2 = Default Alert1 = PCT1 * BFCC / 100
Multiply(PCT1,BFCC,Local0)
Divide(Local0, 100, Local1, Local2)
//Local3 = Default Alert2 = PCT2 * BFCC / 100
Multiply(PCT2,BFCC,Local0)
Divide(Local0, 100, Local1, Local3)
Store(BFCC, Index(CFG0, 2))
Store(BFCC, Index(CFG0, 3))
Store(Local2, Index(CFG0, 4))
Store(Local3, Index(CFG0, 5))
Return (CFG0)
}
//ACPI methods for Proprietary chargers
Method (BPCH) {
Name (CFG0,
Package(){
3000, // QC2.0 charger current = 3000mA
3000, // QC3.0 charger current = 3000mA
1500 // Invalid Wall charger current = 1500mA
})
Return (CFG0)
}
//ACPI methods for foldback chargers
Method (BFCH) {
Name (CFG0,
Package(){
1, // Feature enable/disable
5, // No of consecutive times charger attach/detach
5000, // msecs, Time elapsed between attach/detach
900, // mA, Current setting for foldback charger
})
Return (CFG0)
}
//ACPI methods for coin cell charger
Method (BCCC) {
Name (CFG0,
Package(){
1, //Enable coin cell charger; 1 = enable, 0 = disable
0, // RSET, 0=2K1, 1=1K7, 2=1K2, 3 = 0K8
0 // VSET, 0=2V5, 1=3V2, 2=3V1, 3=3V0
})
Return (CFG0)
}
//ACPI methods for Recharge/Maintenance Mode
Method (BRCH) {
Name (CFG0,
Package(){
100, // Delta V Recharge threshold = 100mV
0 // Delta V Recharge Reduction below Normal= 0mV
})
Return (CFG0)
}
//ACPI methods for Qi Charging
Method (_BQI) {
Name (CFG0,
Package(){
0,
})
Return (CFG0)
}
//ACPI methods for Interrupt Name
Method (BIRQ) {
Name (CFG0,
Package(){
//"ChgError", //Charger Error
//"BclIrq1", //IBAT greater than threshold IRQ
//"BclIrq2", // VBAT less than threshold IRQ
//"MEMIFaccess", //MEMIF access granted IRQ
//"TccReached", // Termination Current IRQ
// "ChargerInhibit" // Charger Inhibit IRQ
"VbatLow", // VBAT LOW IRQ
//"QiWlcDet", // Qi charging
"BattMissing", // BATT_MISSING IRQ
"AiclDone", // AICL Done
// "UsbUv", //USB UV
//"SOCFull", //SOC Full IRQ
//"SOCEmpty", //SOC Empty IRQ
//"FvCal", //FVCAl IRQ
"JeitaLimit" //JEITA limit IRQ
})
Return (CFG0)
}
//ACPI methods for Platform File
Method (BPLT) {
Name (CFG0,
Package(){
1024, //* 0: ACPI Version
0xFFFFFFFF, //* 1: VNOM: (mV), Nominal Battery Voltage
0xFFFFFFFF, //* 2: VLOW: (mV), Low Battery Voltage
0xFFFFFFFF, //* 3: EMPT: (mV), VcutOff
0xFFFFFFFF, //* 4: DCMA: (mA), DC Current
1, //* 5: ChargePath Priority: Select 0 for DC, 1 for USB
50, //* 6: RSLOW for maxFlashCurrentPrediction
50, //* 7: RPARA for maxFlashCurrentPrediction
5000, //* 8: VINFLASH for maxFlashCurrentPrediction
8, //* 9: FlashParam for maxFlashCurrentPrediction
1, //* 10: AFP Mode Supported
80, //* 11: AFP Trigger Max Battery Temp (+80 deg C)
0xFFFFFFEC, //* 12: AFP Trigger Min Battery Temp (-20 deg C)
72, //* 13: Watchdog timer in secs
100, //* 14: Charger iterm 100 mA for now
30, //* 15: SRAM logging timer
5, //* 16: VBATT average Window Size
6, //* 17: Emergency Shutdown Initial SOC
500, //* 18: SoC convergent point
126, //* 19: LM_Threshold
400, //* 20: MH_Threshold
0xFFFFFFFF, //* 21: BOCP: (mA), OCP current used in BCL
750, //* 22: soc (75%) below which no soc linearization even in CV charging
1, //* 23: BMD - Battery Missing Detection Source when source is attached: BATT_ID (1=BATT_ID, 4=HW Misssing Algorithm)
2, //* 24: ibat src sensing : 0 for batfet and 1 for external sensing
50, //* 25: IFGD: (mA), FG Iterm delta; (iterm + this value) determines when FG report 100%
10, //* 26: VFGD: (mV), CC to CV Vdelta; (Vfloat - this value) determine when FG report 100%
1, //* 27: 0 - disable SOC linearization; 1 (nonzero): enable SOC linearization
0xFFFFFFEC, //* 28: (Celcius), Temperature threshold do have different SOC slope limiter
10, //* 29: (milli%) - SOC slope limiter when charging and at lower temperature than threshold
10, //* 30: (milli%) - SOC slope limiter when charging and at higher temperature than threshold
10, //* 31: (milli%) - SOC slope limiter when discharging and at lower temperature than threshold
10, //* 32: (milli%) - SOC slope limiter when discharging and at higher temperature than threshold
1, //* 33: 0 - disable FCC learning; 1 (nonzero): enable FCC leearning
150, //* 34: maximum starting SOC (in tenth percent)at which FCC learning would be turned on during charging
100, //* 35: maximum allowable decrement (in tenth percent) of battery capacity in FCC learning
5, //* 36: maximum allowable increment (in tenth percent) of battery capacity in FCC learning
10, //* 37: battery temperature in degree C below which switch to low temp ESR update steps
0x02, //* 38: ESR update step tight, (2 * 0.001953 = 0.0039 = 0.4% max change each update)
0x33, //* 39: ESR update step broad, (51* 0.001953 = 0.099603 = 10% max change each update)
0x02, //* 40: ESR update step tight at low temp (below 10 degree, 0.4% max change each update)
0x0A, //* 41: ESR update step broad at low temp (below 10 degree, 2% max change each update)
0, //* 42: mOhm, RConn
0, //* 43: Type C Thermal Mitigation Enable
70, //* 44: Temperature to arm mitigation (degree C)
50, //* 45: ICL adjustment (percent)
60 //* 46: Temperature to disarm mitigation (degree C)
})
Store(VNOM, Index(CFG0, 1))
Store(VLOW, Index(CFG0, 2))
Store(EMPT, Index(CFG0, 3))
Store(DCMA, Index(CFG0, 4))
Store(BOCP, Index(CFG0, 21))
Store(IFGD, Index(CFG0, 25))
Store(VFGD, Index(CFG0, 26))
Return (CFG0)
}
//ACPI methods for Platform File
Method (BPTM) {
Name (CFG0,
Package(){
15000, // Emergency Timer
0, // Emergency Tolerable Delay
})
Return (CFG0)
}
//*****************************************************
// Battery Charge Table 1 (BCT1)
// Notes: used in Method(BJTA) & Method (BAT1)
//*****************************************************
Name (BCT1, Package(){
4350, //* 0: VDD1: (mV), Float Voltage (FV)
2100, //* 1: FCC1: (mA), Full Charge Current (FCC)
0, //* 2: HCLI: (C) hard cold limit - at which temperature charging will be disabled
10, //* 3: SCLI: (C) soft cold limit - at which temperature charge current/float voltage will be reduced to JEITA compensated value
45, //* 4: SHLI: (C) soft hot limit - at which temperature float voltage/charge current will be reduced to JEITA compensated value
55, //* 5: HHLI: (C) hard hot limit - at which temperature charging will be disabled
105, //* 6: FVC1: (mV) Float Voltage compensation (amount of FV reduction) when in battery hot-soft limit
0, //* 7: (mV) Float Voltage compensation (amount of FV reduction) when in battery cold-soft limit
//* notes: put 0 value to disable
//* These values (10 vs 11) should be the same when HW JEITA is enabled
0, //* 8: (mA) Charge Current compensation (amount of CC reduction) when in battery hot-soft limit
1000, //* 9: CCC1: (mA) Charge Current compensation (amount of CC reduction) when in battery cold-soft limit
//* notes: put 0 value to disable
//* These values (12 vs 13) should be the same when HW JEITA is enabled
})
//ACPI methods for JEITA
Method (BJTA) {
Name (CFG0,
Package(){
2, //* 0: Select JEITA Configuration: 0- No JEITA, 1- SW JEITA, 2- HW JEITA
2, //* 1: Temperature Hysteresis (in deg C)
Package(0xa){0,0,0,0,0,0,0,0,0,0}
//* 2: Structure for default charge table
})
Store(VDD1, Index(\_SB_.PMBT.BCT1, 0))
Store(FCC1, Index(\_SB_.PMBT.BCT1, 1))
Store(HCLI, Index(\_SB_.PMBT.BCT1, 2))
Store(SCLI, Index(\_SB_.PMBT.BCT1, 3))
Store(SHLI, Index(\_SB_.PMBT.BCT1, 4))
Store(HHLI, Index(\_SB_.PMBT.BCT1, 5))
Store(FVC1, Index(\_SB_.PMBT.BCT1, 6))
Store(CCC1, Index(\_SB_.PMBT.BCT1, 9))
//Use BCT1 as the Default Charge Table
Store(\_SB_.PMBT.BCT1, Index(CFG0, 2))
Return (CFG0)
}
//ACPI methods for Battery-1 (Ascent 860-82209-0000 3450mAh)
Method (BAT1)
{
Name (CFG0,
Package(){
0, //* 0: Battery Category: 0-NORMAL, 1-SMART
0xFFFFFFEC, //* 1: min operating battery temp (-20 deg C)
65, //* 2: max operating battery temp (+65 deg C)
Package(4){0,0,0,0}, //* 3: 128-bit battery info for future expansion
Package(0xa){0,0,0,0,0,0,0,0,0,0}
//* 4: Structure for charge table
})
//assign Charge Table to BCT1
//Notes: 1) If the default charge table and desire charge table are different,
// Create another table (ex: BCT2) with the same structure as BCT1 and modify BCT1 below with the new table name
// 2) Method(BJTA) is parsed before this(BAT1) method in Battmngr module
// Method(BJTA) may be updating BCT1 parameters using configuration from cust_pmic_batt.asl (refer to BJTA method details)
// If BAT1 desires different value to be used (than what used in BJTA), pls change/update relevant parameter(s) here.
Store(\_SB_.PMBT.BCT1, Index(CFG0, 4))
Return (CFG0)
}
//ACPI methods for Battery Error Handling
Method (BEHC)
{
//Actions for Battery Error Handling
// 0x0 - Do Nothing
// 0x1 - Reload Charge Table
// 0x2 - Error Shutdown
// 0x4 - Emergency Shutdown
// 0x8 - Enter Test Mode
Name (CFG0,
Package(){
1, //1-Feature Enable, 0-Feature Disable
0x8, //Action(s) for DEBUG state -> Enter Test Mode
0x1, //Action(s) for NORMAL state -> Reload Charge Table
0x0, //Action(s) for SMART_AUTHENTICATED state -> Do nothing
0x0, //Action(s) for UNKNOWN state -> Do nothing
0x2, //Action(s) for NOT_PRESENT state -> Error Shutdown
0x2, //Action(s) for INVALID state -> Error Shutdown
0x4 //Action(s) for OUT_OP_RANGE state -> AFP for out of operational range
})
Return (CFG0)
}
//ACPI methods for Charge Table Management Configuration
Method (CTMC)
{
Name (CFG0,
Package(){
2000, //* 0: min RID for DEBUG category: 2K
14000, //* 1: max RID for DEBUG category: 14K
0xFFFFFFFF, //* 2: RID2: min RID for NORMAL category: 15K
0xFFFFFFFF, //* 3: RID3: max RID for NORMAL category: 140K
240000, //* 4: min RID for SMART category: 240K
450000, //* 5: max RID for SMART category: 450K
1, //* 6: Number of charging table
})
Store(RID2, Index(CFG0, 2))
Store(RID3, Index(CFG0, 3))
Return (CFG0)
}
//ACPI methods for Parallel Charging
Method (BMPC) {
Name (CFG0,
Package(){
0, //* 0: Feaature Enable. 1: Enabled, 0: Disable
1, //* 1: Input Power Disctribution (HW) configuration: 0: MID-MID, 1: USBIN-USBIN
7000, //* 2: (mW) Input Power Threshold to decide if parallel charging to be enabled or not
//* Note: Not applicable for MID-MID configuration
1000, //* 3: (mA) Charge Current Threshold to decide if parallel charging to be enabled or not
50, //* 4: (%) Slave Charger Initial Power Distribution
60, //* 5: (mV) Slave Charger Float Voltage Headroom
500, //* 6: (mA) Slave Charger Charge Current Done Threshold
90, //* 7: Slave Charger Minimum Efficiency
0, //* 8: Slave Charger HW ID. 0: SMB1380/1
70, //* 9: (%)Slave Charger Max Power Distribution: 70%
0, //* 10: (%)Slave Charger Min Power Distribution: 0%
Package(0x4)//* 11: Thermal Balancing Configuration
{
5, //11.1: (C)Temperature Difference to trigger thermal balancing. 0 to disable the feature
5, //11.2: (%)Step to redistrubute the power
120, //11.3: (Sec)Minimum Wait Time for each redistribution attempt
5, //11.4: (C)Temperature Margin for Master Charger
}
})
Return (CFG0)
}
}
//
// PMIC Battery Miniclass Driver
//
Device (PMBM) {
Name (_HID, "QCOM0263")
Alias(\_SB.PSUB, _SUB)
Name (_DEP, Package(0x1)
{
\_SB_.PMBT
})
Method (_CRS, 0x0, NotSerialized) {
Name (RBUF, ResourceTemplate () {
})
Return (RBUF)
}
Method (_STA) {
Return (0xB) // Device is installable, functional & should not be visible in OSPM/Device Manager
}
}
//
//FGBCL Driver
//
Device (BCL1) {
Name (_HID, "QCOM02D6")
Alias(\_SB.PSUB, _SUB)
Name (_DEP, Package(0x1)
{
\_SB_.PMIC
})
Method (_STA) {
Return (0xB) // Device is installable, functional & should not be visible in OSPM/Device Manager
}
Method (_CRS, 0x0, NotSerialized) {
Name (RBUF, ResourceTemplate () {
GpioInt(Edge, ActiveBoth, Shared, PullUp, 0, "\\_SB.PM01",,,,RawDataBuffer(){0x08}) {64} // 0x1E8 - PM_INT__BCL_COMP__VCOMP_LOW0 - VCOMP_LOW0 IRQ
GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {65} // 0x1E9 - PM_INT__BCL_COMP__VCOMP_LOW1 - VCOMP_LOW1 IRQ
GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {66} // 0x1EA - PM_INT__BCL_COMP__VCOMP_LOW2 - VCOMP_LOW2 IRQ
GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {67} // 0x1EB - PM_INT__BCL_COMP__VCOMP_HI - VCOMP_HI IRQ
//GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {68} // 0x1EC - PM_INT__BCL_COMP__SYS_OK - SYS_OK IRQ
//GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {72} // 0x1F0 - PM_INT__BCL_PLM__VCOMP_LVL0_PLM - LVL0_PLM IRQ
//GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {74} // 0x1F2 -PM_INT__BCL_PLM__VCOMP_LVL2_PLM - LVL2_PLM IRQ
GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {75} // 0x1F3 - PM_INT__BCL_PLM__VCOMP_BA - BAN alarm IRQ
GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {336} // 0x210 - PM_INT__FG_BCL__IBT_HI - ibatt high IRQ
GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {337} // 0x211 - PM_INT__FG_BCL__IBT_THI - ibatt too high IRQ
GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {339} // 0x213 - PM_INT__FG_BCL__VBT_LO_CMP - vbatt low irq
GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {340} // 0x214 - PM_INT__FG_BCL__VBT_TLO_CMP - vbatt too low irq
GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {324} // 0x204 - PM_INT__FG_BATT_SOC__MSOC_LOW - MSOC_Low Interrupt
GpioInt(Edge, ActiveHigh, Shared, PullUp, 0, "\\_SB.PM01",,,,) {326} // 0x206 - PM_INT__FG_BATT_SOC__MSOC_HIGH - MSOC_HI Interrupt
GpioInt(Edge, ActiveBoth, Shared, PullUp, 0, "\\_SB.PM01",,,,RawDataBuffer(){0x08}) {344} // 0x218 - PM_INT__FG_LMH__LMH_LVL0 - LMH_LVL0 IRQ
GpioInt(Edge, ActiveBoth, Shared, PullUp, 0, "\\_SB.PM01",,,,RawDataBuffer(){0x08}) {345} // 0x219 - PM_INT__FG_LMH__LMH_LVL1 - LMH_LVL1 IRQ
GpioInt(Edge, ActiveBoth, Shared, PullUp, 0, "\\_SB.PM01",,,,RawDataBuffer(){0x08}) {346} // 0x21A - PM_INT__FG_LMH__LMH_LVL2 - LMH_LVL2 IRQ
})
Return (RBUF)
}
//ACPI methods for FGBCL device
Method (BCLS) {
Name (CFG0,
Package(){
3, //* FGBCL ACPI revision
7, //* 0: BCL disabled, 1: vph_pwr bcl enabled, 2: fg vbatt enabled, 4: fg ibatt enabled
5000, //* battery ocp current
80, //* ibatt high threshold is set to 80 for 80% of OCP
90, //* ibatt too high is set to 90 for 90% of OCP
2800, //* vbatt low is set to 2800 mV
2600, //* vbatt too low is set to 2600 mV
3200, //* vcomp_low0 threshold is 3200 mv
2750, //* vcomp_low1 threshold is 2750 mv
2500, //* vcomp_low2 threshold is 2500 mV
10, //* poll timer for battery soc polling.
1, //* 1- enable battery percent notification. 0-disable battery percent notification
2000, //* debug board Min battery ID in Ohm
14000 //* debug board Max battery ID in Ohm
})
Return (CFG0)
}
//ACPI methods for Interrupt Name
Method (BCLQ) {
Name (CFG0,
Package(){
"VCOMP_LOW0", //vcomp_low0 IRQ
"VCOMP_LOW1", //vcomp_low1 IRQ
"VCOMP_LOW2", //vcomp_low2 IRQ
"VCOMP_HI", //vcomp_hi IRQ
//"SYS_OK", // sys_ok irq
//"LVL0_PLM", // LVL0_PLM IRQ
//"LVL1_PLM" // LVL1_PLM IRQ
//"LVL2_PLM", //LVL2_PLM IRQ
"BAN_ALARM", // BAN_ALARM IRQ
"IBATT_HI", // IBATT HIGH IRQ
"IBATT_THI", // IBATT TOO HIGH IRQ
"VBATT_LOW", // VBATT_LOW IRQ
"VBATT_TLOW", // VBATT TOO LOW IRQ
"MSOC_LOW", //monotonic soc low IRQ
"MSOC_HI", //monotonic soc high IRQ
"LMH_LVL0", //LMH_LVL0 IRQ
"LMH_LVL1", //LMH_LVL1 IRQ
"LMH_LVL2", //LMH_LVL2 IRQ
})
Return (CFG0)
}
}
//
//PMIC Type-C Controler Driver (PMICTCC) Driver
//
Device(PTCC)
{
Name (_HID, "QCOM02E6")
Alias(\_SB.PSUB, _SUB)
Name (_DEP, Package(0x1) {\_SB_.PMIC})
Method (_CRS, 0x0, NotSerialized) {
Name (RBUF, ResourceTemplate () {
GpioInt(Edge, ActiveHigh, SharedAndWake, PullNone, 0, "\\_SB.PM01",,,,) {239} // 0x9F - PM_INT__SCHG_USB__TYPE_C_OR_RID_DETECTION_CHANGE - CC State Changed IRQ
GpioInt(Edge, ActiveHigh, SharedAndWake, PullNone, 0, "\\_SB.PM01",,,,) {270} // 0xBE - PM_INT__USB_PD__MESSAGE_RX_DISCARDED - Message RX Discarded IRQ
GpioInt(Edge, ActiveHigh, SharedAndWake, PullNone, 0, "\\_SB.PM01",,,,) {269} // 0xBD - PM_INT__USB_PD__MESSAGE_TX_DISCARDED - Message TX Discarded IRQ
GpioInt(Edge, ActiveHigh, SharedAndWake, PullNone, 0, "\\_SB.PM01",,,,) {268} // 0xBC - PM_INT__USB_PD__MESSAGE_TX_FAILED - Message TX Failed IRQ
GpioInt(Edge, ActiveHigh, SharedAndWake, PullNone, 0, "\\_SB.PM01",,,,) {267} // 0xBB - PM_INT__USB_PD__MESSAGE_RECEIVED - Message Received IRQ
GpioInt(Edge, ActiveHigh, SharedAndWake, PullNone, 0, "\\_SB.PM01",,,,) {266} // 0xBA - PM_INT__USB_PD__MESSAGE_SENT - Message Sent IRQ
GpioInt(Edge, ActiveHigh, SharedAndWake, PullNone, 0, "\\_SB.PM01",,,,) {265} // 0xB9 - PM_INT__USB_PD__SIGNAL_RECEIVED - Singal Received IRQ
GpioInt(Edge, ActiveHigh, SharedAndWake, PullNone, 0, "\\_SB.PM01",,,,) {264} // 0xB8 - PM_INT__USB_PD__SIGNAL_SENT - Signal Sent IRQ
GpioInt(Edge, ActiveHigh, Exclusive, PullUp, 0, "\\_SB.PM01",,,,) {217} // 0x89 - PM_INT__SCHG_OTG__OTG_OVERCURRENT - OTG_OC_IRQ
GpioInt(Edge, ActiveBoth, Exclusive, PullUp, 0, "\\_SB.PM01",,,,) {263} // 0xB7 - PM_INT__SCHG_MISC__SWITCHER_POWER_OK - SWITCHER_POWER_OK (CHG_MISC)
GpioInt(Edge, ActiveHigh, Exclusive, PullUp, 0, "\\_SB.PM01",,,,) {235} // 0x9B - PM_INT__SCHG_USB__USBIN_OV - USBIN_OV (CHG_USB)
// GpioIo (Exclusive, PullUp, 0, 0, , "\\_SB.PM01", , , , ) {493} // 0x668 - PM_INT__PM2_GPIO14__GPIO_IN_STS - GPIO14B For Type-C Debug Accessory Mode
})
Return (RBUF)
}
}

557
smartisan/thz.asl Normal file
View File

@ -0,0 +1,557 @@
//
// The Driver for Dynamically Changing Thresholds
// of Thermal Zones
//
Method(THTZ, 0x4, NotSerialized)
{
// Switch based on thermal zone number
Switch(toInteger(Arg0))
{
Case(1)
{
Switch(toInteger(Arg3))
{
Case(0) {
If(Arg2)
{
Store(Arg1, \_SB.TZ1.TPSV)
Notify(\_SB.TZ1, 0x81)
}
Return(\_SB.TZ1._PSV)
}
Case(2) {
If(Arg2)
{
Store(Arg1, \_SB.TZ1.TTSP)
Notify(\_SB.TZ1, 0x81)
}
Return(\_SB.TZ1._TSP)
}
Case(3) {
If(Arg2)
{
Store(Arg1, \_SB.TZ1.TTC1)
Notify(\_SB.TZ1, 0x81)
}
Return(\_SB.TZ1._TC1)
}
Case(4) {
If(Arg2)
{
Store(Arg1, \_SB.TZ1.TTC2)
Notify(\_SB.TZ1, 0x81)
}
Return(\_SB.TZ1._TC2)
}
Default
{
Return(0xFFFF)
}
}
}
Case(3)
{
Switch(toInteger(Arg3))
{
Case(0) {
If(Arg2)
{
Store(Arg1, \_SB.TZ3.TPSV)
Notify(\_SB.TZ3, 0x81)
}
Return(\_SB.TZ3._PSV)
}
Case(2) {
If(Arg2)
{
Store(Arg1, \_SB.TZ3.TTSP)
Notify(\_SB.TZ3, 0x81)
}
Return(\_SB.TZ3._TSP)
}
Case(3) {
If(Arg2)
{
Store(Arg1, \_SB.TZ3.TTC1)
Notify(\_SB.TZ3, 0x81)
}
Return(\_SB.TZ3._TC1)
}
Case(4) {
If(Arg2)
{
Store(Arg1, \_SB.TZ3.TTC2)
Notify(\_SB.TZ3, 0x81)
}
Return(\_SB.TZ3._TC2)
}
Default
{
Return(0xFFFF)
}
}
}
Case(20)
{
Switch(toInteger(Arg3))
{
Case(0) {
If(Arg2)
{
Store(Arg1, \_SB.TZ20.TPSV)
Notify(\_SB.TZ20, 0x81)
}
Return(\_SB.TZ20._PSV)
}
Case(2) {
If(Arg2)
{
Store(Arg1, \_SB.TZ20.TTSP)
Notify(\_SB.TZ20, 0x81)
}
Return(\_SB.TZ20._TSP)
}
Case(3) {
If(Arg2)
{
Store(Arg1, \_SB.TZ20.TTC1)
Notify(\_SB.TZ20, 0x81)
}
Return(\_SB.TZ20._TC1)
}
Case(4) {
If(Arg2)
{
Store(Arg1, \_SB.TZ20.TTC2)
Notify(\_SB.TZ20, 0x81)
}
Return(\_SB.TZ20._TC2)
}
Default
{
Return(0xFFFF)
}
}
}
Case(21)
{
Switch(toInteger(Arg3))
{
Case(0) {
If(Arg2)
{
Store(Arg1, \_SB.TZ21.TPSV)
Notify(\_SB.TZ21, 0x81)
}
Return(\_SB.TZ21._PSV)
}
Case(2) {
If(Arg2)
{
Store(Arg1, \_SB.TZ21.TTSP)
Notify(\_SB.TZ21, 0x81)
}
Return(\_SB.TZ21._TSP)
}
Case(3) {
If(Arg2)
{
Store(Arg1, \_SB.TZ21.TTC1)
Notify(\_SB.TZ21, 0x81)
}
Return(\_SB.TZ21._TC1)
}
Case(4) {
If(Arg2)
{
Store(Arg1, \_SB.TZ21.TTC2)
Notify(\_SB.TZ21, 0x81)
}
Return(\_SB.TZ21._TC2)
}
Default
{
Return(0xFFFF)
}
}
}
Case(33) {
Switch(toInteger(Arg3))
{
Case(0) {
If(Arg2)
{
Store(Arg1, \_SB.TZ33.TPSV)
Notify(\_SB.TZ33, 0x81)
}
Return(\_SB.TZ33._PSV)
}
Case(2) {
If(Arg2)
{
Store(Arg1, \_SB.TZ33.TTSP)
Notify(\_SB.TZ33, 0x81)
}
Return(\_SB.TZ33._TSP)
}
Case(3) {
If(Arg2)
{
Store(Arg1, \_SB.TZ33.TTC1)
Notify(\_SB.TZ33, 0x81)
}
Return(\_SB.TZ33._TC1)
}
Case(4) {
If(Arg2)
{
Store(Arg1, \_SB.TZ33.TTC2)
Notify(\_SB.TZ33, 0x81)
}
Return(\_SB.TZ33._TC2)
}
Default
{
Return(0xFFFF)
}
}
}
Case(36) {
Switch(toInteger(Arg3))
{
Case(0) {
If(Arg2)
{
Store(Arg1, \_SB.TZ36.TPSV)
Notify(\_SB.TZ36, 0x81)
}
Return(\_SB.TZ36._PSV)
}
Case(2) {
If(Arg2)
{
Store(Arg1, \_SB.TZ36.TTSP)
Notify(\_SB.TZ36, 0x81)
}
Return(\_SB.TZ36._TSP)
}
Case(3) {
If(Arg2)
{
Store(Arg1, \_SB.TZ36.TTC1)
Notify(\_SB.TZ36, 0x81)
}
Return(\_SB.TZ36._TC1)
}
Case(4) {
If(Arg2)
{
Store(Arg1, \_SB.TZ36.TTC2)
Notify(\_SB.TZ36, 0x81)
}
Return(\_SB.TZ36._TC2)
}
Default
{
Return(0xFFFF)
}
}
}
Case(37) {
Switch(toInteger(Arg3))
{
Case(0) {
If(Arg2)
{
Store(Arg1, \_SB.TZ37.TPSV)
Notify(\_SB.TZ37, 0x81)
}
Return(\_SB.TZ37._PSV)
}
Case(1)
{
If(Arg2)
{
Store(Arg1, \_SB.TZ37.TCRT)
Notify(\_SB.TZ37, 0x81)
}
Return(\_SB.TZ37._CRT)
}
Case(2) {
If(Arg2)
{
Store(Arg1, \_SB.TZ37.TTSP)
Notify(\_SB.TZ37, 0x81)
}
Return(\_SB.TZ37._TSP)
}
Case(3) {
If(Arg2)
{
Store(Arg1, \_SB.TZ37.TTC1)
Notify(\_SB.TZ37, 0x81)
}
Return(\_SB.TZ37._TC1)
}
Case(4) {
If(Arg2)
{
Store(Arg1, \_SB.TZ37.TTC2)
Notify(\_SB.TZ37, 0x81)
}
Return(\_SB.TZ37._TC2)
}
Default
{
Return(0xFFFF)
}
}
}
Case(38) {
Switch(toInteger(Arg3))
{
Case(0) {
If(Arg2)
{
Store(Arg1, \_SB.TZ38.TPSV)
Notify(\_SB.TZ38, 0x81)
}
Return(\_SB.TZ38._PSV)
}
Default
{
Return(0xFFFF)
}
}
}
Case(40) {
Switch(toInteger(Arg3))
{
Case(0) {
If(Arg2)
{
Store(Arg1, \_SB.TZ40.TPSV)
Notify(\_SB.TZ40, 0x81)
}
Return(\_SB.TZ40._PSV)
}
Case(2) {
If(Arg2)
{
Store(Arg1, \_SB.TZ40.TTSP)
Notify(\_SB.TZ40, 0x81)
}
Return(\_SB.TZ40._TSP)
}
Case(3) {
If(Arg2)
{
Store(Arg1, \_SB.TZ40.TTC1)
Notify(\_SB.TZ40, 0x81)
}
Return(\_SB.TZ40._TC1)
}
Case(4) {
If(Arg2)
{
Store(Arg1, \_SB.TZ40.TTC2)
Notify(\_SB.TZ40, 0x81)
}
Return(\_SB.TZ40._TC2)
}
Default
{
Return(0xFFFF)
}
}
}
Case(44) {
Switch(toInteger(Arg3))
{
Case(0) {
If(Arg2)
{
Store(Arg1, \_SB.TZ44.TPSV)
Notify(\_SB.TZ44, 0x81)
}
Return(\_SB.TZ44._PSV)
}
Case(2) {
If(Arg2)
{
Store(Arg1, \_SB.TZ44.TTSP)
Notify(\_SB.TZ44, 0x81)
}
Return(\_SB.TZ44._TSP)
}
Case(3) {
If(Arg2)
{
Store(Arg1, \_SB.TZ44.TTC1)
Notify(\_SB.TZ44, 0x81)
}
Return(\_SB.TZ44._TC1)
}
Case(4) {
If(Arg2)
{
Store(Arg1, \_SB.TZ44.TTC2)
Notify(\_SB.TZ44, 0x81)
}
Return(\_SB.TZ44._TC2)
}
Default
{
Return(0xFFFF)
}
}
}
Case(98)
{
Switch(toInteger(Arg3))
{
Case(0) {
If(Arg2)
{
Store(Arg1, \_SB.TZ98.TPSV)
Notify(\_SB.TZ98, 0x81)
}
Return(\_SB.TZ98._PSV)
}
Case(2) {
If(Arg2)
{
Store(Arg1, \_SB.TZ98.TTSP)
Notify(\_SB.TZ98, 0x81)
}
Return(\_SB.TZ98._TSP)
}
Case(3) {
If(Arg2)
{
Store(Arg1, \_SB.TZ98.TTC1)
Notify(\_SB.TZ98, 0x81)
}
Return(\_SB.TZ98._TC1)
}
Case(4) {
If(Arg2)
{
Store(Arg1, \_SB.TZ98.TTC2)
Notify(\_SB.TZ98, 0x81)
}
Return(\_SB.TZ98._TC2)
}
Default
{
Return(0xFFFF)
}
}
}
Case(99)
{
Switch(toInteger(Arg3))
{
Case(1) {
If(Arg2)
{
Store(Arg1, \_SB.TZ99.TCRT)
Notify(\_SB.TZ99, 0x81)
}
Return(\_SB.TZ99._CRT)
}
Case(2) {
If(Arg2)
{
Store(Arg1, \_SB.TZ99.TTSP)
Notify(\_SB.TZ99, 0x81)
}
Return(\_SB.TZ99._TSP)
}
Case(3) {
If(Arg2)
{
Store(Arg1, \_SB.TZ99.TTC1)
Notify(\_SB.TZ99, 0x81)
}
Return(\_SB.TZ99._TC1)
}
Case(4) {
If(Arg2)
{
Store(Arg1, \_SB.TZ99.TTC2)
Notify(\_SB.TZ99, 0x81)
}
Return(\_SB.TZ99._TC2)
}
Default
{
Return(0xFFFF)
}
}
}
Default {
Return(0xFFFF)
}
}
}