Skip to content

Commit

Permalink
riscv: dtb: thead: Add BeagleV Ahead LEDs
Browse files Browse the repository at this point in the history
Add nodes for the 5 user controllable LEDs on the BeagleV Ahead board.

Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
  • Loading branch information
esmil authored and RevySR committed Dec 14, 2023
1 parent 099c21c commit d309135
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
/dts-v1/;

#include "th1520.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>

/ {
model = "BeagleV Ahead";
Expand Down Expand Up @@ -35,7 +37,42 @@
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_LOW>;
color = <LED_COLOR_ID_BLUE>;
label = "led1";
};

led-2 {
gpios = <&gpio4 9 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_BLUE>;
label = "led2";
};

led-3 {
gpios = <&gpio4 10 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_BLUE>;
label = "led3";
};

led-4 {
gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_BLUE>;
label = "led4";
};

led-5 {
gpios = <&gpio4 12 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_BLUE>;
label = "led4";
};
};
};

Expand Down Expand Up @@ -99,6 +136,24 @@
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 */
function = "3";
bias-disable;
drive-strength = <3>;
input-disable;
input-schmitt-disable;
slew-rate = <0>;
};
};
};

&padctrl0_apsys {
uart0_pins: uart0-0 {
tx-pins {
Expand Down

0 comments on commit d309135

Please sign in to comment.