Include("cust_hwn.asl")
//
- // Touch
+ // Touch and panel xml
//
- Include("focaltech.asl")
+ Include("panel.asl")
//
// Buttons
+++ /dev/null
-//
-// This file contains the touch ACPI device definitions.
-//
-
-Device (TSC1)
-{
- Name (_HID, "MSHW1003") // _HID: Hardware ID
- Alias (\_SB.PSUB, _SUB)
- Name (_DEP, Package (0x03) // _DEP: Dependencies
- {
- \_SB.GIO0,
- \_SB.IC15,
- \_SB.PEP0
- })
- Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings
- {
- Name (RBUF, ResourceTemplate ()
- {
- I2cSerialBusV2 (0x0020, ControllerInitiated, 0x00061A80,
- AddressingMode7Bit, "\\_SB.IC15",
- 0x00, ResourceConsumer, , Exclusive,
- )
- GpioInt (Level, ActiveLow, Exclusive, PullUp, 0x0000,
- "\\_SB.GIO0", 0x00, ResourceConsumer, ,
- )
- { // Pin list
- 0x007D
- }
- })
- Return (RBUF) /* \_SB_.TSC1._CRS.RBUF */
- }
-
- Name (PGID, Buffer (0x0A)
- {
- "\\_SB.TSC1"
- })
- Name (DBUF, Buffer (DBFL){})
- CreateByteField (DBUF, Zero, STAT)
- CreateByteField (DBUF, 0x02, DVAL)
- CreateField (DBUF, 0x18, 0xA0, DEID)
- Method (_S1D, 0, NotSerialized) // _S1D: S1 Device State
- {
- Return (0x03)
- }
-
- Method (_S2D, 0, NotSerialized) // _S2D: S2 Device State
- {
- Return (0x03)
- }
-
- Method (_S3D, 0, NotSerialized) // _S3D: S3 Device State
- {
- Return (0x03)
- }
-
- Method (_PS0, 0, NotSerialized) // _PS0: Power State 0
- {
- DEID = Buffer (ESNL){}
- DVAL = Zero
- DEID = PGID /* \_SB_.TSC1.PGID */
- If (\_SB.ABD.AVBL)
- {
- \_SB.PEP0.FLD0 = DBUF /* \_SB_.TSC1.DBUF */
- }
- }
-
- Method (_PS3, 0, NotSerialized) // _PS3: Power State 3
- {
- DEID = Buffer (ESNL){}
- DVAL = 0x03
- DEID = PGID /* \_SB_.TSC1.PGID */
- If (\_SB.ABD.AVBL)
- {
- \_SB.PEP0.FLD0 = DBUF /* \_SB_.TSC1.DBUF */
- }
- }
-}
+++ /dev/null
-//===========================================================================
-// <cust_touch_resources.asl>
-// DESCRIPTION
-// This file contains the resources needed by touch driver.
-//
-//===========================================================================
-Scope(\_SB_.PEP0)
-{
-
- Method(LPMX)
- {
- Return(LPXC)
- }
-
- Name(LPXC,
- Package(){
- Package ()
- {
- "DEVICE",
- "\\_SB.TSC1",
- Package ()
- {
- "DSTATE",
- Zero,
- Package ()
- {
- "PMICVREGVOTE",
- Package ()
- {
- "PPP_RESOURCE_ID_LDO6_A",
- One,
- 0x001C5200,
- One,
- 0x07,
- Zero
- }
- },
-
- Package ()
- {
- "PMICVREGVOTE",
- Package ()
- {
- "PPP_RESOURCE_ID_LDO28_A",
- One,
- 0x002DE600,
- One,
- 0x07,
- Zero
- }
- },
-
- Package ()
- {
- "TLMMGPIO",
- Package ()
- {
- 0x17,
- One,
- Zero,
- One,
- 0x03,
- Zero
- }
- },
-
- Package ()
- {
- "TLMMGPIO",
- Package ()
- {
- 0x7D,
- Zero,
- Zero,
- Zero,
- 0x03,
- Zero
- }
- },
-
- Package ()
- {
- "TLMMGPIO",
- Package ()
- {
- 0x63,
- Zero,
- Zero,
- One,
- Zero,
- Zero
- }
- },
-
- Package ()
- {
- "DELAY",
- Package ()
- {
- 0x02
- }
- },
-
- Package ()
- {
- "TLMMGPIO",
- Package ()
- {
- 0x63,
- One,
- Zero,
- One,
- Zero,
- Zero
- }
- },
-
- Package ()
- {
- "DELAY",
- Package ()
- {
- 0xC8
- }
- }
- },
-
- Package ()
- {
- "DSTATE",
- 0x03,
- Package ()
- {
- "PMICVREGVOTE",
- Package ()
- {
- "PPP_RESOURCE_ID_LDO6_A",
- One,
- Zero,
- Zero,
- Zero,
- Zero
- }
- },
-
- Package ()
- {
- "PMICVREGVOTE",
- Package ()
- {
- "PPP_RESOURCE_ID_LDO28_A",
- One,
- Zero,
- Zero,
- Zero,
- Zero
- }
- },
-
- Package ()
- {
- "TLMMGPIO",
- Package ()
- {
- 0x17,
- Zero,
- Zero,
- One,
- One,
- Zero
- }
- },
-
- Package ()
- {
- "TLMMGPIO",
- Package ()
- {
- 0x63,
- Zero,
- Zero,
- Zero,
- One,
- Zero
- }
- },
-
- Package ()
- {
- "TLMMGPIO",
- Package ()
- {
- 0x7D,
- Zero,
- Zero,
- Zero,
- One,
- Zero
- }
- }
- }
- }
- })
-}
//
// Include primary panel specific ROM data
-Include("panelcfg.asl")
-Include("panelcfg2.asl")
+//Include("panelcfg.asl")
+//Include("panelcfg2.asl")
//Check if 0x01 on IC15 is present
//If it is, return tianma panel config
-Method (PNPC, 0, NotSerialized) {
+//Method (PNPC, 0, NotSerialized) {
// OperationRegion(TOP1, GenericSerialBus, 0x00, 0x100) // GenericSerialBus device at command value offset 0
// Field(TOP1, BufferAcc, NoLock, Preserve)
// Return(PCFB)
// }
- Return(PCFB)
-}
+ //Return(PCFB)
+//}
///
// All other dynamically detected panel configurations must not use this name
//======================================================================================
- Local2 = PNPC
+ Local2 = PCFA
// Ensure offset does not exceed the buffer size
// otherwise return a Null terminated buffer
-Include ("focaltech_resources.asl")
+Include ("novatek_focaltech_resources.asl")
Device (TSC1)
{
^^PEP0.FLD0 = DBUF /* \_SB_.TSC1.DBUF */
}
}
-}
\ No newline at end of file
+}
+++ /dev/null
-Scope (PEP0)
- {
- Method (LPMX, 0, NotSerialized)
- {
- Return (LPXC) /* \_SB_.PEP0.LPXC */
- }
-
- Name (LPXC, Package (0x01)
- {
- Package (0x04)
- {
- "DEVICE",
- "\\_SB.TSC1",
- Package (0x08)
- {
- "DSTATE",
- Zero,
- Package (0x02)
- {
- "TLMMGPIO",
- Package (0x06)
- {
- 0x1F,
- Zero,
- Zero,
- Zero,
- 0x03,
- Zero
- }
- },
-
- Package (0x02)
- {
- "TLMMGPIO",
- Package (0x06)
- {
- 0x20,
- Zero,
- Zero,
- One,
- Zero,
- Zero
- }
- },
-
- Package (0x02)
- {
- "PMICVREGVOTE",
- Package (0x06)
- {
- "PPP_RESOURCE_ID_LDO14_A",
- One,
- 0x001B7740,
- One,
- 0x07,
- Zero
- }
- },
-
- Package (0x02)
- {
- "DELAY",
- Package (0x01)
- {
- 0x03E8
- }
- },
-
- Package (0x02)
- {
- "TLMMGPIO",
- Package (0x06)
- {
- 0x20,
- One,
- Zero,
- One,
- Zero,
- Zero
- }
- },
-
- Package (0x02)
- {
- "DELAY",
- Package (0x01)
- {
- 0x4E20
- }
- }
- },
-
- Package (0x05)
- {
- "DSTATE",
- 0x03,
- Package (0x02)
- {
- "PMICVREGVOTE",
- Package (0x06)
- {
- "PPP_RESOURCE_ID_LDO14_A",
- One,
- Zero,
- Zero,
- 0x05,
- Zero
- }
- },
-
- Package (0x02)
- {
- "TLMMGPIO",
- Package (0x06)
- {
- 0x20,
- Zero,
- Zero,
- Zero,
- One,
- Zero
- }
- },
-
- Package (0x02)
- {
- "TLMMGPIO",
- Package (0x06)
- {
- 0x1F,
- Zero,
- Zero,
- Zero,
- One,
- Zero
- }
- }
- }
- }
- })
- }
\ No newline at end of file
+++ /dev/null
-Name (PCFA, Buffer(){"
- <?xml version='1.0' encoding='utf-8'?>
-<PanelName>TIANMA_NT36672A_FHD</PanelName>
-<PanelDescription>Tianma Single DSI Video Mode Panel (1080x2246 24bpp)</PanelDescription>
-<Group id='Active Timing'>
- <HorizontalActive>1080</HorizontalActive>
- <HorizontalFrontPorch>40</HorizontalFrontPorch>
- <HorizontalBackPorch>44</HorizontalBackPorch>
- <HorizontalSyncPulse>20</HorizontalSyncPulse>
- <HorizontalSyncSkew>0</HorizontalSyncSkew>
- <HorizontalLeftBorder>0</HorizontalLeftBorder>
- <HorizontalRightBorder>0</HorizontalRightBorder>
- <VerticalActive>2246</VerticalActive>
- <VerticalFrontPorch>10</VerticalFrontPorch>
- <VerticalBackPorch>10</VerticalBackPorch>
- <VerticalSyncPulse>2</VerticalSyncPulse>
- <VerticalSyncSkew>0</VerticalSyncSkew>
- <VerticalTopBorder>0</VerticalTopBorder>
- <VerticalBottomBorder>0</VerticalBottomBorder>
- <InvertDataPolarity>False</InvertDataPolarity>
- <InvertVsyncPolairty>False</InvertVsyncPolairty>
- <InvertHsyncPolarity>False</InvertHsyncPolarity>
- <BorderColor>0x0</BorderColor>
-</Group>
-<Group id='Display Interface'>
- <InterfaceType>8</InterfaceType>
- <InterfaceColorFormat>3</InterfaceColorFormat>
-</Group>
-<Group id='DSI Interface'>
- <DSIChannelId>2</DSIChannelId>
- <DSIVirtualId>0</DSIVirtualId>
- <DSIColorFormat>36</DSIColorFormat>
- <DSITrafficMode>1</DSITrafficMode>
- <DSILanes>4</DSILanes>
- <DSIRefreshRate>0x3C0000</DSIRefreshRate>
- <DSIHsaHseAfterVsVe>False</DSIHsaHseAfterVsVe>
- <DSILowPowerModeInHFP>False</DSILowPowerModeInHFP>
- <DSILowPowerModeInHBP>False</DSILowPowerModeInHBP>
- <DSILowPowerModeInHSA>False</DSILowPowerModeInHSA>
- <DSILowPowerModeInBLLPEOF>True</DSILowPowerModeInBLLPEOF>
- <DSILowPowerModeInBLLP>True</DSILowPowerModeInBLLP>
- <DSILP11AtInit>True</DSILP11AtInit>
- <DSIControllerMapping>
- 00
- </DSIControllerMapping>
-</Group>
-<DSIInitSequence>
- 15 FF 22
- 15 00 40
- 15 01 C0
- 15 02 40
- 15 03 40
- 15 04 40
- 15 05 40
- 15 06 40
- 15 07 40
- 15 08 40
- 15 09 40
- 15 0A 40
- 15 0B 40
- 15 0C 40
- 15 0D 40
- 15 0E 40
- 15 0F 40
- 15 10 40
- 15 11 50
- 15 12 60
- 15 13 70
- 15 14 58
- 15 15 68
- 15 16 78
- 15 17 77
- 15 18 39
- 15 19 2D
- 15 1A 2E
- 15 1B 32
- 15 1C 37
- 15 1D 3A
- 15 1E 40
- 15 1F 40
- 15 20 40
- 15 21 40
- 15 22 40
- 15 23 40
- 15 24 40
- 15 25 40
- 15 26 40
- 15 27 40
- 15 28 40
- 15 2D 00
- 15 2F 40
- 15 30 40
- 15 31 40
- 15 32 40
- 15 33 40
- 15 34 40
- 15 35 40
- 15 36 40
- 15 37 40
- 15 38 40
- 15 39 40
- 15 3A 40
- 15 3B 40
- 15 3D 40
- 15 3F 40
- 15 40 40
- 15 41 40
- 15 42 40
- 15 43 40
- 15 44 40
- 15 45 40
- 15 46 40
- 15 47 40
- 15 48 40
- 15 49 40
- 15 4A 40
- 15 4B 40
- 15 4C 40
- 15 4D 40
- 15 4E 40
- 15 4F 40
- 15 50 40
- 15 51 40
- 15 52 40
- 15 53 01
- 15 54 01
- 15 55 FE
- 15 56 77
- 15 58 CD
- 15 59 D0
- 15 5A D0
- 15 5B 50
- 15 5C 50
- 15 5D 50
- 15 5E 50
- 15 5F 50
- 15 60 50
- 15 61 50
- 15 62 50
- 15 63 50
- 15 64 50
- 15 65 50
- 15 66 50
- 15 67 50
- 15 68 50
- 15 69 50
- 15 6A 50
- 15 6B 50
- 15 6C 50
- 15 6D 50
- 15 6E 50
- 15 6F 50
- 15 70 07
- 15 71 00
- 15 72 00
- 15 73 00
- 15 74 06
- 15 75 0C
- 15 76 03
- 15 77 09
- 15 78 0F
- 15 79 68
- 15 7A 88
- 15 7C 80
- 15 7D 80
- 15 7E 80
- 15 7F 00
- 15 80 00
- 15 81 00
- 15 83 01
- 15 84 00
- 15 85 80
- 15 86 80
- 15 87 80
- 15 88 40
- 15 89 91
- 15 8A 98
- 15 8B 80
- 15 8C 80
- 15 8D 80
- 15 8E 80
- 15 8F 80
- 15 90 80
- 15 91 80
- 15 92 80
- 15 93 80
- 15 94 80
- 15 95 80
- 15 96 80
- 15 97 80
- 15 98 80
- 15 99 80
- 15 9A 80
- 15 9B 80
- 15 9C 80
- 15 9D 80
- 15 9E 80
- 15 9F 80
- 15 A0 8A
- 15 A2 80
- 15 A6 80
- 15 A7 80
- 15 A9 80
- 15 AA 80
- 15 AB 80
- 15 AC 80
- 15 AD 80
- 15 AE 80
- 15 AF 80
- 15 B7 76
- 15 B8 76
- 15 B9 05
- 15 BA 0D
- 15 BB 14
- 15 BC 0F
- 15 BD 18
- 15 BE 1F
- 15 BF 05
- 15 C0 0D
- 15 C1 14
- 15 C2 03
- 15 C3 07
- 15 C4 0A
- 15 C5 A0
- 15 C6 55
- 15 C7 FF
- 15 C8 39
- 15 C9 44
- 15 CA 12
- 15 CD 80
- 15 DB 80
- 15 DC 80
- 15 DD 80
- 15 E0 80
- 15 E1 80
- 15 E2 80
- 15 E3 80
- 15 E4 80
- 15 E5 40
- 15 E6 40
- 15 E7 40
- 15 E8 40
- 15 E9 40
- 15 EA 40
- 15 EB 40
- 15 EC 40
- 15 ED 40
- 15 EE 40
- 15 EF 40
- 15 F0 40
- 15 F1 40
- 15 F2 40
- 15 F3 40
- 15 F4 40
- 15 F5 40
- 15 F6 40
- 15 FB 01
- 15 FF 23
- 15 FB 01
- 15 01 84
- 15 05 2D
- 15 06 00
- 15 11 01
- 15 12 7B
- 15 15 6F
- 15 16 0B
- 15 29 0A
- 15 30 FF
- 15 31 FF
- 15 32 FF
- 15 33 FF
- 15 34 FF
- 15 35 FF
- 15 36 FF
- 15 37 FF
- 15 38 FC
- 15 39 F8
- 15 3A F4
- 15 3B F1
- 15 3D EE
- 15 3F EB
- 15 40 E8
- 15 41 E5
- 15 2A 13
- 15 45 FF
- 15 46 FF
- 15 47 FF
- 15 48 FF
- 15 49 FF
- 15 4A FF
- 15 4B FF
- 15 4C FF
- 15 4D ED
- 15 4E D5
- 15 4F BF
- 15 50 A6
- 15 51 96
- 15 52 86
- 15 53 76
- 15 54 66
- 15 2B 0E
- 15 58 FF
- 15 59 FF
- 15 5A FF
- 15 5B FF
- 15 5C FF
- 15 5D FF
- 15 5E FF
- 15 5F FF
- 15 60 F6
- 15 61 EA
- 15 62 E1
- 15 63 D8
- 15 64 CE
- 15 65 C3
- 15 66 BA
- 15 67 B3
- 15 FF 25
- 15 FB 01
- 15 05 04
- 15 FF 26
- 15 FB 01
- 15 1C AF
- 15 FF 10
- 15 FB 01
- 15 51 FF
- 15 53 24
- 15 55 00
- 05 11
- FF 78
- 05 29
- FF 14
- 15 FF 24
- 15 FB 01
- 15 C3 01
- 15 C4 54
- 15 FF 10
-</DSIInitSequence>
-<Group id='Backlight Configuration'>
- <BacklightType>1</BacklightType>
- <BacklightPmicControlType>2</BacklightPmicControlType>
- <BacklightSteps>100</BacklightSteps>
- <BacklightPMICBankSelect>15</BacklightPMICBankSelect>
- <BacklightPMICPWMFrequency>600000</BacklightPMICPWMFrequency>
- <BacklightDefault>80</BacklightDefault>
- <BacklightLowPower>40</BacklightLowPower>
- <PMIPowerPmicNumber>1</PMIPowerPmicNumber>
- <PMIPowerPmicModel>21</PMIPowerPmicModel>
- <PMIPowerconfig>1</PMIPowerConfig>
- <AdaptiveBrightnessFeature>1</AdaptiveBrightnessFeature>
- <CABLEnable>True</CABLEnable>
- <BrignessMinLuminance>200</BrignessMinLuminance>
- <BrignessMaxLuminance>319970</BrignessMaxLuminance>
-</Group>
-"})
+++ /dev/null
-Name (PCFB, Buffer(){"
- <?xml version='1.0' encoding='utf-8'?>
-<PanelName>EBBG</PanelName>
-<PanelDescription>EBBG (possibly Tianma)</PanelDescription>
-<Group id='Active Timing'>
- <HorizontalActive>1080</HorizontalActive>
- <HorizontalFrontPorch>28</HorizontalFrontPorch>
- <HorizontalBackPorch>16</HorizontalBackPorch>
- <HorizontalSyncPulse>4</HorizontalSyncPulse>
- <HorizontalSyncSkew>0</HorizontalSyncSkew>
- <HorizontalLeftBorder>0</HorizontalLeftBorder>
- <HorizontalRightBorder>0</HorizontalRightBorder>
- <VerticalActive>2246</VerticalActive>
- <VerticalFrontPorch>120</VerticalFrontPorch>
- <VerticalBackPorch>12</VerticalBackPorch>
- <VerticalSyncPulse>4</VerticalSyncPulse>
- <VerticalSyncSkew>0</VerticalSyncSkew>
- <VerticalTopBorder>0</VerticalTopBorder>
- <VerticalBottomBorder>0</VerticalBottomBorder>
- <InvertDataPolarity>False</InvertDataPolarity>
- <InvertVsyncPolairty>False</InvertVsyncPolairty>
- <InvertHsyncPolarity>False</InvertHsyncPolarity>
- <BorderColor>0x0</BorderColor>
-</Group>
-<Group id='Display Interface'>
- <InterfaceType>8</InterfaceType>
- <InterfaceColorFormat>3</InterfaceColorFormat>
-</Group>
-<Group id='DSI Interface'>
- <DSIChannelId>2</DSIChannelId>
- <DSIVirtualId>0</DSIVirtualId>
- <DSIColorFormat>36</DSIColorFormat>
- <DSITrafficMode>1</DSITrafficMode>
- <DSILanes>4</DSILanes>
- <DSIRefreshRate>0x3C0000</DSIRefreshRate>
- <DSIHsaHseAfterVsVe>False</DSIHsaHseAfterVsVe>
- <DSILowPowerModeInHFP>False</DSILowPowerModeInHFP>
- <DSILowPowerModeInHBP>False</DSILowPowerModeInHBP>
- <DSILowPowerModeInHSA>False</DSILowPowerModeInHSA>
- <DSILowPowerModeInBLLPEOF>True</DSILowPowerModeInBLLPEOF>
- <DSILowPowerModeInBLLP>True</DSILowPowerModeInBLLP>
- <DSILP11AtInit>True</DSILP11AtInit>
- <DSIControllerMapping>
- 00
- </DSIControllerMapping>
-</Group>
-<DSIInitSequence>
- 15 00 00
- FF 3C
- 29 FF 87 19 01
- 15 00 80
- 29 FF 87 19
- 15 00 A0
- 29 D6 7A 79 74 8C 8C 92 97 9B 97 8F 80 77
- 15 00 B0
- 29 D6 7E 7D 81 7A 7A 7B 7C 81 84 85 80 82
- 15 00 C0
- 29 D6 7D 7D 78 8A 89 8F 97 97 8F 8C 80 7A
- 15 00 D0
- 29 D6 7E 7D 81 7C 79 7B 7C 80 84 85 80 82
- 15 00 E0
- 29 D6 7B 7B 7B 80 80 80 80 80 80 80 80 80
- 15 00 F0
- 29 D6 7E 7E 80 80 80 80 80 80 80 80 80 80
- 15 00 00
- 29 D7 80 80 80 80 80 80 80 80 80 80 80 80
- 15 00 10
- 29 D7 80 80 80 80 80 80 80 80 80 80 80 80
- 15 00 A0
- 29 CA 0F 0F 0F
- 15 00 80
- 29 CA BE B5 AD A6 A0 9B 96 91 8D 8A 87 83
- 15 00 90
- 29 CA FE FF 66 F6 FF 66 FB FF 32
- 15 00 00
- 29 FF 00 00 00
- 15 00 80
- 29 FF 00 00
- 15 51 FF
- 15 53 24
- 15 55 00
- 05 11
- FF 78
- 05 29
-</DSIInitSequence>
-<Group id='Backlight Configuration'>
- <BacklightType>1</BacklightType>
- <BacklightPmicControlType>2</BacklightPmicControlType>
- <BacklightSteps>100</BacklightSteps>
- <BacklightPMICBankSelect>15</BacklightPMICBankSelect>
- <BacklightPMICPWMFrequency>600000</BacklightPMICPWMFrequency>
- <BacklightDefault>80</BacklightDefault>
- <BacklightLowPower>40</BacklightLowPower>
- <PMIPowerPmicNumber>1</PMIPowerPmicNumber>
- <PMIPowerPmicModel>21</PMIPowerPmicModel>
- <PMIPowerconfig>1</PMIPowerConfig>
- <AdaptiveBrightnessFeature>1</AdaptiveBrightnessFeature>
- <CABLEnable>True</CABLEnable>
- <BrignessMinLuminance>200</BrignessMinLuminance>
- <BrignessMaxLuminance>319970</BrignessMaxLuminance>
-</Group>
-"})
+++ /dev/null
-//
-// This file contains the Panel configuration for external display
-//
-// Panel configuration format is similar to primary panel in panelcfg.asl
-//
-
-Name (PCFG, Buffer() {0x0} )