riscv: dts: sifive unmatched: Add PWM controlled LEDs
This adds the two PWM controlled LEDs to the HiFive Unmatched device tree. D12 is just a regular green diode, but D2 is an RGB diode with 3 PWM inputs controlling the three different colours. Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Pavel Machek <pavel@ucw.cz> Tested-by: Ron Economos <re@w6rz.net> Link: https://lore.kernel.org/r/20220705210143.315151-5-emil.renner.berthing@canonical.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
This commit is contained in:
parent
d8357e3bf8
commit
2cfe9bbec5
@ -4,6 +4,8 @@
|
||||
#include "fu740-c000.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
|
||||
/* Clock frequency (in Hz) of the PCB crystal for rtcclk */
|
||||
#define RTCCLK_FREQ 1000000
|
||||
@ -44,6 +46,46 @@
|
||||
compatible = "gpio-poweroff";
|
||||
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led-controller-1 {
|
||||
compatible = "pwm-leds";
|
||||
|
||||
led-d12 {
|
||||
pwms = <&pwm0 0 7812500 PWM_POLARITY_INVERTED>;
|
||||
active-low;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
max-brightness = <255>;
|
||||
label = "d12";
|
||||
};
|
||||
};
|
||||
|
||||
led-controller-2 {
|
||||
compatible = "pwm-leds-multicolor";
|
||||
|
||||
multi-led {
|
||||
color = <LED_COLOR_ID_RGB>;
|
||||
max-brightness = <255>;
|
||||
label = "d2";
|
||||
|
||||
led-red {
|
||||
pwms = <&pwm0 2 7812500 PWM_POLARITY_INVERTED>;
|
||||
active-low;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
};
|
||||
|
||||
led-green {
|
||||
pwms = <&pwm0 1 7812500 PWM_POLARITY_INVERTED>;
|
||||
active-low;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
};
|
||||
|
||||
led-blue {
|
||||
pwms = <&pwm0 3 7812500 PWM_POLARITY_INVERTED>;
|
||||
active-low;
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
|
Loading…
Reference in New Issue
Block a user