From b1141263b4122135eee9b3f428460bf5c41d0626 Mon Sep 17 00:00:00 2001 From: Nikolay Date: Wed, 13 Jun 2018 10:43:23 +0500 Subject: [PATCH] Add onboard led support --- .../sun50i-h5-orangepi0+2-led-fix.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 patch/kernel/sunxi-next/sun50i-h5-orangepi0+2-led-fix.patch diff --git a/patch/kernel/sunxi-next/sun50i-h5-orangepi0+2-led-fix.patch b/patch/kernel/sunxi-next/sun50i-h5-orangepi0+2-led-fix.patch new file mode 100644 index 0000000000..80d805cd79 --- /dev/null +++ b/patch/kernel/sunxi-next/sun50i-h5-orangepi0+2-led-fix.patch @@ -0,0 +1,33 @@ +--- sun50i-h5-orangepi-zero-plus2.dts 2018-06-12 21:44:33.735864264 +0500 ++++ sun50i-h5-orangepi0+2-led-fix.dts 2018-06-13 08:53:24.345843418 +0500 +@@ -72,6 +72,23 @@ + reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */ + post-power-on-delay-ms = <50>; + }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ pwr { ++ label = "orangepi:green:pwr"; ++ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ ++ default-state = "on"; ++ }; ++ ++ status { ++ label = "orangepi:red:status"; ++ linux,default-trigger = "mmc0"; ++ gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; /* PA17 */ ++ default-state = "on"; ++ }; ++ }; + }; + + &mmc0 { +@@ -186,4 +203,4 @@ + */ + usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ + status = "okay"; +-}; +\ No newline at end of file ++};