1 # SuperIO SSTD generator
3 This page describes the common SSDT ACPI generator for SuperIO chips that can
6 ## Functional description
8 In order to automatically generate ACPI functions you need to add
9 a new `chip superio/common` and `device pnp xx.0 on` to your devicetree.
11 The xx denotes the hexadecimal address of the SuperIO.
13 Place the regular LDN pnp devices behind those two entries.
15 The code will automatically guess the function based on the decoded
16 I/O range and ISA IRQ number.
18 ## Example devicetree.cb
20 This example is based on AST2400.
23 # Add a "container" for proper ACPI code generation
25 device pnp 2e.0 on # just for the base device, not for the LDNs
26 chip superio/aspeed/ast2400
27 device pnp 2e.0 off end
28 device pnp 2e.2 on # SUART1
32 device pnp 2e.3 on # SUART2
36 device pnp 2e.4 on # SWC
48 ## Automatically generated methods
50 The following methods are generated for each SuperIO:
52 Acquire the global mutex and enter config mode.
53 It's called this at the beginning of an atomic operation to make sure
54 no other ACPI code messes with the config space while working on it.
57 Exit config mode and release the global mutex.
58 It's called at the end of an atomic operation.
61 Selects the (virtual) LDN given as Arg0.
62 This method isn't guarded with the global mutex.
65 Disables the (virtual) LDN given as Arg0.
66 This method acquires the global mutex.
69 Queries the state of the (virtual) LDN given as Arg0.
70 This method quires the global mutex.
74 1) Add ACPI HIDs to every SuperIO driver
75 2) Generate support methods that allow
76 * Setting resource settings at runtime
77 * Getting resource settings at runtime