History log of /openbsd-current/sys/dev/fdt/dapmic.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.4 12-Oct-2022 kettenis

Extend struct todr_chip_handle with a todr_quality member. This allows us
to assign a quality to RTC implementation and pick the "best" RTC if a
system has multiple RTCs (or multiple interfaces to an RTC). This allows
us to prefer a battery-backed I2C RTC over an RTC that is part of the SoC
which is only running of the SoC is powered. It also allows us to
work around issues with firmware RTC interfaces that may lie to us or
even crash the system.

This change makes sure the todr_quality member of the struct is always
initialized. In most cases the quality will be set to zero; further
adjustments of the quality for specific subsystems/architectures will follow.

ok cheloha@, patrick@


# 1.3 03-Oct-2022 jca

dapmic(4): support clean shutdown with the power button

Register an interrupt handler and look for nONKEY events.
Mask off all other events. Also clear the FAULT_LOG register at
startup, but don't attempt to acknowledge its contents at runtime. This
lets the user force a shutdown with a long power button press. Some
events in EVENT_* or FAULT_LOG may benefit from more graceful handling.

This makes it possible to cleanly shutdown my Hifive Unmatched using
the power button.

Thanks to kettenis@ who wrote sfgpio(4) to handle dapmic(4) interrupts
on the Unmatched. ok kettenis@


Revision tags: OPENBSD_7_2_BASE
# 1.2 06-Apr-2022 naddy

constify struct cfattach


Revision tags: OPENBSD_7_0_BASE OPENBSD_7_1_BASE
# 1.1 16-Jun-2021 kettenis

Add ociic(4) and dapmic(4). The first is a driver for the OpenCores I2C
controller and the latter is a driver for the Dialog DA9063 PMIC. The
dapmic(4) driver currently supports the integrated RTC and also provides
support for resetting and powering down an application processor. This
functionality is used to support rebooting the SiFive Unmatched board.

ok deraadt@


# 1.3 03-Oct-2022 jca

dapmic(4): support clean shutdown with the power button

Register an interrupt handler and look for nONKEY events.
Mask off all other events. Also clear the FAULT_LOG register at
startup, but don't attempt to acknowledge its contents at runtime. This
lets the user force a shutdown with a long power button press. Some
events in EVENT_* or FAULT_LOG may benefit from more graceful handling.

This makes it possible to cleanly shutdown my Hifive Unmatched using
the power button.

Thanks to kettenis@ who wrote sfgpio(4) to handle dapmic(4) interrupts
on the Unmatched. ok kettenis@


Revision tags: OPENBSD_7_2_BASE
# 1.2 06-Apr-2022 naddy

constify struct cfattach


Revision tags: OPENBSD_7_0_BASE OPENBSD_7_1_BASE
# 1.1 16-Jun-2021 kettenis

Add ociic(4) and dapmic(4). The first is a driver for the OpenCores I2C
controller and the latter is a driver for the Dialog DA9063 PMIC. The
dapmic(4) driver currently supports the integrated RTC and also provides
support for resetting and powering down an application processor. This
functionality is used to support rebooting the SiFive Unmatched board.

ok deraadt@