]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add support for interrupts, sensors and GPIO for AXP209 PMIC.
authorEmmanuel Vadot <manu@FreeBSD.org>
Thu, 26 May 2016 21:09:07 +0000 (21:09 +0000)
committerEmmanuel Vadot <manu@FreeBSD.org>
Thu, 26 May 2016 21:09:07 +0000 (21:09 +0000)
commit30068a1de9e30a6dc9edda490aff9c1985c4f479
tree72cca28dd48cb2ef7bb57d4be170385b7330b04f
parent32a4dda86d23b1fb730f395c73e5e0cd0a68de63
Add support for interrupts, sensors and GPIO for AXP209 PMIC.
Pressing the PEK (power enable key) will shutdown the board.
Some events are reported to devd via system "PMU" and subsystem
"Battery", "AC" and "USB" such as connected/disconnected.
Some sensors values (power source voltage/current) are reported via
sysctl (dev.axp209_pmu.X.)
It also expose a gpioc node usable in kernel and userland. Only 3 of
the 4 GPIO are exposed (The GPIO3 is different and mostly unused on
boards). Most popular boards uses GPIO1 as a sense pin for OTG power.
Add a dtsi file that adds gpio-controller capability to the device as
upstream doesn't defined it and include it in our custom DTS.

Reviewed by: jmcneill
Approved by: cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D6135
sys/arm/allwinner/axp209.c
sys/arm/allwinner/axp209reg.h [new file with mode: 0644]
sys/boot/fdt/dts/arm/bananapi.dts
sys/boot/fdt/dts/arm/cubieboard.dts
sys/boot/fdt/dts/arm/cubieboard2.dts
sys/boot/fdt/dts/arm/olimex-a20-som-evb.dts
sys/boot/fdt/dts/arm/olinuxino-lime.dts
sys/boot/fdt/dts/arm/xpowers-axp209.dtsi [new file with mode: 0644]
sys/dev/iicbus/twsi/a10_twsi.c