Add support for blinking LED

This commit is contained in:
George Hilliard 2019-08-17 09:16:25 -05:00
parent 1f8f677017
commit f3eb862f5f
3 changed files with 22 additions and 1 deletions

View file

@ -28,6 +28,26 @@
regulator-min-microvolt = <3300000>; regulator-min-microvolt = <3300000>;
regulator-max-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 { &spi0 {

View file

@ -82,7 +82,6 @@ CONFIG_LEDS_CLASS=y
CONFIG_LEDS_GPIO=y CONFIG_LEDS_GPIO=y
CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
CONFIG_SYNC_FILE=y CONFIG_SYNC_FILE=y
# CONFIG_VIRTIO_MENU is not set # CONFIG_VIRTIO_MENU is not set
CONFIG_SUN8I_A83T_CCU=y CONFIG_SUN8I_A83T_CCU=y

View file

@ -43,6 +43,8 @@ CONFIG_CMD_UBI=y
CONFIG_DEFAULT_DEVICE_TREE="businesscard" CONFIG_DEFAULT_DEVICE_TREE="businesscard"
# CONFIG_NET is not set # CONFIG_NET is not set
CONFIG_HAVE_BLOCK_DEVICE=y CONFIG_HAVE_BLOCK_DEVICE=y
CONFIG_LED=y
CONFIG_LED_GPIO=y
# CONFIG_MMC is not set # CONFIG_MMC is not set
CONFIG_MTD=y CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y CONFIG_DM_SPI_FLASH=y