]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
riscv: dtb: thead: Add BeagleV Ahead LEDs
authorEmil Renner Berthing <emil.renner.berthing@canonical.com>
Mon, 14 Oct 2024 17:54:23 +0000 (10:54 -0700)
committerDrew Fustini <dfustini@tenstorrent.com>
Tue, 15 Oct 2024 17:01:18 +0000 (10:01 -0700)
Add nodes for the 5 user controllable LEDs on the BeagleV Ahead board.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Signed-off-by: Drew Fustini <dfustini@tenstorrent.com>
arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts

index 0484fb390be4ed7078ef9eed6066b47b4311fc9a..c0cf9b086f8150b42f6d57448d813cd75b322f50 100644 (file)
@@ -7,6 +7,8 @@
 /dts-v1/;
 
 #include "th1520.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
 
 / {
        model = "BeagleV Ahead";
        memory@0 {
                device_type = "memory";
                reg = <0x0  0x00000000  0x1 0x00000000>;
+       };
+
+       leds {
+               pinctrl-names = "default";
+               pinctrl-0 = <&led_pins>;
+               compatible = "gpio-leds";
+
+               led-1 {
+                       gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>;
+                       color = <LED_COLOR_ID_BLUE>;
+                       label = "led1";
+               };
+
+               led-2 {
+                       gpios = <&gpio4 9 GPIO_ACTIVE_HIGH>;
+                       color = <LED_COLOR_ID_BLUE>;
+                       label = "led2";
+               };
+
+               led-3 {
+                       gpios = <&gpio4 10 GPIO_ACTIVE_HIGH>;
+                       color = <LED_COLOR_ID_BLUE>;
+                       label = "led3";
+               };
+
+               led-4 {
+                       gpios = <&gpio4 11 GPIO_ACTIVE_HIGH>;
+                       color = <LED_COLOR_ID_BLUE>;
+                       label = "led4";
+               };
 
+               led-5 {
+                       gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
+                       color = <LED_COLOR_ID_BLUE>;
+                       label = "led5";
+               };
        };
 };
 
        status = "okay";
 };
 
+&padctrl_aosys {
+       led_pins: led-0 {
+               led-pins {
+                       pins = "AUDIO_PA8",  /* GPIO4_8 */
+                              "AUDIO_PA9",  /* GPIO4_9 */
+                              "AUDIO_PA10", /* GPIO4_10 */
+                              "AUDIO_PA11", /* GPIO4_11 */
+                              "AUDIO_PA12"; /* GPIO4_12 */
+                       bias-disable;
+                       drive-strength = <3>;
+                       input-disable;
+                       input-schmitt-disable;
+                       slew-rate = <0>;
+               };
+       };
+};
+
 &padctrl0_apsys {
        uart0_pins: uart0-0 {
                tx-pins {