From f3eb862f5f5a75fb1e88d526c414655364049809 Mon Sep 17 00:00:00 2001 From: George Hilliard Date: Sat, 17 Aug 2019 09:16:25 -0500 Subject: [PATCH] Add support for blinking LED --- board/businesscard/v1/dts/businesscard.dts | 20 ++++++++++++++++++++ board/businesscard/v1/linux_defconfig | 1 - board/businesscard/v1/uboot_defconfig | 2 ++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/board/businesscard/v1/dts/businesscard.dts b/board/businesscard/v1/dts/businesscard.dts index a1749a9..bf8be5e 100644 --- a/board/businesscard/v1/dts/businesscard.dts +++ b/board/businesscard/v1/dts/businesscard.dts @@ -28,6 +28,26 @@ regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins>; + + heartbeat { + label = "Heartbeat"; + gpios = <&pio 3 7 GPIO_ACTIVE_LOW>; + default-state = "on"; + linux,default-trigger = "heartbeat"; + }; + }; +}; + +&pio { + led_pins: led_pins { + pins = "PD7"; + function = "gpio_out"; + }; }; &spi0 { diff --git a/board/businesscard/v1/linux_defconfig b/board/businesscard/v1/linux_defconfig index 95096d9..9a40867 100644 --- a/board/businesscard/v1/linux_defconfig +++ b/board/businesscard/v1/linux_defconfig @@ -82,7 +82,6 @@ CONFIG_LEDS_CLASS=y CONFIG_LEDS_GPIO=y CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y CONFIG_SYNC_FILE=y # CONFIG_VIRTIO_MENU is not set CONFIG_SUN8I_A83T_CCU=y diff --git a/board/businesscard/v1/uboot_defconfig b/board/businesscard/v1/uboot_defconfig index f6ea357..f6862a3 100644 --- a/board/businesscard/v1/uboot_defconfig +++ b/board/businesscard/v1/uboot_defconfig @@ -43,6 +43,8 @@ CONFIG_CMD_UBI=y CONFIG_DEFAULT_DEVICE_TREE="businesscard" # CONFIG_NET is not set CONFIG_HAVE_BLOCK_DEVICE=y +CONFIG_LED=y +CONFIG_LED_GPIO=y # CONFIG_MMC is not set CONFIG_MTD=y CONFIG_DM_SPI_FLASH=y