From b1141263b4122135eee9b3f428460bf5c41d0626 Mon Sep 17 00:00:00 2001 From: Nikolay Date: Wed, 13 Jun 2018 10:43:23 +0500 Subject: [PATCH 1/3] 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 ++}; From a815bbf1ccecc32cdc2f9b586522e6b424828f28 Mon Sep 17 00:00:00 2001 From: Nikolay Date: Wed, 13 Jun 2018 12:35:09 +0500 Subject: [PATCH 2/3] fix patching --- patch/kernel/sunxi-next/sun50i-h5-orangepi0+2-led-fix.patch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 index 80d805cd79..401317a2b6 100644 --- a/patch/kernel/sunxi-next/sun50i-h5-orangepi0+2-led-fix.patch +++ b/patch/kernel/sunxi-next/sun50i-h5-orangepi0+2-led-fix.patch @@ -1,5 +1,7 @@ +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +index f455146..2372664 100644 --- 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 ++++ sun50i-h5-orangepi-zero-plus2.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>; From 982a7d0881ec5cc8cabd5ba0f6cd7281bef0da60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Pe=C4=8Dovnik?= Date: Wed, 13 Jun 2018 10:22:31 +0200 Subject: [PATCH 3/3] Fix the patch --- ...ngepi-zero-plus2-onboard-led-support.patch} | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) rename patch/kernel/sunxi-next/{sun50i-h5-orangepi0+2-led-fix.patch => board-orangepi-zero-plus2-onboard-led-support.patch} (69%) diff --git a/patch/kernel/sunxi-next/sun50i-h5-orangepi0+2-led-fix.patch b/patch/kernel/sunxi-next/board-orangepi-zero-plus2-onboard-led-support.patch similarity index 69% rename from patch/kernel/sunxi-next/sun50i-h5-orangepi0+2-led-fix.patch rename to patch/kernel/sunxi-next/board-orangepi-zero-plus2-onboard-led-support.patch index 401317a2b6..6c62225608 100644 --- a/patch/kernel/sunxi-next/sun50i-h5-orangepi0+2-led-fix.patch +++ b/patch/kernel/sunxi-next/board-orangepi-zero-plus2-onboard-led-support.patch @@ -1,13 +1,13 @@ diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts -index f455146..2372664 100644 ---- sun50i-h5-orangepi-zero-plus2.dts 2018-06-12 21:44:33.735864264 +0500 -+++ sun50i-h5-orangepi-zero-plus2.dts 2018-06-13 08:53:24.345843418 +0500 -@@ -72,6 +72,23 @@ +index 495cbb17..7df39b99 100644 +--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts ++++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +@@ -72,6 +72,24 @@ reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */ post-power-on-delay-ms = <50>; }; + -+ leds { ++ leds { + compatible = "gpio-leds"; + + pwr { @@ -23,13 +23,7 @@ index f455146..2372664 100644 + 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 -+};