Skip to content

Commit 01f4c5b

Browse files
committed
mb/system76/meer9: Add power_on_after_fail
Configure SuperIO for BIOS control of power loss behavior and add CMOS option to allow user control. Enum 1 is used instead of 7 as the `Keep` option does not seem to work on meer9. The same setting via SIO control (CRE4) does work, though. Change-Id: I9a215f5b0ab131a93afc1d8e41f608a263284ad0 Signed-off-by: Tim Crawford <[email protected]>
1 parent 01d1204 commit 01f4c5b

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

src/mainboard/system76/meer9/bootblock.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ static void superio_init(void)
6969
// GPIO 87 set high
7070
pnp_write_config(dev, 0xF1, 0x80); // Default is 0xFF
7171

72+
printk(BIOS_DEBUG, "configure ACPI (logical device A)\n");
73+
dev = PNP_DEV(0x2E, 0x0A);
74+
pnp_set_logical_device(dev);
75+
// User-defined resume state after power loss
76+
pnp_write_config(dev, 0xE4, 0x60); // Default is 0x00
77+
7278
printk(BIOS_DEBUG, "configure hardware monitor (logical device B)\n");
7379
dev = PNP_DEV(0x2E, 0x0B);
7480
pnp_set_logical_device(dev);

src/mainboard/system76/meer9/cmos.default

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
boot_option=Fallback
44
debug_level=Debug
55
me_state=Enable
6+
power_on_after_fail=Disable

src/mainboard/system76/meer9/cmos.layout

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ entries
1111
# RTC_CLK_ALTCENTURY
1212
400 8 r 0 century
1313

14+
# TODO: Use enum 7 to allow `Keep`
15+
409 2 e 1 power_on_after_fail
1416
412 4 e 6 debug_level
1517
416 1 e 2 me_state
1618
417 3 h 0 me_state_counter
@@ -22,6 +24,9 @@ entries
2224

2325
enumerations
2426

27+
1 0 Disable
28+
1 1 Enable
29+
2530
2 0 Enable
2631
2 1 Disable
2732

@@ -38,6 +43,10 @@ enumerations
3843
6 7 Debug
3944
6 8 Spew
4045

46+
7 0 Disable
47+
7 1 Enable
48+
7 2 Keep
49+
4150
checksums
4251

4352
checksum 408 799 984

0 commit comments

Comments
 (0)