Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added gpio-poweroff driver overlay for sun8i-h3 #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions sun8i-h3/README.sun8i-h3-overlays
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ adding fixed software (GPIO) chip selects is possible with a separate overlay

- analog-codec
- cir
- gpio-poweroff
- i2c0
- i2c1
- i2c2
Expand Down Expand Up @@ -68,6 +69,16 @@ I2C2 pins (SCL, SDA): PE12, PE13

On most board this bus is wired to Camera (CSI) socket

### gpio-poweroff

Activates poweroff gpio driver, this driver toggles a pin when the system shuts down

Parameters:

param_pwr_off_pin (pin)
Pin which outputs poweroff signal when system halts
Default: PG11

### pps-gpio

Activates pulse-per-second GPIO client
Expand Down
28 changes: 28 additions & 0 deletions sun8i-h3/sun8i-h3-gpio-poweroff.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/dts-v1/;
/plugin/;

/ {
compatible = "allwinner,sun8i-h3";

fragment@0 {
target = <&pio>;
__overlay__ {
pwr_off_pins: pwr_off_pins {
pins = "PG11";
function = "gpio_out";
};
};
};

fragment@1 {
target-path = "/";
__overlay__ {
gpio-poweroff {
compatible = "gpio-poweroff";
pinctrl-names = "default";
pinctrl-0 = <&pwr_off_pins>;
gpios = <&pio 6 11 0>;
};
};
};
};