[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ2_jOHoNnBF2UwU6G1vdvNrJAUJdGL_RncRAOaXMWoS03cagA@mail.gmail.com>
Date: Tue, 19 Mar 2019 11:56:35 +0530
From: Yash Shah <yash.shah@...ive.com>
To: Andreas Schwab <schwab@...e.de>
Cc: Palmer Dabbelt <palmer@...ive.com>, linux-pwm@...r.kernel.org,
linux-riscv@...ts.infradead.org,
Thierry Reding <thierry.reding@...il.com>, robh+dt@...nel.org,
mark.rutland@....com, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
Sachin Ghadi <sachin.ghadi@...ive.com>,
Paul Walmsley <paul.walmsley@...ive.com>
Subject: Re: [PATCH v9 0/2] PWM support for HiFive Unleashed
On Mon, Mar 18, 2019 at 10:56 PM Andreas Schwab <schwab@...e.de> wrote:
>
> On Mär 15 2019, Yash Shah <yash.shah@...ive.com> wrote:
>
> > You need to make sure the period setting is passed via the
> > conventional way in DT file.
> > Example:
> > pwmleds {
> > compatible = "pwm-leds";
> > heartbeat {
> > pwms = <&L45 0 10000000 0>;
> > max-brightness = <255>;
> > linux,default-trigger = "heartbeat";
> > };
> > };
>
> I've now managed to build a working FSBL with that change, but that
> didn't change anything. There is not even a heartbeat option in
> /sys/class/leds/heartbeat/trigger any more.
Below is the copy of the pwm nodes in my DTS file:
L45: pwm@...20000 {
compatible = "sifive,pwm0";
interrupt-parent = <&plic0>;
interrupts = <42 43 44 45>;
reg = <0x0 0x10020000 0x0 0x1000>;
reg-names = "control";
clocks = <&prci 3>;
#pwm-cells = <2>;
};
L46: pwm@...21000 {
compatible = "sifive,pwm0";
interrupt-parent = <&plic0>;
interrupts = <46 47 48 49>;
reg = <0x0 0x10021000 0x0 0x1000>;
reg-names = "control";
clocks = <&prci 3>;
#pwm-cells = <2>;
};
pwmleds {
compatible = "pwm-leds";
heartbeat {
pwms = <&L45 0 10000000 0>;
max-brightness = <255>;
linux,default-trigger = "heartbeat";
};
};
The above works for me.
I just noticed that I have been using pwm-cells = 2, instead of 3.
Maybe that is the problem here.
I will suggest you test it on v11 patch in which I will fix this
pwm-cells issue.
Thanks for pointing it out.
>
> Andreas.
>
> --
> Andreas Schwab, SUSE Labs, schwab@...e.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."
Powered by blists - more mailing lists