9650bedc3edd14e8bfe876378fe987998cda3a8d
[openwrt/staging/wigyori.git] / target / linux / hifiveu / patches-5.10 / 0040-riscv-sifive-unmatched-add-D12-PWM-LED.patch
1 From ce24ba4d603a19690548b986d87ae2d9af26d015 Mon Sep 17 00:00:00 2001
2 From: David Abdurachmanov <david.abdurachmanov@sifive.com>
3 Date: Thu, 25 Mar 2021 04:34:52 -0700
4 Subject: [PATCH 23/28] riscv: sifive: unmatched: add D12 PWM LED
5
6 Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
7 ---
8 arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts | 12 ++++++++++++
9 1 file changed, 12 insertions(+)
10
11 diff --git a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
12 index e026f60..8461b33 100644
13 --- a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
14 +++ b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
15 @@ -3,6 +3,7 @@
16
17 #include "fu740-c000.dtsi"
18 #include <dt-bindings/interrupt-controller/irq.h>
19 +#include <dt-bindings/pwm/pwm.h>
20
21 /* Clock frequency (in Hz) of the PCB crystal for rtcclk */
22 #define RTCCLK_FREQ 1000000
23 @@ -30,6 +31,17 @@
24 soc {
25 };
26
27 + pwmleds {
28 + compatible = "pwm-leds";
29 + d12 {
30 + label = "green:d12";
31 + pwms = <&pwm0 0 7812500 PWM_POLARITY_INVERTED>;
32 + active-low = <1>;
33 + max-brightness = <255>;
34 + linux,default-trigger = "none";
35 + };
36 + };
37 +
38 hfclk: hfclk {
39 #clock-cells = <0>;
40 compatible = "fixed-clock";
41 --
42 2.7.4
43