From 3a4bbafea70f75a7cde30617d80c35d5f9076b6b Mon Sep 17 00:00:00 2001 From: Thomas Klaehn Date: Thu, 5 Oct 2017 09:16:28 +0200 Subject: [PATCH] Kernel: activate LED support. Signed-off-by: Thomas Klaehn --- .../files/0002-onboard-led-init-disable.patch | 37 +++++++++++++++++++ .../linux/files/enable_onboard_leds.cfg | 19 ++++++++++ .../linux/linux-yocto_4.10.bbappend | 2 + 3 files changed, 58 insertions(+) create mode 100644 recipes-kernel/linux/files/0002-onboard-led-init-disable.patch create mode 100644 recipes-kernel/linux/files/enable_onboard_leds.cfg diff --git a/recipes-kernel/linux/files/0002-onboard-led-init-disable.patch b/recipes-kernel/linux/files/0002-onboard-led-init-disable.patch new file mode 100644 index 0000000..2f64199 --- /dev/null +++ b/recipes-kernel/linux/files/0002-onboard-led-init-disable.patch @@ -0,0 +1,37 @@ +diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi +index 3e32dd18fd25..695634c7c895 100644 +--- a/arch/arm/boot/dts/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi +@@ -31,28 +31,28 @@ + led2 { + label = "beaglebone:green:heartbeat"; + gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>; +- linux,default-trigger = "heartbeat"; ++ linux,default-trigger = "none"; /* heartbeat */ + default-state = "off"; + }; + + led3 { + label = "beaglebone:green:mmc0"; + gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>; +- linux,default-trigger = "mmc0"; ++ linux,default-trigger = "none"; /* mmc0 */ + default-state = "off"; + }; + + led4 { + label = "beaglebone:green:usr2"; + gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; +- linux,default-trigger = "cpu0"; ++ linux,default-trigger = "none"; /* cpu0 */ + default-state = "off"; + }; + + led5 { + label = "beaglebone:green:usr3"; + gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>; +- linux,default-trigger = "mmc1"; ++ linux,default-trigger = "none"; /* mmc1 */ + default-state = "off"; + }; + }; diff --git a/recipes-kernel/linux/files/enable_onboard_leds.cfg b/recipes-kernel/linux/files/enable_onboard_leds.cfg new file mode 100644 index 0000000..2008304 --- /dev/null +++ b/recipes-kernel/linux/files/enable_onboard_leds.cfg @@ -0,0 +1,19 @@ +CONFIG_RFKILL_LEDS=y +CONFIG_INPUT_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PWM=y +CONFIG_LEDS_SYSCON=y +CONFIG_LEDS_USER=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_MTD=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_LEDS_TRIGGER_TRANSIENT=y +CONFIG_LEDS_TRIGGER_CAMERA=y +CONFIG_LEDS_TRIGGER_PANIC=y diff --git a/recipes-kernel/linux/linux-yocto_4.10.bbappend b/recipes-kernel/linux/linux-yocto_4.10.bbappend index 6e4aac6..d27f5dc 100644 --- a/recipes-kernel/linux/linux-yocto_4.10.bbappend +++ b/recipes-kernel/linux/linux-yocto_4.10.bbappend @@ -6,7 +6,9 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" SRC_URI += " \ file://rtl8192cu.cfg \ file://enable_pwm.cfg \ + file://enable_onboard_leds.cfg \ file://0001-bbb-enable-pwm.patch \ + file://0002-onboard-led-init-disable.patch \ " KERNEL_CONFIG_FRAGMENTS_append_ti33x = " \