]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
stm32mp1: add gpio led support
authorPatrick Delaunay <patrick.delaunay@st.com>
Fri, 27 Jul 2018 14:37:05 +0000 (16:37 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 10 Aug 2018 14:27:32 +0000 (10:27 -0400)
This patch add the 4 LED available on the ED1 board and activated
gpio led driver.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi
configs/stm32mp15_basic_defconfig

index 39a0ebce9073fd794c5d8242ded88a37495e8f9f..4898483e1d16d35afd996a8fb85bccc6d7336749 100644 (file)
                mmc1 = &sdmmc2;
                i2c3 = &i2c4;
        };
+
+       led {
+               compatible = "gpio-leds";
+
+               red {
+                       label = "stm32mp:red:status";
+                       gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
+                       default-state = "off";
+               };
+               green {
+                       label = "stm32mp:green:user";
+                       gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
+                       default-state = "on";
+               };
+               orange {
+                       label = "stm32mp:orange:status";
+                       gpios = <&gpioh 7 GPIO_ACTIVE_HIGH>;
+                       default-state = "off";
+               };
+               blue {
+                       label = "stm32mp:blue:user";
+                       gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
+               };
+       };
 };
 
 &uart4_pins_a {
index ad21bdbab4f2ae0eb9e0d760a1c56eb9e9372968..5b7fa5b3a2e55660937fa9fd4e78d63a1bf36f71 100644 (file)
@@ -31,6 +31,8 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_STM32_ADC=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_STM32F7=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_STM32_SDMMC2=y
 # CONFIG_PINCTRL_FULL is not set